fixed jshint errors
added beforeSend to node version of ajax.js
xhr parameter is null in this case as it does not exist