Add JSHint configs. Refactoring.
Fix typo.