Porting scripts over to python3