 				(d_radii,d_radii);
 
 			//Copy radii from device to host
-//			checkCudaErrors(cudaMemcpy(h_radii, d_radii, (dataCount/steps)*sizeof(float), cudaMemcpyDeviceToHost));
-
-			//r_radii are still needed, so no memory free just yet.
+
+			//d_radii are still needed, so no memory free just yet.
 
 		//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//
 

	//Allocate space to store origin data
	float4 *d_origins, *h_origins;
	checkCudaErrors(cudaMalloc(&d_origins, dataCount/(2*blockSize)*sizeof(float4)));
	h_origins = (float4*) malloc((dataCount/steps) * sizeof(float4));

	//Allocating the array to store the length data, both for host and device
	float *d_lengths, *h_lengths;
	checkCudaErrors(cudaMalloc(&d_lengths, dataCount*sizeof(float)));
	status = cudaMallocHost((void**)&h_lengths, (dataCount/steps)*sizeof(float));
	if (status != cudaSuccess)
		printf("Error allocating pinned host memory.\n");

	//Allocating the array to store the radius data, both for host and device
	float *d_radii, *h_radii;
	checkCudaErrors(cudaMalloc(&d_radii, dataCount*sizeof(float)));
	h_radii = (float*) malloc((dataCount/steps)*sizeof(float));

	//Allocating arrays to store the alpha and beta data to compute winding numbers.
	float *d_alpha, *d_beta;

	for (int yindex = 0; yindex < BIGgridSize.y; yindex += gridSizeRK4.y) {
		for (int xindex = 0; xindex < BIGgridSize.x; xindex += gridSizeRK4.x) {

			std::cout << "x" << std::flush;
			float4 startloc = BIGstartloc + ((float)xindex/BIGgridSize.x) * BIGxvec + ((float)yindex/BIGgridSize.y) * BIGyvec;
			float4 xvec = BIGxvec * ((float)gridSizeRK4.x/BIGgridSize.x);
			float4 yvec = BIGyvec * ((float)gridSizeRK4.y/BIGgridSize.y);

			int globaloffset = yindex*blockSizeRK4.y*BIGgridSize.x*blockSizeRK4.x+xindex*blockSizeRK4.x;

			int hsize = gridSizeRK4.x*blockSizeRK4.x;
			int vsize = gridSizeRK4.y*blockSizeRK4.y;

		//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//

