Refactor to Result->success/error