more cleanup. Added mailer and test