Move private functions to correct section
Correct names for tree root variables
Simplify the map test case