Adding a clustering algorithm factory and modifying some method signatures in the KMeans algorithm