Fixed a number of JSHint errors.