email templates and cleanup.