try to make it a tree. Store the changes that are made, instead of storing the entire class. Store the action that would undo the action.