QuadTree implemented for better performance

NEEDS TESTS!