First swing at refactoring for appropriate error codes
Review fixes
dur
MORE
HARDU