TreeView class refactored.