Lots more socket library changes (Socket class)