Improve the way tracksegments are handled