Disable searching in the tree.
Redraw filter after every change.
Add column of buttons and event handler
Add a view class.
Move most of the logic from main to the view class.
Move button creaton loogic to common function.