Replace ~ by Box.
Use &mut for the treehandler callbacks.