Added global 'use strict' to main.js and updated code to avoid errors