make test python2 compatible, flatten classes