A re-write of quadtree-js code.