make email format consistent, clean up mail template context