moves files to public and refactors server.js