Create/delete/modify tree nodes

@m1ch1  Welcome back!
these pull requests don't contain session feature.
Also now I'm using json for directory as well as file since I feel it's more consistent to do in this way, we can discuss further if you have different opinions.