Changed the indentation for cluster.cc
removed some code duplication