added Grunt for jshint check
fixed jshint errors
added docs and cleaned up
make sure dialog editor has access to ctx