Fixes for Python 3 compatibility

Hi,

I had to change package dependencies and add class decorators so it works on Python 3. Please review and see if it fits.