Fixing py3 support and more tests