Adds treeview features
Fix bug in build2 where child was missing from value
Cleans the code a bit.
Renames build function in client module