Small refactoring in views.