Error handling cleanups refs #31