<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,6 +8,7 @@
 	 - onlyShowPlayer: Only display icons casted by the player. (Default: nil)
 	 - growth-x: Growth direction, affected by initialAnchor. (Default: &quot;UP&quot;)
 	 - growth-y: Growth direction, affected by initialAnchor. (Default: &quot;RIGHT&quot;)
+	 - disableCooldown: Disable the Cooldown Spiral on the Aura Icons. (Default: nil)
 	 - filter: Expects a string with filter. See the UnitAura[1] documentation for
 		more information.
 
@@ -99,15 +100,32 @@ local createAuraIcon = function(self, icons, index, debuff)
 	return button
 end
 
+local customFilter = function(icons, unit, icon, name, rank, texture, count, dtype, duration, timeLeft, caster)
+	local isPlayer
+
+	if(caster == 'player' or caster == 'vehicle') then
+		isPlayer = true
+	end
+
+	if((icons.onlyShowPlayer and isPlayer) or (not icons.onlyShowPlayer and name)) then
+		icon.isPlayer = isPlayer
+		icon.owner = caster
+		return true
+	end
+end
+
 local updateIcon = function(self, unit, icons, index, offset, filter, isDebuff, max)
 	if(index == 0) then index = max end
-	local name, rank, texture, count, dtype, duration, timeLeft, isPlayer = UnitAura(unit, index, filter)
 
 	local icon = icons[index + offset]
-	if((icons.onlyShowPlayer and isPlayer) or (not icons.onlyShowPlayer and name)) then
-		if(not icon) then icon = (self.CreateAuraIcon and self:CreateAuraIcon(icons, index, isDebuff)) or createAuraIcon(self, icons, index, isDebuff) end
+	if(not icon) then
+		icon = (self.CreateAuraIcon or createAuraIcon) (self, icons, index, isDebuff)
+	end
 
-		if(duration and duration &gt; 0) then
+	local name, rank, texture, count, dtype, duration, timeLeft, caster = UnitAura(unit, index, filter)
+	local show = (self.CustomAuraFilter or customFilter) (icons, unit, icon, name, rank, texture, count, dtype, duration, timeLeft, caster)
+	if(show) then
+		if(not icons.disableCooldown and duration and duration &gt; 0) then
 			icon.cd:SetCooldown(timeLeft - duration, duration)
 			icon.cd:Show()
 		else
