Started fixing the formatting.

The document was already pretty much markdown, but the syntax is still broken in places.