cluster mode management refactored