Pretty much completely rewrote run_clustering.pl