 import mx.effects.Effect;
 import mx.effects.EffectManager;
 import mx.events.ChildExistenceChangedEvent;
-import mx.events.CollectionEvent;
-import mx.events.CollectionEventKind;
 import mx.events.EffectEvent;
 import mx.events.FlexEvent;
 import mx.events.IndexChangedEvent;
-import mx.events.PropertyChangeEvent;
 import mx.geom.RoundedRectangle;
 import mx.managers.HistoryManager;
-import mx.managers.IHistoryManagerClient;
 
 use namespace mx_internal;
 

        // Stretch the selectedIndex to fill our size
        if (selectedIndex != -1)
        {
            var child:UIComponent =
                UIComponent(getChildAt(selectedIndex));

            var newWidth:Number = w;
            var newHeight:Number = h;


        if (lastIndex != -1 && lastIndex < numChildren)
        {
            var currentChild:Container = Container(getChildAt(lastIndex));

            currentChild.setVisible(false); // Hide the current child

