Added some socket.io functionality