Refactored the very long server.js file into several modules.