Improved error handling

Improved handling for some possible errors.  Worked a little on the deck
editor.