use doit to run jshint
jshint fixes. refactoring.