Implemented a framework for history (undo/redo)