quadtree class refactored