Refactor to consistent return values