Functional refactoring of the calculator. Where did all the objects go