pep8 fixes for cli and term