fix jshint and tidy up brocfile