Made some changes to the Tenant Service and Repository.