     # IO.inspect partial(body)
     # IO.inspect body
     # IO.inspect partial(body)
-    IO.inspect get_shadow_buffer(body) == body
-
-    # IO.inspect collect_scripts(body, 0)
-    # IO.inspect(IO.iodata_to_binary(body))
-    # IO.inspect to_html(body)
-    # b = [body]
-    # Macro.prewalk(b, [], fn node, acc -> 
-    #   IO.inspect node
-    #   {nil, nil}
-    # end) 
-    # :ok = stop_shadow_buffer(var!(shadow_buffer, Drab.Live.EExEngine))
-    stop_shadow_buffer(body)
+
     init_js = "if (typeof window.#{@jsvar} == 'undefined') {window.#{@jsvar} = {}; window.#{@jsvar}.assigns = {}}"
-    {:safe, [script_tag(init_js), body, "\n</span>\n"]}
+    final = [script_tag(init_js), body, "\n</span>\n"]
+    put_shadow_buffer("\n</span>\n")
+
+    Drab.Live.Cache.set({:shadow, partial(body)}, get_shadow_buffer() |> Floki.parse())
+    IO.inspect partial(body)
+
+    stop_shadow_buffer()
+
+    {:safe, final}
   end
 
   @doc false
   def handle_text({:safe, buffer}, text) do
-    shadow = quote do
+    put_shadow_buffer(text)
+    {:safe, quote do
       [unquote(buffer)|unquote(text)]
-    end
-    # IO.puts ""
-    # IO.inspect buffer
-    put_shadow_buffer(buffer, shadow)
-    {:safe, shadow}
+    end}
   end
 
   @doc false

    expr = Macro.prewalk(expr, &handle_assign/1)

    # Decide if the expression is inside the tag or not
    shadow = if Regex.match?(~r/<\S+/, no_tags(html)) do
      inject_attribute(buffer, expr, line, html)
    else
      if in_script?(html) do

  @doc false
  def handle_expr({:safe, buffer}, "", expr) do
    expr = Macro.prewalk(expr, &handle_assign/1)
    {:safe, quote do
      tmp2 = unquote(buffer)
      unquote(expr)
      tmp2
    end}
  end

  @doc false
