further tweaks to template
small tweaks
fix scope in template
add email_from into template