Clean history format