python 3, pep8 and other various updates