Update to IRepository and tests