Changed ArrayList to HashSet in KdTree