Test rig for querying

Not sure if this is a good idea yet!