applyButton_Click refactoring populateTreeView