Initial work towards python 3 support

Some initial works about python 3 support :)