Sped up reassign_centroids by quite a lot