Separated out code in server.js into modular files