Small integer optimizations

Calculating before getting the int to add it to.