Refactoring cluster builder