Corrected a lot regarding the SphereTree, but still bugs (probably in the final grouping phase).