Refactor to use helper method for Markdown rendering