KMeans updated

Cleanup up code.