     apply-presentation-style
     nip ;
 
-TUPLE: nested-pane-stream < pane-stream style parent ;
+TUPLE: nested-pane-stream < style-stream parent ;
 
 : new-nested-pane-stream ( style parent class -- stream )
-    new
-        swap >>parent
-        swap <pane> apply-wrap-style [ >>style ] [ >>pane ] bi* ; inline
+    [ <pane> apply-wrap-style <pane-stream> swap ] 2dip boa ; inline
 
 : unnest-pane-stream ( stream -- child parent )
-    [ [ style>> ] [ pane>> smash-pane ] bi style-pane ] [ parent>> ] bi ;
+    [ style>> ] [ stream>> pane>> smash-pane style-pane ] [ parent>> ] tri ;
 
 TUPLE: pane-block-stream < nested-pane-stream ;
 


M: pane-stream stream-write-table
    [
        swap [ [ pane>> smash-pane ] map ] map
        styled-grid
    ] dip write-gadget ;


        add-incremental
    ] [ next-line ] bi ;

: smash-pane ( pane -- gadget )
    [ pane-nl ] [ output>> smash-line ] bi ;

: pane-write ( seq pane -- )
    [ pane-nl ] [ current>> stream-write ]
