for the second part, change:
Code:
self:SetSize(width, height)
if(unit == "targettarget" or unit == "focus" or unit == "pet") then
self:SetSize(80, height)
end
to be like this...
Code:
if(unit == "targettarget") then
self:SetSize(x, y)
else if (unit == "focus" or unit == "pet") then
self:SetSize(80, height)
else
self:SetSize(width, height)
end