First version of clustering
Implemented basic, sorta broken, clustering