         spherePartitions.swap(nextSpherePartitions);
         rayPartitions.swap(nextRayPartitions);
 
-        cout << ToString(true) << endl;
+        cout << "\n ** Before Leaf removal **\n" << ToString(true) << endl;
 
         // *** Remove leafs ***
-        // CreateLeafNodes();        
-        // exit(0);
+        CreateLeafNodes();        
+
+        cout << "\n ** After Leaf removal **\n" << ToString(true) << endl;
     }
 
     CHECK_FOR_CUDA_ERROR();

        nextSpherePartitions.resize(nextPartitionSize);
        cudaFuncGetAttributes(&funcAttr, CreateNextPartitionings);
        blocksize = funcAttr.maxThreadsPerBlock > 256 ? 256 : funcAttr.maxThreadsPerBlock;
        blocks = (spherePartitions.size() / blocksize) + 1;
        CreateNextPartitionings<<<blocks, blocksize>>>
            (RawPointer(spherePartitions) + leafNodes,
             RawPointer(sphereLeftRightEntries),
             (uint4*)(RawPointer(nextSpherePartitions) + leafNodes),
             leafSphereIndices, activeNodes);
        CHECK_FOR_CUDA_ERROR();
        cout << "nextSpherePartitions:\n" << nextSpherePartitions << endl;

    spherePartitions.resize(cubes.Size());
    thrust::copy(h_spherePartitions.begin(), h_spherePartitions.end(), spherePartitions.begin());
}


std::string MortonDacrtNodes::ToString(const bool verbose) const {
    std::ostringstream out;
