fix some view code for pep8