Tested all repository tests fixed errors