Corrected the kNN functionality: Using a bounded priority queue (with bound=k) in order to save the k best results so far. I used http://www.stanford.edu/class/cs106l/handouts/assignment-3-kdtree.pdf for more details about the algorithm