Tidy up template for views (in progress)