Refactor region quadtree