Python 3 compatibility

Fixes to enable use in python 3.
Added pip classifiers.