setup.py fix
New tests and some bugfixes
Python3 fix