Error correcting patch - graph building phase
Refactoring