many bug fixes and html to markdown conversion (optional)