Bugs resolved; tree method added;