fixed infinite recursion bug of continually visiting both subtrees in kdtree.knnsearch, and fixed maxheap_insert in bpq.py since heapq.heappush needs to work with iterables for the elements, and cleaned up a lot of things