pep8 and small fixes