Fixed most of the JSHint errors.