General code cleanup in the views