Move core query functions into a data/core namespace.