More Python 3 porting