Remove rep_history global variable