Ported code to python 3.
Adjusted readme.