changes email logic a bit, and style  a bit