Finish up clean_history script