I made a lot of changes and added a new class PipeConnectorSwitch