autopep8 the codebase

Not finished yet, will also do a pylint and do the tests.