@@ -119,22 +137,25 @@ local updateIcon = function(self, unit, icons, index, offset, filter, isDebuff,
 
 			icon.overlay:SetVertexColor(color.r, color.g, color.b)
 			icon.overlay:Show()
-			icon.count:SetText((count &gt; 1 and count))
 		else
 			icon.overlay:Hide()
 		end
 
-		icon:Show()
-		icon:SetID(index)
+		icon.icon:SetTexture(texture)
+		icon.count:SetText((count &gt; 1 and count))
 
 		icon.filter = filter
 		icon.debuff = isDebuff
-		icon.icon:SetTexture(texture)
-		icon.count:SetText((count &gt; 1 and count))
 
-		if(self.PostUpdateAuraIcon) then self:PostUpdateAuraIcon(icons, unit, icon, index, offset, filter, isDebuff) end
+		icon:SetID(index)
+		icon:Show()
+
+		if(self.PostUpdateAuraIcon) then
+			self:PostUpdateAuraIcon(icons, unit, icon, index, offset, filter, isDebuff)
+		end
+
 		return true
-	elseif(icon) then
+	else
 		icon:Hide()
 	end
 end
@@ -190,12 +211,12 @@ local Update = function(self, event, unit)
 		local visibleBuffs, visibleDebuffs = 0, 0
 		for index = 1, max do
 			if(index &gt; buffs) then
-				if(updateIcon(self, unit, auras, index % debuffs, buffs, auras.debuffFilter or auras.filter or 'HARMFUL', true, debuffs)) then
-					visibleBuffs = visibleBuffs + 1
+				if(updateIcon(self, unit, auras, index % debuffs, visibleBuffs, auras.debuffFilter or auras.filter or 'HARMFUL', true, debuffs)) then
+					visibleDebuffs = visibleDebuffs + 1
 				end
 			else
 				if(updateIcon(self, unit, auras, index, 0, auras.buffFilter or  auras.filter or 'HELPFUL')) then
-					visibleDebuffs = visibleDebuffs + 1
+					visibleBuffs = visibleBuffs + 1
 				end
 			end
 		end</diff>
      <filename>oUF_embed/elements/aura.lua</filename>
    </modified>
    <modified>
      <diff>@@ -59,7 +59,7 @@ local UNIT_SPELLCAST_START = function(self, event, unit, spell, spellrank)
 		sf:SetPoint'BOTTOM'
 	end
 
-	if(self.PostCastStart) then self:PostCastStart(event, unit, spell, spellrank, castid) end
+	if(self.PostCastStart) then self:PostCastStart(event, unit, name, rank, text, castid) end
 	castbar:Show()
 end
 
@@ -109,7 +109,7 @@ local UNIT_SPELLCAST_DELAYED = function(self, event, unit, spellname, spellrank)
 
 	castbar:SetValue(duration)
 
-	if(self.PostCastDelayed) then self:PostCastDelayed(event, unit, spellname, spellrank) end
+	if(self.PostCastDelayed) then self:PostCastDelayed(event, unit, name, rank, text) end
 end
 
 local UNIT_SPELLCAST_STOP = function(self, event, unit, spellname, spellrank, castid)
@@ -161,7 +161,7 @@ local UNIT_SPELLCAST_CHANNEL_START = function(self, event, unit, spellname, spel
 		sf:SetPoint'BOTTOM'
 	end
 
-	if(self.PostChannelStart) then self:PostChannelStart(event, unit, spellname, spellrank) end
+	if(self.PostChannelStart) then self:PostChannelStart(event, unit, name, rank, text) end
 	castbar:Show()
 end
 
@@ -169,6 +169,10 @@ local UNIT_SPELLCAST_CHANNEL_UPDATE = function(self, event, unit, spellname, spe
 	if(self.unit ~= unit) then return end
 
 	local name, rank, text, texture, startTime, endTime, oldStart = UnitChannelInfo(unit)
+	if(not name) then
+		return
+	end
+
 	local castbar = self.Castbar
 	local duration = (endTime / 1000) - GetTime()
 
@@ -179,19 +183,21 @@ local UNIT_SPELLCAST_CHANNEL_UPDATE = function(self, event, unit, spellname, spe
 	castbar:SetMinMaxValues(0, castbar.max)
 	castbar:SetValue(duration)
 
-	if(self.PostChannelUpdate) then self:PostChannelUpdate(event, unit, spellname, spellrank) end
+	if(self.PostChannelUpdate) then self:PostChannelUpdate(event, unit, name, rank, text) end
 end
 
 local UNIT_SPELLCAST_CHANNEL_STOP = function(self, event, unit, spellname, spellrank)
 	if(self.unit ~= unit) then return end
 
 	local castbar = self.Castbar
-	castbar.channeling = nil
+	if(castbar:IsShown()) then
+		castbar.channeling = nil
 
-	castbar:SetValue(castbar.max)
-	castbar:Hide()
+		castbar:SetValue(castbar.max)
+		castbar:Hide()
 
-	if(self.PostChannelStop) then self:PostChannelStop(event, unit, spellname, spellrank) end
+		if(self.PostChannelStop) then self:PostChannelStop(event, unit, spellname, spellrank) end
+	end
 end
 
 local onUpdate = function(self, elapsed)
@@ -283,20 +289,20 @@ end
 
 local Enable = function(object, unit)
 	local castbar = object.Castbar
-	if(unit and unit:match'%wtarget$') then return end
 
 	if(castbar) then
-		object:RegisterEvent(&quot;UNIT_SPELLCAST_START&quot;, UNIT_SPELLCAST_START)
-		object:RegisterEvent(&quot;UNIT_SPELLCAST_FAILED&quot;, UNIT_SPELLCAST_FAILED)
-		object:RegisterEvent(&quot;UNIT_SPELLCAST_STOP&quot;, UNIT_SPELLCAST_STOP)
-		object:RegisterEvent(&quot;UNIT_SPELLCAST_INTERRUPTED&quot;, UNIT_SPELLCAST_INTERRUPTED)
-		object:RegisterEvent(&quot;UNIT_SPELLCAST_DELAYED&quot;, UNIT_SPELLCAST_DELAYED)
-		object:RegisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_START&quot;, UNIT_SPELLCAST_CHANNEL_START)
-		object:RegisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_UPDATE&quot;, UNIT_SPELLCAST_CHANNEL_UPDATE)
-		object:RegisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_INTERRUPTED&quot;, 'UNIT_SPELLCAST_INTERRUPTED')
-		object:RegisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_STOP&quot;, UNIT_SPELLCAST_CHANNEL_STOP)
-
-		castbar.parent = object
+		if(not (unit and unit:match'%wtarget$')) then
+			object:RegisterEvent(&quot;UNIT_SPELLCAST_START&quot;, UNIT_SPELLCAST_START)
+			object:RegisterEvent(&quot;UNIT_SPELLCAST_FAILED&quot;, UNIT_SPELLCAST_FAILED)
+			object:RegisterEvent(&quot;UNIT_SPELLCAST_STOP&quot;, UNIT_SPELLCAST_STOP)
+			object:RegisterEvent(&quot;UNIT_SPELLCAST_INTERRUPTED&quot;, UNIT_SPELLCAST_INTERRUPTED)
+			object:RegisterEvent(&quot;UNIT_SPELLCAST_DELAYED&quot;, UNIT_SPELLCAST_DELAYED)
+			object:RegisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_START&quot;, UNIT_SPELLCAST_CHANNEL_START)
+			object:RegisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_UPDATE&quot;, UNIT_SPELLCAST_CHANNEL_UPDATE)
+			object:RegisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_INTERRUPTED&quot;, 'UNIT_SPELLCAST_INTERRUPTED')
+			object:RegisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_STOP&quot;, UNIT_SPELLCAST_CHANNEL_STOP)
+		end
+
 		castbar:SetScript(&quot;OnUpdate&quot;, object.OnCastbarUpdate or onUpdate)
 
 		if object.unit == &quot;player&quot; then
