update tree.ess.R to work properly

a few fixes. This now works as it should.