Socket added.
Moved functions to Client.