Clustering

Adding clustering abilities (not finished)