Refactoring MarkupParser