Some modifiations of main.js.