Make all code pep8 / flake8 compliant

Please install the following `flake8` pre-commit hook to make sure your code complies *before* committing in future:
```
flake8 --install-hook
```