Changed error handling, fixed unhandeled exceptions, added it to all templates for identification, added better error handling to mail,