Moved server.js stuff to index.js