Modes separated, socket.io connection added