Finish refactoring for cluster