Socket logic moved to routes.js