Rename types, add tests for tree module