Changed data structure reprsentation of KNN, wrote untested add code.