Much improved socket.io integration