improve type stability by avoiding using a Dict{String, Any} as a tree and instead definining proper structs that can be recursive
#188
+76
−49