report 1 on errors not -1
fix jshint warnings