Updated the email and sms templates to use objects