      */
     public function toArray () :Array
     {
-        var elements :Array = [];
-        for each (var element :ExpiringElement in _data) {
-            elements.push(element.element);
-        }
-        return elements;
+        return _data.map(function (e :ExpiringElement, ... ignored) :Object {
+            return e.element;
+        });
     }
 
-    protected function checkTimer (...ignored) :void
+    /**
+     * Remove probably just one element from the front of the expiration queue, and
+     * schedule a wakeup for the time to the new head's expiration time.
+     */
+    protected function checkTimer (... ignored) :void
     {
-        // expiration check
         var now :int = getTimer();
-        while (headIsExpired(now)) {
-            // pop the head off the queue and dispatch an event
-            var head :ExpiringElement = _data.shift() as ExpiringElement;
-            dispatchEvent(new ValueEvent(ELEMENT_EXPIRED, head.element));
+        while (_data.length > 0) {
+            var e :ExpiringElement = ExpiringElement(_data[0]);
+            var timeToExpire :int = e.expirationTime - now;
+            if (timeToExpire <= 0) {
+                _data.shift(); // remove it
+                dispatchEvent(new ValueEvent(ELEMENT_EXPIRED, e.element)); // notify
+
+            } else {
+                // the head element is not yet expired
+                _timer.reset();
+                _timer.delay = timeToExpire;
+                _timer.start();
+                break;
+            }
         }
-
-        // empty check
-        if (isEmpty()) {
-            return;
-        }
-
-        // if the timer is already running, and we're not empty, we want to just let it finish
-        // its current delay, and set up a new one then
-        if (_timer != null && _timer.running) {
-            return;
-        }
-
-        // sanity check
-        var delay :int = (_data[0] as ExpiringElement).expirationTime - now;
-        if (delay <= 0) {
-            // blow up
-            log.warning("calculated delay after expiring elements is invalid! [" + delay + "]");
-            return;
-        }
-
-        // set up next delay
-        if (_timer == null) {
-            _timer = new Timer(delay, 1);
-            _timer.addEventListener(TimerEvent.TIMER, checkTimer);
-        } else {
-            _timer.delay = delay;
-            _timer.reset();
-        }
-        _timer.start();
-    }
-
-    protected function headIsExpired (now :int) :Boolean
-    {
-        return isEmpty() ? false : (_data[0] as ExpiringElement).isExpired(now);
     }
 
     protected static const log :Log = Log.getLog(ExpiringSet);

    }

    // from Set
    public function contains (o :Object) :Boolean
    {
        for each (var e :ExpiringElement in _data) {
            if (e.objectEquals(o)) {
                return true;
            }
        }
        return false;
    }
    
    /**

        this.expirationTime = expiration;
    }

    public function objectEquals (element :Object) :Boolean
    {
        return Util.equals(element, this.element);
