Better polyline generation.