     @edges = []
 
   addEdge: (node) ->
-    @edges.push node
+    if node not in @edges
+      @edges.push node
 
 class Graph
 

  , (error) ->
    callback error, graph

exports.buildGraph = buildGraph

  proxy = GraphHandler.proxy contents, (dep) ->
    graph.addDependency current, dep

  locals.contents = proxy # TODO: don't modify locals

  async.eachSeries items, (item, callback) ->
    current = item
