Add setup.py and unit tests
Fix Flake8 warnings
Python 2.6+ style-changes