minor implementation fixes, added support for Node and establishing global in browser
minor implementation fixes, added support for Node and establishing global in browser