Replacing instances of Collection with List including some type casting in Cluster.java.