clean up some of the error/response handling, refs #2