Move email template to app-state. Remove unused code.
Fix email template showing.