Making classes python2 compatible