Fix some jshint + remove duplicate helper