Add flake8 and fix its warnings.