Refactoring md2 class