Fix PEP8 issues and run flake8