Introduce nitems() and use it; use bsearch.

9 files changed