Browserify

Update tests
This really should be a much more lightweight wrapper around `document`. Don't copy/paste all the code.