Refactored common client cluster code into trait