various improvements for markdown