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