fix gui/portable for pull request #903
Reinsert --no-browser option. Move code to utils.main. Some other small style changes.