Reorganizing server.js