Fix main typos and Pandoc syntax errors