Bugfix about resources not serving correct values + small jshint fixes