JSHint + Documentation

- Fix JSHint warnings.
- Add inline documentation.