Refactor ref data more