Add flake8
Improve setup.py
Fix tests on master