Eliminate num_active_nodes variable