Minimal change in the way appModel is called

Instead of adding to appModel's List todos directly, a function is called.