Finished implementing frames-to-linear-segments