Added a rebuild method for quadtrees