Refactored code to represent KMeans within the clustering package.