 	float4 *d_origin;
 	checkCudaErrors(cudaMalloc(&d_origin, 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, BIGnroflines*sizeof(float));
 	if (status != cudaSuccess)
 		printf("Error allocating pinned host memory.\n");
-	//Allocating Origins
-
-	float4 *d_normals;
-	checkCudaErrors(cudaMalloc(&d_normals, dataCount*sizeof(float4)));
-	float4 *d_normal;
-	checkCudaErrors(cudaMalloc(&d_normal, sizeof(float4)));
-
-
-	//Allocating the array to store the radius data, both for host and device
-	float *d_radius, *d_radiimin, *d_radiimax;
-//	      *h_radii;
-	checkCudaErrors(cudaMalloc(&d_radiimin, dataCount*sizeof(float)));
-	checkCudaErrors(cudaMalloc(&d_radiimax, dataCount*sizeof(float)));
-	checkCudaErrors(cudaMalloc(&d_radius, sizeof(float4)));
-
-	//Allocating arrays to store the alpha and beta data to compute winding numbers.
-	float *d_alpha, *d_beta;
-	checkCudaErrors(cudaMalloc(&d_alpha, dataCount*sizeof(float)));
-	checkCudaErrors(cudaMalloc(&d_beta, dataCount*sizeof(float)));
-
-	std::cout << "Je moeder is mis" << std::endl;
 	RK4init<<<gridSizeRK4,blockSizeRK4,0>>>(d_lengths, BIGstartloc, BIGxvec, BIGyvec);
 	reduceSum<float><<<gridSizeRK4.x*gridSizeRK4.y/2,blockSizeRK4.x*blockSizeRK4.y,blockSizeRK4.x*blockSizeRK4.y*sizeof(float)>>>
 		(d_lengths, d_lengths);


	//Set integration parameters (end time, number of steps, etc.)
	const int blockSize = 1024;
	unsigned int steps = 8*blockSize;
	float dt = 0;

	dim3 BIGgridSize(32,32);


	cudaFree(d_radiimin);
	cudaFree(d_radiimax);
	
	//Declaring arrays to save the winding data
	float *d_alpha, *d_beta;
	checkCudaErrors(cudaMalloc(&d_alpha, dataCount*sizeof(float)));
	checkCudaErrors(cudaMalloc(&d_beta, dataCount*sizeof(float)));

	//Set up streams for independent execution
	cudaStream_t RK4, windings, windings2, lengths;
