Refactoring for the Reference/Instance design pattern