Updated Calculator logic.