Bugfixes and slight refactoring of View.