Reformatting view code