Cluster algorithm and related files