Add tests for apropos middleware.

Also, update some comments.