tree add lookup ok
tree del ok
tree thread-safe done
fixed tree del
some code cleanup