Persistent undo history, and some other tweaks.