nextFrame -> requestFrame, improve request.js
improve linting, put DOCUMENT and HTML constants back