Update lambda_tau_for_trees

This includes main functions.