Use a quadtree to avoid duplicate nodes

TODO: Add edges