Extract code into GenericCommProtocol