Global error trapping and logging.
Some leftover tweaks.

Encourage browsers to use modern standards modes.
Ask older versions of IE to to use standards instead of quirks mode.