cleanup and flake8