Added (hopefully functioning) kmeans implementation