diff --git a/Nemesis b/Nemesis
--- a/Nemesis
+++ b/Nemesis
@@ -1,4 +1,9 @@
-nemesis = do
+import System.Nemesis.Titan
+import System.Nemesis.Env
+import Air.Env
+import Prelude ()
+
+main = run - do
   
   clean
     [ "**/*.hi"
@@ -30,3 +35,7 @@
   desc "run-test"
   task "run-test" - do
     sh "runghc -isrc src/test.hs"
+  
+  titan "Main.hs"
+  
+  task "t:Main/titan" end
diff --git a/moe.cabal b/moe.cabal
--- a/moe.cabal
+++ b/moe.cabal
@@ -1,5 +1,5 @@
 Name:                 moe
-Version:              2011.6.14
+Version:              2013.6.22
 Build-type:           Simple
 Synopsis:             html with style
 Description:
@@ -14,23 +14,25 @@
 Cabal-version:        >= 1.2
 category:             Web
 homepage:             https://github.com/nfjinjing/moe
-data-files:           readme.md, changelog.md, known-issues.md, Nemesis, src/test.hs
+data-files:           readme.md
+                    , changelog.md
+                    , known-issues.md
+                    , Nemesis
+                    , src/Main.hs
 
 library
 
-  build-depends: base >= 4 && < 5, mtl, air >= 2011.6.18, data-default, bytestring, utf8-string, dlist
+  build-depends:      base >= 4 && < 99
+                    , mtl
+                    , air >= 2013.6.22
+                    , data-default
+                    , bytestring
+                    , utf8-string
+                    , dlist
+                    
   hs-source-dirs: src/
+  
   exposed-modules:  
-                      Text.HTML.Moe   
-                      Text.HTML.Moe.Attribute
-                      Text.HTML.Moe.Element
-                      Text.HTML.Moe.DSL.Markdown
-                      Text.HTML.Moe.DSL.Kawaii
-                      Text.HTML.Moe.DSL.HTML5
-                      Text.HTML.Moe.Type
-                      Text.HTML.Moe.Utils
-                      Text.HTML.Moe.Backend.ByteString
-                      
                       Text.HTML.Moe2   
                       Text.HTML.Moe2.Attribute
                       Text.HTML.Moe2.Element
@@ -42,9 +44,8 @@
 
                       Text.HTML.Moe2.Type
                       Text.HTML.Moe2.Utils
-
                       
-  other-modules:
-                      Text.HTML.Moe.Backend.DList
+                      Text.HTML.Moe2.Backend.ByteString
+
                       
                       
diff --git a/readme.md b/readme.md
--- a/readme.md
+++ b/readme.md
@@ -50,6 +50,3 @@
       </body>
     </html>
     
-<br />
-
-![luba](https://github.com/nfjinjing/moe/raw/master/luba.jpg)
diff --git a/src/Main.hs b/src/Main.hs
new file mode 100644
--- /dev/null
+++ b/src/Main.hs
@@ -0,0 +1,23 @@
+module Main where
+
+import Prelude hiding ((/), (-), head, (>), (.), div)
+import Air.Light ((-))
+import Text.HTML.Moe2
+import System.Nemesis.Titan
+
+test_page :: String
+test_page = render -
+  html - do
+    head - do
+      meta ! [http_equiv "Content-Type", content "text/html; charset=utf-8"] - (/)
+      title - str "my title"
+      link ! [rel "icon", _type "image/png", href "panda_icon.png"] - (/)
+  
+    body - do
+      div ! [_class "container"] - do
+        str "hello world"
+
+main :: IO ()
+main = do
+  putStrLn test_page
+  halt
diff --git a/src/Text/HTML/Moe.hs b/src/Text/HTML/Moe.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe.hs
+++ /dev/null
@@ -1,101 +0,0 @@
-{-# LANGUAGE NoMonomorphismRestriction #-}
-
-module Text.HTML.Moe
-(
-    module Text.HTML.Moe.Element
-  , module Text.HTML.Moe.Attribute
-  , (/)
-  , render
-  , render'
-)
-where
-
-import Control.Monad.Writer (execWriter)
-import Prelude hiding ((/), (-), head, (>), (.), concat, concatMap, (+))
-import qualified Prelude as P
-import Air.Light ((>), (.), times)
-import Text.HTML.Moe.Type hiding (name, value)
-import qualified Text.HTML.Moe.Type as T
-import Text.HTML.Moe.Element
-import Text.HTML.Moe.Attribute
-import Text.HTML.Moe.Utils
-import qualified Data.ByteString.Char8 as B
-import Data.DList (toList)
-import Data.List (intersperse)
-
-
-render :: MoeUnit -> String
-render = render' > B.unpack
-
-render' :: MoeUnit -> B.ByteString
-render' = execWriter > toList > map render_element > intercalate new_line > to_bs
-
-_indent_space :: Int
-_indent_space = 2
-
-new_line :: Internal
-new_line = pack "\n"
-
-space :: Internal
-space = pack " "
-
-_indent :: Int -> Internal
-_indent n = (n * _indent_space).times space.concat
-
-render_element' :: Int -> Element -> Internal
-render_element' _ (Raw x)   = x
-render_element' _ (Pre x)   = x
-render_element' n (Prim x)  = _indent n + x
-render_element' n (Data x)  = _indent n + x
-  
-render_element' n x 
-  | x.self_close =
-    [ _indent n
-    , "<".pack
-    , x.T.name
-    , x.attributes.map render_attribute. join_attribute
-    , " />".pack
-    ]
-    .concat
-    
-  | otherwise = 
-    [ self_indent
-    , "<".pack
-    , x.T.name
-    , x.attributes.map render_attribute. join_attribute
-    , ">".pack
-    , inner_elements
-    , "</".pack
-    , x.T.name
-    , ">".pack
-    ]
-    .concat
-    
-  where
-    self_indent = if x.indent then _indent n else "".pack
-    join_attribute xs = xs.map (pack " " `append`) .concat
-    inner_elements = 
-      if x.elements.null
-        then "".pack
-        else 
-          [ new_line
-          , x.elements.map (render_element' (n P.+ 1)) .intersperse new_line .concat
-          , new_line
-          , self_indent
-          ]
-          .concat
-
-      
-
-
-
-render_element :: Element -> Internal
-render_element = render_element' 0
-
-render_attribute :: Attribute -> Internal
-render_attribute x = 
-  [x.key, pack "=", pack "\"", x.T.value, pack "\""].concat
-
-
-(/) :: MoeUnit
-(/) = return ()
diff --git a/src/Text/HTML/Moe/Attribute.hs b/src/Text/HTML/Moe/Attribute.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe/Attribute.hs
+++ /dev/null
@@ -1,86 +0,0 @@
-module Text.HTML.Moe.Attribute where
-
-import Text.HTML.Moe.Type
-import Text.HTML.Moe.Utils
-import Prelude hiding (id, (-))
-import Air.Light ((-))
-import Text.HTML.Moe.Utils
-
-attr :: String -> String -> Attribute
-attr x y = Attribute (pack x) (pack - escape - y)
-
-_class      :: String -> Attribute
-_data       :: String -> Attribute
-_span       :: String -> Attribute
-_style      :: String -> Attribute
-_title      :: String -> Attribute
-_type       :: String -> Attribute
-action      :: String -> Attribute
-align       :: String -> Attribute
-alt         :: String -> Attribute
-bgcolor     :: String -> Attribute
-border      :: String -> Attribute
-classid     :: String -> Attribute
-colspan     :: String -> Attribute
-cols        :: String -> Attribute
-content     :: String -> Attribute
-height      :: String -> Attribute
-href        :: String -> Attribute
-http_equiv  :: String -> Attribute
-id          :: String -> Attribute
-lang        :: String -> Attribute
-language    :: String -> Attribute
-media       :: String -> Attribute
-method      :: String -> Attribute
-name        :: String -> Attribute
-quality     :: String -> Attribute
-rel         :: String -> Attribute
-rowspan     :: String -> Attribute
-rows        :: String -> Attribute
-selected    :: String -> Attribute
-src         :: String -> Attribute
-size        :: String -> Attribute
-target      :: String -> Attribute
-valign      :: String -> Attribute
-value       :: String -> Attribute
-width       :: String -> Attribute
-xml_lang    :: String -> Attribute
-xmlns       :: String -> Attribute
-
-_class      = attr "class"
-_data       = attr "data"
-_span       = attr "span"
-_style      = attr "style"
-_title      = attr "title"
-_type       = attr "type"
-action      = attr "action"
-align       = attr "align"
-alt         = attr "alt"
-bgcolor     = attr "bgcolor"
-border      = attr "border"
-classid     = attr "classid"
-colspan     = attr "colspan"
-cols        = attr "cols"
-content     = attr "content"
-height      = attr "height"
-href        = attr "href"
-http_equiv  = attr "http-equiv"
-id          = attr "id"
-lang        = attr "lang"
-language    = attr "language"
-media       = attr "media"
-method      = attr "method"
-name        = attr "name"
-quality     = attr "quality"
-rel         = attr "rel"
-rowspan     = attr "rowspan"
-rows        = attr "rows"
-selected    = attr "selected"
-src         = attr "src"
-size        = attr "size"
-target      = attr "target"
-valign      = attr "valign"
-value       = attr "value"
-width       = attr "width"
-xml_lang    = attr "xml:lang"
-xmlns       = attr "xmlns"
diff --git a/src/Text/HTML/Moe/Backend/ByteString.hs b/src/Text/HTML/Moe/Backend/ByteString.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe/Backend/ByteString.hs
+++ /dev/null
@@ -1,27 +0,0 @@
-module Text.HTML.Moe.Backend.ByteString where
-
-import qualified Data.ByteString.Char8 as B
-import Data.ByteString.UTF8 (fromString, toString)
-
-type Internal = B.ByteString
-
-pack :: String -> Internal
-pack = fromString
-
-unpack :: Internal -> String
-unpack = toString
-
-none :: Internal
-none = B.empty
-
-concat :: [Internal] -> Internal
-concat = B.concat
-
-append :: Internal -> Internal -> Internal
-append = B.append
-
-intercalate :: Internal -> [Internal] -> Internal
-intercalate = B.intercalate
-
-to_bs :: Internal -> B.ByteString
-to_bs = id
diff --git a/src/Text/HTML/Moe/Backend/DList.hs b/src/Text/HTML/Moe/Backend/DList.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe/Backend/DList.hs
+++ /dev/null
@@ -1,34 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-}
-
-module Text.HTML.Moe.Backend.DList where
-
-import qualified Data.ByteString.Char8 as B
-import Data.ByteString.UTF8 (fromString)
-import qualified Data.DList as D
-import qualified Data.List as L
-
-type Internal = D.DList Char
-
-instance Show (D.DList Char) where
-  show = D.toList
-
-pack :: String -> Internal
-pack = D.fromList
-
-unpack :: Internal -> String
-unpack = D.toList
-
-none :: Internal
-none = D.empty
-
-concat :: [Internal] -> Internal
-concat = D.concat
-
-append :: Internal -> Internal -> Internal
-append = D.append
-
-intercalate :: Internal -> [Internal] -> Internal
-intercalate x = D.concat . L.intersperse x
-
-to_bs :: Internal -> B.ByteString
-to_bs = fromString . D.toList
diff --git a/src/Text/HTML/Moe/DSL/HTML5.hs b/src/Text/HTML/Moe/DSL/HTML5.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe/DSL/HTML5.hs
+++ /dev/null
@@ -1,113 +0,0 @@
-module Text.HTML.Moe.DSL.HTML5 where
-
-import Text.HTML.Moe.Element
-import Text.HTML.Moe.Type
-
-article       :: MoeCombinator 
-aside         :: MoeCombinator 
-audio         :: MoeCombinator 
-canvas        :: MoeCombinator 
-command       :: MoeCombinator 
-datagrid      :: MoeCombinator 
-datalist      :: MoeCombinator 
-datatemplate  :: MoeCombinator 
-details       :: MoeCombinator 
-dialog        :: MoeCombinator 
-event_source  :: MoeCombinator 
-figure        :: MoeCombinator 
-footer        :: MoeCombinator 
-header        :: MoeCombinator 
-mark          :: MoeCombinator 
-meter         :: MoeCombinator 
-nav           :: MoeCombinator 
-nest          :: MoeCombinator 
-output        :: MoeCombinator 
-progress      :: MoeCombinator 
-rule          :: MoeCombinator 
-section       :: MoeCombinator 
-source        :: MoeCombinator 
-time          :: MoeCombinator 
-video         :: MoeCombinator 
-
-article'      :: MoeCombinator'  
-aside'        :: MoeCombinator'
-audio'        :: MoeCombinator'
-canvas'       :: MoeCombinator'
-command'      :: MoeCombinator'
-datagrid'     :: MoeCombinator'
-datalist'     :: MoeCombinator'
-datatemplate' :: MoeCombinator'
-details'      :: MoeCombinator'
-dialog'       :: MoeCombinator'
-event_source' :: MoeCombinator'
-figure'       :: MoeCombinator'
-footer'       :: MoeCombinator'
-header'       :: MoeCombinator'
-mark'         :: MoeCombinator'
-meter'        :: MoeCombinator'
-nav'          :: MoeCombinator'
-nest'         :: MoeCombinator'
-output'       :: MoeCombinator'
-progress'     :: MoeCombinator'
-rule'         :: MoeCombinator'
-section'      :: MoeCombinator'
-source'       :: MoeCombinator'
-time'         :: MoeCombinator'
-video'        :: MoeCombinator'
-
-
-
-
-article       = element "article"
-aside         = element "aside"
-audio         = element "audio"
-canvas        = element "canvas"
-command       = element "command"
-datagrid      = element "datagrid"
-datalist      = element "datalist"
-datatemplate  = element "datatemplate"
-details       = element "details"
-dialog        = element "dialog"
-event_source  = element "event_source"
-figure        = element "figure"
-footer        = element "footer"
-header        = element "header"
-mark          = element "mark"
-meter         = element "meter"
-nav           = element "nav"
-nest          = element "nest"
-output        = element "output"
-progress      = element "progress"
-rule          = element "rule"
-section       = element "section"
-source        = element "source"
-time          = element "time"
-video         = element "video"
-
-article'      = article []       
-aside'        = aside []         
-audio'        = audio []         
-canvas'       = canvas []        
-command'      = command []       
-datagrid'     = datagrid []      
-datalist'     = datalist []      
-datatemplate' = datatemplate []  
-details'      = details []       
-dialog'       = dialog []        
-event_source' = event_source []  
-figure'       = figure []        
-footer'       = footer []        
-header'       = header []        
-mark'         = mark []          
-meter'        = meter []         
-nav'          = nav []           
-nest'         = nest []          
-output'       = output []        
-progress'     = progress []      
-rule'         = rule []          
-section'      = section []       
-source'       = source []        
-time'         = time []          
-video'        = video []         
-
-
diff --git a/src/Text/HTML/Moe/DSL/Kawaii.hs b/src/Text/HTML/Moe/DSL/Kawaii.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe/DSL/Kawaii.hs
+++ /dev/null
@@ -1,19 +0,0 @@
-module Text.HTML.Moe.DSL.Kawaii where
-
-
-import Text.HTML.Moe
-import Text.HTML.Moe.Type (MoeUnit)
-import Text.HTML.Moe.DSL.Markdown
-import Prelude hiding ((-), (/), div)
-
-c :: String -> MoeUnit -> MoeUnit
-c x = div [_class x]
-
-css :: String -> MoeUnit
-css x = link [rel "stylesheet", _type "text/css", href x]
-
-js :: String -> MoeUnit
-js x = script [_type "text/javascript", src x] (/)
-
-(~>) :: String -> String -> MoeUnit
-(~>) = (<>)
diff --git a/src/Text/HTML/Moe/DSL/Markdown.hs b/src/Text/HTML/Moe/DSL/Markdown.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe/DSL/Markdown.hs
+++ /dev/null
@@ -1,61 +0,0 @@
-module Text.HTML.Moe.DSL.Markdown
-(
-  (#)
-, (##)
-, (###)
-, (####)
-, (#####)
-, (######)
-, (>>)
-, (*)
-, (***)
--- , _
--- , __
-, (!)
-, (<>)
-, o
-, block
-) where
-
-
-import Text.HTML.Moe
-import Text.HTML.Moe.Type (MoeUnit)
-import Air.Light ((-))
-import Prelude hiding ((-), (/), (>>), (*))
-
-single_line, r :: (MoeUnit -> MoeUnit) -> String -> MoeUnit
-single_line f = f . str
-r = single_line
-
-(#)       :: String -> MoeUnit
-(##)      :: String -> MoeUnit
-(###)     :: String -> MoeUnit
-(####)    :: String -> MoeUnit
-(#####)   :: String -> MoeUnit
-(######)  :: String -> MoeUnit
-(>>)      :: String -> MoeUnit
-(*)       :: String -> MoeUnit
--- _         :: String -> MoeUnit
--- __        :: String -> MoeUnit
-o         :: String -> MoeUnit
-block     :: String -> MoeUnit
-(***)     :: MoeUnit
-(!)       :: String -> String -> MoeUnit
-(<>)      :: String -> String -> MoeUnit
-
-
-(#)       = r h1'
-(##)      = r h2'
-(###)     = r h3'
-(####)    = r h4'
-(#####)   = r h5'
-(######)  = r h6'
-(>>)      = r blockquote'
-(*)       = r ul'
--- _         = r em'
--- __        = r strong'
-o         = r li'
-block     = pre' . code' . _pre
-(***)     = hr'
-(!) x y   = img [src y, alt x]
-(<>) x y  = a [href y] - str x
diff --git a/src/Text/HTML/Moe/Element.hs b/src/Text/HTML/Moe/Element.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe/Element.hs
+++ /dev/null
@@ -1,257 +0,0 @@
-module Text.HTML.Moe.Element where
-
-import Text.HTML.Moe.Type
-import Text.HTML.Moe.Utils
-import Data.Default
-import Control.Monad.Writer
-import Prelude hiding (id, span, div, head, (>), (.), (-))
-import Air.Light ((-))
-import Data.DList (singleton, toList)
-
-element :: String -> MoeCombinator
-element x xs u = tell - singleton - 
-  def
-    {
-      name       = pack - escape x
-    , attributes = xs
-    , elements   = toList - execWriter - u
-    }
-
-e :: String -> MoeCombinator
-e = element
-  
-element' :: (String -> MoeCombinator) -> (String -> MoeCombinator')
-element' x = flip x []
-
-no_indent_element :: String -> MoeCombinator
-no_indent_element x xs u = tell - singleton -
-  def
-    {
-      name       = pack - x
-    , attributes = xs
-    , elements   = toList - execWriter u
-    , indent     = False
-    }
-
-ne :: String -> MoeCombinator
-ne = no_indent_element
-
-self_close_element :: String -> LightCombinator
-self_close_element x xs = tell - singleton - 
-  def
-    {
-      name       = pack - escape x
-    , attributes = xs
-    , self_close = True
-    }
-
-sc :: String -> LightCombinator
-sc = self_close_element
-
-a         :: MoeCombinator
-body      :: MoeCombinator
-br        :: LightCombinator
-blockquote  :: MoeCombinator
-code      :: MoeCombinator
-colgroup  :: MoeCombinator
-col       :: MoeCombinator
-div       :: MoeCombinator
-form      :: MoeCombinator
-embed     :: MoeCombinator
-em        :: MoeCombinator
-h1        :: MoeCombinator
-h2        :: MoeCombinator
-h3        :: MoeCombinator
-h4        :: MoeCombinator
-h5        :: MoeCombinator
-h6        :: MoeCombinator
-head      :: MoeCombinator
-html      :: MoeCombinator
-hr        :: LightCombinator
-img       :: LightCombinator
-input     :: LightCombinator
-label     :: MoeCombinator
-li        :: MoeCombinator
-link      :: LightCombinator
-meta      :: LightCombinator
-object    :: MoeCombinator
-ol        :: MoeCombinator
-param     :: MoeCombinator
-ul        :: MoeCombinator
-dl        :: MoeCombinator
-dt        :: MoeCombinator
-dd        :: MoeCombinator
-option    :: MoeCombinator
-p         :: MoeCombinator
-pre       :: MoeCombinator
-select    :: MoeCombinator
-script    :: MoeCombinator
-span      :: MoeCombinator
-style     :: MoeCombinator
-strong    :: MoeCombinator
-table     :: MoeCombinator
-textarea  :: MoeCombinator
-td        :: MoeCombinator
-th        :: MoeCombinator
-title     :: MoeCombinator
-tr        :: MoeCombinator
-
-a'          ::  MoeCombinator'
-body'       ::  MoeCombinator'
-br'         ::  LightCombinator'
-blockquote' ::  MoeCombinator'
-code'       ::  MoeCombinator'
-colgroup'   ::  MoeCombinator'
-col'        ::  MoeCombinator'
-div'        ::  MoeCombinator'
-embed'      ::  MoeCombinator'
-em'         ::  MoeCombinator'
-form'       ::  MoeCombinator'
-h1'         ::  MoeCombinator'
-h2'         ::  MoeCombinator'
-h3'         ::  MoeCombinator'
-h4'         ::  MoeCombinator'
-h5'         ::  MoeCombinator'
-h6'         ::  MoeCombinator'
-head'       ::  MoeCombinator'
-html'       ::  MoeCombinator'
-hr'         ::  LightCombinator'
-img'        ::  LightCombinator'
-input'      ::  LightCombinator'
-label'      ::  MoeCombinator'
-li'         ::  MoeCombinator'
-link'       ::  LightCombinator'
-meta'       ::  LightCombinator'
-object'     ::  MoeCombinator'
-ol'         ::  MoeCombinator'
-param'      ::  MoeCombinator'
-ul'         ::  MoeCombinator'
-dl'         ::  MoeCombinator'
-dt'         ::  MoeCombinator'
-dd'         ::  MoeCombinator'
-option'     ::  MoeCombinator'
-p'          ::  MoeCombinator'
-pre'        ::  MoeCombinator'
-select'     ::  MoeCombinator'
-script'     ::  MoeCombinator'
-span'       ::  MoeCombinator'
-style'      ::  MoeCombinator'
-strong'     ::  MoeCombinator'
-table'      ::  MoeCombinator'
-textarea'   ::  MoeCombinator'
-td'         ::  MoeCombinator'
-th'         ::  MoeCombinator'
-title'      ::  MoeCombinator'
-tr'         ::  MoeCombinator'
-
-
-a          = e "a"
-body       = e "body"
-br         = sc "br"
-blockquote  = e "blockquote"
-code       = e "code"
-colgroup   = e "colgroup"
-col        = e "col"
-div        = e "div"
-embed      = e "embed"
-em         = e "em"
-form       = e "form"
-h1         = e "h1"
-h2         = e "h2"
-h3         = e "h3"
-h4         = e "h4"
-h5         = e "h5"
-h6         = e "h6"
-head       = e "head"
-html       = e "html"
-hr         = sc "hr"
-img        = sc "img"
-input      = sc "input"
-label      = e "label"
-li         = e "li"
-link       = sc "link"
-meta       = sc "meta"
-object     = e "object"
-ol         = e "ol"
-param      = e "param"
-ul         = e "ul"
-dl         = e "dl"
-dt         = e "dt"
-dd         = e "dd"
-option     = e "option"
-p          = e "p"
-pre        = e "pre"
-select     = e "select"
-script     = e "script"
-span       = e "span"
-style      = e "style"
-strong     = e "strong"
-table      = e "table"
-textarea   = ne "textarea"
-td         = e "td"
-th         = e "th"
-title      = e "title"
-tr         = e "tr"
-
-
-
-
-
-a'         = a          []
-body'      = body       []
-br'        = br         []
-blockquote' = blockquote  []
-code'      = code       []
-colgroup'  = colgroup   []
-col'       = col        []
-div'       = div        []
-embed'     = embed      []
-em'        = em         []
-form'      = form       []
-h1'        = h1         []
-h2'        = h2         []
-h3'        = h3         []
-h4'        = h4         []
-h5'        = h5         []
-h6'        = h6         []
-head'      = head       []
-hr'        = hr         []
-html'      = html       []
-img'       = img        []
-input'     = input      []
-label'     = label      []
-li'        = li         []
-link'      = link       []
-meta'      = meta       []
-object'    = object     []
-ol'        = ol         []
-param'     = param      []
-ul'        = ul         []
-dl'        = dl         []
-dt'        = dt         []
-dd'        = dd         []
-option'    = option     []
-p'         = p          []
-pre'       = pre        []
-select'    = select     []
-script'    = script     []
-span'      = span       []
-style'     = style      []
-strong'    = strong     []
-table'     = table      []
-textarea'  = textarea   []
-td'        = td         []
-th'        = th         []
-title'     = title      []
-tr'        = tr         []
-
-str, raw, _pre, prim :: String -> MoeUnit
-
-str x   = tell - singleton - Data (pack - escape x)
-raw x   = tell - singleton - Raw  (pack x)
-_pre x  = tell - singleton - Pre  (pack - escape x)
-prim x  = tell - singleton - Prim (pack x)
-
-
-raw_bytestring x   = tell - singleton - Raw  x
-prim_bytestring x  = tell - singleton - Prim x
diff --git a/src/Text/HTML/Moe/Type.hs b/src/Text/HTML/Moe/Type.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe/Type.hs
+++ /dev/null
@@ -1,50 +0,0 @@
-module Text.HTML.Moe.Type where
-
-import Data.Default
-import Control.Monad.Writer
-import Text.HTML.Moe.Utils
-import Data.DList (DList)
-
-data Element = 
-    Element
-      {
-        name :: Internal
-      , attributes :: [Attribute]
-      , elements :: [Element]
-      , indent :: Bool
-      , self_close :: Bool
-      }
-  | Raw Internal  -- no escape, no indent
-  | Pre Internal  -- escape, no indent
-  | Data Internal -- escape, indent
-  | Prim Internal -- no escape, indent
-  deriving (Show)
-
-instance Default Element where
-  def = Element 
-    {
-      name = none
-    , attributes = def
-    , elements = def
-    , indent = True
-    , self_close = False
-    }
-
-data Attribute = Attribute
-  {
-    key :: Internal
-  , value :: Internal
-  }
-  deriving (Show)
-
-instance Default Attribute where
-  def = Attribute none none
-
-type MoeUnitT a = Writer (DList Element) a
-type MoeUnit = MoeUnitT ()
-
-type MoeCombinator = [Attribute] -> MoeUnit -> MoeUnit
-type MoeCombinator' = MoeUnit -> MoeUnit
-
-type LightCombinator = [Attribute] -> MoeUnit
-type LightCombinator' = MoeUnit
diff --git a/src/Text/HTML/Moe/Utils.hs b/src/Text/HTML/Moe/Utils.hs
deleted file mode 100644
--- a/src/Text/HTML/Moe/Utils.hs
+++ /dev/null
@@ -1,26 +0,0 @@
-module Text.HTML.Moe.Utils 
-( escape
-, (+)
-, module Text.HTML.Moe.Backend.ByteString
-) where
-
-import Prelude hiding ((+))
-import Data.Monoid
-import Text.HTML.Moe.Backend.ByteString
-
-escape :: String -> String
-escape = escape_html
-
-escape_html :: String -> String
-escape_html = concatMap fixChar
-  where
-    fixChar '&'  = "&amp;"
-    fixChar '<'  = "&lt;"
-    fixChar '>'  = "&gt;"
-    fixChar '\'' = "&#39;"
-    fixChar '"'  = "&quot;"
-    fixChar x    = [x]
-
-(+) :: (Monoid a) => a -> a -> a
-(+) = mappend
-infixl 5 +
diff --git a/src/Text/HTML/Moe2/Backend/ByteString.hs b/src/Text/HTML/Moe2/Backend/ByteString.hs
new file mode 100644
--- /dev/null
+++ b/src/Text/HTML/Moe2/Backend/ByteString.hs
@@ -0,0 +1,27 @@
+module Text.HTML.Moe2.Backend.ByteString where
+
+import qualified Data.ByteString.Char8 as B
+import Data.ByteString.UTF8 (fromString, toString)
+
+type Internal = B.ByteString
+
+pack :: String -> Internal
+pack = fromString
+
+unpack :: Internal -> String
+unpack = toString
+
+none :: Internal
+none = B.empty
+
+concat :: [Internal] -> Internal
+concat = B.concat
+
+append :: Internal -> Internal -> Internal
+append = B.append
+
+intercalate :: Internal -> [Internal] -> Internal
+intercalate = B.intercalate
+
+to_bs :: Internal -> B.ByteString
+to_bs = id
diff --git a/src/Text/HTML/Moe2/Element.hs b/src/Text/HTML/Moe2/Element.hs
--- a/src/Text/HTML/Moe2/Element.hs
+++ b/src/Text/HTML/Moe2/Element.hs
@@ -7,6 +7,7 @@
 import Prelude hiding (id, span, div, head, (>), (.), (-))
 import Air.Light ((-), first)
 import Data.DList (singleton, toList)
+import Data.Maybe (fromMaybe)
 
 element :: String -> MoeCombinator
 element x u = tell - singleton - 
@@ -26,7 +27,7 @@
   let r = f u
   in
   
-  tell - singleton - Attributes xs - first - toList - execWriter - r
+  tell - singleton - Attributes xs - fromMaybe def - first - toList - execWriter - r
 
 
 e :: String -> MoeCombinator
diff --git a/src/Text/HTML/Moe2/Type.hs b/src/Text/HTML/Moe2/Type.hs
--- a/src/Text/HTML/Moe2/Type.hs
+++ b/src/Text/HTML/Moe2/Type.hs
@@ -2,7 +2,7 @@
 
 import Data.Default
 import Control.Monad.Writer
-import Text.HTML.Moe.Utils
+import Text.HTML.Moe2.Utils
 import Data.DList (DList)
 
 data Element = 
diff --git a/src/Text/HTML/Moe2/Utils.hs b/src/Text/HTML/Moe2/Utils.hs
--- a/src/Text/HTML/Moe2/Utils.hs
+++ b/src/Text/HTML/Moe2/Utils.hs
@@ -1,12 +1,11 @@
 module Text.HTML.Moe2.Utils 
 ( escape
-, module Text.HTML.Moe.Backend.ByteString
+, module Text.HTML.Moe2.Backend.ByteString
 , (/)
 ) where
 
 import Data.Monoid
-import Text.HTML.Moe.Backend.ByteString
-import Text.HTML.Moe2.Type
+import Text.HTML.Moe2.Backend.ByteString
 import Prelude hiding ((/))
 
 escape :: String -> String
@@ -23,5 +22,5 @@
     fixChar x    = [x]
 
 
-(/) :: MoeUnit
+(/) :: (Monad m) => m ()
 (/) = return ()
diff --git a/src/test.hs b/src/test.hs
deleted file mode 100644
--- a/src/test.hs
+++ /dev/null
@@ -1,18 +0,0 @@
-import Prelude hiding ((/), (-), head, (>), (.), div)
-import Air.Light ((-))
-import Text.HTML.Moe2
-
-test_page :: String
-test_page = render -
-  html - do
-    head - do
-      meta ! [http_equiv "Content-Type", content "text/html; charset=utf-8"] - (/)
-      title - str "my title"
-      link ! [rel "icon", _type "image/png", href "panda_icon.png"] - (/)
-  
-    body - do
-      div ! [_class "container"] - do
-        str "hello world"
-
-main :: IO ()
-main = putStrLn test_page
