Make Visits table sortable by referral_id and date. #300