Cleanup email boilerplate code.