Setup testing via tox and pytest
Fix flake8 errors