Modified code to pretty up views