Flake8 & CGI port

- Flake8 cleaning
- Generator imports from cgi [in progress]