Topic/refactor ref