improved quadtree search

initial dist is now based on the size of the tree.
clipping the box of interest to the tree bounds.