Remove require from env, fix XHR shim for multiple requests