Pass unit tests and flake8