Added bewit generation to browser.js, as well as corresponding unit test...

... cases