Added persistent undo history.