Finished initial python 3 porting, started work on test cases