Updates to UnitOfWork/Repository pattern

also creation of tests