Refactored Markdown methods