Updated isolated section of prune_clusters in cluster.py.