Added jshint configuration file and fixed some warnings
Added license text to most source files
Fixed formatting in grunt config
All objects wrapped into IIFE and moved to namespace