Reference refactoring