Replaced deprecated type, PathElement with Segment