 
   # Copy the array of intersections
   nodes = []
-  console.log "copy begin"
   for id, node of intersections
     new_node = []
     for prop, val of node

console.log("Processing")

exports.nav = (req, res) ->
  start = req.query.start
  end = req.query.end
  res.send(astar(start, end))

astar = (start, end) ->

    new_node.id = id
    nodes[id] = new_node
  open_nodes = [start]
  start_node = nodes[start]
  end_node = nodes[end]
  start_node.g = 0
  start_node.f = distance(start_node.lat, start_node.lon, end_node.lat, end_node.lon)

  count = 0
  while open_nodes.length > 0
    count++
    # Sort the working nodes by f
