Adapt to API changes

The index.html and js/main.js are now simplified.