Refactor so no exceptions are thrown - upated status/errorcodes