Changes and adaptations for getting a working version in Python 2 and Python 3. New dependency: future