Extracting PathNode union to a separate file