* refactored and fixed issues in TreeView