Wouldn't it be better to return a new `Path` object with the vertices and codes in it?