python3, pep8 and various other updates