major refactoring, add more robustness, doc

- use a single API query for search too
- DRY: displayArticle() + startSpinner() = apiRequest()
- consolidate scattered comments into a single descriptive text
  at the top of file, for clearer reading and future reference
- make search more robust in case the term isn't found