Undo nearly complete

Everything but a size check on the undo list is done.