New metaquery api

Currently a work in progress
Sounds reasonable…