Replace Implicit Tree With Composite

Problem:

You implicitly form a tree structure, using a primitive representation, such as a String.

Solution:

Replace your primitive representation with a Composite.