Refactor referrals