Move with-prefix-eq and with-prefix-in to query parameters, and
some other miscellaneous cleanup.