style(graph) Refactore code.