Simplify cluster code a bit