Cleanup
Fix simple python 3 incompatibilities