various minor changes, still a bug in spherical kmeans implementation