         @emit 'replaced', tag # internal
         tag
 
-    remove: () =>
-        @closed = 'removed' unless @closed
-        @emit 'remove', this
-        @emit 'removed' # internal
-        @removeAllListeners()
+    remove: (opts = {}) =>
+        @closed = 'removed' unless @closed or opts.soft
+        @emit 'remove', this, opts
+        @builder = null
+        @parent = null
+        @emit 'removed', opts.soft # internal
+        @removeAllListeners() unless opts.soft
         this
 
     ready: (callback) =>

            if @closed is 'self'
                "/>"
            else if @closed
                ">#{@content}</#{@name}>" # FIXME children ?
            else
                ">#{@content}"


            if (listener = listeners[event])?
                child.removeListener?(event, listener)
                listeners[event] = undefined
    remove = (soft) ->
        if this is child
            parent.removeListener('removed', remove)
            dispose()
            parent.removeListener('replaced', replace)
            child.removeListener('replaced', replace)
        else unless soft
            child.removeListener('removed', remove)
            dispose()
            parent.removeListener('replaced', replace)
            child.removeListener('replaced', replace)
    replace = (tag) ->
        if this is child
            remove.call(parent)
