moved amd boilerplate inside iife and added a few global vars to jshintrc