Restarted refactor of dao to return status codes correctly.