Going to same endpoint, and some jshint fixes