Enhanced link attribution, 404 logging.

Not sure if 404/error logging needs encodeURIComponent.
Tab highlights
Some template filler to push to master.