Updated for Socket.IO