Graph minor refactor.