Why did this get moved into the listener from the JS file? Is this the right/better place for it?

If it was soly because of the JSLint errors we can fix those no sweat!