Added six compatibility layer (for Python 3)