Add management command for retrieving referral data and fix model.
Tests!