Added method updateReactionEquationsForUndo...

to replace large segments of code in two methods.