fixing and cleaning up code
deleted mailer.js
added mailer.js
merged