Refactor the solution code.
Add Email service.