Started refactoring of MmdTool