More refactoring of CM client