Split query functions into a separate namespace.