Converted to format()

And other python3 improvements