Moved Markdown to HTML conversion into separate function.