Refactoring LayerTree
Refactoring LayerTree