Remove require from env, fix XHR shim for multiple requests
Fixes for XHR shim
Rewrite xhr shim for XMLHttpRequest2