@@ -343,7 +349,6 @@ local Disable = function(object, unit)
 		object:UnregisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_INTERRUPTED&quot;, UNIT_SPELLCAST_CHANNEL_INTERRUPTED)
 		object:UnregisterEvent(&quot;UNIT_SPELLCAST_CHANNEL_STOP&quot;, UNIT_SPELLCAST_CHANNEL_STOP)
 
-		castbar.parent = nil
 		castbar:SetScript(&quot;OnUpdate&quot;, nil)
 	end
 end</diff>
      <filename>oUF_embed/elements/castbar.lua</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@
 	 - colorDisconnected
 	 - colorHappiness
 	 - colorClass (Colors player units based on class)
+	 - colorClassPet (Colors pet units based on class)
 	 - colorClassNPC (Colors non-player units based on class)
 	 - colorReaction
 	 - colorSmooth - will use smoothGradient instead of the internal gradient if set.
@@ -64,11 +65,13 @@ local Update = function(self, event, unit)
 			t = self.colors.disconnected
 		elseif(bar.colorHappiness and unit == &quot;pet&quot; and GetPetHappiness()) then
 			t = self.colors.happiness[GetPetHappiness()]
-		elseif(bar.colorClass and UnitIsPlayer(unit)) or (bar.colorClassNPC and not UnitIsPlayer(unit)) then
+		elseif(bar.colorClass and UnitIsPlayer(unit)) or
+			(bar.colorClassNPC and not UnitIsPlayer(unit)) or
+			(bar.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then
 			local _, class = UnitClass(unit)
 			t = self.colors.class[class]
 		elseif(bar.colorReaction) then
-			r, g, b = UnitSelectionColor(unit)
+			t = self.colors.reaction[UnitReaction(unit, &quot;player&quot;)]
 		elseif(bar.colorSmooth and max ~= 0) then
 			r, g, b = self.ColorGradient(min / max, unpack(bar.smoothGradient or self.colors.smooth))
 		elseif(bar.colorHealth) then</diff>
      <filename>oUF_embed/elements/health.lua</filename>
    </modified>
    <modified>
      <diff>@@ -4,18 +4,22 @@ assert(global, 'X-oUF needs to be defined in the parent add-on.')
 local oUF = _G[global]
 
 local Update = function(self, event, unit)
-	if(self.unit ~= unit) then return end
+	if(not UnitIsUnit(self.unit, unit)) then return end
 
 	local portrait = self.Portrait
 	if(portrait:IsObjectType'Model') then
+		local name = UnitName(unit)
 		if(not UnitExists(unit) or not UnitIsConnected(unit) or not UnitIsVisible(unit)) then
 			portrait:SetModelScale(4.25)
 			portrait:SetPosition(0, 0, -1.5)
 			portrait:SetModel&quot;Interface\\Buttons\\talktomequestionmark.mdx&quot;
-		else
+		elseif(portrait.name ~= name or event == 'UNIT_MODEL_CHANGED') then
 			portrait:SetUnit(unit)
 			portrait:SetCamera(0)
-			portrait:Show()
+
+			portrait.name = name
+		else
+			portrait:SetCamera(0)
 		end
 	else
 		SetPortraitTexture(portrait, unit)
@@ -25,6 +29,7 @@ end
 local Enable = function(self)
 	if(self.Portrait) then
 		self:RegisterEvent(&quot;UNIT_PORTRAIT_UPDATE&quot;, Update)
+		self:RegisterEvent(&quot;UNIT_MODEL_CHANGED&quot;, Update)
 
 		return true
 	end
@@ -33,6 +38,7 @@ end
 local Disable = function(self)
 	if(self.Portrait) then
 		self:UnregisterEvent(&quot;UNIT_PORTRAIT_UPDATE&quot;, Update)
+		self:UnregisterEvent(&quot;UNIT_MODEL_CHANGED&quot;, Update)
 	end
 end
 </diff>
      <filename>oUF_embed/elements/portraits.lua</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,7 @@
 	 - colorHappiness
 	 - colorPower
 	 - colorClass (Colors player units based on class)
+	 - colorClassPet (Colors pet units based on class)
 	 - colorClassNPC (Colors non-player units based on class)
 	 - colorReaction
 	 - colorSmooth - will use smoothGradient instead of the internal gradient if set.
@@ -71,11 +72,13 @@ local Update = function(self, event, unit)
 			local _, ptype = UnitPowerType(unit)
 
 			t = self.colors.power[ptype]
-		elseif(bar.colorClass and UnitIsPlayer(unit)) or (bar.colorClassNPC and not UnitIsPlayer(unit)) then
+		elseif(bar.colorClass and UnitIsPlayer(unit)) or
+			(bar.colorClassNPC and not UnitIsPlayer(unit)) or
+			(bar.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then
 			local _, class = UnitClass(unit)
 			t = self.colors.class[class]
 		elseif(bar.colorReaction) then
-			r, g, b = UnitSelectionColor(unit)
+			t = self.colors.reaction[UnitReaction(unit, &quot;player&quot;)]
 		elseif(bar.colorSmooth) then
 			r, g, b = self.ColorGradient(min / max, unpack(bar.smoothGradient or self.colors.smooth))
 		end</diff>
      <filename>oUF_embed/elements/power.lua</filename>
    </modified>
    <modified>
      <diff>@@ -79,29 +79,30 @@ tags = {
 	end,
 }
 local tagEvents = {
-	[&quot;[curhp]&quot;]       = &quot;UNIT_HEALTH&quot;,
-	[&quot;[curpp]&quot;]       = &quot;UNIT_ENERGY UNIT_FOCUS UNIT_MANA UNIT_RAGE&quot;,
-	[&quot;[dead]&quot;]        = &quot;UNIT_HEALTH&quot;,
-	[&quot;[leader]&quot;]      = &quot;PARTY_LEADER_CHANGED&quot;,
-	[&quot;[leaderlong]&quot;]  = &quot;PARTY_LEADER_CHANGED&quot;,
-	[&quot;[level]&quot;]       = &quot;UNIT_LEVEL PLAYER_LEVEL_UP&quot;,
-	[&quot;[maxhp]&quot;]       = &quot;UNIT_MAXHEALTH&quot;,
-	[&quot;[maxpp]&quot;]       = &quot;UNIT_MAXENERGY UNIT_MAXFOCUS UNIT_MAXMANA UNIT_MAXRAGE&quot;,
-	[&quot;[missinghp]&quot;]   = &quot;UNIT_HEALTH UNIT_MAXHEALTH&quot;,
-	[&quot;[missingpp]&quot;]   = &quot;UNIT_MAXENERGY UNIT_MAXFOCUS UNIT_MAXMANA UNIT_MAXRAGE UNIT_ENERGY UNIT_FOCUS UNIT_MANA UNIT_RAGE UNIT_MAXRUNIC_POWER UNIT_RUNIC_POWER&quot;,
-	[&quot;[name]&quot;]        = &quot;UNIT_NAME_UPDATE&quot;,
-	[&quot;[offline]&quot;]     = &quot;UNIT_HEALTH&quot;,
-	[&quot;[perhp]&quot;]       = &quot;UNIT_HEALTH UNIT_MAXHEALTH&quot;,
-	[&quot;[perpp]&quot;]       = &quot;UNIT_MAXENERGY UNIT_MAXFOCUS UNIT_MAXMANA UNIT_MAXRAGE UNIT_ENERGY UNIT_FOCUS UNIT_MANA UNIT_RAGE UNIT_MAXRUNIC_POWER UNIT_RUNIC_POWER&quot;,
-	[&quot;[pvp]&quot;]         = &quot;UNIT_FACTION&quot;,
-	[&quot;[resting]&quot;]     = &quot;PLAYER_UPDATE_RESTING&quot;,
-	[&quot;[status]&quot;]      = &quot;UNIT_HEALTH PLAYER_UPDATE_RESTING&quot;,
-	[&quot;[smartlevel]&quot;]  = &quot;UNIT_LEVEL PLAYER_LEVEL_UP UNIT_CLASSIFICATION_CHANGED&quot;,
-	[&quot;[threat]&quot;]      = &quot;UNIT_THREAT_SITUATION_UPDATE&quot;,
-	[&quot;[threatcolor]&quot;] = &quot;UNIT_THREAT_SITUATION_UPDATE&quot;,
-	['[cpoints]']     = 'UNIT_COMBO_POINTS UNIT_TARGET',
-	[&quot;[classification]&quot;]      = &quot;UNIT_CLASSIFICATION_CHANGED&quot;,
-	[&quot;[shortclassification]&quot;] = &quot;UNIT_CLASSIFICATION_CHANGED&quot;,
+	[&quot;[curhp]&quot;]               = &quot;UNIT_HEALTH&quot;,
+	[&quot;[curpp]&quot;]               = &quot;UNIT_ENERGY UNIT_FOCUS UNIT_MANA UNIT_RAGE UNIT_RUNIC_POWER&quot;,
+	[&quot;[dead]&quot;]                = &quot;UNIT_HEALTH&quot;,
+	[&quot;[leader]&quot;]              = &quot;PARTY_LEADER_CHANGED&quot;,
+	[&quot;[leaderlong]&quot;]          = &quot;PARTY_LEADER_CHANGED&quot;,
+	[&quot;[level]&quot;]               = &quot;UNIT_LEVEL PLAYER_LEVEL_UP&quot;,
+	[&quot;[maxhp]&quot;]               = &quot;UNIT_MAXHEALTH&quot;,
+	[&quot;[maxpp]&quot;]               = &quot;UNIT_MAXENERGY UNIT_MAXFOCUS UNIT_MAXMANA UNIT_MAXRAGE UNIT_MAXRUNIC_POWER&quot;,
+	[&quot;[missinghp]&quot;]           = &quot;UNIT_HEALTH UNIT_MAXHEALTH&quot;,
+	[&quot;[missingpp]&quot;]           = &quot;UNIT_MAXENERGY UNIT_MAXFOCUS UNIT_MAXMANA UNIT_MAXRAGE UNIT_ENERGY UNIT_FOCUS UNIT_MANA UNIT_RAGE UNIT_MAXRUNIC_POWER UNIT_RUNIC_POWER&quot;,
+	[&quot;[name]&quot;]                = &quot;UNIT_NAME_UPDATE&quot;,
+	[&quot;[offline]&quot;]             = &quot;UNIT_HEALTH&quot;,
+	[&quot;[perhp]&quot;]               = &quot;UNIT_HEALTH UNIT_MAXHEALTH&quot;,
+	[&quot;[perpp]&quot;]               = &quot;UNIT_MAXENERGY UNIT_MAXFOCUS UNIT_MAXMANA UNIT_MAXRAGE UNIT_ENERGY UNIT_FOCUS UNIT_MANA UNIT_RAGE UNIT_MAXRUNIC_POWER UNIT_RUNIC_POWER&quot;,
+	[&quot;[pvp]&quot;]                 = &quot;UNIT_FACTION&quot;,
+	[&quot;[resting]&quot;]             = &quot;PLAYER_UPDATE_RESTING&quot;,
+	[&quot;[status]&quot;]              = &quot;UNIT_HEALTH PLAYER_UPDATE_RESTING&quot;,
+	[&quot;[smartlevel]&quot;]          = &quot;UNIT_LEVEL PLAYER_LEVEL_UP UNIT_CLASSIFICATION_CHANGED&quot;,
+	[&quot;[threat]&quot;]              = &quot;UNIT_THREAT_SITUATION_UPDATE&quot;,
+	[&quot;[threatcolor]&quot;]         = &quot;UNIT_THREAT_SITUATION_UPDATE&quot;,
+	['[cpoints]']             = 'UNIT_COMBO_POINTS UNIT_TARGET',
+	['[rare]']                = 'UNIT_CLASSIFICATION_CHANGED',
+	['[classification]']      = 'UNIT_CLASSIFICATION_CHANGED',
+	['[shortclassification]'] = 'UNIT_CLASSIFICATION_CHANGED',
 }
 
 local unitlessEvents = {
@@ -115,7 +116,7 @@ local frame = CreateFrame&quot;Frame&quot;
 frame:SetScript('OnEvent', function(self, event, unit)
 	local strings = events[event]
 	if(strings) then
-		for k, fontstring in ipairs(strings) do
+		for k, fontstring in next, strings do
 			if(not unitlessEvents[event] and fontstring.parent.unit == unit and fontstring:IsVisible()) then
 				fontstring:UpdateTag()
 			end
@@ -125,9 +126,10 @@ end)
 
 local eventlessUnits = {}
 local timer = .5
+local lowestTimer = .5
 local OnUpdate = function(self, elapsed)
-	if(timer &gt;= .5) then
-		for k, fs in ipairs(eventlessUnits) do
+	if(timer &gt;= lowestTimer) then
+		for k, fs in next, eventlessUnits do
 			if(fs.parent:IsShown() and UnitExists(fs.parent.unit)) then
 				fs:UpdateTag()
 			end
@@ -140,7 +142,7 @@ local OnUpdate = function(self, elapsed)
 end
 
 local OnShow = function(self)
-	for _, fs in ipairs(self.__tags) do
+	for _, fs in next, self.__tags do
 		fs:UpdateTag()
 	end
 end
@@ -167,7 +169,7 @@ end
 
 local UnregisterEvents = function(fontstr)
 	for events, data in pairs(events) do
-		for k, tagfsstr in ipairs(data) do
+		for k, tagfsstr in pairs(data) do
 			if(tagfsstr == fontstr) then
 				if(#data[k] == 1) then frame:UnregisterEvent(event) end
 				data[k] = nil
@@ -189,7 +191,7 @@ local Tag = function(self, fs, tagstr, frequent)
 	else
 		-- Since people ignore everything that's good practice - unregister the tag
 		-- if it already exists.
-		for _, tag in ipairs(self.__tags) do
+		for _, tag in pairs(self.__tags) do
 			if(fs == tag) then
 				-- We don't need to remove it from the __tags table as Untag handles
 				-- that for us.
@@ -264,7 +266,7 @@ local Tag = function(self, fs, tagstr, frequent)
 			local unit = self.parent.unit
 			local __unit = self.parent.__unit
 
-			for i, func in ipairs(args) do
+			for i, func in next, args do
 				tmp[i] = func(unit, __unit) or ''
 			end
 
@@ -276,7 +278,11 @@ local Tag = function(self, fs, tagstr, frequent)
 	fs.UpdateTag = func
 
 	local unit = self.unit
-	if((unit and unit:match'%w+target') or frequent) then
+	if((unit and unit:match'%w+target') or fs.frequentUpdates) then
+		if(type(fs.frequentUpdates) == 'number') then
+			lowestTimer = math.min(fs.frequentUpdates, lowestTimer)
+		end
+
 		table.insert(eventlessUnits, fs)
 
 		if(not frame:GetScript'OnUpdate') then
@@ -301,17 +307,19 @@ local Untag = function(self, fs)
 	if(not fs or self == oUF) then return end
 
 	UnregisterEvents(fs)
-	for k, fontstr in ipairs(eventlessUnits) do
+	for k, fontstr in next, eventlessUnits do
 		if(fs == fontstr) then
 			table.remove(eventlessUnits, k)
 		end
 	end
 
-	for k, fontstr in ipairs(self.__tags) do
+	for k, fontstr in next, self.__tags do
 		if(fontstr == fs) then
 			table.remove(self.__tags, k)
 		end
 	end
+
+	fs.UpdateTag = nil
 end
 
 oUF.Tags = tags</diff>
      <filename>oUF_embed/elements/tags.lua</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ local Update = function(self, event, unit)
 	local status = UnitThreatSituation(unit)
 
 	if(not self.OverrideUpdateThreat) then
-		if(status &gt; 0) then
+		if(status and status &gt; 0) then
 			local r, g, b = GetThreatStatusColor(status)
 			threat:SetVertexColor(r, g, b)
 			threat:Show()</diff>
      <filename>oUF_embed/elements/threat.lua</filename>
    </modified>
    <modified>
      <diff>@@ -4,119 +4,71 @@ assert(global, 'X-oUF needs to be defined in the parent add-on.')
 local oUF = _G[global]
 
 local objects = oUF.objects
-local units = oUF.units
 
-local toUnit = function(...)
-	for i=1, select('#', ...) do
-		local unit = select(i, ...)
+local VehicleDriverFrame
 
-		for k, object in ipairs(objects) do
-			if(object.__unit == unit) then
+local UpdateVehicleSwitch = function(self, attr, value)
+	if attr == &quot;unit&quot; then
+		self.unit = value
 
-				if(not InCombatLockdown()) then
-					object.__unit = nil
-					object:SetAttribute('unit', unit)
-				else
-					object.unit = unit
-					object:PLAYER_ENTERING_WORLD()
-				end
-			end
+		if self:GetAttribute(&quot;normalUnit&quot;) == &quot;player&quot; then
+			PlayerFrame.unit = self.unit
+			BuffFrame_Update()
 		end
 	end
 end
 
-local toVehicle = function(aUnit, bUnit, override)
-	local aFrame = units[override or aUnit]
-	local bFrame = units[bUnit]
-
-	aFrame.__unit = aFrame.unit
-	bFrame.__unit = bFrame.unit
+local Enable = function(self, unit)
+	if self.disallowVehicleSwap or (unit ~= &quot;player&quot; and unit ~= &quot;pet&quot;) then return end
 
-	if(not InCombatLockdown()) then
-		aFrame:SetAttribute('unit', bUnit)
-		bFrame:SetAttribute('unit', override or aUnit)
-	else
-		-- We manually change the unit here, so we can check if it's correct when
-		-- we drop combat.
-		aFrame.unit = bUnit
-		bFrame.unit = override or aUnit
-
-		-- Force an update to all the information is correct. This is usually done
-		-- by OnAttributeChanged.
-		aFrame:PLAYER_ENTERING_WORLD()
-		bFrame:PLAYER_ENTERING_WORLD()
+	if not VehicleDriverFrame then
+		VehicleDriverFrame = CreateFrame(&quot;Frame&quot;, nil, UIParent, &quot;SecureHandlerStateTemplate&quot;)
+		RegisterStateDriver(VehicleDriverFrame, &quot;vehicle&quot;, &quot;[target=vehicle,exists,bonusbar:5]vehicle;novehicle&quot;)
+		VehicleDriverFrame:SetAttribute(&quot;_onstate-vehicle&quot;, [[
+			if newstate == &quot;vehicle&quot; then
+				for idx, frame in pairs(VEHICLE_FRAMES) do
+					frame:SetAttribute(&quot;unit&quot;, frame:GetAttribute(&quot;vehicleUnit&quot;))
+				end
+			else
+				for idx, frame in pairs(VEHICLE_FRAMES) do
+					frame:SetAttribute(&quot;unit&quot;, frame:GetAttribute(&quot;normalUnit&quot;))
+				end
+			end
+		]])
+		VehicleDriverFrame:Execute([[
+			VEHICLE_FRAMES = newtable()
+		]])
 	end
-end
-
-local UNIT_ENTERED_VEHICLE = function(self, event, unit)
-	if(unit ~= self.unit) then return end
 
-	if(unit == 'player' and units.pet) then
-		-- Required for BuffFrame.lua
-		PlayerFrame.unit = 'vehicle'
-		BuffFrame_Update()
+	self:SetAttribute(&quot;normalUnit&quot;, unit)
 
-		toVehicle('vehicle', 'pet', 'player')
-	elseif(self.id) then
-		if(unit == 'party'..self.id and units['partypet'..self.id]) then
-			toVehicle(unit, 'partypet'..self.id)
-		elseif(unit == 'raid'..self.id and units['raidpet'..self.id]) then
-			toVehicle(unit, 'raidpet'..self.id)
-		end
+	if unit == &quot;player&quot; then
+		self:SetAttribute(&quot;vehicleUnit&quot;, &quot;pet&quot;)
+	elseif unit == &quot;pet&quot; then
+		self:SetAttribute(&quot;vehicleUnit&quot;, &quot;player&quot;)
 	end
-end
-
-local UNIT_EXITED_VEHICLE = function(self, event, unit)
-	if(unit ~= self.__unit) then return end
 
-	if(unit == 'player' and units.pet) then
-		-- Required for BuffFrame.lua
-		PlayerFrame.unit = 'player'
+	VehicleDriverFrame:SetFrameRef(&quot;vehicleFrame&quot;, self)
+	VehicleDriverFrame:Execute([[
+		local frame = self:GetFrameRef(&quot;vehicleFrame&quot;)
+		table.insert(VEHICLE_FRAMES, frame)
+	]])
 
-		toUnit('player', 'pet')
-	elseif(self.id) then
-		if(unit == 'party'..self.id and units['partypet'..self.id]) then
-			toUnit(unit, 'partypet'..self.id)
-		elseif(unit == 'raid'..self.id and units['raidpet'..self.id]) then
-			toUnit(unit, 'raidpet'..self.id)
-		end
-	end
-end
-
--- Swap the unit - I hate this solution and hope it's me whose stupid.
-local PLAYER_REGEN_ENABLED = function(self)
-	local unit = self.unit
-	if(self:GetAttribute'unit' ~= unit) then
-		self.__unit = nil
-		self:SetAttribute('unit', unit)
-	end
+	self:HookScript(&quot;OnAttributeChanged&quot;, UpdateVehicleSwitch)
 end
 
-oUF:AddElement(
-	'VehicleSwitch',
-
-	-- Update
-	function(...)
-		UNIT_ENTERED_VEHICLE(...)
-		UNIT_EXITED_VEHICLE(...)
-	end,
-
-	-- Enable
-	function(self, unit)
-		if(self.disallowVehicleSwap) then return end
-
-		if(unit ~= 'pet') then
-			self:RegisterEvent('UNIT_ENTERED_VEHICLE', UNIT_ENTERED_VEHICLE)
-			self:RegisterEvent('UNIT_EXITED_VEHICLE', UNIT_EXITED_VEHICLE)
+local Disable = function(self)
+	self:SetAttribute(&quot;unit&quot;, self:GetAttribute(&quot;normalUnit&quot;))
+	VehicleDriverFrame:SetFrameRef(&quot;vehicleFrame&quot;, self)
+	VehicleDriverFrame:Execute([[
+		local frame = self:GetFrameRef(&quot;vehicleFrame&quot;)
+		for idx, value in pairs(VEHICLE_FRAMES) do
+			if value == frame then
+				table.remove(VEHICLE_FRAMES, idx)
+				return
+			end
 		end
+	]])
+end
 
-		self:RegisterEvent('PLAYER_REGEN_ENABLED', PLAYER_REGEN_ENABLED)
-	end,
-
-	-- Disable
-	function(self)
-		self:UnregisterEvent('UNIT_ENTERED_VEHICLE', UNIT_ENTERED_VEHICLE)
-		self:UnregisterEvent('UNIT_EXITED_VEHICLE', UNIT_EXITED_VEHICLE)
-		self:UnregisterEvent('PLAYER_REGEN_ENABLED', PLAYER_REGEN_ENABLED)
-	end
-)
+oUF:AddElement(&quot;VehicleSwitch&quot;, nil, Enable, Disable)</diff>
      <filename>oUF_embed/elements/vehicle.lua</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
-## Interface: 30000
+## Interface: 30100
 ## Title: oUF
 ## Author: Haste
-## Version: 1.3.3
+## Version: 1.3.11
 ## X-eMail: troeks@gmail.com
 ## X-oUF: oUF
 ## Notes: Unit frame framework. Does nothing by itself.</diff>
      <filename>oUF_embed/oUF.toc</filename>
    </modified>
    <modified>
      <diff>@@ -51,16 +51,20 @@ local colors = {
 
 -- We do this because people edit the vars directly, and changing the default
 -- globals makes SPICE FLOW!
-for eclass, color in pairs(RAID_CLASS_COLORS) do
+for eclass, color in next, RAID_CLASS_COLORS do
 	colors.class[eclass] = {color.r, color.g, color.b}
 end
 
-for power, color in pairs(PowerBarColor) do
+for power, color in next, PowerBarColor do
 	if(type(power) == 'string') then
 		colors.power[power] = {color.r, color.g, color.b}
 	end
 end
 
+for eclass, color in next, FACTION_BAR_COLORS do
+	colors.reaction[eclass] = {color.r, color.g, color.b}
+end
+
 -- add-on object
 local oUF = CreateFrame&quot;Button&quot;
 local frame_metatable = {__index = oUF}
@@ -108,7 +112,7 @@ end
 
 -- Events
 local OnEvent = function(self, event, ...)
-	if(not self:IsShown() and not self.__unit) then return end
+	if(not self:IsShown() and not self.vehicleUnit) then return end
 	self[event](self, event, ...)
 end
 
@@ -120,7 +124,7 @@ local OnAttributeChanged = function(self, name, value)
 			return
 		else
 			if(self.hasChildren) then
-				for _, object in ipairs(objects) do
+				for _, object in next, objects do
 					local unit = SecureButton_GetModifiedUnit(object)
 					object.unit = conv[unit] or unit
 					object:PLAYER_ENTERING_WORLD()
@@ -253,11 +257,11 @@ local initObject = function(unit, style, ...)
 
 		object:RegisterEvent&quot;PLAYER_ENTERING_WORLD&quot;
 
-		for element in pairs(elements) do
+		for element in next, elements do
 			object:EnableElement(element, unit)
 		end
 
-		for _, func in ipairs(callback) do
+		for _, func in next, callback do
 			func(object)
 		end
 
@@ -356,7 +360,7 @@ function oUF:RegisterEvent(event, func)
 		if(func) then
 			self[event] = func
 		elseif(not self[event]) then
-			error(&quot;Handler for event [%s] does not exist.&quot;, event)
+			return error(&quot;Handler for event [%s] on unit [%s] does not exist.&quot;, event, self.unit or 'unknown')
 		end
 
 		RegisterEvent(self, event)
@@ -448,7 +452,7 @@ function oUF:PLAYER_ENTERING_WORLD(event)
 	local unit = self.unit
 	if(not UnitExists(unit)) then return end
 
-	for _, func in ipairs(self.__elements) do
+	for _, func in next, self.__elements do
 		func(self, event, unit)
 	end
 end</diff>
      <filename>oUF_embed/ouf.lua</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>50f946cf8085d301b439fce5f86633d9c8e02bee</id>
    </parent>
    <parent>
      <id>5844396fcb1df5222a34fcbb9af20036d5487c56</id>
    </parent>
  </parents>
  <author>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </author>
  <url>http://github.com/tekkub/ouf_tek/commit/8059b2cb8a7de2e13a4028701e01f6765384b547</url>
  <id>8059b2cb8a7de2e13a4028701e01f6765384b547</id>
  <committed-date>2009-04-19T18:15:16-07:00</committed-date>
  <authored-date>2009-04-19T18:15:16-07:00</authored-date>
  <message>Merge branch 'master' of git://haste.ixo.no/oUF

Conflicts:
	oUF_embed/elements/tags.lua</message>
  <tree>2d665513e6add89058968a48365e2cbc05167f17</tree>
  <committer>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </committer>
</commit>
