Some changes, pep8 fixes