Misc tweaks
Fix
Support for prettier critical errors - log and email, and show the user something more like a fail-whale
Small tweaks to structure, to aid customisation of templates