Socket.io improvements