A flexible multi-mode undo mechanism for a collaborative modeling environment