TreeView / Grid refactoring