Obvious steps for porting it to py3