Fixed scaling again. Fixed JSLINT issues