Refactoring MailModel and EmailTemplate