Slight refactor to ensure the right status codes are being utilized.