Refactored Quadtree