Changes to use div rather than mod.