improvements to style, email sending