More full-featured undo stack (+example tweaks)