Working on a query layer for all data resources

* Constuctors should use IO.query to find the relevant resource
* History generators should also user IO.query to search the history of a given object
* Most of the save/update logic is moving to IO.__save