Fix TypeError: a new-style class can't have only classic bases
Fixing import for python 3+2
Python2 compatibility