Kmeans cleanup

I see, so it makes sense to have it in the base class. Thanks!