changed main.js to global.js, using 'use strict' for jslint