Store change count for redo/undo. Fix writeInt for node name contains number.