Added email template
Test case for email template
Code cleanup