Minimizing duplicated lines in timelines