Refactoring to convert markdown to html on the server. Other various cleanups and tweaks.