Refactored Quadtree class