Updated to latest XSockets version and simplified