Refactor gen_tree attribute one more time.