Some email service refactoring.
Added email service tests.
Added email service template with multiple data inputs.