Refactored CM code to separate sms4j-cm project.