Moving testing code to separate file and cleaning up KMeans implementations.