Changes to work with CM/SM refactoring