Undo works same as last for metabolites table

Last push was for reactions table only. Code cleaned up for reactions
table.