Added flake8 scripts and fixed all errors reported by those scripts.