Some python 3 compatibility
Some more of python 3