simplified tests and added headers to emailTemplates.