fixes for pylint and pep8

Several fixes after running pylint and pep8 tools