Adapt demo.js to the new index API