Additional tweaks in the calculator function.