Remove some repetitive math.