Remove viewmode and old state object

This branch removes the old unused viewmode state code and state object. There should be no user facing changes to this, simply code removal

#### To QA
Do some exploratory QA around views changing in the sidebar, everything should work as expected.