Code cleanup and Confirmation e-mail script