remove unused imports, minor formatting cleanup
add flake8 config file