Started rework of sockets