     # unbind selection
     selection.unbind()
 
+  garbageCollect: ->
+    sels = @_rte.selections
+    for index in [0..sels.length-1]
+      for key, value of sels[index]
+        console.log sels[index], "has", key, value, "deleting!"
+        if value == null or value == ""
+          sels[index].unbind()
+          @removeSel sels[index]
+
+
 if window?
   window.Rte = Rte
   window.Selection = Selection

  # @param content [String] the content to set the word to
  setWord: (index, content) ->
    if index == @_rte.words.length
      @_rte.words.push(new Word content)
    if not (0 <= index < @_rte.words.length)
      throw new Error "Index out of bounds"


      if pos == 0
        if index == 0
          index += 1
          @insertWord 0, (new Word '', @)
        prevWord = @getWord(index-1).word
        prevWord += preSpaces
        content = content.substring(preSpaces.length)
