Remove unncessary referral variables.