Adding "improved" kNN, kNN2. Fixes explained in comments.
Added improved knn