Rejig of referrals function - now turned into object