Fix JSHint errors.
Setup preferences first.