run through jshint with minor fixes + moved to utility