added email service, renamed and refactored methods, updated tests