optimize _clean_intersections