Slight math optimizations