 		//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//
 		   
 			//Free host pointers
-			free(hostvfield[0][0]);
-			free(hostvfield[0]);
-			free(hostvfield);
 			free(h_origins);
 			free(h_lines);
 			free(h_lengths);

			//Free the remaining device pointers
			cudaFree(d_origins);
			cudaFree(d_lines);
			cudaFreeArray(dataArray);
		}
	}


	//Allocate host array for the winding numbers
	float* h_windingdata = (float*) malloc(BIGnroflines*sizeof(float));

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

			float4 startloc = BIGstartloc + xindex/BIGgridSize.x * BIGxvec + yindex/BIGgridSize.y * BIGyvec;
			float4 xvec = BIGxvec * (gridSizeRK4.x/BIGgridSize.x);
