Adding network communication code to the client