Refactored sockets.