Hide tree view element when not search tree is not visible.
Remove commented code and cleanup whitespace.