Fix jshint; add some comments