Move demo code out of index.js.