Cleanup of tree listening in basic tree window