Python3 compatible + pretify source

Hi guys,
I have introduced bunch of changes into API to make it more compatible with the original API. On top of that I made few changes so the project is supposed to run above python3 and python2.

It definitely requires more testing since I didn't have much time recently. But I'll look at it in near future.

If we incorporate this pull request some other people can speed up testing :)