Finalizing code for evaluating dep graph