Md refactoring