Calculate largest cluster size.
Stylistic/optimization tweaks.
Merge branch 'master' into cache
Stylistic/optimization tweaks to foreach loops.