Markdown editor and some fixes