I was adding a special page (dead-end pages), and I realized that almost all
the special query pages were pretty much identical. I copy-and-pasted one to
make the one I was working on, and I realized that that was Wrong.
So, I took the common elements and made them into a class, QueryPage.php.
Then, I derived each of the existing special pages from QueryPage, and
overrode places where they differed. This is a Recipe pattern, btw, for
those of you following along at home.
Anyways, the upshot is that the query pages are a lot shorter, with just the
essentials that make them different from other query pages, and there's one
place to make big UI changes for all queries.