update tree metadata
init code refactor
add nodes
bugfix
add treemetadata.index
add treemetadata.nodex
fix serialize function
code cleanup