Made a few modifications to kd tree preparing to implement threading.