Implemented connection and disconnection of peripherals