+1, all that logic in graph.js did not make sense.