Some refactoring and some experiments with Knn topic detection