Fixing undo system, there is more to do yet