 		public function removeAll():void
 		{
 			// Looping backwards is more efficient when removing array items.
-			for (var i:uint = listeners.length; i--; )
-			{
-				remove(listeners[i] as Function);
+			for (var i:uint = slots.length; i--; )
+			{
+				// This is the "proper" type-safe way, but perhaps not the fastest.
+				// TODO: Test for speed.
+				remove(Slot(slots[i]).listener);
 			}
 		}
 		

		/** @inheritDoc */
		public function remove(listener:Function):Function
		{
			const index:int = listeners.indexOf(listener);
			if (index == -1) return listener;
			if (listenersNeedCloning)
			{
				listeners = listeners.slice();
				listenersNeedCloning = false;
			}
			listeners.splice(index, 1);
			delete onceListeners[listener];
			return listener;
		}
		

				throw new ArgumentError('Listener has '+listener.length+' '+argumentString+' but it needs at least '+_valueClasses.length+' to match the given value classes.');
			}
			
			const slot:Slot = new Slot(listener, once, this);
			// If there are no previous listeners, add the first one as quickly as possible.
			if (!slots.length)
			{
				slots[0] = slot;
				return;
			}
						
			var prevListenerIndex:int = indexOfListener(listener);
			if (prevListenerIndex >= 0)
			{
				// If the listener was previously added, definitely don't add it again.
				// But throw an exception in some cases, as the error messages explain.
				var prevSlot:Slot = Slot(slots[prevListenerIndex]);
				if (prevSlot.once && !once)
				{
					throw new IllegalOperationError('You cannot addOnce() then add() the same listener without removing the relationship first.');
				}
				else if (!prevSlot.once && once)
				{
					throw new IllegalOperationError('You cannot add() then addOnce() the same listener without removing the relationship first.');
				}
