Added modules and changed structure of app.js
socket changes