Added QueryRepository and abstracted DataModelEntityManager