Updated NetworkClient to use an event driven design instead of having a hard dependency on the Server class