Bugfixes

A bunch of bugfixes that make the views work better.