Flake8 support

This extends the already existing PEP8 checks and fixes a few warnings and errors found by it.