Moved connect function from device to deviceManager