Improve BNetworkConnection; fix warnings