Added start of support for markdown.
Misc cleanups.