Fixed many bugs, rewrote some methods

Fixed null metabolite abbreviation in metaboliteIdNameMap bug. Rewrote
undo/redo methods for easier troubleshooting.