Removed more subtractions and a multiplies from calculating a memory location by using a pre-calculated lookup table.