Refactor Result class.