Refactoring done. Better kMeans algorithme