Add logging and mailing modules, add email template handling functions to event model