   getSelections: (filter = null)->
     # console.log "Word.getSelections", @left, @right
     tmp = (if _.isFunction(filter)
-      @left.concat(@right).filter(filter) or []
-    else
-      @left.concat(@right) or [])
+      @_get("left").concat(@_get("right")).filter(filter) or []
+    else
+      @_get("left").concat(@_get("right")) or [])
     # console.log "returning", _.uniq tmp
     _.uniq tmp
 
 # A class describing a selection with a style (bold, italic, …)
 class Selection
-  # Word that is the left bound
-  @left = null
-  # Word that is the right bound
-  @right = null
-
+  _name = "Selection"
+
+  _getModel: (Y, Operation) ->
+    if @_model == null
+      @_model = new Operation.MapManager(@).execute()
+      @_model.val("left", @left)
+      @_model.val("leftPos", @leftPos)
+      @_model.val("right", @right)
+      @_model.val("rightPos", @leftPos)
+      @_model.val("style", @style)
+
+      delete @left
+      delete @leftPos
+      delete @right
+      delete @rightPos
+      delete @style
+
+    return @_model
+
+  _setModel: (model) ->
+    delete @left
+    delete @left
+    delete @leftPos
+    delete @right
+    delete @rightPos
+    delete @style
+
+    @_model = model
   # Construct a new selection using the index of the first and last character.
   #
   # @param [Integer] start index of the first character

  # @param [Selection] selection the selection to compare to this
  # @return [Bool] true if the given selection is located on the left of this selection
  atLeftOf: (selection) ->
    (@gt(selection.left, selection.leftPos, "right") and
    @lt(selection.right, selection.rightPos, "right"))


  # Set the style to style

    left = @left
    right = @right

    @_set("left", null)
    @_set("right", null)

    [left, right]

