Seperated out server.js logic into seperate files