 	double yMax = 30;
 	double zMin = -30;
 	double zMax = 30;
-	double rMin = 1;
-	double rMax = 20;
+	double rMin = .1;
+	double rMax = 1;
 
 	vector<Sphere> spheres;
 
 	Sphere sphere;
-	for(int i=0;i<numSpheres;i++)
-	{
-		sphere.pos = make_real3(getRandomNumber(xMin,xMax),getRandomNumber(yMin,yMax),getRandomNumber(zMin,zMax));
-		sphere.r = getRandomNumber(rMin,rMax);
+	for (int i = 0; i < numSpheres; i++) {
+		sphere.pos = make_real3(getRandomNumber(xMin, xMax), getRandomNumber(yMin, yMax), getRandomNumber(zMin, zMax));
+		sphere.r = getRandomNumber(rMin, rMax);
 		sphere.index = i;
 
 		//printf("Sphere %d pos = (%.3f, %.3f, %.3f), r = %.3f\n",i,sphere.pos.x,sphere.pos.y,sphere.pos.z,sphere.r);

	custom_vector<long long> potentialCollisions;

	Broadphase broadphaseManager;
	broadphaseManager.setBinsPerAxis(make_real3(50,50,50));

	cout << "Begin parallel broadphase" << endl;
	double startTime = omp_get_wtime();
	broadphaseManager.detectPossibleCollisions(aabb_data, potentialCollisions);
	double endTime = omp_get_wtime();
	printf("Time to detect: %lf seconds (%d possible collisions)\n", (endTime - startTime),broadphaseManager.getNumPossibleContacts());
	cout << "End parallel broadphase\n" << endl;

	thrust::host_vector<long long> potentialCollisions_h = potentialCollisions;
	thrust::host_vector<int2> gpuCollisions;
	for (int i = 0; i < broadphaseManager.getNumPossibleContacts(); i++)
	{
		int2 collisionPair;
		collisionPair.x = int(potentialCollisions_h[i] >> 32);
		collisionPair.y = int(potentialCollisions_h[i] & 0xffffffff);

	// Step 2: Generate aabb_data from spheres
	custom_vector<real3> aabb_data;

	for (int i = 0; i < spheres.size(); i++) {
		real3 temp = spheres[i].pos;
		temp.x -= spheres[i].r;
		temp.y -= spheres[i].r;
		temp.z -= spheres[i].r;
		aabb_data.push_back(temp);
	}
	for (int i = 0; i < spheres.size(); i++) {
		real3 temp = spheres[i].pos;
		temp.x += spheres[i].r;
		temp.y += spheres[i].r;
		temp.z += spheres[i].r;
		aabb_data.push_back(temp);
	}
	// End Step 2
