Refactor cluster deployment