move the navigation of segments within edges into its own module