Fix flake8 with max complexity 12.
Make it compatible with Python 3.
Fix invalid classifiers in setup.py