Adding some path segment parsing and manipulation