Updated index.js to not have 'state' socket