Refactored UnitOfWork