began refactoring tree view