Some cleanups around the views class as I write tests on the client side
Some code cleanup and minor bugfixes for issues found from writing tests