Additional strict JS fixes

Complete JS file is now strict standards compliant