(Algorithms1, week5) Improvements and bug fixes to KdTree.java