WIP. Merged query and history data services back.