Adding in the mail wrapper integration, and cleaning up the code a bit.
Finish debugging the mail wrapper integration, tweak the JS, and clean up the code a bit more.