getNextPipe now returns the Pipe object.