                          int16_t* predecessors)
 {
     uint16_t node_id = graph[max_score_id_pos];
+
+    // Go through all the outgoing edges of the node, and for
+    // each of the end nodes of the edges clear the scores
+    // for all the _other_ nodes that had edges to that end node.
     uint16_t out_edges = outgoing_edge_count[node_id];
     for(uint16_t oe = 0; oe < out_edges; oe++)
     {


    for(uint16_t graph_pos = 0; graph_pos < node_count; graph_pos++)
    {
        //printf("%d\n", max_score_id);
        uint16_t node_id = graph[graph_pos];
        //printf("node id %d\n", node_id);
        uint16_t in_edges = incoming_edge_count[node_id];

        int32_t score_node_id = scores[node_id];
        for(uint16_t e = 0; e < in_edges; e++)
        {
            uint16_t edge_w = incoming_edge_w[node_id * CUDAPOA_MAX_NODE_EDGES + e];

        scores[node_id] = score_node_id;
    }

    // If the node with maximum score isn't a leaf of the graph
    // then run a special branch completion function.
    if (outgoing_edge_count[max_score_id] != 0)
    {
        while(outgoing_edge_count[max_score_id] != 0)
