Import graph analysis refactoring.