Minor clean-up on the partial function. Added a redirect and a send_email function as nice little helpers