Added Markdown support and other fixes