Fixed some details to pass in JsLint