application modularisation setup

splitting out the server.js file to modularise the project, amending various folder names and generally tidying things up