divided server.js into separate files to separate concerns