cms refactoring