Fixed indentation (spaces), removed trailing slashes. JavaScript files now conform to JSHint (and mostly to JSLint, too).