   ## Examples 
 
     iex(1)> Wadler.text "Hello, World!"
-    Wadler.TEXT[string: "Hello, World!"]
+    Wadler.DocText[str: "Hello, World!"]
 
     iex(2)> IO.puts Wadler.pretty(80, v(9))
     Hello, World!
     :ok
 
   """
-  @spec text(binary) :: TEXT.t
-  def text(s) when is_binary(s), do: TEXT[string: s]
-  
-  @doc """
-  Document entity representation of a line break. It's
-  the place where nesting spaces get appended. `group`
-  of a document entity will transform lines breaks in
-  single space characters and `group1` of a document
-  will transform line breaks into NIL.
-
-  ## Examples
-
-    iex(1)> Wadler.line
-    LINE
-    
-    iex(2)> Wadler.group v(1) # flatten is called here
-    Wadler.UNION[left: Wadler.TEXT[string: " "], right: LINE]
-
-    iex(3)> Wadler.group1 v(1) # shrink is called here
-    Wadler.UNION[left: NIL, right: LINE]
-
-    iex(4)> IO.puts Wadler.pretty(80, v(1))
-
-
-    :ok
-
-  """
-  @spec line() :: LINE
-  def line, do: LINE
-
-  @doc """
-  Returns a single space character of glue text.
-
-  Glue text is only visible in multiline layouts.
-  Call to both `group` and `group1` of a document
-  destroys glue.
-
-  ## Examples
-
-    iex(1)> Wadler.glue
-    Wadler.GLUE[string: " "]
-
-    iex(2)> Wadler.group v(1)
-    Wadler.UNION[left: NIL, right: Wadler.GLUE[string: " "]]
-
-    iex(3)> Wadler.group1 v(1)
-    Wadler.UNION[left: NIL, right: Wadler.GLUE[string: " "]]
-
-    iex(4)> IO.puts Wadler.pretty(80, v(1)) # There is a space down there!
-     
-    :ok
-
-  """
-  @spec glue() :: GLUE.t
-  def glue(), do: GLUE[string: " "]
-
-  @doc """
-  Makes glue text from a binary.
-
-  Glue text is only visible in multiline layouts.
-  Call to both `group` and `group1` of a document
-  destroys glue.
-
-  ## Examples
-
-    iex(1)> Wadler.glue "foo"
-    Wadler.GLUE[string: "foo"]
-
-    iex(2)> Wadler.group v(1)
-    Wadler.UNION[left: NIL, right: Wadler.GLUE[string: "foo"]]
-
-    iex(3)> Wadler.group1 v(1)
-    Wadler.UNION[left: NIL, right: Wadler.GLUE[string: "foo"]]
-
-    iex(4)> IO.puts Wadler.pretty 80, v(1)
-    foo
-    :ok
-
-    iex(5)> IO.puts Wadler.pretty 80, v(2)
-
-    :ok
-
-  """
-  @spec glue(binary) :: GLUE.t
-  def glue(x) when is_binary(x), do: GLUE[string: x]
+  @spec text(binary) :: DocText.t
+  def text(s) when is_binary(s), do: DocText[str: s]
+
+  
+  @doc """
+  Document entity representating a break. This break can
+  be rendered as a linebreak or as spaces, depending on the
+  `mode` of the chosen layout or the provided separator.
+  
+  ## Examples
+
+    iex(2)> Wadler.break "hello"
+    Wadler.DocBreak[str: "hello"]
+   
+    iex(3)> Wadler.break        
+    Wadler.DocBreak[str: " "]
+
+    iex(4)> Wadler.concat(
+              Wadler.concat(
+                Wadler.text("a"), Wadler.break), Wadler.text("b"))
+
+    iex(5)> Wadler.render Wadler.format w, 0, [{0, Wadler.Flat, v(4)}]
+    "a b"
+
+    iex(6)> Wadler.render Wadler.format w, 0, [{0, Wadler.Break, v(4)}]
+    "a\nb"
+
+  """
+  @spec break(binary) :: DocBreak.t
+  def break(s) when is_binary(s), do: DocBreak[str: s]
+
+  @spec break() :: DocBreak.t
+  def break(), do: DocBreak[str: " "]
 
   @doc"""
