Remove double integer conversions

There are some strings in the code that are being converted twice to integers, and this optimizes that.