      *  <code>setAttributes({ fontSize: 12, color: 0xFF0000 })</code>
      *  will set the fontSize and color of the selection.
      *  The supported attributes are those in the
-     *  ICharacterAttributes and IParagraphAttributes interfaces.
+     *  ICharacterFormat and IParagraphFormat interfaces.
      */
     public function setAttributes(attributes:Object):void
     {
-        var containerAttributes:ContainerAttributes;
-        var paragraphAttributes:ParagraphAttributes;
-        var characterAttributes:CharacterAttributes;
+        var containerFormat:ContainerFormat;
+        var paragraphFormat:ParagraphFormat;
+        var characterFormat:CharacterFormat;
         
         for (var p:String in attributes)
         {
-            var kind:String = TextUtil.ATTRIBUTE_MAP[p];
+            var kind:String = TextUtil.FORMAT_MAP[p];
             
             if (kind == TextUtil.CONTAINER)
             {
-                if (!containerAttributes)
-                   containerAttributes =  new ContainerAttributes();
-                containerAttributes[p] = attributes[p];
+                if (!containerFormat)
+                   containerFormat =  new ContainerFormat();
+                containerFormat[p] = attributes[p];
             }
             else if (kind == TextUtil.PARAGRAPH)
             {
-                if (!paragraphAttributes)
-                   paragraphAttributes =  new ParagraphAttributes();
-                paragraphAttributes[p] = attributes[p];
+                if (!paragraphFormat)
+                   paragraphFormat =  new ParagraphFormat();
+                paragraphFormat[p] = attributes[p];
             }
             else if (kind == TextUtil.CHARACTER)
             {
-                if (!characterAttributes)
-                   characterAttributes =  new CharacterAttributes();
-                characterAttributes[p] = attributes[p];
+                if (!characterFormat)
+                   characterFormat =  new CharacterFormat();
+                characterFormat[p] = attributes[p];
             }
         }
         
         var editManager:TextViewEditManager =
             TextViewEditManager(textFlow.selectionManager);
         
-        if (containerAttributes)
+        if (containerFormat)
         {
             editManager.execute(new ContainerStyleChangeOperation(
-                editManager, containerAttributes));
+                editManager, containerFormat));
         }
 
-        if (paragraphAttributes)
+        if (paragraphFormat)
         {
             editManager.execute(new ParagraphStyleChangeOperation(
-                editManager, paragraphAttributes));
+                editManager, paragraphFormat));
         }
 
-        if (characterAttributes)
+        if (characterFormat)
         {
             editManager.execute(new StyleChangeOperation(
-                editManager, characterAttributes));
+                editManager, characterFormat));
         }
     }
 

		contentChanged = false;
		textChanged = false;

        var containerAttributes:IContainerAttributes =
            textFlow.containerAttributes;
        var paragraphAttributes:IParagraphAttributes =
            textFlow.paragraphAttributes;
        var characterAttributes:ICharacterAttributes =
            textFlow.characterAttributes;
        
        if (!containerAttributes || containerAttributes.blockProgression == null)
            textFlow.blockProgression = blockProgression;
        if (!characterAttributes || characterAttributes.color == null)
            textFlow.color = color;
        if (!paragraphAttributes || paragraphAttributes.direction == null)
            textFlow.direction = direction;
		if (!characterAttributes || characterAttributes.fontFamily == null)
            textFlow.fontFamily = fontFamily;
		if (!characterAttributes || characterAttributes.fontSize == null)
            textFlow.fontSize = fontSize;
		if (!characterAttributes || characterAttributes.fontStyle == null)
		    textFlow.fontStyle = fontStyle;
		if (!characterAttributes || characterAttributes.fontWeight == null)
		    textFlow.fontWeight = fontWeight;
		if (!characterAttributes || characterAttributes.kerning == null)
		    textFlow.kerning = kerning;
		if (!characterAttributes || characterAttributes.lineHeight == null)
		    textFlow.lineHeight = lineHeight;
		if (!containerAttributes || containerAttributes.lineBreak == null)
		    textFlow.lineBreak = lineBreak;
		if (!characterAttributes || characterAttributes.lineThrough == null)
		    textFlow.lineThrough = lineThrough;
        if (!paragraphAttributes || paragraphAttributes.marginBottom == null)
		    textFlow.marginBottom = marginBottom;
        if (!paragraphAttributes || paragraphAttributes.marginLeft == null)
		    textFlow.marginLeft = marginLeft;
        if (!paragraphAttributes || paragraphAttributes.marginRight == null)
		    textFlow.marginRight = marginRight;
        if (!paragraphAttributes || paragraphAttributes.marginTop == null)
		    textFlow.marginTop = marginTop;
        if (!containerAttributes || containerAttributes.paddingBottom == null)
		    textFlow.paddingBottom = paddingBottom;
        if (!containerAttributes || containerAttributes.paddingLeft == null)
		    textFlow.paddingLeft = paddingLeft;
        if (!containerAttributes || containerAttributes.paddingRight == null)
		    textFlow.paddingRight = paddingRight;
        if (!containerAttributes || containerAttributes.paddingTop == null)
		    textFlow.paddingTop = paddingTop;
        if (!paragraphAttributes || paragraphAttributes.textAlign == null)
		    textFlow.textAlign = textAlign;
        if (!paragraphAttributes || paragraphAttributes.textAlignLast == null)
		    textFlow.textAlignLast = textAlignLast;
		if (!characterAttributes || characterAttributes.textAlpha == null)
		    textFlow.textAlpha = textAlpha;
		if (!characterAttributes || characterAttributes.textDecoration == null)
		    textFlow.textDecoration = textDecoration;
        if (!paragraphAttributes || paragraphAttributes.textIndent == null)
		    textFlow.textIndent = textIndent;
		if (!characterAttributes || characterAttributes.trackingRight == null)
		    textFlow.trackingRight = tracking; // what about trackingLeft?
        if (!containerAttributes || containerAttributes.verticalAlign == null)
		    textFlow.verticalAlign = verticalAlign;
		if (!characterAttributes || characterAttributes.whitespaceCollapse == null)
		    textFlow.whitespaceCollapse = whiteSpaceCollapse; // different case

		return textFlow;

            else if (content is Array)
            {
                textFlow = createEmptyTextFlow();
                textFlow.mxmlChildren = content as Array;
            }
            else if (content is FlowElement)
            {
                textFlow = createEmptyTextFlow();
                textFlow.mxmlChildren = [ content ];
            }
			else if (content is String)
			{
