Refactoring graph dependencies