code cleanups (import order, flake8, etc.)