pep8 and removed unnecessary code