add toStringSingleLine
decouple browser.js from shared.js