better tests and python3 fixes