Format section headers, fix links, prettify TOC links