Added undo/redo feature