Hi Dave,
I have developed an app like yours few years ago, I used the Command
Pattern which is great to handle actions and their undos.
You'll find a brief description
here and the basic design
here If you google using command pattern you will find a lot of articles, tutorials etc.
I hope this helps!
Giovanni