Refactor manager and uow