Tidy up the views code a weebit.