Ran JsHint, fixed minor syntax defects