Python3 support
Refactored test methods