Refactoring. DiGraph init.