A little cmm refactoring