Kmeans cleanup

Yes, we want to avoid *any* duplicate code in both of the classes. If there are batches of the same/similar code, move it into a helper method in the base class. Let me know if it's not clear to you