Add new unit tests, Improve tree types