fix some jshint issues and ignore others
Be strict
Fix all jshint issues for the preview and move to separate js file for jshinting convenience