This commit brings all tests to a passing state.
Fix flake8 warnings.