Remove viewmode from browser.js

Sorry about the huge diff!

This branch removes all reliance of the `viewmode` property, it also removed some old unused legacy code and the minimized view.