added persistent undo, moved swap and backup