Add some client-side debugging to browser.js

Perform minor code formatting changes