Remove wildcard import and fix flake8 errors