Undo Protection

Protects against errors when user undos too many times.  Uses try-catch
blocks to prevent nullpointer exceptions