Changes to improve the socket communication.
Unsuccessful...