Additional consistency checks for UnitOfWork and better documentation