refractored socket.io away