Improved anchor emitting.
Simplified TOC links in generated HTML.