Refactored so that request verification is contained w/i a function (instead of global scope)