Move some pipe management into PipePair

Most notably, PipePair now has an update method to update its position.