Minor revisions to main.js.