Added socket.io and basic functions