Slightly simplified index.html and server.js code