Heavily commented index.js.