Refactoring MM for PaaS