Added EmailSender
Minor refactoring