Removes some unused code from the views.