Move socket listeners to app.js