Modified main.js and main controller.