Switch to divMod
Use more (.)
Avoid using `undefined` even when we know it will not be evaluated