fixed some errors jshint reported. Nice to have that in place actually.