Few changes in network client class

> The bug causing client to think it's still connected to the server
even though the communication channel was already closed should be now
fixed.
> Rearranged some method declarations.