memory optimizations, improved removeEmptyEdges & sortEdgesPerCube functions, Included code for the merge tree to store the halo size as well