Add new tests, improve tree node