Kmeans cleanup

isnt this also something that might be better handled via a polymorphic approach?