Initial implementation of clustering activity (correctness check still missing)