Add tests for apropos middleware.

Also, updates some comments.