-  Inserts single space glue between two docentities.
-  """
-  @spec glue(docentity, docentity) :: CONCAT.t
-  def glue(x, y), do: concat(x, concat(glue, y))
+  Inserts a break etween two docs.
+  """
+  @spec glue(doc, doc) :: DocCons.t
+  def glue(x, y), do: concat(x, concat(break, y))
 
   @doc"""
-  Inserts glue, passed as second argument between
-  docentity, passed as the first argument and
-  docentity, passed as the third argument.
-  """
-  @spec glue(docentity, binary, docentity) :: CONCAT.t
-  def glue(x, g, y) when is_binary(g), do: concat(x, concat(glue(g), y))
-
-  @doc """
-  Returns a union of a document entitiy in
-  which left document entity is flattened 
-  version of the initial document and right
-  document entity is the initial document
-  entity.
-
-  ## Examples
-
-    iex(1)> Wadler.group(Wadler.concat(Wadler.group(
-    ...(1)>                                         Wadler.concat(Wadler.text("Hello,"),
-    ...(1)>                                                       Wadler.concat(Wadler.line,
-    ...(1)>                                                                     Wadler.text("A"))
-    ...(1)>                                         )),
-    ...(1)>                            Wadler.concat(Wadler.line,
-    ...(1)>                                          Wadler.text("B"))
+  Inserts a break, passed as second argument, between two docs,
+  the first and the third argument.
+  """
+  @spec glue(doc, binary, doc) :: DocCons.t
+  def glue(x, g, y) when is_binary(g), do: concat(x, concat(break(g), y))
+
+  @doc """
+  Returns a group containing the specified document.
+  ## Examples
+
+    iex(1)> Wadler.group(
+    ...(1)>   Wadler.concat(
+    ...(1)>     Wadler.group(
+    ...(1)>       Wadler.concat(
+    ...(1)>         Wadler.text("Hello,"),
+    ...(1)>         Wadler.concat(
+    ...(1)>           Wadler.break,
+    ...(1)>           Wadler.text("A")
+    ...(1)>         )
+    ...(1)>       )
+    ...(1)>     ),
+    ...(1)>     Wadler.concat(
+    ...(1)>       Wadler.break,
+    ...(1)>       Wadler.text("B")
+    ...(1)>     )
     ...(1)> )) # Output is prettified for readability.
-    UNION[
-      left:CONCAT[
-        left:CONCAT[
-          left:TEXT[string: "Hello,"]
-          right:CONCAT[
-            left:TEXT[string: " "]
-            right:TEXT[string: "A"]]]
-        right:CONCAT[
-          left:TEXT[string: " "]
-          right:TEXT[string: "B"]]]
-      right:CONCAT[
-        left:UNION[
-          left:CONCAT[
-            left:TEXT[string: "Hello,"]
-            right:CONCAT[
-              left:TEXT[string: " "]
-              right:TEXT[string: "A"]]]
-          right:CONCAT[
-            left:TEXT[string: "Hello,"]
-            right:CONCAT[
-              left:LINE
-              right:TEXT[string: "A"]]]]
-        right:CONCAT[
-          left:LINE
-          right:TEXT[string: "B"]]]]
+    Wadler.DocGroup[
+      doc: Wadler.DocCons[
+        left:  Wadler.DocGroup[
+          doc: Wadler.DocCons[
+            left:  Wadler.DocText[str: "Hello,"], 
+            right: Wadler.DocCons[
+              left:  Wadler.DocBreak[str: " "], 
+              right: Wadler.DocText[str: "A"]
+            ]
+          ]
+        ], 
+        right: Wadler.DocCons[
+          left:  Wadler.DocBreak[str: " "], 
+          right: Wadler.DocText[str: "B"]
+        ]
+      ]
+    ]
 
     iex(2)> IO.puts Wadler.pretty(80, v(1))
     Hello, A B


  ## Examples

    iex(1)> Wadler.nest(5, Wadler.concat(Wadler.line, Wadler.text("6")))
    Wadler.NEST[indent: 5, rest: Wadler.CONCAT[left: LINE, right: Wadler.TEXT[string: "6"]]]

    iex(2)> IO.puts Wadler.pretty(80, v(1))
    

    :ok

  """
  @spec nest(non_neg_integer, doc) :: DocNest.t
  def nest(i, x) when is_integer(i), do: DocNest[indent: i, doc: x]

  @doc """
  Document entity representation of a text.
