Significant progress on Dataquery functionality and oranisation of code around it