Quantcast

4.9.99

Steven Jackson [10-13-14 - 00:13]
4.9.99
Filename
Interface/AddOns/SVUI/SVUI.lua
Interface/AddOns/SVUI/SVUI.toc
Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-CLEANUP.blp
Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-DEPOSIT.blp
Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-PURCHASE.blp
Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-REAGENTS.blp
Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-1.blp
Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-2.blp
Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-3.blp
Interface/AddOns/SVUI/assets/artwork/Icons/GENERIC-STAR.blp
Interface/AddOns/SVUI/assets/artwork/Icons/MICROMENU.blp
Interface/AddOns/SVUI/assets/artwork/Icons/PROFESSIONS.blp
Interface/AddOns/SVUI/assets/artwork/Icons/Thumbs.db
Interface/AddOns/SVUI/assets/artwork/Template/DIALOG-1.blp
Interface/AddOns/SVUI/assets/artwork/Template/DIALOG-2.blp
Interface/AddOns/SVUI/docs/schema.lua
Interface/AddOns/SVUI/language/chinese_ui.lua
Interface/AddOns/SVUI/language/english_ui.lua
Interface/AddOns/SVUI/language/french_ui.lua
Interface/AddOns/SVUI/language/german_ui.lua
Interface/AddOns/SVUI/language/italian_ui.lua
Interface/AddOns/SVUI/language/korean_ui.lua
Interface/AddOns/SVUI/language/portuguese_ui.lua
Interface/AddOns/SVUI/language/russian_ui.lua
Interface/AddOns/SVUI/language/spanish_ui.lua
Interface/AddOns/SVUI/language/taiwanese_ui.lua
Interface/AddOns/SVUI/libs/LibStub/LibStub.lua
Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraBars/oUF_AuraBars.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_CombatFader/oUF_CombatFader.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DrunkenMaster/oUF_DrunkenMaster.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Experience/oUF_Experience.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Friendship/oUF_Friendship.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MainTank/oUF_MainTank.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MonkHarmony/oUF_MonkHarmony.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PallyPower/oUF_PallyPower.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PriestOrbs/oUF_PriestOrbs.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Reputation/oUF_Reputation.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Smooth/oUF_Smooth.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_TotemBars/oUF_TotemBars.lua
Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua
Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/castbar.lua
Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/healprediction.lua
Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/health.lua
Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/portraits.lua
Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/tags.lua
Interface/AddOns/SVUI/libs/oUF_Villain/oUF/ouf.lua
Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua
Interface/AddOns/SVUI/packages/actionbar/SVBar.lua
Interface/AddOns/SVUI/packages/aura/SVAura.lua
Interface/AddOns/SVUI/packages/bag/SVBag.lua
Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua
Interface/AddOns/SVUI/packages/bag/tools/sorting.lua
Interface/AddOns/SVUI/packages/chat/SVChat.lua
Interface/AddOns/SVUI/packages/dock/SVDock.lua
Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua
Interface/AddOns/SVUI/packages/map/SVMap.lua
Interface/AddOns/SVUI/packages/override/SVOverride.lua
Interface/AddOns/SVUI/packages/plates/SVPlate.lua
Interface/AddOns/SVUI/packages/stats/SVStats.lua
Interface/AddOns/SVUI/packages/stats/stats/experience.lua
Interface/AddOns/SVUI/packages/stats/stats/friends.lua
Interface/AddOns/SVUI/packages/stats/stats/guild.lua
Interface/AddOns/SVUI/packages/stats/stats/reputation.lua
Interface/AddOns/SVUI/packages/stats/stats/time.lua
Interface/AddOns/SVUI/packages/tip/SVTip.lua
Interface/AddOns/SVUI/packages/unit/SVUnit.lua
Interface/AddOns/SVUI/packages/unit/elements/auras.lua
Interface/AddOns/SVUI/packages/unit/elements/castbar.lua
Interface/AddOns/SVUI/packages/unit/elements/essentials.lua
Interface/AddOns/SVUI/packages/unit/elements/misc.lua
Interface/AddOns/SVUI/packages/unit/elements/tags.lua
Interface/AddOns/SVUI/packages/unit/frames.lua
Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua
Interface/AddOns/SVUI/packages/unit/resources/druid.lua
Interface/AddOns/SVUI/packages/unit/resources/mage.lua
Interface/AddOns/SVUI/packages/unit/resources/monk.lua
Interface/AddOns/SVUI/packages/unit/resources/paladin.lua
Interface/AddOns/SVUI/packages/unit/resources/priest.lua
Interface/AddOns/SVUI/packages/unit/resources/rogue.lua
Interface/AddOns/SVUI/packages/unit/resources/shaman.lua
Interface/AddOns/SVUI/packages/unit/resources/warlock.lua
Interface/AddOns/SVUI/scripts/ego.lua
Interface/AddOns/SVUI/scripts/misc.lua
Interface/AddOns/SVUI/scripts/mounts.lua
Interface/AddOns/SVUI/scripts/questwatch.lua
Interface/AddOns/SVUI/scripts/reactions.lua
Interface/AddOns/SVUI/scripts/spellbind.lua
Interface/AddOns/SVUI/setup/configs.lua
Interface/AddOns/SVUI/setup/installer.lua
Interface/AddOns/SVUI/setup/presets.lua
Interface/AddOns/SVUI/system/alerts.lua
Interface/AddOns/SVUI/system/animate.lua
Interface/AddOns/SVUI/system/common.lua
Interface/AddOns/SVUI/system/load.lua
Interface/AddOns/SVUI/system/media.lua
Interface/AddOns/SVUI/system/mentalo.lua
Interface/AddOns/SVUI/system/moveable.lua
Interface/AddOns/SVUI/system/slash.lua
Interface/AddOns/SVUI/system/timers.lua
Interface/AddOns/SVUI/system/utilities.lua
Interface/AddOns/SVUI/system/visibility.lua
Interface/AddOns/SVUI_ChatOMatic/Loader.lua
Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua
Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc
Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua
Interface/AddOns/SVUI_ChatOMatic/components/chat_history.lua
Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua
Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc
Interface/AddOns/SVUI_ConfigOMatic/components/bag.lua
Interface/AddOns/SVUI_ConfigOMatic/components/bar.lua
Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua
Interface/AddOns/SVUI_ConfigOMatic/components/filter.lua
Interface/AddOns/SVUI_ConfigOMatic/components/plate.lua
Interface/AddOns/SVUI_ConfigOMatic/components/profiles.lua
Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua
Interface/AddOns/SVUI_ConfigOMatic/components/units/raid.lua
Interface/AddOns/SVUI_CraftOMatic/Loader.lua
Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc
Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml
Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua
Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua
Interface/AddOns/SVUI_CraftOMatic/components/farming.lua
Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua
Interface/AddOns/SVUI_FightOMatic/Loader.lua
Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.lua
Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc
Interface/AddOns/SVUI_LogOMatic/Loader.lua
Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua
Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
Interface/AddOns/SVUI_StyleOMatic/Loader.lua
Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua
Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc
Interface/AddOns/SVUI_StyleOMatic/components/addons/Ace3.lua
Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/auctionhouse.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/barbershop.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/battlefield.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/blackmarket.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/calendar.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/challenges.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/character.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/chat.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/dressup.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/encounterjournal.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/friends.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/gossip.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/guild.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/help.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/inspect.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemsocketing.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemupgrade.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/keybinding.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/loothistory.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lossofcontrol.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/macro.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/mailbox.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/merchant.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petition.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petstable.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/pvp.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/raid.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/reforging.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/spellbook.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/store.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tabard.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/talents.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/taxi.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/timemanager.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trade.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tradeskill.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trainer.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/transmog.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/voidstorage.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldmap.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldstate.lua
Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua
Interface/AddOns/SVUI_TrackOMatic/Loader.lua
Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua
Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc
Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua
Interface/AddOns/SVUI_TrackOMatic/components/unitframe_gps.lua
diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua
index 1112741..f17e95e 100644
--- a/Interface/AddOns/SVUI/SVUI.lua
+++ b/Interface/AddOns/SVUI/SVUI.lua
@@ -13,47 +13,73 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ############################################################################## ]]--

---[[  CONSTANTS ]]--
-
-BINDING_HEADER_SVUI = "Supervillain UI";
-BINDING_NAME_SVUI_MARKERS = "Raid Markers";
-BINDING_NAME_SVUI_DOCKS = "Toggle Docks";
-BINDING_NAME_SVUI_RIDE = "Let's Ride";
-
-SLASH_RELOADUI1 = "/rl"
-SLASH_RELOADUI2 = "/reloadui"
-SlashCmdList.RELOADUI = ReloadUI
-
 --[[ GLOBALS ]]--

 local _G = _G;
+--LUA
 local unpack        = _G.unpack;
 local select        = _G.select;
-local pairs         = _G.pairs;
+local assert        = _G.assert;
 local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
 local rawset        = _G.rawset;
 local rawget        = _G.rawget;
-local tinsert       = _G.tinsert;
-local tremove       = _G.tremove;
 local tostring      = _G.tostring;
-local error         = _G.error;
+local tonumber      = _G.tonumber;
 local getmetatable  = _G.getmetatable;
 local setmetatable  = _G.setmetatable;
-local assert        = assert;
-local string    = _G.string;
-local math      = _G.math;
-local table     = _G.table;
---[[ STRING METHODS ]]--
-local upper = string.upper;
-local format, find, match, gsub = string.format, string.find, string.match, string.gsub;
---[[ MATH METHODS ]]--
-local floor = math.floor
---[[ TABLE METHODS ]]--
-local twipe, tsort, tconcat = table.wipe, table.sort, table.concat;
+--STRING
+local string        = _G.string;
+local upper         = string.upper;
+local format        = string.format;
+local find          = string.find;
+local match         = string.match;
+local gsub          = string.gsub;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+--TABLE
+local table         = _G.table;
+local tsort         = table.sort;
+local tconcat       = table.concat;
+local tinsert       = _G.tinsert;
+local tremove       = _G.tremove;
+local twipe         = _G.wipe;
+--BLIZZARD API
+local ReloadUI              = _G.ReloadUI;
+local GetLocale             = _G.GetLocale;
+local CreateFrame           = _G.CreateFrame;
+local IsAddOnLoaded         = _G.IsAddOnLoaded;
+local InCombatLockdown      = _G.InCombatLockdown;
+local GetAddOnInfo          = _G.GetAddOnInfo;
+local LoadAddOn             = _G.LoadAddOn;
+local SendAddonMessage      = _G.SendAddonMessage;
+local LibStub               = _G.LibStub;
+local GetAddOnMetadata      = _G.GetAddOnMetadata;
+local GetCVarBool           = _G.GetCVarBool;
+local GameTooltip           = _G.GameTooltip;
+local StaticPopup_Hide      = _G.StaticPopup_Hide;
+local ERR_NOT_IN_COMBAT     = _G.ERR_NOT_IN_COMBAT;
+
+--[[  CONSTANTS ]]--
+
+_G.BINDING_HEADER_SVUI = "Supervillain UI";
+_G.BINDING_NAME_SVUI_MARKERS = "Raid Markers";
+_G.BINDING_NAME_SVUI_DOCKS = "Toggle Docks";
+_G.BINDING_NAME_SVUI_RIDE = "Let's Ride";
+
+_G.SlashCmdList.RELOADUI = ReloadUI
+_G.SLASH_RELOADUI1 = "/rl"
+_G.SLASH_RELOADUI2 = "/reloadui"

 --[[ GET THE REGISTRY LIB ]]--

-local SVLib = LibSuperVillain;
+local SVLib = _G.LibSuperVillain;

 --[[ LOCALS ]]--

@@ -99,8 +125,13 @@ end

 --[[ BUILD CLASS COLOR GLOBAL ]]--

-SVUI_CLASS_COLORS = {};
+local SVUI_CLASS_COLORS;
+
 do
+    local env = getfenv(0)
+    env.SVUI_CLASS_COLORS = {}
+    SVUI_CLASS_COLORS = env.SVUI_CLASS_COLORS
+
     local classes = {};
     local supercolors = {
         ["HUNTER"]        = { r = 0.454, g = 0.698, b = 0 },
diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc
index 4e5264d..572cf9a 100644
--- a/Interface/AddOns/SVUI/SVUI.toc
+++ b/Interface/AddOns/SVUI/SVUI.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## Title: |cffFF9900SVUI|r
 ## Notes: Supervillain UI [|cff9911FFCore Framework|r].
 ## SavedVariables: SVUI_Global
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-CLEANUP.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-CLEANUP.blp
new file mode 100644
index 0000000..514d5e0
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-CLEANUP.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-DEPOSIT.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-DEPOSIT.blp
new file mode 100644
index 0000000..683d6a5
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-DEPOSIT.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-PURCHASE.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-PURCHASE.blp
index 1ac9ca8..49f4726 100644
Binary files a/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-PURCHASE.blp and b/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-PURCHASE.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-REAGENTS.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-REAGENTS.blp
new file mode 100644
index 0000000..d77f134
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/BAGS-REAGENTS.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-1.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-1.blp
new file mode 100644
index 0000000..32efb88
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-1.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-2.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-2.blp
new file mode 100644
index 0000000..bef839f
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-2.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-3.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-3.blp
new file mode 100644
index 0000000..a46772e
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-3.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/GENERIC-STAR.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/GENERIC-STAR.blp
new file mode 100644
index 0000000..8c89657
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/GENERIC-STAR.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/MICROMENU.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/MICROMENU.blp
index c9928f0..088fe01 100644
Binary files a/Interface/AddOns/SVUI/assets/artwork/Icons/MICROMENU.blp and b/Interface/AddOns/SVUI/assets/artwork/Icons/MICROMENU.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/PROFESSIONS.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/PROFESSIONS.blp
index e4c7c84..c1f8518 100644
Binary files a/Interface/AddOns/SVUI/assets/artwork/Icons/PROFESSIONS.blp and b/Interface/AddOns/SVUI/assets/artwork/Icons/PROFESSIONS.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/Thumbs.db b/Interface/AddOns/SVUI/assets/artwork/Icons/Thumbs.db
new file mode 100644
index 0000000..15d6ea3
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/Thumbs.db differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Template/DIALOG-1.blp b/Interface/AddOns/SVUI/assets/artwork/Template/DIALOG-1.blp
new file mode 100644
index 0000000..3adc6a3
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Template/DIALOG-1.blp differ
diff --git a/Interface/AddOns/SVUI/assets/artwork/Template/DIALOG-2.blp b/Interface/AddOns/SVUI/assets/artwork/Template/DIALOG-2.blp
new file mode 100644
index 0000000..b06e5f4
Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Template/DIALOG-2.blp differ
diff --git a/Interface/AddOns/SVUI/docs/schema.lua b/Interface/AddOns/SVUI/docs/schema.lua
index 61dffa4..fdf841f 100644
--- a/Interface/AddOns/SVUI/docs/schema.lua
+++ b/Interface/AddOns/SVUI/docs/schema.lua
@@ -42,7 +42,7 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #

 ]]--

-local lib = LibSuperVillain
+local lib = _G.LibSuperVillain
 local PKG = {};

 --Here you would build your package object, then...
diff --git a/Interface/AddOns/SVUI/language/chinese_ui.lua b/Interface/AddOns/SVUI/language/chinese_ui.lua
index 6ce4bc7..53efbcc 100644
--- a/Interface/AddOns/SVUI/language/chinese_ui.lua
+++ b/Interface/AddOns/SVUI/language/chinese_ui.lua
@@ -1,4 +1,4 @@
-local L = LibSuperVillain:Lang("zhCN");
+local L = _G.LibSuperVillain:Lang("zhCN");
 if not L then return end
 --[[REACTION TEXTS]]--
 L[" is drinking."] = true;
diff --git a/Interface/AddOns/SVUI/language/english_ui.lua b/Interface/AddOns/SVUI/language/english_ui.lua
index fdff64a..9211ac5 100644
--- a/Interface/AddOns/SVUI/language/english_ui.lua
+++ b/Interface/AddOns/SVUI/language/english_ui.lua
@@ -1,4 +1,4 @@
-local L = LibSuperVillain:Lang("enUS", true);
+local L = _G.LibSuperVillain:Lang("enUS", true);
 if not L then return; end
 --[[REACTION TEXTS]]--
 L[" is drinking."] = true;
diff --git a/Interface/AddOns/SVUI/language/french_ui.lua b/Interface/AddOns/SVUI/language/french_ui.lua
index 5767ed6..6dd382c 100644
--- a/Interface/AddOns/SVUI/language/french_ui.lua
+++ b/Interface/AddOns/SVUI/language/french_ui.lua
@@ -1,4 +1,4 @@
-local L = LibSuperVillain:Lang("frFR");
+local L = _G.LibSuperVillain:Lang("frFR");
 if not L then return; end
 --[[REACTION TEXTS]]--
 L[" is drinking."] = true;
diff --git a/Interface/AddOns/SVUI/language/german_ui.lua b/Interface/AddOns/SVUI/language/german_ui.lua
index 1b597e7..6cadd3a 100644
--- a/Interface/AddOns/SVUI/language/german_ui.lua
+++ b/Interface/AddOns/SVUI/language/german_ui.lua
@@ -1,4 +1,4 @@
-local L = LibSuperVillain:Lang("deDE");
+local L = _G.LibSuperVillain:Lang("deDE");
 if not L then return end
 --[[REACTION TEXTS]]--
 L[" is drinking."] = true;
diff --git a/Interface/AddOns/SVUI/language/italian_ui.lua b/Interface/AddOns/SVUI/language/italian_ui.lua
index 09c14a2..1a993cd 100644
--- a/Interface/AddOns/SVUI/language/italian_ui.lua
+++ b/Interface/AddOns/SVUI/language/italian_ui.lua
@@ -1,4 +1,4 @@
-local L = LibSuperVillain:Lang("itIT");
+local L = _G.LibSuperVillain:Lang("itIT");
 if not L then return; end
 --[[REACTION TEXTS]]--
 L[" is drinking."] = true;
diff --git a/Interface/AddOns/SVUI/language/korean_ui.lua b/Interface/AddOns/SVUI/language/korean_ui.lua
index 5fb983b..d0c5665 100644
--- a/Interface/AddOns/SVUI/language/korean_ui.lua
+++ b/Interface/AddOns/SVUI/language/korean_ui.lua
@@ -1,4 +1,4 @@
-local L = LibSuperVillain:Lang("koKR");
+local L = _G.LibSuperVillain:Lang("koKR");
 if not L then return; end
 --[[REACTION TEXTS]]--
 L[" is drinking."] = true;
diff --git a/Interface/AddOns/SVUI/language/portuguese_ui.lua b/Interface/AddOns/SVUI/language/portuguese_ui.lua
index 2b55f4c..1126daa 100644
--- a/Interface/AddOns/SVUI/language/portuguese_ui.lua
+++ b/Interface/AddOns/SVUI/language/portuguese_ui.lua
@@ -1,4 +1,4 @@
-local L = LibSuperVillain:Lang("ptBR");
+local L = _G.LibSuperVillain:Lang("ptBR");
 if not L then return; end
 --[[REACTION TEXTS]]--
 L[" is drinking."] = true;
diff --git a/Interface/AddOns/SVUI/language/russian_ui.lua b/Interface/AddOns/SVUI/language/russian_ui.lua
index 78a0df3..14aec3f 100644
--- a/Interface/AddOns/SVUI/language/russian_ui.lua
+++ b/Interface/AddOns/SVUI/language/russian_ui.lua
@@ -1,4 +1,4 @@
-local L = LibSuperVillain:Lang("ruRU");
+local L = _G.LibSuperVillain:Lang("ruRU");
 if not L then return; end
 --[[REACTION TEXTS]]--
 L[" is drinking."] = true;
diff --git a/Interface/AddOns/SVUI/language/spanish_ui.lua b/Interface/AddOns/SVUI/language/spanish_ui.lua
index 64a3e0c..fb3d1b5 100644
--- a/Interface/AddOns/SVUI/language/spanish_ui.lua
+++ b/Interface/AddOns/SVUI/language/spanish_ui.lua
@@ -1,6 +1,6 @@
-local L = LibSuperVillain:Lang("esES");
+local L = _G.LibSuperVillain:Lang("esES");
 if not L then
-	L = LibSuperVillain:Lang("esMX")
+	L = _G.LibSuperVillain:Lang("esMX")
 end
 if not L then return; end
 --[[REACTION TEXTS]]--
diff --git a/Interface/AddOns/SVUI/language/taiwanese_ui.lua b/Interface/AddOns/SVUI/language/taiwanese_ui.lua
index 759aebe..13e99bc 100644
--- a/Interface/AddOns/SVUI/language/taiwanese_ui.lua
+++ b/Interface/AddOns/SVUI/language/taiwanese_ui.lua
@@ -1,4 +1,4 @@
-local L = LibSuperVillain:Lang("zhTW");
+local L = _G.LibSuperVillain:Lang("zhTW");
 if not L then return; end
 --[[REACTION TEXTS]]--
 L[" is drinking."] = true;
diff --git a/Interface/AddOns/SVUI/libs/LibStub/LibStub.lua b/Interface/AddOns/SVUI/libs/LibStub/LibStub.lua
index 0a41ac0..ade16d8 100644
--- a/Interface/AddOns/SVUI/libs/LibStub/LibStub.lua
+++ b/Interface/AddOns/SVUI/libs/LibStub/LibStub.lua
@@ -1,5 +1,6 @@
 -- LibStub is a simple versioning stub meant for use in Libraries.  http://www.wowace.com/wiki/LibStub for more info
 -- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
+local _G = getfenv(0)
 local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2  -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
 local LibStub = _G[LIBSTUB_MAJOR]

diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
index 3c27e64..1dc362e 100644
--- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
+++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua
@@ -25,25 +25,25 @@ core add-ins functioning outside of the core object.
 --]]

 --[[ LOCALIZED GLOBALS ]]--
-local _G            = getfenv(0);
+--GLOBAL NAMESPACE
+local _G = getfenv(0);
 --LUA
 local unpack        = _G.unpack;
 local select        = _G.select;
-local pairs         = _G.pairs;
+local assert        = _G.assert;
 local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
 local rawset        = _G.rawset;
 local rawget        = _G.rawget;
 local tostring      = _G.tostring;
-local error         = _G.error;
-local next          = _G.next;
-local pcall         = _G.pcall;
+local tonumber      = _G.tonumber;
 local getmetatable  = _G.getmetatable;
 local setmetatable  = _G.setmetatable;
-local assert        = _G.assert;
---BLIZZARD
-local tinsert       = _G.tinsert;
-local tremove       = _G.tremove;
-local twipe         = _G.wipe;
 --STRING
 local string        = _G.string;
 local upper         = string.upper;
@@ -58,12 +58,28 @@ local floor         = math.floor
 local table         = _G.table;
 local tsort         = table.sort;
 local tconcat       = table.concat;
+local tinsert       = _G.tinsert;
+local tremove       = _G.tremove;
+local twipe         = _G.wipe;
+--BLIZZARD API
+local ReloadUI              = _G.ReloadUI;
+local GetLocale             = _G.GetLocale;
+local CreateFrame           = _G.CreateFrame;
+local IsAddOnLoaded         = _G.IsAddOnLoaded;
+local GetNumAddOns          = _G.GetNumAddOns;
+local GetAddOnInfo          = _G.GetAddOnInfo;
+local LoadAddOn             = _G.LoadAddOn;
+local EnableAddOn           = _G.EnableAddOn;
+local GetSpecialization     = _G.GetSpecialization;
+local GetAddOnMetadata      = _G.GetAddOnMetadata;
+local IsAddOnLoadOnDemand   = _G.IsAddOnLoadOnDemand;
+

 --[[ LIB CONSTRUCT ]]--
-local lib = _G["LibSuperVillain"]
-if not lib then
-    _G["LibSuperVillain"] = {}
-    lib = _G["LibSuperVillain"]
+local lib
+do
+    _G.LibSuperVillain = {}
+    lib = _G.LibSuperVillain
 end

 --[[ ADDON DATA ]]--
@@ -183,8 +199,9 @@ function string.link(this, prefix, text, color)
 end

 function string.explode(str, delim)
-   local res = { }
+   local res = {}
    local pattern = format("([^%s]+)%s()", delim, delim)
+   local line, pos
    while (true) do
       line, pos = match(str, pattern, pos)
       if line == nil then break end
@@ -246,14 +263,14 @@ function lib:Lang(locale, isDefault)
     if(not locale) then
         return self.Localization
     else
-        local gameLocale = GetLocale()
-        if gameLocale == "enGB" then gameLocale = "enUS" end
+        local GAME_LOCALE = GetLocale()
+        if GAME_LOCALE == "enGB" then GAME_LOCALE = "enUS" end

         activeLocale = self.Localization

         if isDefault then
             return defaultwrite
-        elseif(locale == GAME_LOCALE or locale == gameLocale) then
+        elseif(locale == GAME_LOCALE) then
             return metawrite
         end
     end
@@ -470,11 +487,6 @@ function lib:UpdateDatabase(event)
                 removedefaults(sv[k], src[k])
             end
         end
-        for k,v in pairs(CACHE_SV) do
-            if(k ~= "STORED") then
-                CACHE_SV[k] = nil
-            end
-        end
     elseif(event == "ACTIVE_TALENT_GROUP_CHANGED") then
         local LastKey = SOURCE_KEY
         if(PROFILE_SV.SAFEDATA and PROFILE_SV.SAFEDATA.dualSpecEnabled) then
@@ -930,12 +942,14 @@ local Core_NewPackage = function(self, schema, header)
     return self[schema]
 end

-local Core_ResetData = function(self, sub, sub2)
+local Core_ResetData = function(self, sub, sub2, sub3)
     local data = self.db
     local sv = rawget(data, "data")
     local src = rawget(data, "defaults")
     local targetData
-    if(sub2 and sv and sv[sub]) then
+    if(sub3 and sub2 and sv and sv[sub] and sv[sub][sub2]) then
+        targetData = sv[sub][sub2][sub3]
+    elseif(sub2 and sv and sv[sub]) then
         targetData = sv[sub][sub2]
     elseif(sub and sv) then
         targetData = sv[sub]
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.lua
index ac98666..df3321e 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.lua
@@ -1,3 +1,19 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type         	= _G.type;
+--BLIZZARD API
+local UnitIsConnected 		= _G.UnitIsConnected;
+local UnitIsTappedByPlayer 	= _G.UnitIsTappedByPlayer;
+local UnitIsTapped       	= _G.UnitIsTapped;
+local UnitIsPlayer       	= _G.UnitIsPlayer;
+local UnitIsFriend       	= _G.UnitIsFriend;
+local UnitIsDeadOrGhost  	= _G.UnitIsDeadOrGhost;
+local UnitClassification 	= _G.UnitClassification;
+
 local parent, ns = ...
 local oUF = ns.oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc
index 5517fa0..9deaa79 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc
@@ -2,7 +2,7 @@
 ## Title: oUF ActionPanel
 ## Notes: Adds a backing to all unit frames that provides many utilities.
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## X-Category: oUF
 ## Dependencies: oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.lua
index fdfaa1c..def4e56 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.lua
@@ -1,3 +1,17 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type         	= _G.type;
+--BLIZZARD API
+local UnitAura       	 = _G.UnitAura;
+local UnitCanAssist      = _G.UnitCanAssist;
+local GetSpellInfo       = _G.GetSpellInfo;
+local GetSpecialization  = _G.GetSpecialization;
+local GetActiveSpecGroup = _G.GetActiveSpecGroup;
+
 local _, ns = ...
 local oUF = oUF or ns.oUF
 if not oUF then return end
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc
index f86751f..e56137c 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc
@@ -2,7 +2,7 @@
 ## Title: oUF Afflicted
 ## Notes: Adds Custom Debuff Highlighting to oUF.
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## X-Category: oUF
 ## Dependencies: oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.lua
index 55456bd..3b99824 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.lua
@@ -1,3 +1,15 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type         	= _G.type;
+--BLIZZARD API
+local GetTime       	= _G.GetTime;
+local GetSpecialization = _G.GetSpecialization;
+local UnitDebuff      	= _G.UnitDebuff;
+
 if select(2, UnitClass('player')) ~= "MAGE" then return end

 local _, ns = ...
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc
index 4c12506..6cbcafa 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc
@@ -2,7 +2,7 @@
 ## Title: oUF Arcane Charge
 ## Notes: Adds support for arcane charge indicators to oUF.
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## Dependencies: oUF

 oUF_ArcaneCharge.lua
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraBars/oUF_AuraBars.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraBars/oUF_AuraBars.lua
index 65c3e76..d4d8fe3 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraBars/oUF_AuraBars.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraBars/oUF_AuraBars.lua
@@ -1,18 +1,41 @@
 --[[ MODIFIED FOR SVUI BY MUNGLUNCH ]]--
+
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type         	= _G.type;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor;
+local huge          = math.huge;
+local min 			= math.min;
+--TABLE
+local table 		= _G.table;
+local tsort 		= table.sort;
+--BLIZZARD API
+local GetTime       = _G.GetTime;
+local CreateFrame   = _G.CreateFrame;
+local UnitAura      = _G.UnitAura;
+local UnitIsFriend  = _G.UnitIsFriend;
+local GameTooltip  	= _G.GameTooltip;
+local DebuffTypeColor  = _G.DebuffTypeColor;
+
 local _, ns = ...
 local oUF = oUF or ns.oUF
 assert(oUF, 'oUF_AuraBars was unable to locate oUF install.')

-local format = string.format
-local floor, huge, min = math.floor, math.huge, math.min
-local tsort = table.sort
-
 local function Round(number, decimalPlaces)
 	if decimalPlaces and decimalPlaces > 0 then
 		local mult = 10^decimalPlaces
-		return floor(number * mult + .5) / mult
+		return floor((number * mult) + .5) / mult
 	end
-	return floor(num + .5)
+	return floor(number + .5)
 end

 local DAY, HOUR, MINUTE = 86400, 3600, 60
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua
index b011926..d2bd366 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_AuraWatch/oUF_AuraWatch.lua
@@ -1,110 +1,28 @@
---[[------------------------------------------------------------------------------------------------------
-oUF_AuraWatch by Astromech
-Please leave comments, suggestions, and bug reports on this addon's WoWInterface page
-
-To setup, create a table named AuraWatch in your unit frame. There are several options
-you can specify, as explained below.
-
-	icons
-		Mandatory!
-		A table of frames to be used as icons. oUF_Aurawatch does not position
-		these frames, so you must do so yourself. Each icon needs a spellID entry,
-		which is the spell ID of the aura to watch. Table should be set up
-		such that values are icon frames, but the keys can be anything.
-
-		Note each icon can have several options set as well. See below.
-	strictMatching
-		Default: false
-		If true, AuraWatch will only show an icon if the specific aura
-		with the specified spell id is on the unit. If false, AuraWatch
-		will show the icon if any aura with the same name and icon texture
-		is on the unit. Strict matching can be undesireable because most
-		ranks of an aura have different spell ids.
-	missingAlpha
-		Default 0.75
-		The alpha value for icons of auras which have faded from the unit.
-	presentAlpha
-		Default 1
-		The alpha value for icons or auras present on the unit.
-	onlyShowMissing
-		Default false
-		If this is true, oUF_AW will hide icons if they are present on the unit.
-	onlyShowPresent
-		Default false
-		If this is true, oUF_AW will hide icons if they have expired from the unit.
-	hideCooldown
-		Default false
-		If this is true, oUF_AW will not create a cooldown frame
-	hideCount
-		Default false
-		If this is true, oUF_AW will not create a count fontstring
-	fromUnits
-		Default {["player"] = true, ["pet"] = true, ["vehicle"] = true}
-		A table of units from which auras can originate. Have the units be the keys
-		and "true" be the values.
-	anyUnit
-		Default false
-		Set to true for oUF_AW to to show an aura no matter what unit it
-		originates from. This will override any fromUnits setting.
-	PostCreateIcon
-		Default nil
-		A function to call when an icon is created to modify it, such as adding
-		a border or repositioning the count fontstring. Leave as nil to ignore.
-		The arguements are: AuraWatch table, icon, auraSpellID, auraName, unitFrame
-
-Below are options set on a per icon basis. Set these as fields in the icon frames.
-
-The following settings can be overridden from the AuraWatch table on a per-aura basis:
-	onlyShowMissing
-	onlyShowPresent
-	hideCooldown
-	hideCount
-	fromUnits
-	anyUnit
-
-The following settings are unique to icons:
-
-	spellID
-		Mandatory!
-		The spell id of the aura, as explained above.
-	icon
-		Default aura texture
-		A texture value for this icon.
-	overlay
-		Default Blizzard aura overlay
-		An overlay for the icon. This is not created if a custom icon texture is created.
-	count
-		Default A fontstring
-		An fontstring to show the stack count of an aura.
-
-Here is an example of how to set oUF_AW up:
-
-	local createAuraWatch = function(self, unit)
-		local auras = {}
-
-		-- A table of spellIDs to create icons for
-		-- To find spellIDs, look up a spell on www.wowhead.com and look at the URL
-		-- http://www.wowhead.com/?spell=SPELL_ID
-		local spellIDs = { ... }
-
-		auras.presentAlpha = 1
-		auras.missingAlpha = .7
-		auras.PostCreateIcon = myCustomIconSkinnerFunction
-		-- Set any other AuraWatch settings
-		auras.icons = {}
-		for i, sid in pairs(spellIDs) do
-			local icon = CreateFrame("Frame", nil, auras)
-			icon.spellID = sid
-			-- set the dimensions and positions
-			icon:SetWidth(24)
-			icon:SetHeight(24)
-			icon:SetPoint("BOTTOM", self, "BOTTOM", 0, 28 * i)
-			auras.icons[sid] = icon
-			-- Set any other AuraWatch icon settings
-		end
-		self.AuraWatch = auras
-	end
------------------------------------------------------------------------------------------------------------]]
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+local ceil          = math.ceil
+--BLIZZARD API
+local GetTime       	= _G.GetTime;
+local CreateFrame       = _G.CreateFrame;
+local UnitAura         	= _G.UnitAura;
+local GetSpellInfo      = _G.GetSpellInfo;
+local NumberFontNormal  = _G.NumberFontNormal;

 local _, ns = ...
 local oUF = oUF or ns.oUF
@@ -147,8 +65,9 @@ do
 	end
 end

-local day, hour, minute, second = 86400, 3600, 60, 1
-function formatTime(s)
+local day, hour, minute, second = 86400, 3600, 60, 1;
+
+local function formatTime(s)
 	if s >= day then
 		return format("%dd", ceil(s / hour))
 	elseif s >= hour then
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_CombatFader/oUF_CombatFader.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_CombatFader/oUF_CombatFader.lua
index 37dba30..2ed55b1 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_CombatFader/oUF_CombatFader.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_CombatFader/oUF_CombatFader.lua
@@ -1,3 +1,24 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local type  		= _G.type;
+
+--BLIZZARD API
+local InCombatLockdown  = _G.InCombatLockdown;
+local UnitHealth        = _G.UnitHealth;
+local UnitExists        = _G.UnitExists;
+local UnitHealthMax     = _G.UnitHealthMax;
+local UnitCastingInfo   = _G.UnitCastingInfo;
+local UnitChannelInfo   = _G.UnitChannelInfo;
+
 local parent, ns = ...
 local oUF = ns.oUF
 local frames, allFrames = {}, {}
@@ -73,7 +94,7 @@ local Update = function(self, arg1, arg2)
 end

 local Enable = function(self, unit)
-	if(not CORE) then CORE = SVUI end
+	if(not CORE) then CORE = ns end

 	if self.CombatFade then
 		frames[self] = self.unit
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.lua
index 48cd364..f95e27d 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.lua
@@ -1,3 +1,36 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+local ceil          = math.ceil
+--BLIZZARD API
+local GetTime       			= _G.GetTime;
+local CreateFrame       		= _G.CreateFrame;
+local UnitIsEnemy         		= _G.UnitIsEnemy;
+local UnitGUID      			= _G.UnitGUID;
+local IsActiveBattlefieldArena  = _G.IsActiveBattlefieldArena;
+local UnitFactionGroup 			= _G.UnitFactionGroup;
+local GetNumArenaOpponentSpecs 	= _G.GetNumArenaOpponentSpecs;
+local GetArenaOpponentSpec      = _G.GetArenaOpponentSpec;
+local GetSpecializationInfoByID = _G.GetSpecializationInfoByID;
+local UnitName       			= _G.UnitName;
+local SendChatMessage  			= _G.SendChatMessage;
+local CooldownFrame_SetTimer 	= _G.CooldownFrame_SetTimer;
+
 local _, ns = ...
 local oUF = ns.oUF

@@ -61,7 +94,7 @@ local function LogUpdate(self, event, ...)
 	elseif(alert and event == "UNIT_SPELLCAST_SUCCEEDED") then
 		local unitID, spellName, _, _, spellID = ...
 		if UnitIsEnemy("player", unitID) and (spellID == 118358 or spellID == 104270 or spellName:find("Drink")) then
-			SendChatMessage(UnitName(unit)..L[" is drinking."], "RAID_WARNING")
+			SendChatMessage(("%s is drinking."):format(UnitName(self.unit)), "RAID_WARNING")
 		end
 	end
 end
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc
index 2d58083..3fd9fb2 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc
@@ -2,7 +2,7 @@
 ## Title: oUF Combatant
 ## Notes: Adds PvP trinket status and spec icons to oUF frames.
 ## Author: Munglunch
-## Version: 4.80
+## Version: 4.90
 ## X-Category: oUF
 ## Dependencies: oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.lua
index f650376..51e925a 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DruidMana/oUF_DruidMana.lua
@@ -1,3 +1,37 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local type  		= _G.type;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+local ceil          = math.ceil
+--TABLE
+local table         = _G.table;
+local wipe          = _G.wipe;
+--BLIZZARD API
+local BEAR_FORM       		= _G.BEAR_FORM;
+local CAT_FORM 				= _G.CAT_FORM;
+local SPELL_POWER_MANA      = _G.SPELL_POWER_MANA;
+local UnitClass         	= _G.UnitClass;
+local UnitPower         	= _G.UnitPower;
+local UnitReaction         	= _G.UnitReaction;
+local UnitPowerMax         	= _G.UnitPowerMax;
+local UnitIsPlayer      	= _G.UnitIsPlayer;
+local UnitPlayerControlled  = _G.UnitPlayerControlled;
+local GetShapeshiftFormID 	= _G.GetShapeshiftFormID;
+
 if(select(2, UnitClass('player')) ~= 'DRUID') then return end

 local _, ns = ...
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DrunkenMaster/oUF_DrunkenMaster.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DrunkenMaster/oUF_DrunkenMaster.lua
index d4b8950..eeb45e6 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DrunkenMaster/oUF_DrunkenMaster.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_DrunkenMaster/oUF_DrunkenMaster.lua
@@ -1,3 +1,22 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local type  		= _G.type;
+--BLIZZARD API
+local GetLocale 					= _G.GetLocale;
+local GetShapeshiftFormID 			= _G.GetShapeshiftFormID;
+local UnitAura         				= _G.UnitAura;
+local UnitHasVehiclePlayerFrameUI 	= _G.UnitHasVehiclePlayerFrameUI;
+local MonkStaggerBar 				= _G.MonkStaggerBar;
+
 if select(2, UnitClass('player')) ~= "MONK" then return end

 local parent, ns = ...
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Experience/oUF_Experience.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Experience/oUF_Experience.lua
index 2c5573a..9b00640 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Experience/oUF_Experience.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Experience/oUF_Experience.lua
@@ -1,3 +1,29 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local type  		= _G.type;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+--BLIZZARD API
+local UnitXP       		= _G.UnitXP;
+local UnitXPMax 		= _G.UnitXPMax;
+local GetXPExhaustion   = _G.GetXPExhaustion;
+local UnitLevel         = _G.UnitLevel;
+local UnitHasVehicleUI  = _G.UnitHasVehicleUI;
+local MAX_PLAYER_LEVEL  = _G.MAX_PLAYER_LEVEL;
+
 local __, ns = ...
 local oUF = ns.oUF or oUF
 assert(oUF, 'oUF Experience was unable to locate oUF install')
@@ -10,7 +36,7 @@ for tag, func in pairs({
 		return UnitXPMax(unit)
 	end,
 	['perxp'] = function(unit)
-		return math.floor(UnitXP(unit) / UnitXPMax(unit) * 100 + 0.5)
+		return floor(UnitXP(unit) / UnitXPMax(unit) * 100 + 0.5)
 	end,
 	['currested'] = function()
 		return GetXPExhaustion()
@@ -18,7 +44,7 @@ for tag, func in pairs({
 	['perrested'] = function(unit)
 		local rested = GetXPExhaustion()
 		if(rested and rested > 0) then
-			return math.floor(rested / UnitXPMax(unit) * 100 + 0.5)
+			return floor(rested / UnitXPMax(unit) * 100 + 0.5)
 		end
 	end,
 }) do
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Friendship/oUF_Friendship.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Friendship/oUF_Friendship.lua
index f381dd2..b99ffcb 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Friendship/oUF_Friendship.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Friendship/oUF_Friendship.lua
@@ -1,3 +1,33 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local type  		= _G.type;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+local ceil          = math.ceil
+--TABLE
+local table         = _G.table;
+local wipe          = _G.wipe;
+--BLIZZARD API
+local UnitExists       			= _G.UnitExists;
+local UnitIsPlayer 				= _G.UnitIsPlayer;
+local UnitName         			= _G.UnitName;
+local GetFriendshipReputation	= _G.GetFriendshipReputation;
+local GameTooltip         		= _G.GameTooltip;
+local GameTooltip_Hide      	= _G.GameTooltip_Hide;
+
 local _, ns = ...
 local oUF = ns.oUF or oUF
 assert(oUF, 'oUF Friendship was unable to locate oUF install')
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua
index 696ed53..efbd5fd 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_HyperCombo/oUF_HyperCombo.lua
@@ -1,11 +1,41 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local type  		= _G.type;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+local ceil          = math.ceil
+--TABLE
+local table         = _G.table;
+local wipe          = _G.wipe;
+--BLIZZARD API
+local GetShapeshiftForm         = _G.GetShapeshiftForm;
+local UnitHasVehicleUI 			= _G.UnitHasVehicleUI;
+local UnitBuff         			= _G.UnitBuff;
+local CombatText_AddMessage 	= _G.CombatText_AddMessage;
+local CombatText_StandardScroll = _G.CombatText_StandardScroll;
+local MAX_COMBO_POINTS      	= _G.MAX_COMBO_POINTS;
+local GetSpellInfo      		= _G.GetSpellInfo;
+local GetComboPoints  			= _G.GetComboPoints;
+
 local class = select(2, UnitClass("player"));
 if(class ~= "ROGUE" and class ~= "DRUID") then return end

 local parent, ns = ...
 local oUF = ns.oUF

-local GetComboPoints = GetComboPoints
-local MAX_COMBO_POINTS = MAX_COMBO_POINTS
 local GUILE1 = GetSpellInfo(84745)
 local GUILE2 = GetSpellInfo(84746)
 local GUILE3 = GetSpellInfo(84747)
@@ -69,7 +99,7 @@ local Update = function(self, event, unit)
 			else
 				cpoints[i]:Hide()
 				if(bar.PointHide) then
-					bar.PointHide(cpoints[i])
+					bar.PointHide(cpoints[i], i)
 				end
 			end
 		end
@@ -131,7 +161,7 @@ local Update = function(self, event, unit)
 	end

 	if(bar.PostUpdate) then
-		return bar:PostUpdate(cp)
+		return bar:PostUpdate(current)
 	end
 end

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MainTank/oUF_MainTank.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MainTank/oUF_MainTank.lua
index 51293af..9e2c149 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MainTank/oUF_MainTank.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MainTank/oUF_MainTank.lua
@@ -1,3 +1,14 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+--BLIZZARD API
+local UnitInRaid       		= _G.UnitInRaid;
+local GetRaidRosterInfo 	= _G.GetRaidRosterInfo;
+local UnitHasVehicleUI      = _G.UnitHasVehicleUI;
+
 local parent, ns = ...
 local oUF = ns.oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MonkHarmony/oUF_MonkHarmony.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MonkHarmony/oUF_MonkHarmony.lua
index f5874c6..cc4c8d9 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MonkHarmony/oUF_MonkHarmony.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_MonkHarmony/oUF_MonkHarmony.lua
@@ -1,3 +1,14 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+--BLIZZARD API
+local UnitPower     	= _G.UnitPower;
+local UnitPowerMax 		= _G.UnitPowerMax;
+local UnitHasVehicleUI 	= _G.UnitHasVehicleUI;
+
 if select(2, UnitClass('player')) ~= "MONK" then return end

 local _, ns = ...
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PallyPower/oUF_PallyPower.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PallyPower/oUF_PallyPower.lua
index f6867c2..6b731b1 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PallyPower/oUF_PallyPower.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PallyPower/oUF_PallyPower.lua
@@ -1,3 +1,14 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+--BLIZZARD API
+local UnitPower     	= _G.UnitPower;
+local UnitPowerMax 		= _G.UnitPowerMax;
+local UnitHasVehicleUI 	= _G.UnitHasVehicleUI;
+
 if(select(2, UnitClass('player')) ~= 'PALADIN') then return end

 local parent, ns = ...
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PriestOrbs/oUF_PriestOrbs.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PriestOrbs/oUF_PriestOrbs.lua
index 677639e..bff2e0c 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PriestOrbs/oUF_PriestOrbs.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_PriestOrbs/oUF_PriestOrbs.lua
@@ -1,3 +1,19 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+--BLIZZARD API
+local UnitPower     	= _G.UnitPower;
+local UnitPowerMax 		= _G.UnitPowerMax;
+local UnitHasVehicleUI 	= _G.UnitHasVehicleUI;
+local GetSpecialization = _G.GetSpecialization;
+local UnitLevel 		= _G.UnitLevel;
+local UnitBuff 			= _G.UnitBuff;
+
+local SPELL_POWER_SHADOW_ORBS = _G.SPELL_POWER_SHADOW_ORBS;
+
 if select(2, UnitClass('player')) ~= "PRIEST" then return end

 local _, ns = ...
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua
index 4564487..6b84d1e 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua
@@ -1,3 +1,34 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local type  		= _G.type;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+local ceil          = math.ceil
+--TABLE
+local table         = _G.table;
+local wipe          = _G.wipe;
+--BLIZZARD API
+local GetTime       		= _G.GetTime;
+local GetSpecialization 	= _G.GetSpecialization;
+local UnitAura         		= _G.UnitAura;
+local UnitIsCharmed         = _G.UnitIsCharmed;
+local UnitCanAttack         = _G.UnitCanAttack;
+local GetSpellInfo      	= _G.GetSpellInfo;
+local GetActiveSpecGroup  	= _G.GetActiveSpecGroup;
+
 local _, ns = ...
 local oUF = ns.oUF or oUF

@@ -6,10 +37,7 @@ local CleanseName = GetSpellInfo(4987)

 local addon = {}
 ns.oUF_RaidDebuffs = addon
-oUF_RaidDebuffs = ns.oUF_RaidDebuffs
-if not _G.oUF_RaidDebuffs then
-	_G.oUF_RaidDebuffs = addon
-end
+_G.oUF_RaidDebuffs = ns.oUF_RaidDebuffs

 local debuff_data = {}
 addon.DebuffData = debuff_data
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Reputation/oUF_Reputation.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Reputation/oUF_Reputation.lua
index cbb3fa1..e06e668 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Reputation/oUF_Reputation.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Reputation/oUF_Reputation.lua
@@ -1,3 +1,30 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local type  		= _G.type;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+--BLIZZARD API
+local UnitXP       		= _G.UnitXP;
+local UnitXPMax 		= _G.UnitXPMax;
+local GetXPExhaustion   = _G.GetXPExhaustion;
+local UnitSex         	= _G.UnitSex;
+local GetText  			= _G.GetText;
+local GetWatchedFactionInfo = _G.GetWatchedFactionInfo;
+local FACTION_BAR_COLORS  	= _G.FACTION_BAR_COLORS;
+
 local __, ns = ...
 local oUF = ns.oUF or oUF
 assert(oUF, 'oUF Reputation was unable to locate oUF install')
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Smooth/oUF_Smooth.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Smooth/oUF_Smooth.lua
index 67b59d0..6835963 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Smooth/oUF_Smooth.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Smooth/oUF_Smooth.lua
@@ -1,3 +1,17 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local pairs         = _G.pairs;
+local type  		= _G.type;
+--MATH
+local math          = _G.math;
+local abs         	= math.abs;
+--BLIZZARD API
+local GetFramerate      = _G.GetFramerate;
+
 local _, ns = ...
 local oUF = ns.oUF or oUF
 if not oUF then return end
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_TotemBars/oUF_TotemBars.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_TotemBars/oUF_TotemBars.lua
index ccf7d29..81a911a 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_TotemBars/oUF_TotemBars.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_TotemBars/oUF_TotemBars.lua
@@ -1,3 +1,13 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+--BLIZZARD API
+local GameTooltip   = _G.GameTooltip;
+local MAX_TOTEMS 	= _G.MAX_TOTEMS;
+local TotemFrame 	= _G.TotemFrame;
+
 local class = select(2, UnitClass('player'))
 if(class ~= 'SHAMAN') then return end

@@ -51,7 +61,7 @@ local Update = function(self, event)
 			if(timeLeft > 0) then
 				totem.expirationTime = (start + duration)
 				totem:SetValue(timeLeft)
-				totem:SetScript('OnUpdate', UpdateBar)
+				totem:SetScript('OnUpdate', Totem_OnUpdate)
 			else
 				totem:SetValue(0)
 				totem:SetScript('OnUpdate', nil)
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua
index fd6ac91..a40210b 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_WarlockShards/oUF_WarlockShards.lua
@@ -1,3 +1,18 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+--BLIZZARD API
+local UnitPower     	= _G.UnitPower;
+local UnitPowerMax 		= _G.UnitPowerMax;
+local UnitHasVehicleUI 	= _G.UnitHasVehicleUI;
+local GetSpecialization = _G.GetSpecialization;
+
 if select(2, UnitClass('player')) ~= "WARLOCK" then return end

 local _, ns = ...
@@ -122,7 +137,7 @@ local function Enable(self, unit)

 		for i = 1, 4 do
 			if not wsb[i]:GetStatusBarTexture() then
-				Point:SetStatusBarTexture([=[Interface\TargetingFrame\UI-StatusBar]=])
+				wsb[i]:SetStatusBarTexture([=[Interface\TargetingFrame\UI-StatusBar]=])
 			end

 			wsb[i]:SetFrameLevel(wsb:GetFrameLevel() + 1)
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/castbar.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/castbar.lua
index bf553fb..e4cc177 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/castbar.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/castbar.lua
@@ -3,6 +3,35 @@
 	THIS FILE HEAVILY MODIFIED FOR USE WITH SUPERVILLAIN UI

 ]]
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local tostring      = _G.tostring;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local format        = string.format;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+local ceil          = math.ceil
+--BLIZZARD API
+local GetTime       	= _G.GetTime;
+local CreateFrame       = _G.CreateFrame;
+local GetNetStats       = _G.GetNetStats;
+local UnitCastingInfo   = _G.UnitCastingInfo;
+local UnitChannelInfo   = _G.UnitChannelInfo;
+local GetTradeskillRepeatCount  = _G.GetTradeskillRepeatCount;
+local CastingBarFrame   	= _G.CastingBarFrame;
+local PetCastingBarFrame   	= _G.PetCastingBarFrame;
+
 local parent, ns = ...
 local oUF = ns.oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/healprediction.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/healprediction.lua
index a1f5a94..d730423 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/healprediction.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/healprediction.lua
@@ -1,3 +1,19 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+--MATH
+local math          = _G.math;
+local max         	= math.max
+--BLIZZARD API
+local UnitHealth     			= _G.UnitHealth;
+local UnitHealthMax     		= _G.UnitHealthMax;
+local UnitGetTotalHealAbsorbs	= _G.UnitGetTotalHealAbsorbs;
+local UnitGetTotalAbsorbs 		= _G.UnitGetTotalAbsorbs;
+local UnitGetIncomingHeals 		= _G.UnitGetIncomingHeals;
+
 local _, ns = ...
 local oUF = ns.oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/health.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/health.lua
index 3019292..6cdf103 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/health.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/health.lua
@@ -3,10 +3,37 @@
 	THIS FILE HEAVILY MODIFIED FOR USE WITH SUPERVILLAIN UI

 ]]
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+--MATH
+local math          = _G.math;
+local max         	= math.max
+local random 		= math.random
+--BLIZZARD API
+local UnitClass     			= _G.UnitClass;
+local UnitReaction     			= _G.UnitReaction;
+local UnitIsEnemy     			= _G.UnitIsEnemy;
+local GetCVarBool     			= _G.GetCVarBool;
+local SetCVar     				= _G.SetCVar;
+local UnitHealth     			= _G.UnitHealth;
+local UnitHealthMax     		= _G.UnitHealthMax;
+local UnitIsConnected			= _G.UnitIsConnected;
+local UnitIsDeadOrGhost 		= _G.UnitIsDeadOrGhost;
+local UnitIsPlayer 				= _G.UnitIsPlayer;
+local UnitPlayerControlled 		= _G.UnitPlayerControlled;
+local UnitIsTapped 				= _G.UnitIsTapped;
+local UnitIsTappedByPlayer 		= _G.UnitIsTappedByPlayer;
+local UnitIsTappedByAllThreatList = _G.UnitIsTappedByAllThreatList;
+
+
 local parent, ns = ...
 local oUF = ns.oUF
 local updateFrequentUpdates
-local random = math.random
+
 oUF.colors.health = {49/255, 207/255, 37/255}

 local Update = function(self, event, unit)
@@ -155,7 +182,7 @@ local CustomUpdate = function(self, event, unit)
 		health:SetStatusBarColor(0.6,0.4,1,0.5)
 		health.animation[1]:SetVertexColor(0.8,0.3,1,0.4)
 	elseif(health.colorOverlay) then
-		local t = oUF_Villain.colors.health
+		local t = oUF.colors.health
 		health:SetStatusBarColor(t[1], t[2], t[3], 0.9)
 	else
 		health:SetStatusBarColor(1, 0.25 * mu, 0, 0.85)
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/portraits.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/portraits.lua
index 66b810b..53f9bbb 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/portraits.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/portraits.lua
@@ -3,6 +3,23 @@
 	THIS FILE HEAVILY MODIFIED FOR USE WITH SUPERVILLAIN UI

 ]]
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+--BLIZZARD API
+local UnitClass     			= _G.UnitClass;
+local UnitReaction     			= _G.UnitReaction;
+local UnitGUID     				= _G.UnitGUID;
+local UnitIsUnit     			= _G.UnitIsUnit;
+local UnitExists     			= _G.UnitExists;
+local UnitIsVisible     		= _G.UnitIsVisible;
+local UnitIsConnected			= _G.UnitIsConnected;
+local UnitIsPlayer 				= _G.UnitIsPlayer;
+local SetPortraitTexture 		= _G.SetPortraitTexture;
+
 local parent, ns = ...
 local oUF = ns.oUF

diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/tags.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/tags.lua
index c7b6304..2e38ccc 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/tags.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/elements/tags.lua
@@ -1,6 +1,23 @@
 --[[
 -- Credits: Vika, Cladhaire, Tekkub
 ]]
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local error         = _G.error;
+local print         = _G.print;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset      	= _G.rawset;
+local type  		= _G.type;
+
+--BLIZZARD API
+local CreateFrame   = _G.CreateFrame;
+local UnitExists 	= _G.UnitExists;
+

 local parent, ns = ...
 local oUF = ns.oUF
diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/ouf.lua b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/ouf.lua
index e25715e..5da9ccd 100644
--- a/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/ouf.lua
+++ b/Interface/AddOns/SVUI/libs/oUF_Villain/oUF/ouf.lua
@@ -1,3 +1,12 @@
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local next          = _G.next;
+
 local parent, ns = ...
 local global = GetAddOnMetadata(parent, 'X-oUF')
 local _VERSION = GetAddOnMetadata(parent, 'version')
diff --git a/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua b/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua
index a37c248..0db4ded 100644
--- a/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua
+++ b/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua
@@ -204,7 +204,7 @@ function MOD:ToggleKeyBindingMode(deactivate, saveRequested)
   end
 end

-blockedButtons = { LSHIFT = true, RSHIFT = true, LCTRL = true, RCTRL = true, LALT = true, RALT = true, UNKNOWN = true, LeftButton = true}
+local blockedButtons = { LSHIFT = true, RSHIFT = true, LCTRL = true, RCTRL = true, LALT = true, RALT = true, UNKNOWN = true, LeftButton = true}

 --[[ HANDLERS ]]--
 local tipTimeLapse = 0;
@@ -415,7 +415,7 @@ function MOD:LoadKeyBinder()
   Binder:EnableKeyboard(true)
   Binder:EnableMouseWheel(true)
   Binder.texture = Binder:CreateTexture()
-  Binder.texture:SetAllPoints(a)
+  Binder.texture:SetAllPoints(Binder)
   Binder.texture:SetTexture(0, 0, 0, .25)
   Binder:Hide()

diff --git a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua
index 35531aa..f3ea13f 100644
--- a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua
+++ b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua
@@ -373,7 +373,7 @@ local function ModifyActionButton(parent)
 	if icon then
 		icon:SetTexCoord(.1,.9,.1,.9)
 		--icon:SetGradient("VERTICAL",.5,.5,.5,1,1,1)
-		icon:FillInner()
+		icon:FillInner(button)
 	end
 	if shine then shine:SetAllPoints()end
 	if SV.db.SVBar.hotkeytext then
diff --git a/Interface/AddOns/SVUI/packages/aura/SVAura.lua b/Interface/AddOns/SVUI/packages/aura/SVAura.lua
index a849539..c80c9de 100644
--- a/Interface/AddOns/SVUI/packages/aura/SVAura.lua
+++ b/Interface/AddOns/SVUI/packages/aura/SVAura.lua
@@ -270,9 +270,9 @@ do
 			if aura.SetDisabledTexture then aura:SetDisabledTexture("") end
 			aura:SetBackdrop({
 				bgFile = [[Interface\BUTTONS\WHITE8X8]],
-					tile = false,
-					tileSize = 0,
-					edgeFile = [[Interface\BUTTONS\WHITE8X8]],
+				tile = false,
+				tileSize = 0,
+				edgeFile = [[Interface\BUTTONS\WHITE8X8]],
 				edgeSize = 2,
 				insets = {
 					left = 0,
@@ -281,7 +281,7 @@ do
 					bottom = 0
 				}
 			 })
-		 	aura:SetBackdropColor(0, 0, 0, 0)
+		 	aura:SetBackdropColor(0, 0, 0)
 		 	aura:SetBackdropBorderColor(0, 0, 0)
 		 	local cd = aura:GetName() and _G[aura:GetName().."Cooldown"]
 			if cd then
@@ -290,6 +290,7 @@ do
 			end
 			aura.Skinned = true
 		end
+
 		local font = LSM:Fetch("font", SV.db.SVAura.font)
 		aura.texture = aura:CreateTexture(nil, "BORDER")
 		aura.texture:FillInner(aura, 2, 2)
diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua
index 421cc81..940ea11 100644
--- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua
+++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua
@@ -33,7 +33,7 @@ local table 	= _G.table;
 local find, format, len = string.find, string.format, string.len;
 local sub, byte = string.sub, string.byte;
 --[[ MATH METHODS ]]--
-local floor = math.floor;
+local floor, ceil, abs = math.floor, math.ceil, math.abs;
 local twipe = table.wipe;
 --[[
 ##########################################################
@@ -49,8 +49,8 @@ local TTIP = SV.SVTip;
 LOCAL VARS
 ##########################################################
 ]]--
-local NewFrame = CreateFrame;
-local NewHook = hooksecurefunc;
+local CreateFrame = _G.CreateFrame;
+local hooksecurefunc = _G.hooksecurefunc;
 local iconTex = [[Interface\BUTTONS\WHITE8X8]]
 local borderTex = [[Interface\Addons\SVUI\assets\artwork\Template\ROUND]]
 local ICON_BAGS = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-BAGS]]
@@ -58,10 +58,13 @@ local ICON_SORT = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-SORT]]
 local ICON_STACK = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-STACK]]
 local ICON_TRANSFER = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-TRANSFER]]
 local ICON_PURCHASE = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-PURCHASE]]
+local ICON_CLEANUP = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-CLEANUP]]
+local ICON_DEPOSIT = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-DEPOSIT]]
 local ICON_VENDOR = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-VENDOR]]
+local ICON_REAGENTS = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-REAGENTS]]
 local numBagFrame = NUM_BAG_FRAMES + 1;
 local gearSet, gearList = {}, {};
-local internalTimer, SetBagHooks;
+local internalTimer;
 local RefProfessionColors = {
 	[0x0008] = {224/255,187/255,74/255},
 	[0x0010] = {74/255,77/255,224/255},
@@ -73,11 +76,24 @@ local RefProfessionColors = {
 	[0x10000] = {222/255,13/255,65/255},
 	[0x100000] = {18/255,224/255,180/255}
 }
+
+local BagFilters = CreateFrame("Frame", "SVUI_BagFilterMenu", UIParent);
 --[[
 ##########################################################
 LOCAL FUNCTIONS
 ##########################################################
 ]]--
+local goldFormat = "%s|TInterface\\MONEYFRAME\\UI-GoldIcon.blp:16:16|t"
+
+local function FormatCurrency(amount)
+	if not amount then return end
+	local gold = floor(abs(amount/10000))
+	if gold ~= 0 then
+		gold = BreakUpLargeNumbers(gold)
+		return goldFormat:format(gold)
+	end
+end
+
 local function StyleBagToolButton(button)
 	if button.styled then return end

@@ -94,7 +110,7 @@ local function StyleBagToolButton(button)
 	local icon = button:CreateTexture(nil, "OVERLAY")
 	icon:WrapOuter(button, 6, 6)
 	SetPortraitToTexture(icon, iconTex)
-	NewHook(icon, "SetTexture", SetPortraitToTexture)
+	hooksecurefunc(icon, "SetTexture", SetPortraitToTexture)

 	local hover = button:CreateTexture(nil, "HIGHLIGHT")
 	hover:WrapOuter(button, 6, 6)
@@ -185,36 +201,59 @@ local function BuildEquipmentMap()
 		end
 	end
 end
+
+local DD_OnClick = function(self)
+	SetBagSlotFlag(self.BagID, self.FilterID, not GetBagSlotFlag(self.BagID, self.FilterID))
+	self:GetParent():Hide()
+end
+
+local DDClear_OnClick = function(self)
+	for i = LE_BAG_FILTER_FLAG_EQUIPMENT, NUM_LE_BAG_FILTER_FLAGS do
+		SetBagSlotFlag(self.BagID, i, false)
+	end
+	self:GetParent():Hide()
+end
+
+local DD_OnEnter = function(self)
+	self.hoverTex:Show()
+end
+
+local DD_OnLeave = function(self)
+	self.hoverTex:Hide()
+end
+
+local function SetFilterMenu(self)
+	for i = LE_BAG_FILTER_FLAG_EQUIPMENT, NUM_LE_BAG_FILTER_FLAGS do
+		if(GetBagSlotFlag(self.id, i)) then
+			BagFilters.buttons[i].activeTex:Show()
+		else
+			BagFilters.buttons[i].activeTex:Hide()
+		end
+		BagFilters.buttons[i].BagID = self.id
+	end
+
+	BagFilters.buttons[NUM_LE_BAG_FILTER_FLAGS + 1].BagID = self.id
+
+	local maxHeight = ((NUM_LE_BAG_FILTER_FLAGS) * 16) + 30
+	local maxWidth = 135
+
+	BagFilters:SetSize(maxWidth, maxHeight)
+	BagFilters:ClearAllPoints()
+	BagFilters:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 0, -8)
+	ToggleFrame(BagFilters)
+end
 --[[
 ##########################################################
 CORE FUNCTIONS
 ##########################################################
 ]]--
-function MOD:GetContainerFrame(isBank, isReagent)
-	if(type(isBank) == "boolean" and isBank == true) then
-		if(type(isReagent) == "boolean" and isReagent == true and self.ReagentFrame) then
-			return self.ReagentFrame
-		elseif(self.BankFrame) then
-			return self.BankFrame
-		end
-	end
-	return self.BagFrame
-end
-
-function MOD:DisableBlizzard()
-	BankFrame:UnregisterAllEvents()
-	for h = 1, NUM_CONTAINER_FRAMES do
-		_G["ContainerFrame"..h]:Die()
-	end
-end
-
 function MOD:INVENTORY_SEARCH_UPDATE()
-	for _, bag in pairs(self.BagFrames)do
-		for _, bagID in ipairs(bag.BagIDs)do
-			for i = 1, GetContainerNumSlots(bagID)do
-				local _, _, _, _, _, _, _, n = GetContainerItemInfo(bagID, i)
-				local item = bag.Bags[bagID][i]
-				if item:IsShown()then
+	for _, frame in pairs(self.BagFrames) do
+		for id, bag in ipairs(frame.Bags) do
+			for i = 1, GetContainerNumSlots(id) do
+				local _, _, _, _, _, _, _, n = GetContainerItemInfo(id, i)
+				local item = bag[i]
+				if(item and item:IsShown()) then
 					if n then
 						SetItemButtonDesaturated(item, 1, 1, 1, 1)
 						item:SetAlpha(0.4)
@@ -228,277 +267,489 @@ function MOD:INVENTORY_SEARCH_UPDATE()
 	end
 end

-function MOD:RefreshSlot(bag, slotID)
-	if self.Bags[bag] and self.Bags[bag].numSlots ~= GetContainerNumSlots(bag) or not self.Bags[bag] or not self.Bags[bag][slotID] then return end
-	local slot, _ = self.Bags[bag][slotID], nil;
-	local bagType = self.Bags[bag].bagFamily;
-	local texture, count, locked = GetContainerItemInfo(bag, slotID)
-	local itemLink = GetContainerItemLink(bag, slotID);
-	local key;
+local SlotUpdate = function(self, slotID)
+	if(not self[slotID]) then return end
+	--print(self[slotID]:GetName())
+	local bag = self:GetID();
+	local slot = self[slotID];
+	local bagType = self.bagFamily;
+
 	slot:Show()
-	slot.name, slot.rarity = nil, nil;
-	local start, duration, enable = GetContainerItemCooldown(bag, slotID)
-	CooldownFrame_SetTimer(slot.cooldown, start, duration, enable)
-	if duration > 0 and enable == 0 then
+
+	local texture, count, locked, rarity = GetContainerItemInfo(bag, slotID);
+	local start, duration, enable = GetContainerItemCooldown(bag, slotID);
+	local itemLink = GetContainerItemLink(bag, slotID);
+
+	CooldownFrame_SetTimer(slot.cooldown, start, duration, enable);
+
+	if(duration > 0 and enable == 0) then
 		SetItemButtonTextureVertexColor(slot, 0.4, 0.4, 0.4)
 	else
 		SetItemButtonTextureVertexColor(slot, 1, 1, 1)
-	end
-	if bagType then
+	end
+
+	if(bagType) then
 		local r, g, b = bagType[1], bagType[2], bagType[3];
-		slot:SetBackdropColor(r, g, b, 0.5)
+		slot:SetBackdropColor(r, g, b, 0.6)
 		slot:SetBackdropBorderColor(r, g, b, 1)
-	elseif itemLink then
-		local class, subclass, maxStack;
-		key, _, slot.rarity, _, _, class, subclass, maxStack = GetItemInfo(itemLink)
-		slot.name = key
-		local z, A, C = GetContainerItemQuestInfo(bag, slotID)
-		if A and not isActive then
-			slot:SetBackdropBorderColor(1.0, 0.3, 0.3)
-		elseif A or z then
-			slot:SetBackdropBorderColor(1.0, 0.3, 0.3)
-		elseif slot.rarity and slot.rarity>1 then
-			local D, E, F = GetItemQualityColor(slot.rarity)
-			slot:SetBackdropBorderColor(D, E, F)
+	elseif(itemLink) then
+		local rarity = select(3, GetItemInfo(itemLink))
+		if(rarity and rarity > 1) then
+			local r, g, b = GetItemQualityColor(rarity)
+			slot:SetBackdropBorderColor(r, g, b)
 		else
 			slot:SetBackdropBorderColor(0, 0, 0)
 		end
 	else
 		slot:SetBackdropBorderColor(0, 0, 0)
-	end
-	if C_NewItems.IsNewItem(bag, slotID)then
+	end
+
+	if(C_NewItems.IsNewItem(bag, slotID)) then
 		ActionButton_ShowOverlayGlow(slot)
 	else
 		ActionButton_HideOverlayGlow(slot)
-	end
+	end
+
 	SetItemButtonTexture(slot, texture)
 	SetItemButtonCount(slot, count)
 	SetItemButtonDesaturated(slot, locked, 0.5, 0.5, 0.5)
 end

-function MOD:RefreshBagSlots(bag)
-	if(not bag) then return end
-	for i = 1, GetContainerNumSlots(bag)do
-		if self.RefreshSlot then
-			self:RefreshSlot(bag, i)
-		else
-			self:GetParent():RefreshSlot(bag, i)
-		end
+local RefreshSlots = function(self)
+	local bagID = self:GetID()
+	if(not bagID) then return end
+	local maxcount = GetContainerNumSlots(bagID)
+	for slotID = 1, maxcount do
+		self:SlotUpdate(slotID)
 	end
-end
+end
+
+local RefreshReagentSlots = function(self)
+	local bagID = self:GetID()
+	if(not bagID or (not self.SlotUpdate)) then return end
+	local maxcount = self.numSlots
+	for slotID = 1, maxcount do
+		self:SlotUpdate(slotID)
+	end
+end

-function MOD:RefreshBagsSlots()
-	for _, bag in ipairs(self.BagIDs)do
-		if self.Bags[bag] then
-			self.Bags[bag]:RefreshBagSlots(bag)
+local BagMenu_OnEnter = function(self)
+	local parent = self.parent
+	if(not parent) then return end
+	for bagID, bag in pairs(parent.Bags) do
+		local numSlots = GetContainerNumSlots(bagID)
+		for slotID = 1, numSlots do
+			if bag[slotID] then
+				if bagID == self.id then
+					bag[slotID]:SetAlpha(1)
+				else
+					bag[slotID]:SetAlpha(0.1)
+				end
+			end
 		end
 	end
+
+	if(select(4, GetBuildInfo()) >= 60000) then GameTooltip:AppendText(" |cff00FF11[SHIFT-CLICK] To Set Filters|r") end
 end

-function MOD:RefreshCD()
-	for _, bag in ipairs(self.BagIDs)do
-		for i = 1, GetContainerNumSlots(bag)do
-			local start, duration, enable = GetContainerItemCooldown(bag, i)
-			if self.Bags[bag] and self.Bags[bag][i] then
-				CooldownFrame_SetTimer(self.Bags[bag][i].cooldown, start, duration, enable)
+local BagMenu_OnLeave = function(self)
+	local parent = self.parent
+	if(not parent) then return end
+	for bagID, bag in pairs(parent.Bags) do
+		local numSlots = GetContainerNumSlots(bagID)
+		for slotID = 1, numSlots do
+			if bag[slotID] then
+				bag[slotID]:SetAlpha(1)
+			end
+		end
+	end
+end
+
+local BAG_FILTER_LABELS = _G.BAG_FILTER_LABELS;
+
+local BagMenu_OnClick = function(self)
+	if IsShiftKeyDown() then
+		SetFilterMenu(self);
+	elseif(BagFilters:IsShown()) then
+		ToggleFrame(BagFilters)
+	end
+end
+
+local ContainerFrame_UpdateCooldowns = function(self)
+	if self.isReagent then return end
+	for bagID, bag in pairs(self.Bags) do
+		for slotID = 1, GetContainerNumSlots(bagID)do
+			local start, duration, enable = GetContainerItemCooldown(bagID, slotID)
+			if(bag[slotID]) then
+				CooldownFrame_SetTimer(bag[slotID].cooldown, start, duration, enable)
 				if duration > 0 and enable == 0 then
-					SetItemButtonTextureVertexColor(self.Bags[bag][i], 0.4, 0.4, 0.4)
+					SetItemButtonTextureVertexColor(bag[slotID], 0.4, 0.4, 0.4)
 				else
-					SetItemButtonTextureVertexColor(self.Bags[bag][i], 1, 1, 1)
+					SetItemButtonTextureVertexColor(bag[slotID], 1, 1, 1)
 				end
 			end
 		end
 	end
 end

-function MOD:UseSlotFading(this)
-	for _, id in ipairs(this.BagIDs)do
-		if this.Bags[id] then
-			local numSlots = GetContainerNumSlots(id)
-			for i = 1, numSlots do
-				if this.Bags[id][i] then
-					if id == self.id then
-						this.Bags[id][i]:SetAlpha(1)
-					else
-						this.Bags[id][i]:SetAlpha(0.1)
-					end
-				end
-			end
-		end
-	end
+local ContainerFrame_UpdateBags = function(self)
+	for bagID, bag in pairs(self.Bags) do
+		bag:RefreshSlots()
+	end
 end

-function MOD:FlushSlotFading(this)
-	for _, id in ipairs(this.BagIDs)do
-		if this.Bags[id] then
-			local numSlots = GetContainerNumSlots(id)
-			for i = 1, numSlots do
-				if this.Bags[id][i] then
-					this.Bags[id][i]:SetAlpha(1)
-				end
-			end
-		end
-	end
-end
+local ContainerFrame_UpdateLayout = function(self)
+	if SV.db.SVBag.enable ~= true then return; end

-function MOD:Layout(isBank, isReagent)
-	if SV.db.SVBag.enable ~= true then return; end
-	local f = MOD:GetContainerFrame(isBank, isReagent);
-	if not f then return; end
-	local buttonSize = isBank and SV.db.SVBag.bankSize or SV.db.SVBag.bagSize;
+	local isBank = self.isBank
+	local containerName = self:GetName()
 	local buttonSpacing = 8;
-	local containerWidth = (SV.db.SVBag.alignToChat == true and (isBank and (SV.db.SVDock.dockLeftWidth - 14) or (SV.db.SVDock.dockRightWidth - 14))) or (isBank and SV.db.SVBag.bankWidth) or SV.db.SVBag.bagWidth
-	local numContainerColumns = floor(containerWidth / (buttonSize + buttonSpacing));
+	local containerWidth, numContainerColumns, buttonSize
+
+	local precount = 0;
+	for i, bagID in ipairs(self.BagIDs) do
+		local numSlots = GetContainerNumSlots(bagID);
+		precount = precount + (numSlots or 0);
+	end
+
+	if(SV.db.SVBag.alignToChat) then
+		containerWidth = (isBank and SV.db.SVDock.dockLeftWidth or SV.db.SVDock.dockRightWidth)
+		local avg = 0.08;
+		if(precount > 287) then
+			avg = 0.12
+		elseif(precount > 167) then
+			avg = 0.11
+		elseif(precount > 127) then
+			avg = 0.1
+		elseif(precount > 97) then
+			avg = 0.09
+		end
+
+		numContainerColumns = avg * 100;
+
+		local unitSize = floor(containerWidth / numContainerColumns)
+		buttonSize = unitSize - buttonSpacing;
+	else
+		containerWidth = (isBank and SV.db.SVBag.bankWidth) or SV.db.SVBag.bagWidth
+		buttonSize = isBank and SV.db.SVBag.bankSize or SV.db.SVBag.bagSize;
+		numContainerColumns = floor(containerWidth / (buttonSize + buttonSpacing));
+	end
+
+	local numContainerRows = ceil(precount / numContainerColumns)
+	local containerHeight = (((buttonSize + buttonSpacing) * numContainerRows) - buttonSpacing) + self.topOffset + self.bottomOffset
 	local holderWidth = ((buttonSize + buttonSpacing) * numContainerColumns) - buttonSpacing;
-	local numContainerRows = 0;
-	local bottomPadding = (containerWidth - holderWidth) / 2;
-	f.holderFrame:Width(holderWidth);
-	f.totalSlots = 0;
-	local lastButton;
-	local lastRowButton;
-	local lastContainerButton;
-	local globalName;
+	local bottomPadding = (containerWidth - holderWidth) * 0.5;
+	local lastButton, lastRowButton, globalName;
 	local numContainerSlots, fullContainerSlots = GetNumBankSlots();
-	for i, bagID in ipairs(f.BagIDs) do
-		if (not isReagent and (not isBank and bagID <= 3) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots)))  then
-			if not f.ContainerHolder[i] then
-				if isBank then
-					globalName = "SVUI_BankBag" .. (bagID - 4);
-					f.ContainerHolder[i] = NewFrame("CheckButton", globalName, f.ContainerHolder, "BankItemButtonBagTemplate")
+	local totalSlots = 0;
+
+	self.ButtonSize = buttonSize;
+	self.holderFrame:Width(holderWidth);
+
+	local menu = self.BagMenu
+
+	for i, bagID in ipairs(self.BagIDs) do
+		if((not isBank and bagID <= 3) or (isBank and (bagID ~= -1 and numContainerSlots >= 1))) then
+			menu:Size(((buttonSize + buttonSpacing) * (isBank and i - 1 or i)) + buttonSpacing, buttonSize + (buttonSpacing * 2))
+
+			local bagSlot, globalName, bagTemplate;
+
+			if isBank then
+				globalName = ("SVUI_BankBag%d"):format(bagID - 4);
+				bagTemplate = "BankItemButtonBagTemplate"
+			else
+				globalName = ("SVUI_MainBag%dSlot"):format(bagID);
+				bagTemplate = "BagSlotButtonTemplate"
+			end
+
+			if(not menu[i]) then
+				bagSlot = CreateFrame("CheckButton", globalName, menu, bagTemplate)
+				bagSlot.parent = self;
+
+				bagSlot:SetNormalTexture("")
+				bagSlot:SetCheckedTexture("")
+				bagSlot:SetPushedTexture("")
+				bagSlot:SetScript("OnClick", nil)
+				bagSlot:RemoveTextures()
+				bagSlot:SetSlotTemplate(true, 2, 0, 0, true);
+
+				local texName = ("%sIconTexture"):format(globalName)
+				bagSlot.iconTexture = _G[texName];
+				bagSlot.iconTexture:FillInner()
+				bagSlot.iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+
+				hooksecurefunc(bagSlot, "UpdateTooltip", BagMenu_OnEnter)
+				bagSlot:HookScript("OnLeave", BagMenu_OnLeave)
+
+				if(not bagSlot.tooltipText) then
+					bagSlot.tooltipText = ""
+				end
+
+				if(isBank) then
+					if(select(4, GetBuildInfo()) >= 60000) then bagSlot:SetID(bagID - 4) else bagSlot:SetID(bagID) end
+					bagSlot.id = bagID;
+				else
+					if(select(4, GetBuildInfo()) >= 60000) then bagSlot:HookScript("OnClick", BagMenu_OnClick) end
+					bagSlot.id = (bagID + 1);
+				end
+
+				menu[i] = bagSlot;
+			else
+				bagSlot = menu[i]
+			end
+
+			bagSlot:Size(buttonSize)
+			bagSlot:ClearAllPoints()
+
+			if(isBank) then
+				if(i == 2) then
+					bagSlot:SetPoint("BOTTOMLEFT", menu, "BOTTOMLEFT", buttonSpacing, buttonSpacing)
 				else
-					globalName = "SVUI_MainBag" .. bagID .. "Slot";
-					f.ContainerHolder[i] = NewFrame("CheckButton", globalName, f.ContainerHolder, "BagSlotButtonTemplate")
+					bagSlot:SetPoint("LEFT", menu[i - 1], "RIGHT", buttonSpacing, 0)
 				end
-				--f.ContainerHolder[i]:SetSlotTemplate(true, 2, 4, 4, true)
-				f.ContainerHolder[i]:SetNormalTexture("")
-				f.ContainerHolder[i]:SetCheckedTexture(nil)
-				f.ContainerHolder[i]:SetPushedTexture("")
-				f.ContainerHolder[i]:SetScript("OnClick", nil)
-				f.ContainerHolder[i].id = isBank and bagID or bagID + 1;
-				f.ContainerHolder[i]:SetID(isBank and bagID or (bagID + 1))
-				f.ContainerHolder[i]:HookScript("OnEnter", function(self) MOD.UseSlotFading(self, f) end)
-				f.ContainerHolder[i]:HookScript("OnLeave", function(self) MOD.FlushSlotFading(self, f) end)
-				if(isBank and (not f.ContainerHolder[i].tooltipText)) then
-					f.ContainerHolder[i].tooltipText = ""
-				end
-				f.ContainerHolder[i].iconTexture = _G[f.ContainerHolder[i]:GetName().."IconTexture"];
-				f.ContainerHolder[i].iconTexture:FillInner()
-				f.ContainerHolder[i].iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9 )
-			end
-			f.ContainerHolder:Size(((buttonSize + buttonSpacing) * (isBank and i - 1 or i)) + buttonSpacing, buttonSize + (buttonSpacing * 2))
-			if(isBank and f.ContainerHolder[i].GetInventorySlot) then
-				BankFrameItemButton_Update(f.ContainerHolder[i])
-				BankFrameItemButton_UpdateLocked(f.ContainerHolder[i])
-			end
-			f.ContainerHolder[i]:Size(buttonSize)
-			f.ContainerHolder[i]:ClearAllPoints()
-			if (isBank and i == 2) or (not isBank and i == 1) then
-				f.ContainerHolder[i]:SetPoint("BOTTOMLEFT", f.ContainerHolder, "BOTTOMLEFT", buttonSpacing, buttonSpacing)
-			else
-				f.ContainerHolder[i]:SetPoint("LEFT", lastContainerButton, "RIGHT", buttonSpacing, 0)
-			end
-			lastContainerButton = f.ContainerHolder[i];
+
+				if(bagSlot.GetInventorySlot) then
+					BankFrameItemButton_Update(bagSlot)
+					BankFrameItemButton_UpdateLocked(bagSlot)
+				end
+			else
+				if(i == 1) then
+					bagSlot:SetPoint("BOTTOMLEFT", menu, "BOTTOMLEFT", buttonSpacing, buttonSpacing)
+				else
+					bagSlot:SetPoint("LEFT", menu[i - 1], "RIGHT", buttonSpacing, 0)
+				end
+			end
 		end

 		local numSlots = GetContainerNumSlots(bagID);

-		if numSlots > 0 then
-			if not f.Bags[bagID] then
-				f.Bags[bagID] = NewFrame("Frame", f:GetName().."Bag"..bagID, f);
-				f.Bags[bagID]:SetID(bagID);
-				f.Bags[bagID].RefreshBagSlots = MOD.RefreshBagSlots;
-				f.Bags[bagID].RefreshSlot = RefreshSlot;
-			end
-			f.Bags[bagID].numSlots = numSlots;
+		local bagName = ("%sBag%d"):format(containerName, bagID)
+		local template = (bagID == -1) and "BankItemButtonGenericTemplate" or "ContainerFrameItemButtonTemplate"
+		local bag;
+
+		if numSlots > 0 then
+			if not self.Bags[bagID] then
+				bag = CreateFrame("Frame", bagName, self);
+				bag:SetID(bagID);
+				bag.SlotUpdate = SlotUpdate;
+				bag.RefreshSlots = RefreshSlots;
+				self.Bags[bagID] = bag
+			else
+				bag = self.Bags[bagID]
+			end
+
 			local btype = select(2, GetContainerNumFreeSlots(bagID));
+			local r, g, b;
 			if RefProfessionColors[btype] then
-				local r, g, b = unpack(RefProfessionColors[btype]);
-				f.Bags[bagID].bagFamily = {r, g, b};
-				f.Bags[bagID]:SetBackdropColor(r, g, b, 0.25)
-				f.Bags[bagID]:SetBackdropBorderColor(r, g, b, 1)
+				r, g, b = unpack(RefProfessionColors[btype]);
+				bag.bagFamily = {r, g, b};
 			else
-				f.Bags[bagID].bagFamily = false;
+				r, g, b = 0,0,0
+				bag.bagFamily = false;
 			end
+
 			for i = 1, MAX_CONTAINER_ITEMS do
-				if f.Bags[bagID][i] then
-					f.Bags[bagID][i]:Hide();
+				if bag[i] then
+					bag[i]:Hide();
 				end
-			end
-			for slotID = 1, numSlots do
-				f.totalSlots = f.totalSlots + 1;
-				if not f.Bags[bagID][slotID] then
-					f.Bags[bagID][slotID] = NewFrame("CheckButton", f.Bags[bagID]:GetName().."Slot"..slotID, f.Bags[bagID], bagID == -1 and "BankItemButtonGenericTemplate" or "ContainerFrameItemButtonTemplate");
-					f.Bags[bagID][slotID]:SetNormalTexture(nil);
-					f.Bags[bagID][slotID]:SetCheckedTexture(nil);
-					f.Bags[bagID][slotID]:SetSlotTemplate(true, 2, 0, 0, true);
+			end
+
+			for slotID = 1, numSlots do
+				local slot;
+				totalSlots = totalSlots + 1;
+
+				if not bag[slotID] then
+					local slotName = ("%sSlot%d"):format(bagName, slotID)
+					local newTexName = ("%sNewItemTexture"):format(slotName)
+					local iconName = ("%sIconTexture"):format(slotName)
+					local cdName = ("%sCooldown"):format(slotName)
+
+					slot = CreateFrame("CheckButton", slotName, bag, template);
+					slot:SetNormalTexture("");
+					slot:SetCheckedTexture("");
+					slot:RemoveTextures()
+					slot:SetSlotTemplate(true, 2, 0, 0, true);

-					if(_G[f.Bags[bagID][slotID]:GetName().."NewItemTexture"]) then
-						_G[f.Bags[bagID][slotID]:GetName().."NewItemTexture"]:Hide()
+					if(_G[newTexName]) then
+						_G[newTexName]:Hide()
 					end

-					f.Bags[bagID][slotID].iconTexture = _G[f.Bags[bagID][slotID]:GetName().."IconTexture"];
-					f.Bags[bagID][slotID].iconTexture:FillInner(f.Bags[bagID][slotID]);
-					f.Bags[bagID][slotID].iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9 );
-					f.Bags[bagID][slotID].cooldown = _G[f.Bags[bagID][slotID]:GetName().."Cooldown"];
-					SV.Timers:AddCooldown(f.Bags[bagID][slotID].cooldown)
-					f.Bags[bagID][slotID].bagID = bagID
-					f.Bags[bagID][slotID].slotID = slotID
+					slot.iconTexture = _G[iconName];
+					slot.iconTexture:FillInner(slot);
+					slot.iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9);
+					slot.cooldown = _G[cdName];
+
+					SV.Timers:AddCooldown(slot.cooldown)
+
+					bag[slotID] = slot
+				else
+					slot = bag[slotID]
 				end
-				f.Bags[bagID][slotID]:SetID(slotID);
-				f.Bags[bagID][slotID]:Size(buttonSize);
-				f:RefreshSlot(bagID, slotID);
-				if f.Bags[bagID][slotID]:GetPoint() then
-					f.Bags[bagID][slotID]:ClearAllPoints();
-				end
+
+				slot:SetID(slotID);
+				slot:Size(buttonSize);
+
+				slot:SetBackdropColor(r, g, b, 0.6)
+				slot:SetBackdropBorderColor(r, g, b, 1)
+
+				bag:SlotUpdate(slotID);
+
+				if slot:GetPoint() then
+					slot:ClearAllPoints();
+				end
+
 				if lastButton then
-					if (f.totalSlots - 1) % numContainerColumns == 0 then
-						f.Bags[bagID][slotID]:Point("TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing);
-						lastRowButton = f.Bags[bagID][slotID];
-						numContainerRows = numContainerRows + 1;
+					if((totalSlots - 1) % numContainerColumns == 0) then
+						slot:Point("TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing);
+						lastRowButton = slot;
 					else
-						f.Bags[bagID][slotID]:Point("LEFT", lastButton, "RIGHT", buttonSpacing, 0);
+						slot:Point("LEFT", lastButton, "RIGHT", buttonSpacing, 0);
 					end
 				else
-					f.Bags[bagID][slotID]:Point("TOPLEFT", f.holderFrame, "TOPLEFT");
-					lastRowButton = f.Bags[bagID][slotID];
-					numContainerRows = numContainerRows + 1;
-				end
-				lastButton = f.Bags[bagID][slotID];
+					slot:Point("TOPLEFT", self.holderFrame, "TOPLEFT");
+					lastRowButton = slot;
+				end
+
+				lastButton = slot;
 			end
-		else
-			for i = 1, MAX_CONTAINER_ITEMS do
-				if f.Bags[bagID] and f.Bags[bagID][i] then
-					f.Bags[bagID][i]:Hide();
-				end
+		else
+			if(menu[i] and menu[i].GetInventorySlot) then
+				BankFrameItemButton_Update(menu[i])
+				BankFrameItemButton_UpdateLocked(menu[i])
+			end
+			if(self.Bags[bagID]) then
+				for i = 1, MAX_CONTAINER_ITEMS do
+					if(self.Bags[bagID][i]) then
+						self.Bags[bagID][i]:Hide();
+					end
+				end
 			end
-			if f.Bags[bagID] then
-				f.Bags[bagID].numSlots = numSlots;
+		end
+
+		self.Bags[bagID].numSlots = numSlots;
+	end
+
+	self:Size(containerWidth, containerHeight);
+end
+
+local ReagentFrame_UpdateLayout = function(self)
+	if SV.db.SVBag.enable ~= true or not _G.ReagentBankFrame then return; end
+
+	local ReagentBankFrame = _G.ReagentBankFrame;
+
+	local containerName = self:GetName()
+	local buttonSpacing = 8;
+	local preColumns = ReagentBankFrame.numColumn or 7
+	local preSubColumns = ReagentBankFrame.numSubColumn or 2
+	local numContainerColumns = preColumns * preSubColumns
+	local numContainerRows = ReagentBankFrame.numRow or 7
+	local buttonSize = SVUI_BankContainerFrame.ButtonSize
+	local containerWidth = (buttonSize + buttonSpacing) * numContainerColumns + buttonSpacing
+	local containerHeight = (((buttonSize + buttonSpacing) * numContainerRows) - buttonSpacing) + self.topOffset + self.bottomOffset
+	local maxCount = numContainerColumns * numContainerRows
+	local holderWidth = ((buttonSize + buttonSpacing) * numContainerColumns) - buttonSpacing;
+	local lastButton, lastRowButton;
+	local bagID = REAGENTBANK_CONTAINER;
+	local totalSlots = 0;
+
+	self.holderFrame:Width(holderWidth);
+
+	local bag;
+	local bagName = ("%sBag%d"):format(containerName, bagID)
+
+	if not self.Bags[bagID] then
+		bag = CreateFrame("Frame", bagName, self);
+		bag:SetID(bagID);
+		bag.SlotUpdate = SlotUpdate;
+		bag.RefreshSlots = RefreshReagentSlots;
+		self.Bags[bagID] = bag
+	else
+		bag = self.Bags[bagID]
+	end
+
+	bag.numSlots = maxCount;
+	bag.bagFamily = false;
+
+	for slotID = 1, maxCount do
+		local slot;
+		totalSlots = totalSlots + 1;
+
+		if not bag[slotID] then
+			local slotName = ("%sSlot%d"):format(bagName, slotID)
+			local newTexName = ("%sNewItemTexture"):format(slotName)
+			local iconName = ("%sIconTexture"):format(slotName)
+			local cdName = ("%sCooldown"):format(slotName)
+
+			slot = CreateFrame("CheckButton", slotName, bag, "ReagentBankItemButtonGenericTemplate");
+			slot:SetNormalTexture(nil);
+			slot:SetCheckedTexture(nil);
+			slot:RemoveTextures()
+			slot:SetSlotTemplate(true, 2, 0, 0, true);
+
+			if(_G[newTexName]) then
+				_G[newTexName]:Hide()
 			end
-			if(self.isBank and not self.isReagent) then
-				if(self.ContainerHolder[i] and self.ContainerHolder[i].GetInventorySlot) then
-					BankFrameItemButton_Update(self.ContainerHolder[i])
-					BankFrameItemButton_UpdateLocked(self.ContainerHolder[i])
-				end
+
+			slot.iconTexture = _G[iconName];
+			slot.iconTexture:FillInner(slot);
+			slot.iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9);
+			slot.cooldown = _G[cdName];
+
+			SV.Timers:AddCooldown(slot.cooldown)
+
+			bag[slotID] = slot
+		else
+			slot = bag[slotID]
+		end
+
+		slot:SetID(slotID);
+		slot:Size(buttonSize);
+		bag:SlotUpdate(slotID);
+
+		if slot:GetPoint() then
+			slot:ClearAllPoints();
+		end
+
+		if lastButton then
+			if((totalSlots - 1) % numContainerColumns == 0) then
+				slot:Point("TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing);
+				lastRowButton = slot;
+			else
+				slot:Point("LEFT", lastButton, "RIGHT", buttonSpacing, 0);
 			end
-		end
-	end
-	f:Size(containerWidth, (((buttonSize + buttonSpacing) * numContainerRows) - buttonSpacing) + f.topOffset + f.bottomOffset);
-end
+		else
+			slot:Point("TOPLEFT", self.holderFrame, "TOPLEFT");
+			lastRowButton = slot;
+		end

-function MOD:RefreshBags()
-	if MOD.BagFrame then
-		MOD:Layout(false)
-	end
-	if MOD.BankFrame then
-		MOD:Layout(true)
+		lastButton = slot;
+
+		BankFrameItemButton_Update(slot);
+		BankFrameItemButton_UpdateLocked(slot)
 	end
-	if MOD.ReagentFrame then
-		MOD:Layout(true, true)
+
+	self:Size(containerWidth, containerHeight);
+end
+
+function MOD:RefreshBagFrames(frame)
+	if(frame and self[frame]) then
+		self[frame]:UpdateLayout()
+		return
+	else
+		if(self.BagFrame) then
+			self.BagFrame:UpdateLayout()
+		end
+		if self.BankFrame then
+			self.BankFrame:UpdateLayout()
+		end
+		if self.ReagentFrame then
+			self.ReagentFrame:UpdateLayout()
+		end
 	end
 end

 function MOD:UpdateGoldText()
-	MOD.BagFrame.goldText:SetText(GetCoinTextureString(GetMoney(), 12))
+	self.BagFrame.goldText:SetText(GetCoinTextureString(GetMoney(), 12))
 end

 function MOD:VendorGrays(arg1, arg2, arg3)
@@ -554,17 +805,26 @@ end
 function MOD:ModifyBags()
 	local docked = SV.db.SVBag.alignToChat
 	local anchor, x, y
-	if self.BagFrame then
-		local parent = docked and RightSuperDock or SV.UIParent
-		local anchor, x, y = SV.db.SVBag.bags.point, SV.db.SVBag.bags.xOffset, SV.db.SVBag.bags.yOffset
-		self.BagFrame:ClearAllPoints()
-		self.BagFrame:Point(anchor, parent, anchor, x, y)
-	end
-	if self.BankFrame then
-		local parent = docked and LeftSuperDock or SV.UIParent
-		local anchor, x, y = SV.db.SVBag.bank.point, SV.db.SVBag.bank.xOffset, SV.db.SVBag.bank.yOffset
-		self.BankFrame:ClearAllPoints()
-		self.BankFrame:Point(anchor, parent, anchor, x, y)
+	if(docked) then
+		if self.BagFrame then
+			self.BagFrame:ClearAllPoints()
+			self.BagFrame:Point("BOTTOMRIGHT", RightSuperDock, "BOTTOMRIGHT", 0, 0)
+		end
+		if self.BankFrame then
+			self.BankFrame:ClearAllPoints()
+			self.BankFrame:Point("BOTTOMLEFT", LeftSuperDock, "BOTTOMLEFT", 0, 0)
+		end
+	else
+		if self.BagFrame then
+			local anchor, x, y = SV.db.SVBag.bags.point, SV.db.SVBag.bags.xOffset, SV.db.SVBag.bags.yOffset
+			self.BagFrame:ClearAllPoints()
+			self.BagFrame:Point(anchor, SV.UIParent, anchor, x, y)
+		end
+		if self.BankFrame then
+			local anchor, x, y = SV.db.SVBag.bank.point, SV.db.SVBag.bank.xOffset, SV.db.SVBag.bank.yOffset
+			self.BankFrame:ClearAllPoints()
+			self.BankFrame:Point(anchor, SV.UIParent, anchor, x, y)
+		end
 	end
 end

@@ -593,7 +853,7 @@ do
 	local function LoadBagBar()
 		if MOD.BagBarLoaded then return end

-		local bar = NewFrame("Frame", "SVUI_BagBar", SV.UIParent)
+		local bar = CreateFrame("Frame", "SVUI_BagBar", SV.UIParent)
 		bar:SetPoint("TOPRIGHT", RightSuperDock, "TOPLEFT", -4, 0)
 		bar.buttons = {}
 		bar:EnableMouse(true)
@@ -775,29 +1035,36 @@ do
 	end

 	local Container_OnEvent = function(self, event, ...)
-		if(event == "ITEM_LOCK_CHANGED" or event == "ITEM_UNLOCKED") then
-			self:RefreshSlot(...)
+		if(event == "ITEM_LOCK_CHANGED") then
+			local bagID, slotID = ...
+			if(bagID and slotID and self.Bags[bagID]) then
+				self.Bags[bagID]:SlotUpdate(slotID)
+			end
+			self:RefreshBags()
 		elseif(event == "BAG_UPDATE" or event == "EQUIPMENT_SETS_CHANGED") then
 			BuildEquipmentMap()
-			for _, id in ipairs(self.BagIDs) do
+			for id, bag in pairs(self.Bags) do
 				local numSlots = GetContainerNumSlots(id)
-				if(not self.Bags[id] and numSlots ~= 0 or self.Bags[id] and numSlots ~= self.Bags[id].numSlots) then
-					MOD:Layout(self.isBank, self.isReagent)
+				if(numSlots ~= bag.numSlots) then
+					self:UpdateLayout()
 					return
 				end
 				if(SV.db.SVGear.misc.setoverlay) then
 					for i = 1, numSlots do
-						if self.Bags[id] and self.Bags[id][i] then
-							UpdateEquipmentInfo(self.Bags[id][i], id, i)
+						if bag[i] then
+							UpdateEquipmentInfo(bag[i], id, i)
 						end
 					end
 				end
-			end
-			self:RefreshBagSlots(...)
+			end
+			local bagID = ...
+			if(bagID and self.Bags[bagID]) then
+				self.Bags[bagID]:RefreshSlots()
+			end
 		elseif(event == "BAG_UPDATE_COOLDOWN") then
-			self:RefreshCD()
+			self:RefreshCooldowns()
 		elseif(event == "PLAYERBANKSLOTS_CHANGED" or event == "PLAYERREAGENTBANKSLOTS_CHANGED") then
-			self:RefreshBagsSlots()
+			self:RefreshBags()
 		end
 	end

@@ -828,11 +1095,18 @@ do
 	local Tooltip_Show = function(self)
 		GameTooltip:SetOwner(self:GetParent(),"ANCHOR_TOP",0,4)
 		GameTooltip:ClearLines()
-		GameTooltip:AddLine(self.ttText)
+
+		if(self.altText and IsShiftKeyDown()) then
+			GameTooltip:AddLine(self.altText)
+		else
+			GameTooltip:AddLine(self.ttText)
+		end
+
 		if self.ttText2 then
 			GameTooltip:AddLine(' ')
 			GameTooltip:AddDoubleLine(self.ttText2,self.ttText2desc,1,1,1)
-		end
+		end
+
 		self:GetNormalTexture():SetGradient(unpack(SV.Media.gradient.highlight))
 		GameTooltip:Show()
 	end
@@ -849,7 +1123,7 @@ do
 		self:StopMovingOrSizing()
 	end
 	local Container_OnClick = function(self)
-		if IsControlKeyDown()then MOD:ModifyBags()end
+		if IsControlKeyDown() then MOD:ModifyBags() end
 	end
 	local Container_OnEnter = function(self)
 		GameTooltip:SetOwner(self,"ANCHOR_TOPLEFT",0,4)
@@ -860,59 +1134,55 @@ do
 	end

 	function MOD:ToggleEquipmentOverlay()
-		local numSlots, container;
-		if(MOD.BagFrame) then
-			container = MOD.BagFrame
-			for _,id in ipairs(container.BagIDs) do
-				numSlots = GetContainerNumSlots(id)
+		if(self.BagFrame) then
+			for id,bag in ipairs(self.BagFrame.Bags) do
+				local numSlots = GetContainerNumSlots(id)
 				if(SV.db.SVGear.misc.setoverlay) then
 					for i=1,numSlots do
-						if container.Bags[id] and container.Bags[id][i] then
-							UpdateEquipmentInfo(container.Bags[id][i], id, i)
+						if bag[i] then
+							UpdateEquipmentInfo(bag[i], id, i)
 						end
 					end
 				else
 					for i=1,numSlots do
-						if(container.Bags[id] and container.Bags[id][i] and container.Bags[id][i].equipmentinfo) then
-							container.Bags[id][i].equipmentinfo:SetText()
+						if(bag and bag[i] and bag[i].equipmentinfo) then
+							bag[i].equipmentinfo:SetText()
 						end
 					end
 				end
 			end
 		end
-		if(MOD.BankFrame) then
-			container = MOD.BankFrame
-			for _,id in ipairs(container.BagIDs) do
-				numSlots = GetContainerNumSlots(id)
+		if(self.BankFrame) then
+			for id,bag in ipairs(self.BankFrame.Bags) do
+				local numSlots = GetContainerNumSlots(id)
 				if(SV.db.SVGear.misc.setoverlay) then
 					for i=1,numSlots do
-						if container.Bags[id] and container.Bags[id][i] then
-							UpdateEquipmentInfo(container.Bags[id][i], id, i)
+						if bag and bag[i] then
+							UpdateEquipmentInfo(bag[i], id, i)
 						end
 					end
 				else
 					for i=1,numSlots do
-						if(container.Bags[id] and container.Bags[id][i] and container.Bags[id][i].equipmentinfo) then
-							container.Bags[id][i].equipmentinfo:SetText()
+						if(bag and bag[i] and bag[i].equipmentinfo) then
+							bag[i].equipmentinfo:SetText()
 						end
 					end
 				end
 			end
 		end
-		if(MOD.ReagentFrame) then
-			container = MOD.ReagentFrame
-			for _,id in ipairs(container.BagIDs) do
-				numSlots = GetContainerNumSlots(id)
+		if(self.ReagentFrame) then
+			for id,bag in ipairs(self.ReagentFrame.Bags) do
+				local numSlots = GetContainerNumSlots(id)
 				if(SV.db.SVGear.misc.setoverlay) then
 					for i=1,numSlots do
-						if container.Bags[id] and container.Bags[id][i] then
-							UpdateEquipmentInfo(container.Bags[id][i], id, i)
+						if bag and bag[i] then
+							UpdateEquipmentInfo(bag[i], id, i)
 						end
 					end
 				else
 					for i=1,numSlots do
-						if(container.Bags[id] and container.Bags[id][i] and container.Bags[id][i].equipmentinfo) then
-							container.Bags[id][i].equipmentinfo:SetText()
+						if(bag and bag[i] and bag[i].equipmentinfo) then
+							bag[i].equipmentinfo:SetText()
 						end
 					end
 				end
@@ -922,23 +1192,21 @@ do

 	function MOD:MakeBags()
 		local bagName = "SVUI_ContainerFrame"
-		local uisCount = #UISpecialFrames + 1;
 		local bagsCount = #self.BagFrames + 1;
-		local frame = NewFrame("Button", bagName, SV.UIParent)
+		local frame = CreateFrame("Button", "SVUI_ContainerFrame", SV.UIParent)
+
 		frame:SetPanelTemplate("Container")
 		frame:SetFrameStrata("HIGH")
-		frame.RefreshSlot = MOD.RefreshSlot;
-		frame.RefreshBagsSlots = MOD.RefreshBagsSlots;
-		frame.RefreshBagSlots = MOD.RefreshBagSlots;
-		frame.RefreshCD = MOD.RefreshCD;
+		frame.UpdateLayout = ContainerFrame_UpdateLayout;
+		frame.RefreshBags = ContainerFrame_UpdateBags;
+		frame.RefreshCooldowns = ContainerFrame_UpdateCooldowns;

 		frame:RegisterEvent("ITEM_LOCK_CHANGED")
-		frame:RegisterEvent("ITEM_UNLOCKED")
 		frame:RegisterEvent("BAG_UPDATE_COOLDOWN")
 		frame:RegisterEvent("BAG_UPDATE")
 		frame:RegisterEvent("EQUIPMENT_SETS_CHANGED")
 		frame:RegisterEvent("PLAYERBANKSLOTS_CHANGED")
-		frame:RegisterEvent("PLAYERREAGENTBANKSLOTS_CHANGED")
+		--frame:RegisterEvent("PLAYERREAGENTBANKSLOTS_CHANGED")
 		frame:SetMovable(true)

 		frame:RegisterForDrag("LeftButton", "RightButton")
@@ -956,23 +1224,34 @@ do
 		frame:Hide()
 		frame.bottomOffset = 32;
 		frame.topOffset = 65;
+
 		frame.BagIDs = {0, 1, 2, 3, 4}
+
 		frame.Bags = {}
-		frame.closeButton = NewFrame("Button", bagName.."CloseButton", frame, "UIPanelCloseButton")
+		frame.closeButton = CreateFrame("Button", "SVUI_ContainerFrameCloseButton", frame, "UIPanelCloseButton")
 		frame.closeButton:Point("TOPRIGHT", -4, -4)
-		frame.holderFrame = NewFrame("Frame", nil, frame)
+
+		frame.holderFrame = CreateFrame("Frame", nil, frame)
 		frame.holderFrame:Point("TOP", frame, "TOP", 0, -frame.topOffset)
 		frame.holderFrame:Point("BOTTOM", frame, "BOTTOM", 0, frame.bottomOffset)
-		frame.ContainerHolder = NewFrame("Button", bagName.."ContainerHolder", frame)
-		frame.ContainerHolder:Point("BOTTOMLEFT", frame, "TOPLEFT", 0, 1)
-		frame.ContainerHolder:SetFixedPanelTemplate("Transparent")
-		frame.ContainerHolder:Hide()
+
+		frame.Title = frame:CreateFontString()
+		frame.Title:SetFontObject(NumberFont_Outline_Large)
+		frame.Title:SetText(INVENTORY_TOOLTIP)
+		frame.Title:SetPoint("TOPLEFT", frame, "TOPLEFT", 2, -2)
+		frame.Title:SetTextColor(1,0.8,0)
+
+		frame.BagMenu = CreateFrame("Button", "SVUI_ContainerFrameBagMenu", frame)
+		frame.BagMenu:Point("BOTTOMLEFT", frame, "TOPLEFT", 0, 1)
+		frame.BagMenu:SetFixedPanelTemplate("Transparent")
+		frame.BagMenu:Hide()

 		frame.goldText = frame:CreateFontString(nil, "OVERLAY")
 		frame.goldText:SetFontTemplate(SV.Media.font.numbers)
 		frame.goldText:Point("BOTTOMRIGHT", frame.holderFrame, "TOPRIGHT", -2, 4)
 		frame.goldText:SetJustifyH("RIGHT")
-		frame.editBox = NewFrame("EditBox", bagName.."EditBox", frame)
+
+		frame.editBox = CreateFrame("EditBox", "SVUI_ContainerFrameEditBox", frame)
 		frame.editBox:SetFrameLevel(frame.editBox:GetFrameLevel()+2)
 		frame.editBox:SetEditboxTemplate()
 		frame.editBox:Height(15)
@@ -990,7 +1269,7 @@ do
 		frame.editBox:SetText(SEARCH)
 		frame.editBox:SetFontTemplate(SV.Media.font.roboto)

-		local searchButton = NewFrame("Button", nil, frame)
+		local searchButton = CreateFrame("Button", nil, frame)
 		searchButton:RegisterForClicks("LeftButtonUp", "RightButtonUp")
 		searchButton:SetSize(60, 18)
 		searchButton:SetPoint("BOTTOMLEFT", frame.editBox, "BOTTOMLEFT", -2, 0)
@@ -1004,18 +1283,19 @@ do
 		searchButton:SetFontString(searchText)
 		frame.detail = searchButton

-		frame.sortButton = NewFrame("Button", nil, frame)
+		frame.sortButton = CreateFrame("Button", nil, frame)
 		frame.sortButton:Point("TOP", frame, "TOP", 0, -10)
 		frame.sortButton:Size(25, 25)
-		frame.sortButton:SetNormalTexture(ICON_SORT)
+		frame.sortButton:SetNormalTexture(ICON_CLEANUP)
 		StyleBagToolButton(frame.sortButton)
 		frame.sortButton.ttText = L["Sort Bags"]
+		frame.sortButton.altText = L["Filtered Cleanup"]
 		frame.sortButton:SetScript("OnEnter", Tooltip_Show)
 		frame.sortButton:SetScript("OnLeave", Tooltip_Hide)
-		local Sort_OnClick = (SV.GameVersion >= 60000) and SortBankBags or MOD:RunSortingProcess(MOD.Sort, "bags")
+		local Sort_OnClick = MOD:RunSortingProcess(MOD.Sort, "bags", SortBags)
 		frame.sortButton:SetScript("OnClick", Sort_OnClick)

-		frame.stackButton = NewFrame("Button", nil, frame)
+		frame.stackButton = CreateFrame("Button", nil, frame)
 		frame.stackButton:Point("LEFT", frame.sortButton, "RIGHT", 10, 0)
 		frame.stackButton:Size(25, 25)
 		frame.stackButton:SetNormalTexture(ICON_STACK)
@@ -1026,7 +1306,7 @@ do
 		local Stack_OnClick = MOD:RunSortingProcess(MOD.Stack, "bags")
 		frame.stackButton:SetScript("OnClick", Stack_OnClick)

-		frame.vendorButton = NewFrame("Button", nil, frame)
+		frame.vendorButton = CreateFrame("Button", nil, frame)
 		frame.vendorButton:Point("RIGHT", frame.sortButton, "LEFT", -10, 0)
 		frame.vendorButton:Size(25, 25)
 		frame.vendorButton:SetNormalTexture(ICON_VENDOR)
@@ -1038,7 +1318,7 @@ do
 		frame.vendorButton:SetScript("OnLeave", Tooltip_Hide)
 		frame.vendorButton:SetScript("OnClick", Vendor_OnClick)

-		frame.bagsButton = NewFrame("Button", nil, frame)
+		frame.bagsButton = CreateFrame("Button", nil, frame)
 		frame.bagsButton:Point("RIGHT", frame.vendorButton, "LEFT", -10, 0)
 		frame.bagsButton:Size(25, 25)
 		frame.bagsButton:SetNormalTexture(ICON_BAGS)
@@ -1047,11 +1327,15 @@ do
 		frame.bagsButton:SetScript("OnEnter", Tooltip_Show)
 		frame.bagsButton:SetScript("OnLeave", Tooltip_Hide)
 		local BagBtn_OnClick = function()
-			ToggleFrame(frame.ContainerHolder)
+			PlaySound("igMainMenuOption");
+			if(BagFilters:IsShown()) then
+				ToggleFrame(BagFilters)
+			end
+			ToggleFrame(frame.BagMenu)
 		end
 		frame.bagsButton:SetScript("OnClick", BagBtn_OnClick)

-		frame.transferButton = NewFrame("Button", nil, frame)
+		frame.transferButton = CreateFrame("Button", nil, frame)
 		frame.transferButton:Point("LEFT", frame.stackButton, "RIGHT", 10, 0)
 		frame.transferButton:Size(25, 25)
 		frame.transferButton:SetNormalTexture(ICON_TRANSFER)
@@ -1062,12 +1346,12 @@ do
 		local Transfer_OnClick = MOD:RunSortingProcess(MOD.Transfer, "bags bank")
 		frame.transferButton:SetScript("OnClick", Transfer_OnClick)

-		frame.currencyButton = NewFrame("Frame", nil, frame)
+		frame.currencyButton = CreateFrame("Frame", nil, frame)
 		frame.currencyButton:Point("BOTTOMLEFT", frame, "BOTTOMLEFT", 4, 0)
 		frame.currencyButton:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -4, 0)
 		frame.currencyButton:Height(32)
 		for h = 1, MAX_WATCHED_TOKENS do
-			frame.currencyButton[h] = NewFrame("Button", nil, frame.currencyButton)
+			frame.currencyButton[h] = CreateFrame("Button", nil, frame.currencyButton)
 			frame.currencyButton[h]:Size(22)
 			frame.currencyButton[h]:SetFixedPanelTemplate("Default")
 			frame.currencyButton[h]:SetID(h)
@@ -1084,7 +1368,7 @@ do
 		end

 		frame:SetScript("OnHide", CloseAllBags)
-		UISpecialFrames[uisCount] = bagName;
+		SV:AddToDisplayAudit(frame)

 		self.BagFrames[bagsCount] = frame
 		self.BagFrame = frame
@@ -1094,25 +1378,22 @@ do
 		-- Reagent Slots: 1 - 98
 		-- /script print(ReagentBankFrameItem1:GetInventorySlot())
 		local bagName = isReagent and "SVUI_ReagentContainerFrame" or "SVUI_BankContainerFrame"
-		local otherName = isReagent and "SVUI_BankContainerFrame" or "SVUI_ReagentContainerFrame"
-		local uisCount = #UISpecialFrames + 1;
 		local bagsCount = #self.BagFrames + 1;

-		local frame = NewFrame("Button", bagName, isReagent and self.BankFrame or SV.UIParent)
+		local frame = CreateFrame("Button", bagName, isReagent and self.BankFrame or SV.UIParent)
 		frame:SetPanelTemplate(isReagent and "Action" or "Container")
 		frame:SetFrameStrata("HIGH")
-		frame.RefreshSlot = MOD.RefreshSlot;
-		frame.RefreshBagsSlots = MOD.RefreshBagsSlots;
-		frame.RefreshBagSlots = MOD.RefreshBagSlots;
-		frame.RefreshCD = MOD.RefreshCD;
+
+		frame.UpdateLayout = isReagent and ReagentFrame_UpdateLayout or ContainerFrame_UpdateLayout;
+		frame.RefreshBags = ContainerFrame_UpdateBags;
+		frame.RefreshCooldowns = ContainerFrame_UpdateCooldowns;

 		frame:RegisterEvent("ITEM_LOCK_CHANGED")
-		frame:RegisterEvent("ITEM_UNLOCKED")
 		frame:RegisterEvent("BAG_UPDATE_COOLDOWN")
 		frame:RegisterEvent("BAG_UPDATE")
 		frame:RegisterEvent("EQUIPMENT_SETS_CHANGED")
 		frame:RegisterEvent("PLAYERBANKSLOTS_CHANGED")
-		frame:RegisterEvent("PLAYERREAGENTBANKSLOTS_CHANGED")
+		--frame:RegisterEvent("PLAYERREAGENTBANKSLOTS_CHANGED")

 		frame:SetMovable(true)
 		frame:RegisterForDrag("LeftButton", "RightButton")
@@ -1129,35 +1410,41 @@ do
 		frame:Hide()
 		frame.bottomOffset = 8;
 		frame.topOffset = 60;
+
 		if(isReagent) then
 			frame.BagIDs = {}
 		else
 			frame.BagIDs = {-1, 5, 6, 7, 8, 9, 10, 11}
 		end
+
 		frame.Bags = {}

-		frame.closeButton = NewFrame("Button", bagName.."CloseButton", frame, "UIPanelCloseButton")
+		frame.closeButton = CreateFrame("Button", bagName.."CloseButton", frame, "UIPanelCloseButton")
 		frame.closeButton:Point("TOPRIGHT", -4, -4)
-		frame.holderFrame = NewFrame("Frame", nil, frame)
+
+		frame.holderFrame = CreateFrame("Frame", nil, frame)
 		frame.holderFrame:Point("TOP", frame, "TOP", 0, -frame.topOffset)
 		frame.holderFrame:Point("BOTTOM", frame, "BOTTOM", 0, frame.bottomOffset)
-		frame.ContainerHolder = NewFrame("Button", bagName.."ContainerHolder", frame)
-		frame.ContainerHolder:Point("BOTTOMLEFT", frame, "TOPLEFT", 0, 1)
-		frame.ContainerHolder:SetFixedPanelTemplate("Transparent")
-		frame.ContainerHolder:Hide()

-		frame.sortButton = NewFrame("Button", nil, frame)
+		frame.Title = frame:CreateFontString()
+		frame.Title:SetFontObject(NumberFont_Outline_Large)
+		frame.Title:SetText(isReagent and REAGENT_BANK or BANK or "Bank")
+		frame.Title:SetPoint("TOPLEFT", frame, "TOPLEFT", 2, -2)
+		frame.Title:SetTextColor(1,0.8,0)
+
+		frame.sortButton = CreateFrame("Button", nil, frame)
 		frame.sortButton:Point("TOPRIGHT", frame, "TOP", 0, -10)
 		frame.sortButton:Size(25, 25)
-		frame.sortButton:SetNormalTexture(ICON_SORT)
+		frame.sortButton:SetNormalTexture(ICON_CLEANUP)
 		StyleBagToolButton(frame.sortButton)
-		frame.sortButton.ttText = L["Sort Bags"]
+		frame.sortButton.ttText = L["Sort Bank"]
+		frame.sortButton.altText = L["Filtered Cleanup"]
 		frame.sortButton:SetScript("OnEnter", Tooltip_Show)
 		frame.sortButton:SetScript("OnLeave", Tooltip_Hide)
-		local Sort_OnClick = (SV.GameVersion >= 60000) and SortReagentBankBags or MOD:RunSortingProcess(MOD.Sort, "bank")
+		local Sort_OnClick = MOD:RunSortingProcess(MOD.Sort, "bank", SortBankBags)
 		frame.sortButton:SetScript("OnClick", Sort_OnClick)

-		frame.stackButton = NewFrame("Button", nil, frame)
+		frame.stackButton = CreateFrame("Button", nil, frame)
 		frame.stackButton:Point("LEFT", frame.sortButton, "RIGHT", 10, 0)
 		frame.stackButton:Size(25, 25)
 		frame.stackButton:SetNormalTexture(ICON_STACK)
@@ -1168,24 +1455,27 @@ do
 		local Stack_OnClick = MOD:RunSortingProcess(MOD.Stack, "bank")
 		frame.stackButton:SetScript("OnClick", Stack_OnClick)

-		frame.transferButton = NewFrame("Button", nil, frame)
-		frame.transferButton:Point("LEFT", frame.stackButton, "RIGHT", 10, 0)
-		frame.transferButton:Size(25, 25)
-		frame.transferButton:SetNormalTexture(ICON_TRANSFER)
-		StyleBagToolButton(frame.transferButton)
-		frame.transferButton.ttText = L["Stack Bank to Bags"]
-		frame.transferButton:SetScript("OnEnter", Tooltip_Show)
-		frame.transferButton:SetScript("OnLeave", Tooltip_Hide)
-		local Transfer_OnClick = MOD:RunSortingProcess(MOD.Transfer, "bank bags")
-		frame.transferButton:SetScript("OnClick", Transfer_OnClick)
-
+		if(not isReagent) then
+			frame.BagMenu = CreateFrame("Button", bagName.."BagMenu", frame)
+			frame.BagMenu:Point("BOTTOMLEFT", frame, "TOPLEFT", 0, 1)
+			frame.BagMenu:SetFixedPanelTemplate("Transparent")
+			frame.BagMenu:Hide()
+
+			frame.transferButton = CreateFrame("Button", nil, frame)
+			frame.transferButton:Point("LEFT", frame.stackButton, "RIGHT", 10, 0)
+			frame.transferButton:Size(25, 25)
+			frame.transferButton:SetNormalTexture(ICON_TRANSFER)
+			StyleBagToolButton(frame.transferButton)
+			frame.transferButton.ttText = L["Stack Bank to Bags"]
+			frame.transferButton:SetScript("OnEnter", Tooltip_Show)
+			frame.transferButton:SetScript("OnLeave", Tooltip_Hide)
+			local Transfer_OnClick = MOD:RunSortingProcess(MOD.Transfer, "bank bags")
+			frame.transferButton:SetScript("OnClick", Transfer_OnClick)

+			SV:AddToDisplayAudit(frame)
+			self.BagFrames[bagsCount] = frame

-		UISpecialFrames[uisCount] = bagName;
-		self.BagFrames[bagsCount] = frame
-
-		if(not isReagent) then
-			frame.bagsButton = NewFrame("Button", nil, frame)
+			frame.bagsButton = CreateFrame("Button", nil, frame)
 			frame.bagsButton:Point("RIGHT", frame.sortButton, "LEFT", -10, 0)
 			frame.bagsButton:Size(25, 25)
 			frame.bagsButton:SetNormalTexture(ICON_BAGS)
@@ -1194,16 +1484,20 @@ do
 			frame.bagsButton:SetScript("OnEnter", Tooltip_Show)
 			frame.bagsButton:SetScript("OnLeave", Tooltip_Hide)
 			local BagBtn_OnClick = function()
+				PlaySound("igMainMenuOption");
+				if(BagFilters:IsShown()) then
+					ToggleFrame(BagFilters)
+				end
 				local numSlots, _ = GetNumBankSlots()
 				if numSlots  >= 1 then
-					ToggleFrame(frame.ContainerHolder)
+					ToggleFrame(frame.BagMenu)
 				else
 					SV:StaticPopup_Show("NO_BANK_BAGS")
 				end
 			end
 			frame.bagsButton:SetScript("OnClick", BagBtn_OnClick)

-			frame.purchaseBagButton = NewFrame("Button", nil, frame)
+			frame.purchaseBagButton = CreateFrame("Button", nil, frame)
 			frame.purchaseBagButton:Size(25, 25)
 			frame.purchaseBagButton:Point("RIGHT", frame.bagsButton, "LEFT", -10, 0)
 			frame.purchaseBagButton:SetFrameLevel(frame.purchaseBagButton:GetFrameLevel()+2)
@@ -1213,6 +1507,7 @@ do
 			frame.purchaseBagButton:SetScript("OnEnter", Tooltip_Show)
 			frame.purchaseBagButton:SetScript("OnLeave", Tooltip_Hide)
 			local PurchaseBtn_OnClick = function()
+				PlaySound("igMainMenuOption");
 				local _, full = GetNumBankSlots()
 				if not full then
 					SV:StaticPopup_Show("BUY_BANK_SLOT")
@@ -1223,26 +1518,53 @@ do
 			frame.purchaseBagButton:SetScript("OnClick", PurchaseBtn_OnClick)

 			if(SV.GameVersion >= 60000) then
-				frame.swapButton = NewFrame("Button", nil, frame)
+				local active_icon = IsReagentBankUnlocked() and ICON_REAGENTS or ICON_PURCHASE
+				frame.swapButton = CreateFrame("Button", nil, frame)
 				frame.swapButton:Point("TOPRIGHT", frame, "TOPRIGHT", -40, -10)
 				frame.swapButton:Size(25, 25)
-				frame.swapButton:SetNormalTexture(ICON_BAGS)
+				frame.swapButton:SetNormalTexture(active_icon)
 				StyleBagToolButton(frame.swapButton)
-				frame.swapButton.ttText = isReagent and L["View Bank"] or L["View Reagents"]
-				frame.swapButton:SetScript("OnEnter", Tooltip_Show)
+				frame.swapButton.ttText = L["Toggle Reagents Bank"]
+				frame.swapButton:SetScript("OnEnter", function(self)
+					GameTooltip:SetOwner(self:GetParent(),"ANCHOR_TOP",0,4)
+					GameTooltip:ClearLines()
+					if(not IsReagentBankUnlocked()) then
+						GameTooltip:AddDoubleLine("Purchase Reagents Bank", FormatCurrency(GetReagentBankCost()), 0.1,1,0.1, 1,1,1)
+					else
+						GameTooltip:AddLine(self.ttText)
+					end
+					self:GetNormalTexture():SetGradient(unpack(SV.Media.gradient.highlight))
+					GameTooltip:Show()
+				end)
 				frame.swapButton:SetScript("OnLeave", Tooltip_Hide)
 				frame.swapButton:SetScript("OnClick", function()
-					if(_G["SVUI_ReagentContainerFrame"]:IsShown()) then
-						_G["SVUI_ReagentContainerFrame"]:Hide()
+					if(not IsReagentBankUnlocked()) then
+						SV:StaticPopup_Show("CONFIRM_BUY_REAGENTBANK_TAB");
 					else
-						_G["SVUI_ReagentContainerFrame"]:Show()
+						PlaySound("igMainMenuOption");
+						if(_G["SVUI_ReagentContainerFrame"]:IsShown()) then
+							_G["SVUI_ReagentContainerFrame"]:Hide()
+						else
+							_G["SVUI_ReagentContainerFrame"]:Show()
+						end
 					end
 				end)
 			end
 			frame:SetScript("OnHide", CloseBankFrame)
 			self.BankFrame = frame
 		else
-			frame:SetPoint("TOPLEFT", self.BankFrame, "TOPRIGHT", 2, 0)
+			--DepositReagentBank()
+			frame.transferButton = CreateFrame("Button", nil, frame)
+			frame.transferButton:Point("LEFT", frame.stackButton, "RIGHT", 10, 0)
+			frame.transferButton:Size(25, 25)
+			frame.transferButton:SetNormalTexture(ICON_DEPOSIT)
+			StyleBagToolButton(frame.transferButton)
+			frame.transferButton.ttText = L["Deposit All Reagents"]
+			frame.transferButton:SetScript("OnEnter", Tooltip_Show)
+			frame.transferButton:SetScript("OnLeave", Tooltip_Hide)
+			frame.transferButton:SetScript("OnClick", DepositReagentBank)
+
+			frame:SetPoint("BOTTOMLEFT", self.BankFrame, "BOTTOMRIGHT", 2, 0)
 			self.ReagentFrame = frame
 		end
 	end
@@ -1251,6 +1573,7 @@ end
 function MOD:RefreshTokens()
 	local frame = MOD.BagFrame;
 	local index = 0;
+
 	for i=1,MAX_WATCHED_TOKENS do
 		local name,count,icon,currencyID = GetBackpackCurrencyInfo(i)
 		local set = frame.currencyButton[i]
@@ -1268,19 +1591,21 @@ function MOD:RefreshTokens()
 		else
 			set:Hide()
 		end
-	end
+	end
+
 	if index == 0 then
 		frame.bottomOffset = 8;
 		if frame.currencyButton:IsShown() then
 			frame.currencyButton:Hide()
-			MOD:Layout(false)
+			MOD.BagFrame:UpdateLayout()
 		end
 		return
 	elseif not frame.currencyButton:IsShown() then
 		frame.bottomOffset = 28;
 		frame.currencyButton:Show()
-		MOD:Layout(false)
-	end
+		MOD.BagFrame:UpdateLayout()
+	end
+
 	frame.bottomOffset = 28;
 	local set = frame.currencyButton;
 	if index == 1 then
@@ -1295,100 +1620,96 @@ function MOD:RefreshTokens()
 	end
 end

-do
-	local function OpenBags()
-		GameTooltip:Hide()
-		MOD.BagFrame:Show()
-		MOD.BagFrame:RefreshBagsSlots()
-		TTIP.GameTooltip_SetDefaultAnchor(GameTooltip)
-		MOD.BagFrame.editBox:SearchReset()
-	end

-	local function CloseBags()
-		GameTooltip:Hide()
-		MOD.BagFrame:Hide()
-		if(MOD.BankFrame) then
-			MOD.BankFrame:Hide()
-		end
-		if(MOD.ReagentFrame) then
-			MOD.ReagentFrame:Hide()
-		end
-		if(BreakStuffHandler and BreakStuffButton and BreakStuffButton.icon) then
-			BreakStuffHandler:MODIFIER_STATE_CHANGED()
-			BreakStuffHandler.ReadyToSmash = false
-			BreakStuffButton.ttText = "BreakStuff : OFF";
-			BreakStuffButton.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1)
-		end
-		TTIP.GameTooltip_SetDefaultAnchor(GameTooltip)
-		MOD.BagFrame.editBox:SearchReset()
-	end
+local function _openBags()
+	GameTooltip:Hide()
+	MOD.BagFrame:Show()
+	MOD.BagFrame:RefreshBags()
+	TTIP.GameTooltip_SetDefaultAnchor(GameTooltip)
+	MOD.BagFrame.editBox:SearchReset()
+end

-	local function ToggleBags(id)
-		if id and GetContainerNumSlots(id)==0 then return end
-		if MOD.BagFrame:IsShown()then
-			CloseBags()
-		else
-			OpenBags()
-		end
+local function _closeBags()
+	GameTooltip:Hide()
+	MOD.BagFrame:Hide()
+	if(MOD.BankFrame) then
+		MOD.BankFrame:Hide()
 	end
-
-	local function ToggleBackpack()
-		if IsOptionFrameOpen()then return end
-		if IsBagOpen(0) then
-			OpenBags()
-		else
-			CloseBags()
-		end
+	if(MOD.ReagentFrame) then
+		MOD.ReagentFrame:Hide()
 	end
+	if(BreakStuffHandler and BreakStuffButton and BreakStuffButton.icon) then
+		BreakStuffHandler:MODIFIER_STATE_CHANGED()
+		BreakStuffHandler.ReadyToSmash = false
+		BreakStuffButton.ttText = "BreakStuff : OFF";
+		BreakStuffButton.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1)
+	end
+	TTIP.GameTooltip_SetDefaultAnchor(GameTooltip)
+	MOD.BagFrame.editBox:SearchReset()
+end

-	function MOD:BANKFRAME_OPENED()
-		local hasReagent = (SV.GameVersion >= 60000)
-		if not MOD.BankFrame then
-			MOD:MakeBankOrReagent()
-			MOD:ModifyBags()
-		end
-		MOD:Layout(true)
+local function _toggleBags(id)
+	if id and GetContainerNumSlots(id)==0 then return end
+	if MOD.BagFrame:IsShown()then
+		_closeBags()
+	else
+		_openBags()
+	end
+end

-		if(hasReagent and not MOD.ReagentFrame) then
-			MOD:MakeBankOrReagent(true)
-			MOD:Layout(true, true)
-		end
-
-		MOD.BankFrame:Show()
-		MOD.BankFrame:RefreshBagsSlots()
-		MOD.BagFrame:Show()
-		MOD.BagFrame:RefreshBagsSlots()
-		MOD.RefreshTokens()
+local function _toggleBackpack()
+	if IsOptionFrameOpen()then return end
+	if IsBagOpen(0) then
+		_openBags()
+	else
+		_closeBags()
+	end
+end
+
+function MOD:BANKFRAME_OPENED()
+	if not self.BankFrame then
+		self:MakeBankOrReagent()
 	end
+	self.BankFrame:UpdateLayout()

-	function MOD:BANKFRAME_CLOSED()
-		if(MOD.BankFrame and MOD.BankFrame:IsShown()) then
-			MOD.BankFrame:Hide()
-		end
-		if(MOD.ReagentFrame and MOD.ReagentFrame:IsShown()) then
-			MOD.ReagentFrame:Hide()
-		end
+	if((SV.GameVersion >= 60000) and not self.ReagentFrame) then
+		self:MakeBankOrReagent(true)
+		self.ReagentFrame:UpdateLayout()
+	end
+	if(self.ReagentFrame) then
+		self.ReagentFrame:UpdateLayout()
 	end

-	function SetBagHooks()
-		NewHook("OpenAllBags", OpenBags)
-		NewHook("CloseAllBags", CloseBags)
-		NewHook("ToggleBag", ToggleBags)
-		NewHook("ToggleAllBags", ToggleBackpack)
-		NewHook("ToggleBackpack", ToggleBackpack)
-		NewHook("BackpackTokenFrame_Update", MOD.RefreshTokens)
-		MOD:RegisterEvent("BANKFRAME_OPENED")
-		MOD:RegisterEvent("BANKFRAME_CLOSED")
+	self:ModifyBags()
+
+	self.BankFrame:Show()
+	self.BankFrame:RefreshBags()
+	self.BagFrame:Show()
+	self.BagFrame:RefreshBags()
+	self.RefreshTokens()
+end
+
+function MOD:BANKFRAME_CLOSED()
+	if(self.BankFrame and self.BankFrame:IsShown()) then
+		self.BankFrame:Hide()
 	end
-end
+	if(self.ReagentFrame and self.ReagentFrame:IsShown()) then
+		self.ReagentFrame:Hide()
+	end
+end

 function MOD:PLAYERBANKBAGSLOTS_CHANGED()
-	MOD:Layout(true)
+	if(self.BankFrame and self.BankFrame:IsShown()) then
+		self.BankFrame:UpdateLayout()
+	end
+	if(self.ReagentFrame and self.ReagentFrame:IsShown()) then
+		self.ReagentFrame:UpdateLayout()
+	end
 end

 function MOD:PLAYER_ENTERING_WORLD()
 	self:UpdateGoldText()
-	self.BagFrame:RefreshBagsSlots()
+	self.BagFrame:RefreshBags()
 end
 --[[
 ##########################################################
@@ -1397,7 +1718,7 @@ BUILD FUNCTION / UPDATE
 ]]--
 function MOD:ReLoad()
 	if not SV.db.SVBag.enable then return end
-	self:Layout();
+	self:RefreshBagFrames()
 	self:ModifyBags();
 	self:ModifyBagBar();
 end
@@ -1408,20 +1729,117 @@ function MOD:Load()
 	end
 	if not SV.db.SVBag.enable then return end
 	self:ModifyBagBar()
-	SV.bags = self;
 	self.BagFrames = {}
 	self:MakeBags()
-	SetBagHooks()
 	self:ModifyBags()
-	self:Layout(false)
-	self:DisableBlizzard()
-	SV.Timers:ExecuteTimer(MOD.BreakStuffLoader, 5)
+	self.BagFrame:UpdateLayout()
+
+	BagFilters:SetParent(SV.UIParent)
+	BagFilters:SetPanelTemplate("Default")
+	BagFilters.buttons = {}
+	BagFilters:SetFrameStrata("DIALOG")
+	BagFilters:SetClampedToScreen(true)
+
+	if(select(4, GetBuildInfo()) >= 60000) then
+
+		for i = LE_BAG_FILTER_FLAG_EQUIPMENT, NUM_LE_BAG_FILTER_FLAGS do
+			BagFilters.buttons[i] = CreateFrame("Button", nil, BagFilters)
+
+			BagFilters.buttons[i].hoverTex = BagFilters.buttons[i]:CreateTexture(nil, 'OVERLAY')
+			BagFilters.buttons[i].hoverTex:SetAllPoints()
+			BagFilters.buttons[i].hoverTex:SetTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]])
+			BagFilters.buttons[i].hoverTex:SetBlendMode("ADD")
+			BagFilters.buttons[i].hoverTex:Hide()
+
+			BagFilters.buttons[i].activeTex = BagFilters.buttons[i]:CreateTexture(nil, 'OVERLAY')
+			BagFilters.buttons[i].activeTex:SetAllPoints()
+			BagFilters.buttons[i].activeTex:SetTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]])
+			BagFilters.buttons[i].activeTex:SetVertexColor(0,0.7,0)
+			BagFilters.buttons[i].activeTex:SetBlendMode("ADD")
+			BagFilters.buttons[i].activeTex:Hide()
+
+			BagFilters.buttons[i].text = BagFilters.buttons[i]:CreateFontString(nil, 'BORDER')
+			BagFilters.buttons[i].text:SetAllPoints()
+			BagFilters.buttons[i].text:SetFont(SV.Media.font.roboto,12,"OUTLINE")
+			BagFilters.buttons[i].text:SetJustifyH("LEFT")
+			BagFilters.buttons[i].text:SetText(BAG_FILTER_LABELS[i])
+
+			BagFilters.buttons[i]:SetScript("OnEnter", DD_OnEnter)
+			BagFilters.buttons[i]:SetScript("OnLeave", DD_OnLeave)
+
+			BagFilters.buttons[i]:SetHeight(16)
+			BagFilters.buttons[i]:SetWidth(115)
+
+			BagFilters.buttons[i].FilterID = i
+			BagFilters.buttons[i]:SetScript("OnClick", DD_OnClick)
+
+			if i == LE_BAG_FILTER_FLAG_EQUIPMENT then
+				BagFilters.buttons[i]:SetPoint("TOPLEFT", BagFilters, "TOPLEFT", 10, -10)
+			else
+				BagFilters.buttons[i]:SetPoint("TOPLEFT", BagFilters.buttons[i - 1], "BOTTOMLEFT", 0, 0)
+			end
+
+			BagFilters.buttons[i]:Show()
+		end
+
+		local clearID = NUM_LE_BAG_FILTER_FLAGS + 1
+
+		BagFilters.buttons[clearID] = CreateFrame("Button", nil, BagFilters)
+
+		BagFilters.buttons[clearID].hoverTex = BagFilters.buttons[clearID]:CreateTexture(nil, 'OVERLAY')
+		BagFilters.buttons[clearID].hoverTex:SetAllPoints()
+		BagFilters.buttons[clearID].hoverTex:SetTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]])
+		BagFilters.buttons[clearID].hoverTex:SetBlendMode("ADD")
+		BagFilters.buttons[clearID].hoverTex:Hide()
+
+		BagFilters.buttons[clearID].text = BagFilters.buttons[clearID]:CreateFontString(nil, 'BORDER')
+		BagFilters.buttons[clearID].text:SetAllPoints()
+		BagFilters.buttons[clearID].text:SetFont(SV.Media.font.roboto,12,"OUTLINE")
+		BagFilters.buttons[clearID].text:SetJustifyH("LEFT")
+		BagFilters.buttons[clearID].text:SetText(CLEAR_ALL .. " " .. FILTERS)
+
+		BagFilters.buttons[clearID]:SetScript("OnEnter", DD_OnEnter)
+		BagFilters.buttons[clearID]:SetScript("OnLeave", DD_OnLeave)
+
+		BagFilters.buttons[clearID]:SetHeight(16)
+		BagFilters.buttons[clearID]:SetWidth(115)
+
+		BagFilters.buttons[clearID].FilterID = 0
+		BagFilters.buttons[clearID]:SetScript("OnClick", DDClear_OnClick)
+
+		BagFilters.buttons[clearID]:SetPoint("TOPLEFT", BagFilters.buttons[NUM_LE_BAG_FILTER_FLAGS], "BOTTOMLEFT", 0, -10)
+
+		BagFilters.buttons[clearID]:Show()
+	end
+
+	BagFilters:Hide()
+	SV:AddToDisplayAudit(BagFilters)
+
+	BankFrame:UnregisterAllEvents()
+	for i = 1, NUM_CONTAINER_FRAMES do
+		local frame = _G["ContainerFrame"..i]
+		if(frame) then frame:Die() end
+	end
+
+	SV.Timers:ExecuteTimer(self.BreakStuffLoader, 5)
+
+	hooksecurefunc("OpenAllBags", _openBags)
+	hooksecurefunc("CloseAllBags", _closeBags)
+	hooksecurefunc("ToggleBag", _toggleBags)
+	hooksecurefunc("ToggleAllBags", _toggleBackpack)
+	hooksecurefunc("ToggleBackpack", _toggleBackpack)
+	hooksecurefunc("BackpackTokenFrame_Update", self.RefreshTokens)
+
+	self:RegisterEvent("BANKFRAME_OPENED")
+	self:RegisterEvent("BANKFRAME_CLOSED")
 	self:RegisterEvent("INVENTORY_SEARCH_UPDATE")
 	self:RegisterEvent("PLAYER_MONEY", "UpdateGoldText")
 	self:RegisterEvent("PLAYER_ENTERING_WORLD")
 	self:RegisterEvent("PLAYER_TRADE_MONEY", "UpdateGoldText")
 	self:RegisterEvent("TRADE_MONEY_CHANGED", "UpdateGoldText")
-	if(SV.GameVersion >= 60000) then self:RegisterEvent("PLAYERBANKBAGSLOTS_CHANGED"); end
+	self:RegisterEvent("PLAYERBANKBAGSLOTS_CHANGED")
+
 	StackSplitFrame:SetFrameStrata("DIALOG")
-	self.BagFrame:RefreshBagsSlots()
+
+	self.BagFrame:RefreshBags()
 end
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua b/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua
index ff08004..3668d80 100644
--- a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua
+++ b/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua
@@ -217,7 +217,7 @@ local BreakStuff_OnClick = function(self)
 		if(not MOD.BagFrame:IsShown()) then
 			GameTooltip:Hide()
 			MOD.BagFrame:Show()
-			MOD.BagFrame:RefreshBagsSlots()
+			MOD.BagFrame:RefreshBags()
 			TTIP.GameTooltip_SetDefaultAnchor(GameTooltip,self)
 		end
 	end
diff --git a/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua b/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua
index b1dc03e..a51f67a 100644
--- a/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua
+++ b/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua
@@ -20,10 +20,20 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack 	= _G.unpack;
-local select 	= _G.select;
-local pairs 	= _G.pairs;
-local ipairs 	= _G.ipairs;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
 local tinsert 	= _G.tinsert;
 local string 	= _G.string;
 local math 		= _G.math;
@@ -293,6 +303,8 @@ BAG ITERATION METHOD
 ##########################################################
 ]]--
 do
+	local bagRole;
+
 	local function GetNumSortingSlots(bag, role)
 		if (bag > 50 and bag <= 58) then
 			if not role then role = "deposit" end
@@ -508,15 +520,15 @@ do
 			end
 			for bagType, sortedBags in pairs(sortingCache[1]) do
 				if bagType ~= 'Normal' then
-					MOD.Stack(sortedBags, sortedBags, IsPartial)
-					MOD.Stack(sortingCache[1]['Normal'], sortedBags)
+					MOD.Stack(sortedBags, IsPartial)
 					SortFiller(sortingCache[1]['Normal'], sortedBags, SV.db.SVBag.sortInverted)
+					MOD.Stack(sortingCache[1]['Normal'], IsPartial)
 					Sorter(sortedBags, nil, SV.db.SVBag.sortInverted)
 					twipe(sortedBags)
 				end
 			end
 			if sortingCache[1]['Normal'] then
-				MOD.Stack(sortingCache[1]['Normal'], sortingCache[1]['Normal'], IsPartial)
+				MOD.Stack(sortingCache[1]['Normal'], IsPartial)
 				Sorter(sortingCache[1]['Normal'], nil, SV.db.SVBag.sortInverted)
 				twipe(sortingCache[1]['Normal'])
 			end
@@ -562,7 +574,7 @@ do
 		twipe(sourceUsed)
 	end

-	function MOD.Stack(bags)
+	function MOD.Stack(bags, canMove)
 		if not canMove then canMove = true end
 		for _, bag, slot in IterateBagsForSorting(bags, nil, "deposit") do
 			local bagSlot = (bag*100) + slot
@@ -576,7 +588,7 @@ do
 		for _, bag, slot in IterateBagsForSorting(bags, true, "withdraw") do
 			local sourceSlot = (bag*100) + slot
 			local itemID = sortingCache[2][sourceSlot]
-			if itemID and targetItems[itemID] and (canMove == true or canMove(itemID, bag, slot)) then
+			if itemID and targetItems[itemID] and (canMove == true or (type(canMove) == "function" and canMove(itemID, bag, slot))) then
 				for i = #targetSlots, 1, -1 do
 					local targetedSlot = targetSlots[i]
 					if sortingCache[2][sourceSlot] and sortingCache[2][targetedSlot] == itemID and targetedSlot ~= sourceSlot and not (sortingCache[4][targetedSlot] == sortingCache[5][targetedSlot]) and not sourceUsed[targetedSlot] then
@@ -717,6 +729,7 @@ do
 				end
 			end
 			if lockStop then
+				local i = 1;
 				for slot, itemID in pairs(moveTracker) do
 					local actualItemID = GetSortingItemID(floor(slot/100), slot % 100)
 					if actualItemID  ~= itemid then
@@ -744,6 +757,7 @@ do
 						return
 					end
 					moveTracker[slot] = nil
+					i = i + 1;
 				end
 			end
 			lastItemID, lockStop, lastDestination, lastMove = nil, nil, nil, nil
@@ -788,49 +802,53 @@ do
 	end
 end

-function MOD:RunSortingProcess(func, groupsDefaults)
+function MOD:RunSortingProcess(func, groupsDefaults, altFunc)
 	local bagGroups = {}
 	return function(groups)
-		if SortUpdateTimer:IsShown() then
-			SortUpdateTimer:StopStacking(L['Already Running.. Bailing Out!'])
-			return;
-		end
-		twipe(bagGroups)
-		if not groups or #groups == 0 then
-			groups = groupsDefaults
-		end
-		for bags in (groups or ""):gmatch("[^%s]+") do
-			if bags == "guild" then
-				bags = GetSortingGroup(bags)
-				if bags then
-					tinsert(bagGroups, {bags[GetCurrentGuildBankTab()]})
-				end
-			else
-				bags = GetSortingGroup(bags)
-				if bags then
-					tinsert(bagGroups, bags)
-				end
+		if(altFunc and IsShiftKeyDown()) then
+			altFunc()
+		else
+			if SortUpdateTimer:IsShown() then
+				SortUpdateTimer:StopStacking(L['Already Running.. Bailing Out!'])
+				return;
 			end
-		end
-		for _, bag, slot in IterateBagsForSorting(scanningCache.all) do
-			local bagSlot = (bag*100) + slot
-			local itemID, isBattlePet = ConvertLinkToID(GetSortingItemLink(bag, slot))
-			if itemID then
-				if isBattlePet then
-					sortingCache[3][bagSlot] = itemID
-					sortingCache[5][bagSlot] = 1
+			twipe(bagGroups)
+			if not groups or #groups == 0 then
+				groups = groupsDefaults
+			end
+			for bags in (groups or ""):gmatch("[^%s]+") do
+				if bags == "guild" then
+					bags = GetSortingGroup(bags)
+					if bags then
+						tinsert(bagGroups, {bags[GetCurrentGuildBankTab()]})
+					end
 				else
-					sortingCache[5][bagSlot] = select(8, GetItemInfo(itemID))
+					bags = GetSortingGroup(bags)
+					if bags then
+						tinsert(bagGroups, bags)
+					end
 				end
-				sortingCache[2][bagSlot] = itemID
-				sortingCache[4][bagSlot] = select(2, GetSortingInfo(bag, slot))
 			end
+			for _, bag, slot in IterateBagsForSorting(scanningCache.all) do
+				local bagSlot = (bag*100) + slot
+				local itemID, isBattlePet = ConvertLinkToID(GetSortingItemLink(bag, slot))
+				if itemID then
+					if isBattlePet then
+						sortingCache[3][bagSlot] = itemID
+						sortingCache[5][bagSlot] = 1
+					else
+						sortingCache[5][bagSlot] = select(8, GetItemInfo(itemID))
+					end
+					sortingCache[2][bagSlot] = itemID
+					sortingCache[4][bagSlot] = select(2, GetSortingInfo(bag, slot))
+				end
+			end
+			if func(unpack(bagGroups)) == false then
+				return
+			end
+			twipe(bagGroups)
+			SortUpdateTimer:StartStacking()
 		end
-		if func(unpack(bagGroups)) == false then
-			return
-		end
-		twipe(bagGroups)
-		SortUpdateTimer:StartStacking()
 		collectgarbage("collect")
 	end
 end
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua
index bb31726..8ffc834 100644
--- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua
+++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua
@@ -16,19 +16,52 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
---[[ GLOBALS ]]--
+--GLOBAL NAMESPACE
 local _G = _G;
-local unpack    = _G.unpack;
-local select    = _G.select;
-local pairs     = _G.pairs;
-local tonumber  = _G.tonumber;
-local string    = _G.string;
-local table     = _G.table;
---[[ STRING METHODS ]]--
-local find, format, len, upper = string.find, string.format, string.len, string.upper;
-local match, sub, gsub = string.match, string.sub, string.gsub;
---[[ TABLE METHODS ]]--
-local twipe = table.wipe;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local getmetatable  = _G.getmetatable;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local upper         = string.upper;
+local format        = string.format;
+local find          = string.find;
+local match         = string.match;
+local gsub          = string.gsub;
+local len          	= string.len;
+local sub          	= string.sub;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+--TABLE
+local table         = _G.table;
+local tsort         = table.sort;
+local tconcat       = table.concat;
+local tinsert       = _G.tinsert;
+local tremove       = _G.tremove;
+local twipe         = _G.wipe;
+--BLIZZARD API
+local time 					= _G.time;
+local difftime 				= _G.difftime;
+local BetterDate 			= _G.BetterDate;
+local ReloadUI              = _G.ReloadUI;
+local UnitName   			= _G.UnitName;
+local IsInGroup             = _G.IsInGroup;
+local CreateFrame           = _G.CreateFrame;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -83,25 +116,26 @@ local THROTTLE_CACHE = {}
 INIT SETTINGS
 ##########################################################
 ]]--
-CHAT_GUILD_GET = "|Hchannel:GUILD|hG|h %s ";
-CHAT_OFFICER_GET = "|Hchannel:OFFICER|hO|h %s ";
-CHAT_RAID_GET = "|Hchannel:RAID|hR|h %s ";
-CHAT_RAID_WARNING_GET = "RW %s ";
-CHAT_RAID_LEADER_GET = "|Hchannel:RAID|hRL|h %s ";
-CHAT_PARTY_GET = "|Hchannel:PARTY|hP|h %s ";
-CHAT_PARTY_LEADER_GET = "|Hchannel:PARTY|hPL|h %s ";
-CHAT_PARTY_GUIDE_GET = "|Hchannel:PARTY|hPG|h %s ";
-CHAT_INSTANCE_CHAT_GET = "|Hchannel:Battleground|hI.|h %s: ";
-CHAT_INSTANCE_CHAT_LEADER_GET = "|Hchannel:Battleground|hIL.|h %s: ";
-CHAT_WHISPER_INFORM_GET = "to %s ";
-CHAT_WHISPER_GET = "from %s ";
-CHAT_BN_WHISPER_INFORM_GET = "to %s ";
-CHAT_BN_WHISPER_GET = "from %s ";
-CHAT_SAY_GET = "%s ";
-CHAT_YELL_GET = "%s ";
-CHAT_FLAG_AFK = "[AFK] ";
-CHAT_FLAG_DND = "[DND] ";
-CHAT_FLAG_GM = "[GM] ";
+local CHAT_FRAMES = _G.CHAT_FRAMES
+local CHAT_GUILD_GET = "|Hchannel:GUILD|hG|h %s ";
+local CHAT_OFFICER_GET = "|Hchannel:OFFICER|hO|h %s ";
+local CHAT_RAID_GET = "|Hchannel:RAID|hR|h %s ";
+local CHAT_RAID_WARNING_GET = "RW %s ";
+local CHAT_RAID_LEADER_GET = "|Hchannel:RAID|hRL|h %s ";
+local CHAT_PARTY_GET = "|Hchannel:PARTY|hP|h %s ";
+local CHAT_PARTY_LEADER_GET = "|Hchannel:PARTY|hPL|h %s ";
+local CHAT_PARTY_GUIDE_GET = "|Hchannel:PARTY|hPG|h %s ";
+local CHAT_INSTANCE_CHAT_GET = "|Hchannel:Battleground|hI.|h %s: ";
+local CHAT_INSTANCE_CHAT_LEADER_GET = "|Hchannel:Battleground|hIL.|h %s: ";
+local CHAT_WHISPER_INFORM_GET = "to %s ";
+local CHAT_WHISPER_GET = "from %s ";
+local CHAT_BN_WHISPER_INFORM_GET = "to %s ";
+local CHAT_BN_WHISPER_GET = "from %s ";
+local CHAT_SAY_GET = "%s ";
+local CHAT_YELL_GET = "%s ";
+local CHAT_FLAG_AFK = "[AFK] ";
+local CHAT_FLAG_DND = "[DND] ";
+local CHAT_FLAG_GM = "[GM] ";
 --[[
 ##########################################################
 LOCAL FUNCTIONS
@@ -260,7 +294,7 @@ do
 	local ChatEventFilter = function(self, event, message, author, ...)
 		local filter = nil
 		if locale == 'enUS' or locale == 'enGB' then
-			if strfind(message, '[\227-\237]') then
+			if message:find('[\227-\237]') then
 				filter = true
 			end
 		end
diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua
index 080b9eb..b91bf9b 100644
--- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua
+++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua
@@ -18,16 +18,48 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack    = _G.unpack;
-local select    = _G.select;
-local pairs     = _G.pairs;
-local type      = _G.type;
-local math      = _G.math;
-local table 	= _G.table;
---[[ MATH METHODS ]]--
-local min = math.min;
-local tinsert, twipe, pairs, ipairs, unpack, pcall, select = tinsert, table.wipe, pairs, ipairs, unpack, pcall, select;
-local format, gsub, strfind, strmatch, tonumber = format, gsub, strfind, strmatch, tonumber;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+
+--STRING
+local string        = _G.string;
+local upper         = string.upper;
+local format        = string.format;
+local find          = string.find;
+local match         = string.match;
+local gsub          = string.gsub;
+--TABLE
+local table 		= _G.table;
+local tinsert       = _G.tinsert;
+local tremove       = _G.tremove;
+local twipe 		= _G.wipe;
+--MATH
+local math      	= _G.math;
+local min 			= math.min;
+local floor         = math.floor
+local ceil          = math.ceil
+--BLIZZARD API
+local GameTooltip          	= _G.GameTooltip;
+local InCombatLockdown     	= _G.InCombatLockdown;
+local CreateFrame          	= _G.CreateFrame;
+local GetTime         		= _G.GetTime;
+local GetItemCooldown       = _G.GetItemCooldown;
+local GetItemCount         	= _G.GetItemCount;
+local GetItemInfo          	= _G.GetItemInfo;
+local GetSpellInfo         	= _G.GetSpellInfo;
+local IsSpellKnown         	= _G.IsSpellKnown;
+local GetProfessions       	= _G.GetProfessions;
+local GetProfessionInfo    	= _G.GetProfessionInfo;
+local hooksecurefunc     	= _G.hooksecurefunc;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -87,6 +119,14 @@ local function CycleDocklets()
 	end
 end

+local function GetDefaultWindow()
+	local window = DEFAULT_DOCKLET
+	if window and _G[window] then
+		SuperDockWindowRight.FrameName = window
+		SuperDockWindowRight:Show()
+	end
+end
+
 local AlertActivate = function(self, child)
 	local size = SV.db.SVDock.buttonSize or 22;
 	self:Height(size)
@@ -306,7 +346,7 @@ SV.CycleDocklets = CycleDocklets
 CORE FUNCTIONS
 ##########################################################
 ]]--
-function HideSuperDocks()
+_G.HideSuperDocks = function()
 	ToggleDocks(LeftDockToggleButton)
 end
 --[[
@@ -314,14 +354,6 @@ end
 DOCKLET HELPERS
 ##########################################################
 ]]--
-local function GetDefaultWindow()
-	local window = DEFAULT_DOCKLET
-	if window and _G[window] then
-		SuperDockWindowRight.FrameName = window
-		SuperDockWindowRight:Show()
-	end
-end
-
 function MOD:ActivateDockletButton(button, clickFunction, tipFunction)
 	button._panelGradient = "default"
 	button._iconGradient = "icon"
@@ -642,8 +674,7 @@ do
 		SuperDockMacroBar:Size(width, height)
 	end

-	local function CreateMacroToolButton(proName, proID, itemID, size)
-		if proName == "Mining" then proName = "Smelting" end
+	local function CreateMacroToolButton(proName, proID, itemID, size)
 		local data = TOOL_DATA[proID]
 		if(not data) then return end
 		local button = CreateFrame("Button", ("%s_MacroBarButton"):format(itemID), SuperDockMacroBar, "SecureActionButtonTemplate")
@@ -659,6 +690,8 @@ do
 		button.itemId = itemID;
 		button.TText = proName;

+		if proID == 186 then proName = "Smelting" end
+
 		if(data[5]) then
 			local rightClick
 			button:RegisterForClicks("AnyDown")
diff --git a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua
index eba7b36..3f726ff 100644
--- a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua
+++ b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua
@@ -13,6 +13,60 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local getmetatable  = _G.getmetatable;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local upper         = string.upper;
+local format        = string.format;
+local find          = string.find;
+local match         = string.match;
+local gsub          = string.gsub;
+--MATH
+local math          = _G.math;
+local floor         = math.floor;
+local random        = math.random;
+--TABLE
+local table         = _G.table;
+local tsort         = table.sort;
+local tconcat       = table.concat;
+local tinsert       = _G.tinsert;
+local tremove       = _G.tremove;
+local twipe         = _G.wipe;
+--BLIZZARD API
+local ReloadUI              = _G.ReloadUI;
+local GetLocale             = _G.GetLocale;
+local CreateFrame           = _G.CreateFrame;
+local IsAddOnLoaded         = _G.IsAddOnLoaded;
+local InCombatLockdown      = _G.InCombatLockdown;
+local GetAddOnInfo          = _G.GetAddOnInfo;
+local LoadAddOn             = _G.LoadAddOn;
+local SendAddonMessage      = _G.SendAddonMessage;
+local LibStub               = _G.LibStub;
+local GetAddOnMetadata      = _G.GetAddOnMetadata;
+local GetCVarBool           = _G.GetCVarBool;
+local GameTooltip           = _G.GameTooltip;
+local StaticPopup_Hide      = _G.StaticPopup_Hide;
+local ERR_NOT_IN_COMBAT     = _G.ERR_NOT_IN_COMBAT;
+
 local SV = select(2, ...)
 local L = SV.L
 local MOD = SV:NewPackage("SVHenchmen", L["Henchmen"]);
@@ -108,7 +162,7 @@ end

 local Option_OnMouseUp = function(self)
 	if(type(self.callback) == "function") then
-		self:callback(param)
+		self:callback()
 	end
 end

@@ -787,7 +841,7 @@ function MOD:CHAT_MSG_COMBAT_FACTION_CHANGE(event, msg)
 		for factionIndex = 1, GetNumFactions() do
 			local name = GetFactionInfo(factionIndex)
 			if name == faction and name ~= active then
-				-- local inactive = IsFactionInactive(factionIndex) or SetWatchedFactionIndex(factionIndex)
+				SetWatchedFactionIndex(factionIndex)
 				local strMsg = ("Watching Faction: %s"):format(name)
 				SV:AddonMessage(strMsg)
 				break
diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua
index fe2fdc8..881a504 100644
--- a/Interface/AddOns/SVUI/packages/map/SVMap.lua
+++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua
@@ -64,6 +64,8 @@ local Initialized = false
 DATA UPVALUES
 ##########################################################
 ]]--
+local MM_XY_COORD = "SIMPLE";
+local WM_TINY = false;
 local NARR_TEXT = "Meanwhile";
 local NARR_PREFIX = "In ";
 local NARR_ENABLE = true;
diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua
index 65bfac9..ecd51cf 100644
--- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua
+++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua
@@ -18,16 +18,27 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack 	= _G.unpack;
-local select 	= _G.select;
-local pairs 	= _G.pairs;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
 local tinsert 	= _G.tinsert;
 local string 	= _G.string;
 local math 		= _G.math;
 --[[ STRING METHODS ]]--
 local find, format, len, split = string.find, string.format, string.len, string.split;
 --[[ MATH METHODS ]]--
-local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round;
+local abs, ceil, floor, round, max = math.abs, math.ceil, math.floor, math.round, math.max;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -38,6 +49,8 @@ local L = SV.L
 local LSM = LibStub("LibSharedMedia-3.0")
 local MOD = SV:NewPackage("SVOverride", "Overrides");
 MOD.LewtRollz = {};
+
+local MyName = UnitName("player");
 --[[
 ##########################################################
 LOCAL VARS
@@ -161,7 +174,7 @@ function MOD:DisbandRaidGroup()
 	if UnitInRaid("player") then
 		for i = 1, GetNumGroupMembers() do
 			local name, _, _, _, _, _, _, online = GetRaidRosterInfo(i)
-			if online and name ~= E.myname then
+			if online and name ~= MyName then
 				UninviteUnit(name)
 			end
 		end
@@ -395,7 +408,7 @@ local function MirrorBarRegistry(barType)
 	bar:SetStatusBarColor(r, g, b)
 	bar.type = barType;
 	bar.Start = MirrorBar_Start;
-	bar.Stop = Stop;
+	-- bar.Stop = nil;
 	SetMirrorPosition(bar)
 	RegisteredMirrorBars[barType] = bar;
 	return bar
@@ -983,7 +996,7 @@ local LootComplexEventsHandler = function(_, event, arg1, arg2)
 	end
 end

-local GroupLootDropDown_GiveLoot = function(self)
+_G.GroupLootDropDown_GiveLoot = function(self)
 	if lastQuality >= MASTER_LOOT_THREHOLD then
 		local confirmed = SV:StaticPopup_Show("CONFIRM_LOOT_DISTRIBUTION",ITEM_QUALITY_COLORS[lastQuality].hex..lastName..FONT_COLOR_CODE_CLOSE,self:GetText());
 		if confirmed then confirmed.data = self.value end
@@ -1052,7 +1065,8 @@ function MOD:Load()
 	SVUI_LootFrame:SetFixedPanelTemplate('Transparent');
 	SVUI_LootFrame.title:SetFont(LSM:Fetch("font", "SVUI Number Font"),18,"OUTLINE")
 	SV.Mentalo:Add(SVUI_LootFrameHolder, L["Loot Frame"], nil, nil, nil, nil, "SVUI_LootFrame");
-	tinsert(UISpecialFrames, "SVUI_LootFrame");
+	SV:AddToDisplayAudit(SVUI_LootFrame);
+	SVUI_LootFrame:Hide();

 	UIParent:UnregisterEvent("LOOT_BIND_CONFIRM")
 	UIParent:UnregisterEvent("CONFIRM_DISENCHANT_ROLL")
@@ -1078,8 +1092,6 @@ function MOD:Load()
 		UIParent:UnregisterEvent("CANCEL_LOOT_ROLL");
 	end

-	_G.GroupLootDropDown_GiveLoot = GroupLootDropDown_GiveLoot
-
 	UIParent:UnregisterEvent("MIRROR_TIMER_START")
 	self:RegisterEvent("CVAR_UPDATE", MirrorBarUpdateHandler)
 	self:RegisterEvent("PLAYER_ENTERING_WORLD", MirrorBarUpdateHandler)
diff --git a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua
index b00c06e..1e9548a 100644
--- a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua
+++ b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua
@@ -39,7 +39,7 @@ local lower, upper = string.lower, string.upper;
 local find, format, split = string.find, string.format, string.split;
 local match, gmatch, gsub = string.match, string.gmatch, string.gsub;
 --[[ MATH METHODS ]]--
-local floor = math.floor;  -- Basic
+local floor, ceil = math.floor, math.ceil;  -- Basic
 --[[ BINARY METHODS ]]--
 local band, bor = bit.band, bit.bor;
 --[[ TABLE METHODS ]]--
@@ -642,7 +642,8 @@ PLATE UPDATE HANDLERS
 ]]--
 do
 	local function IsNamePlate(frame)
-		if frame:GetName() and strfind(frame:GetName(), '^NamePlate%d') then
+		local frameName = frame:GetName()
+		if frameName and frameName:find('^NamePlate%d') then
 			local textObj = select(2, frame:GetChildren())
 			if textObj then
 				local textRegions = textObj:GetRegions()
diff --git a/Interface/AddOns/SVUI/packages/stats/SVStats.lua b/Interface/AddOns/SVUI/packages/stats/SVStats.lua
index 3d94bb0..8549fec 100644
--- a/Interface/AddOns/SVUI/packages/stats/SVStats.lua
+++ b/Interface/AddOns/SVUI/packages/stats/SVStats.lua
@@ -18,10 +18,20 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack    = _G.unpack;
-local select    = _G.select;
-local pairs     = _G.pairs;
-local type      = _G.type;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
 local string    = _G.string;
 local math      = _G.math;
 local table 	= _G.table;
@@ -29,7 +39,13 @@ local table 	= _G.table;
 local join, len = string.join, string.len;
 --[[ MATH METHODS ]]--
 local min = math.min;
-local tsort, twipe = table.sort, _G.wipe;
+--TABLE
+local table         = _G.table;
+local tsort         = table.sort;
+local tconcat       = table.concat;
+local tinsert       = _G.tinsert;
+local tremove       = _G.tremove;
+local twipe         = _G.wipe;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -122,18 +138,19 @@ end
 local UpdateAnchor = function()
 	local backdrops, width, height = SV.db.SVStats.showBackground
 	for _, anchor in pairs(MOD.Anchors) do
+		local numPoints = anchor.numPoints
 		if(anchor.vertical) then
 			width = anchor:GetWidth() - 4;
-			height = anchor:GetHeight() / anchor.numPoints - 4;
+			height = anchor:GetHeight() / numPoints - 4;
 		else
-			width = anchor:GetWidth() / anchor.numPoints - 4;
+			width = anchor:GetWidth() / numPoints - 4;
 			height = anchor:GetHeight() - 4;
 			if(backdrops) then
 				height = RightSuperDockToggleButton:GetHeight() - 6
 			end
 		end

-		for i = 1, anchor.numPoints do
+		for i = 1, numPoints do
 			local this = positionIndex[anchor.useIndex][i]
 			anchor.holders[this]:Width(width)
 			anchor.holders[this]:Height(height)
@@ -418,7 +435,7 @@ do
 		StatMenuFrame:SetSize(maxWidth, maxHeight)
 		StatMenuFrame:ClearAllPoints()
 		local point = _locate(self:GetParent())
-		if strfind(point, "BOTTOM") then
+		if point:find("BOTTOM") then
 			StatMenuFrame:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 10, 10)
 		else
 			StatMenuFrame:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 10, -10)
@@ -656,7 +673,7 @@ function MOD:Load()
 	local hexClass = classColor.colorStr
 	BGStatString = "|cff" .. hexHighlight .. "%s: |c" .. hexClass .. "%s|r";

-	self.Accountant = LibSuperVillain:NewGlobal("Accountant")
+	self.Accountant = _G.LibSuperVillain:NewGlobal("Accountant")

 	self.Accountant = self.Accountant or {};
 	self.Accountant[playerRealm] = self.Accountant[playerRealm] or {};
diff --git a/Interface/AddOns/SVUI/packages/stats/stats/experience.lua b/Interface/AddOns/SVUI/packages/stats/stats/experience.lua
index eafb704..3497e58 100644
--- a/Interface/AddOns/SVUI/packages/stats/stats/experience.lua
+++ b/Interface/AddOns/SVUI/packages/stats/stats/experience.lua
@@ -28,6 +28,9 @@ local string 	= _G.string;
 --[[ STRING METHODS ]]--
 local format = string.format;
 local gsub = string.gsub;
+--MATH
+local math          = _G.math;
+local min         = math.min
 --[[
 ##########################################################
 GET ADDON DATA
diff --git a/Interface/AddOns/SVUI/packages/stats/stats/friends.lua b/Interface/AddOns/SVUI/packages/stats/stats/friends.lua
index b0fc852..5cc8bd9 100644
--- a/Interface/AddOns/SVUI/packages/stats/stats/friends.lua
+++ b/Interface/AddOns/SVUI/packages/stats/stats/friends.lua
@@ -43,7 +43,7 @@ local gmatch, gsub = string.gmatch, string.gsub;
 --[[ MATH METHODS ]]--
 local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round;  -- Basic
 --[[ TABLE METHODS ]]--
-local twipe, tsort = table.wipe, table.sort;
+local wipe, sort = table.wipe, table.sort;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -292,7 +292,7 @@ end

 local function OnEnter(self)
 	MOD:Tip(self)
-
+	local grouped
 	local numberOfFriends, onlineFriends = GetNumFriends()
 	local totalBNet, numBNetOnline = BNGetNumFriends()

diff --git a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua
index 8990323..bc6dcb9 100644
--- a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua
+++ b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua
@@ -110,7 +110,7 @@ end
 local function GetGuildStatMembers()
 	twipe(GuildStatMembers)
 	local statusFormat;
-	local _, name, rank, level, zone, note, officernote, online, status, classFileName, isMobile;
+	local _, name, rank, level, zone, note, officernote, online, status, classFileName, isMobile, rankIndex;
 	for i = 1, GetNumGuildMembers() do
 		name, rank, rankIndex, level, _, zone, note, officernote, online, status, classFileName, _, _, isMobile = GetGuildRosterInfo(i)
 		statusFormat = isMobile and MobileFlagFormat[status]() or UnitFlagFormat[status]()
diff --git a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua
index 86a7c8d..229b452 100644
--- a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua
+++ b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua
@@ -41,7 +41,7 @@ local MOD = SV.SVStats;
 REPUTATION STATS
 ##########################################################
 ]]--
-local StatEvents = {"PLAYER_ENTERING_WORLD","UPDATE_FACTION"};
+local StatEvents = {"PLAYER_ENTERING_WORLD", "UPDATE_FACTION"};
 local RepMenuList = {};
 local standingName = {
 	[1] = "Hated",
diff --git a/Interface/AddOns/SVUI/packages/stats/stats/time.lua b/Interface/AddOns/SVUI/packages/stats/stats/time.lua
index 39755a5..e753a8d 100644
--- a/Interface/AddOns/SVUI/packages/stats/stats/time.lua
+++ b/Interface/AddOns/SVUI/packages/stats/stats/time.lua
@@ -57,6 +57,7 @@ local lockoutColorExtended, lockoutColorNormal = { r=0.3,g=1,b=0.3 }, { r=.8,g=.
 local lockoutFormatString = { "%dd %02dh %02dm", "%dd %dh %02dm", "%02dh %02dm", "%dh %02dm", "%dh %02dm", "%dm" }
 local curHr, curMin, curAmPm
 local enteredFrame = false;
+local date = _G.date

 local Update, lastPanel; -- UpValue
 local localizedName, isActive, canQueue, startTime, canEnter, _
@@ -91,7 +92,7 @@ local function CalculateTimeValues(tooltip)
 	if (tooltip and SV.db.SVStats.localtime) or (not tooltip and not SV.db.SVStats.localtime) then
 		return ConvertTime(GetGameTime())
 	else
-		local	dateTable =	date("*t")
+		local dateTable = date("*t")
 		return ConvertTime(dateTable["hour"], dateTable["min"])
 	end
 end
@@ -105,7 +106,7 @@ local function OnLeave(self)
 	enteredFrame = false;
 end

-local function OnEvent()
+local function OnEvent(self, event)
 	if event == "UPDATE_INSTANCE_INFO" and enteredFrame then
 		RequestRaidInfo()
 	end
diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua
index 6a92e5f..f166b1d 100644
--- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua
+++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua
@@ -40,6 +40,7 @@ local SV = select(2, ...)
 local L = SV.L
 local LSM = LibStub("LibSharedMedia-3.0")
 local MOD = SV:NewPackage("SVTip", L["Tooltip"]);
+local ID = _G.ID;
 --[[
 ##########################################################
 LOCAL VARIABLES
@@ -580,8 +581,8 @@ local _hook_GameTooltip_SetDefaultAnchor = function(self, parent)
 		end
 	end
 	if not SV.Mentalo:HasMoved("SVUI_ToolTip_MOVE")then
-		if(SVUI_ContainerFrame and SVUI_ContainerFrame:IsShown()) then
-			self:SetPoint("BOTTOMLEFT", SVUI_ContainerFrame, "TOPLEFT", 0, 18)
+		if(SV.SVBag.BagFrame and SV.SVBag.BagFrame:IsShown()) then
+			self:SetPoint("BOTTOMLEFT", SV.SVBag.BagFrame, "TOPLEFT", 0, 18)
 		elseif(RightSuperDock:GetAlpha() == 1 and RightSuperDock:IsShown()) then
 			self:SetPoint("BOTTOMRIGHT", RightSuperDock, "TOPRIGHT", -44, 18)
 		else
@@ -613,10 +614,10 @@ local _hook_OnTipCleared = function(self)
 	self.itemCleared = nil
 end

-local _hook_OnItemRef = function(link,text,button,chatFrame)
-	if find(link,"^spell:") then
+local _hook_OnItemRef = function(link, text, button, chatFrame)
+	if link:find("^spell:") then
 		local ref = sub(link,7)
-		ItemRefTooltip:AddLine(("|cFFCA3C3C%s|r %d"):format(ID,ref))
+		ItemRefTooltip:AddLine(("|cFFCA3C3C%s|r %d"):format(ID, ref))
 		ItemRefTooltip:Show()
 	end
 end
diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua
index 12023ad..a084307 100644
--- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua
+++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua
@@ -433,10 +433,8 @@ function MOD:RefreshUnitMedia(unitName)
         end
         if(self.Castbar and (unitDB.castbar)) then
             if(unitDB.castbar.useCustomColor) then
-				cr,cg,cb = unitDB.castbar.castingColor[1], unitDB.castbar.castingColor[2], unitDB.castbar.castingColor[3];
-				self.Castbar.CastColor = {cr,cg,cb}
-				cr,cg,cb = unitDB.castbar.sparkColor[1], unitDB.castbar.sparkColor[2], unitDB.castbar.sparkColor[3];
-				self.Castbar.SparkColor = {cr,cg,cb}
+				self.Castbar.CastColor = unitDB.castbar.castingColor
+				self.Castbar.SparkColor = unitDB.castbar.sparkColor
 			else
 				self.Castbar.CastColor = oUF_Villain.colors.casting
 				self.Castbar.SparkColor = oUF_Villain.colors.spark
@@ -877,15 +875,19 @@ function MOD:RefreshUnitLayout(frame, template)
 		else
 			castbar.SafeZone = nil;
 			castbar.LatencyTexture:Hide()
-		end
+		end
+
+		if castbar.Grip then
+			castbar.Grip:Width(castHeight + 2)
+			castbar.Grip:Height(castHeight + 2)
+		end
+
 		if castbar.Icon then
 			if db.castbar.icon then
-				castbar.Icon.bg:Width(castHeight + 2)
-				castbar.Icon.bg:Height(castHeight + 2)
-				castbar.Icon.bg:Show()
-			else
-				castbar.Icon.bg:Hide()
-				castbar.Icon = nil
+				castbar.Grip.Icon:SetAllPoints(castbar.Grip)
+				castbar.Grip.Icon:Show()
+			else
+				castbar.Grip.Icon:Hide()
 			end
 		end

@@ -1009,7 +1011,7 @@ function MOD:RefreshUnitLayout(frame, template)
 			elseif(db.aurabar.attachTo == "DEBUFFS" and frame.Debuffs and frame.Debuffs:IsShown()) then
 				attachTo = frame.Debuffs
 				preOffset = 10
-			elseif not isPlayer and SVUI_Player and db.aurabar.attachTo == "PLAYER_AURABARS" then
+			elseif template ~= "player" and SVUI_Player and db.aurabar.attachTo == "PLAYER_AURABARS" then
 				attachTo = SVUI_Player.AuraBars
 				preOffset = 10
 			end
diff --git a/Interface/AddOns/SVUI/packages/unit/elements/auras.lua b/Interface/AddOns/SVUI/packages/unit/elements/auras.lua
index 20d02f2..03ab962 100644
--- a/Interface/AddOns/SVUI/packages/unit/elements/auras.lua
+++ b/Interface/AddOns/SVUI/packages/unit/elements/auras.lua
@@ -44,6 +44,8 @@ local match         = string.match;
 local gsub          = string.gsub;
 --MATH
 local math          = math;
+local floor         = math.floor
+local ceil         	= math.ceil
 --TABLE
 local table         = table;
 local tsort         = table.sort;
diff --git a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua
index f47c6f4..f0d1e4d 100644
--- a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua
+++ b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua
@@ -16,22 +16,21 @@ S U P E R - V I L L A I N - U I  By: Munglunch               #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
---LUA
-local unpack        = unpack;
-local select        = select;
-local pairs         = pairs;
-local type          = type;
-local rawset        = rawset;
-local rawget        = rawget;
-local tostring      = tostring;
-local error         = error;
-local next          = next;
-local pcall         = pcall;
-local getmetatable  = getmetatable;
-local setmetatable  = setmetatable;
-local assert        = assert;
---BLIZZARD
 local _G            = _G;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
 local tinsert       = _G.tinsert;
 local tremove       = _G.tremove;
 local twipe         = _G.wipe;
@@ -513,25 +512,32 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss)
 	local cbName = frame:GetName().."Castbar"
 	local castbarHolder = CreateFrame("Frame", cbName, castbar)

-	local iconHolder = CreateFrame("Frame", nil, castbar)
+	local grip = CreateFrame("Frame", nil, castbar)
+	grip:SetFrameStrata("HIGH")
+
+	local iconHolder = CreateFrame("Frame", nil, grip)
 	iconHolder:SetFixedPanelTemplate("Inset", false)
-	iconHolder:SetFrameStrata("HIGH")
+	grip.Icon = iconHolder
+
 	local buttonIcon = iconHolder:CreateTexture(nil, "BORDER")
 	buttonIcon:FillInner()
 	buttonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
-	buttonIcon.bg = iconHolder;
 	castbar.Icon = buttonIcon;
+
 	local shieldIcon = iconHolder:CreateTexture(nil, "ARTWORK")
-	shieldIcon:Point("TOPLEFT",buttonIcon,"TOPLEFT",-7,7)
-	shieldIcon:Point("BOTTOMRIGHT",buttonIcon,"BOTTOMRIGHT",7,-8)
+	shieldIcon:Point("TOPLEFT", buttonIcon, "TOPLEFT", -7, 7)
+	shieldIcon:Point("BOTTOMRIGHT", buttonIcon, "BOTTOMRIGHT", 7, -8)
 	shieldIcon:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\Castbar\\SHIELD")
 	castbar.Shield = shieldIcon;

-	castbar.Time = iconHolder:CreateFontString(nil, "OVERLAY")
+	castbar.Time = grip:CreateFontString(nil, "OVERLAY")
 	castbar.Time:SetDrawLayer("OVERLAY", 7)
-	castbar.Text = iconHolder:CreateFontString(nil, "OVERLAY")
+
+	castbar.Text = grip:CreateFontString(nil, "OVERLAY")
 	castbar.Text:SetDrawLayer("OVERLAY", 7)

+	castbar.Grip = grip
+

 	local bgFrame = CreateFrame("Frame", nil, castbar)
 	local hadouken = CreateFrame("Frame", nil, castbar)
@@ -592,7 +598,7 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss)
 			SV.Animate:Sprite(hadouken[2],false,false,true)

 			castbar:Point("BOTTOMLEFT", castbarHolder, "BOTTOMLEFT", 1, 1)
-			iconHolder:Point("LEFT", castbar, "RIGHT", 4, 0)
+			grip:Point("LEFT", castbar, "RIGHT", 4, 0)

 			castbar.Time:Point("RIGHT", castbar, "LEFT", -4, 0)
 			castbar.Time:SetJustifyH("CENTER")
@@ -628,13 +634,13 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss)
 			SV.Animate:Sprite(hadouken[2],false,false,true)

 			castbar:Point("BOTTOMRIGHT", castbarHolder, "BOTTOMRIGHT", -1, 1)
-			iconHolder:Point("RIGHT", castbar, "LEFT", -4, 0)
+			grip:Point("RIGHT", castbar, "LEFT", -4, 0)

 			castbar.Time:Point("LEFT", castbar, "RIGHT", 4, 0)
 			castbar.Time:SetJustifyH("CENTER")
 		end

-		-- castbar.Time:Point("CENTER", iconHolder, "CENTER", 0, 0)
+		-- castbar.Time:Point("CENTER", grip, "CENTER", 0, 0)
 		-- castbar.Time:SetJustifyH("CENTER")

 		castbar.Text:SetPoint("CENTER", castbar, "CENTER", 0, 0)
@@ -665,9 +671,9 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss)

 		if reversed then
 			castbar:SetReverseFill(true)
-			iconHolder:Point("LEFT", castbar, "RIGHT", 6, 0)
+			grip:Point("LEFT", castbar, "RIGHT", 6, 0)
 		else
-			iconHolder:Point("RIGHT", castbar, "LEFT", -6, 0)
+			grip:Point("RIGHT", castbar, "LEFT", -6, 0)
 		end
 	end

diff --git a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua
index 4eb14f4..74282de 100644
--- a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua
+++ b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua
@@ -16,15 +16,36 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
+local _G = _G;
 --LUA
-local unpack        = unpack;
-local select        = select;
-local assert        = assert;
---BLIZZARD
-local _G            = _G;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local getmetatable  = _G.getmetatable;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local upper         = string.upper;
+local format        = string.format;
+local find          = string.find;
+local match         = string.match;
+local gsub          = string.gsub;
 --MATH
-local math          = math;
+local math          = _G.math;
 local random        = math.random;
+local floor         = math.floor
+local ceil         	= math.ceil
 --[[
 ##########################################################
 GET ADDON DATA
@@ -82,7 +103,7 @@ local Anim_OnStop = function(self)
 end

 local function SetNewAnimation(frame, animType, parent)
-	local anim = frame:CreateAnimation(animType, subType)
+	local anim = frame:CreateAnimation(animType)
 	anim.parent = parent
 	return anim
 end
@@ -313,7 +334,7 @@ local function CreateNameText(frame, unitName)
 	name:SetFont(LSM:Fetch("font", db.font), db.fontSize, db.fontOutline)
 	name:SetShadowOffset(2, -2)
 	name:SetShadowColor(0, 0, 0, 1)
-	if unitNmae == "target" then
+	if unitName == "target" then
 		name:SetPoint("RIGHT", frame)
 		name:SetJustifyH("RIGHT")
     	name:SetJustifyV("MIDDLE")
diff --git a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua
index 581fe67..de86873 100644
--- a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua
+++ b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua
@@ -13,12 +13,37 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+local _G = _G;
 --LUA
-local unpack        = unpack;
-local select        = select;
-local assert        = assert;
---BLIZZARD
-local _G            = _G;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local getmetatable  = _G.getmetatable;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local upper         = string.upper;
+local format        = string.format;
+local find          = string.find;
+local match         = string.match;
+local gsub          = string.gsub;
+--MATH
+local math          = _G.math;
+local random        = math.random;
+local floor         = math.floor
+local ceil         	= math.ceil
+local max         	= math.max

 local SV = select(2, ...)
 local oUF_Villain = SV.oUF
diff --git a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua
index 8737477..21dc69a 100644
--- a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua
+++ b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua
@@ -14,18 +14,45 @@ S U P E R - V I L L A I N - U I  By: Munglunch               #
 ##############################################################################
 ]]--
 --[[ GLOBALS ]]--
-local _G 		= _G;
-local unpack 	= unpack;
-local select 	= select;
-local pairs 	= pairs;
-local assert 	= assert;
-local table 	= table;
-local string 	= string;
---[[ STRING METHODS ]]--
-local find, format, byte, upper = string.find, string.format, string.byte, string.upper;
-local sub, gsub, len = string.sub, string.gsub, string.len;
---[[ TABLE METHODS ]]--
-local twipe = _G.wipe;
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local getmetatable  = _G.getmetatable;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local upper         = string.upper;
+local format        = string.format;
+local find          = string.find;
+local match         = string.match;
+local sub         	= string.sub;
+local gsub          = string.gsub;
+local byte 			= string.byte;
+local upper 		= string.upper;
+local len         	= string.len;
+--MATH
+local math          = _G.math;
+local floor         = math.floor
+--TABLE
+local table         = _G.table;
+local tsort         = table.sort;
+local tconcat       = table.concat;
+local tinsert       = _G.tinsert;
+local tremove       = _G.tremove;
+local twipe         = _G.wipe;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -56,10 +83,12 @@ LOCAL FUNCTIONS
 ##########################################################
 ]]--
 local function Hex(r, g, b)
-	if type(r) == "table" then
+	if(not r) then
+		r, g, b = 1, 1, 1;
+	elseif type(r) == "table" then
 		if r.r then r, g, b = r.r, r.g, r.b else r, g, b = unpack(r) end
 	end
-	return format("|cff%02x%02x%02x", r*255, g*255, b*255)
+	return ("|cff%02x%02x%02x"):format(r*255, g*255, b*255)
 end

 local function TruncateString(value)
@@ -82,22 +111,28 @@ local function SetTagStyle(style, min, max)
 		if result <= 0 then
 			return ""
 		else
-			return format("-%s", TruncateString(result))
+			return ("-%s"):format(TruncateString(result))
 		end
-	elseif style == "PERCENT" then
-		result = format("%s%%", format("%.1f", min / max * 100))
+	elseif style == "PERCENT" then
+		local prct = min / max * 100
+		result = ("%.1f"):format(prct)
+		result = ("%s%%"):format(result)
 		result = result:gsub(".0%%", "%%")
 		return result
 	elseif style == "CURRENT" or ((style == "CURRENT_MAX" or style == "CURRENT_MAX_PERCENT" or style == "CURRENT_PERCENT") and min == max) then
-		return format("%s", TruncateString(min))
+		return ("%s"):format(TruncateString(min))
 	elseif style == "CURRENT_MAX" then
-		return format("%s - %s", TruncateString(min), TruncateString(max))
-	elseif style == "CURRENT_PERCENT" then
-		result = format("%s - %s%%", TruncateString(min), format("%.1f", min / max * 100))
+		return ("%s - %s"):format(TruncateString(min), TruncateString(max))
+	elseif style == "CURRENT_PERCENT" then
+		local prct = min / max * 100
+		result = ("%.1f"):format(prct)
+		result = ("%s - %s%%"):format(TruncateString(min), result)
 		result = result:gsub(".0%%", "%%")
 		return result
-	elseif style == "CURRENT_MAX_PERCENT" then
-		result = format("%s - %s - %s%%", TruncateString(min), TruncateString(max), format("%.1f", min / max * 100))
+	elseif style == "CURRENT_MAX_PERCENT" then
+		local prct = min / max * 100
+		result = ("%.1f"):format(prct)
+		result = ("%s - %s - %s%%"):format(TruncateString(min), TruncateString(max), result)
 		result = result:gsub(".0%%", "%%")
 		return result
 	end
@@ -158,8 +193,8 @@ local function GetClassPower(class)
 		if spec == SPEC_WARLOCK_DESTRUCTION then
 			currentPower = UnitPower("player", SPELL_POWER_BURNING_EMBERS, true)
 			maxPower = UnitPowerMax("player", SPELL_POWER_BURNING_EMBERS, true)
-			currentPower = math.floor(currentPower / 10)
-			maxPower = math.floor(maxPower / 10)
+			currentPower = floor(currentPower / 10)
+			maxPower = floor(maxPower / 10)
 			r, g, b = 230 / 255, 95 / 255, 95 / 255
 		elseif spec == SPEC_WARLOCK_AFFLICTION then
 			currentPower = UnitPower("player", SPELL_POWER_SOUL_SHARDS)
@@ -367,7 +402,7 @@ oUF_Villain.Tags.Methods["power:curmax-percent"] = function(f)local j = UnitPowe

 oUF_Villain.Tags.Methods["power:percent"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("PERCENT", p, UnitPowerMax(f, j))end

-oUF_Villain.Tags.Methods["power:deficit"] = function(f)local j = UnitPowerType(f)return SetTagStyle("DEFICIT", UnitPower(f, j), UnitPowerMax(f, j), r, g, b)end
+oUF_Villain.Tags.Methods["power:deficit"] = function(f)local j = UnitPowerType(f) return SetTagStyle("DEFICIT", UnitPower(f, j), UnitPowerMax(f, j))end
 --[[
 ##########################################################
 MISC TAG METHODS
@@ -413,7 +448,7 @@ oUF_Villain.Tags.Methods["classpower"] = function()
 	else
 		local color = Hex(r, g, b)
 		local amt = SetTagStyle("CURRENT", currentPower, maxPower)
-		return format("%s%s ", color, amt)
+		return ("%s%s "):format(color, amt)
 	end
 end

@@ -425,7 +460,7 @@ oUF_Villain.Tags.Methods["altpower"] = function(unit)
 			r, g, b = 1, 1, 1
 		end
 		local color = Hex(r, g, b)
-		return format("%s%s ", color, power)
+		return ("%s%s "):format(color, power)
 	else
 		return " "
 	end
diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua
index 7561c1e..ae7022d 100644
--- a/Interface/AddOns/SVUI/packages/unit/frames.lua
+++ b/Interface/AddOns/SVUI/packages/unit/frames.lua
@@ -979,7 +979,7 @@ local ArenaPrepHandler_OnEvent = function(self, event)
                 if(prepframe) then
                     if i <= numOpps then
                         local s = GetArenaOpponentSpec(i)
-                        local _, spec, class = nil, "UNKNOWN", "UNKNOWN"
+                        local _, spec, class, icon = nil, "UNKNOWN", "UNKNOWN", [[INTERFACE\ICONS\INV_MISC_QUESTIONMARK]]
                         if s and s > 0 then
                             _, spec, _, icon, _, _, class = GetSpecializationInfoByID(s)
                         end
@@ -1095,10 +1095,10 @@ local GroupMediaUpdate = function(self)
     while childFrame do
         MOD.RefreshUnitMedia(childFrame, key)
         if(_G[childFrame:GetName().."Pet"]) then
-            MOD.RefreshUnitMedia(_G[childFrame:GetName().."Pet"], key, updateElements)
+            MOD.RefreshUnitMedia(_G[childFrame:GetName().."Pet"], key)
         end
         if(_G[childFrame:GetName().."Target"]) then
-            MOD.RefreshUnitMedia(_G[childFrame:GetName().."Target"], key, updateElements)
+            MOD.RefreshUnitMedia(_G[childFrame:GetName().."Target"], key)
         end
         childFrame:UpdateAllElements()
         index = index + 1;
@@ -1874,7 +1874,7 @@ local GroupSetConfigEnvironment = function(self)
             end
             if not frame.isForced then
                 if not frame.initialized then
-                    frame:SetAttribute("startingIndex", db.customSorting and (-min(db.groupCount * db.gRowCol * 5, MAX_RAID_MEMBERS) + 1) or -4)
+                    frame:SetAttribute("startingIndex", db.customSorting and (-numMin(db.groupCount * db.gRowCol * 5, MAX_RAID_MEMBERS) + 1) or -4)
                     frame:Show()
                     frame.initialized = true
                 end
diff --git a/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua b/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua
index 29908af..113f4c7 100644
--- a/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua
+++ b/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua
@@ -121,7 +121,7 @@ function MOD:CreateClassBar(playerFrame)
 		bar[i].bg.multiplier = 0.1
 	end

-	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar)
+	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar)
 	classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2)
 	bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0)
 	bar.Holder = classBarHolder
diff --git a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua
index a51ffbe..7a64009 100644
--- a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua
+++ b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua
@@ -267,7 +267,7 @@ function MOD:CreateClassBar(playerFrame)
 		end
 	}

-	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar)
+	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar)
 	classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2)
 	bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0)
 	bar.Holder = classBarHolder
@@ -309,7 +309,7 @@ local ShowSmallPoint = function(self)
 	self:SetAlpha(1)
 end

-local HideSmallPoint = function(self)
+local HideSmallPoint = function(self, i)
 	self.Icon:SetVertexColor(unpack(cpointColor[i]))
 	self:SetAlpha(0)
 end
diff --git a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua
index eca1a28..9275f99 100644
--- a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua
+++ b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua
@@ -187,7 +187,7 @@ function MOD:CreateClassBar(playerFrame)
 	end

 	bar.Override = Update;
-	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar)
+	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar)
 	classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2)
 	bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0)
 	bar.Holder = classBarHolder
diff --git a/Interface/AddOns/SVUI/packages/unit/resources/monk.lua b/Interface/AddOns/SVUI/packages/unit/resources/monk.lua
index 99c4bf8..e90a137 100644
--- a/Interface/AddOns/SVUI/packages/unit/resources/monk.lua
+++ b/Interface/AddOns/SVUI/packages/unit/resources/monk.lua
@@ -150,7 +150,7 @@ function MOD:CreateClassBar(playerFrame)
 		bar[i]:SetScript("OnHide", StopFlash)
 	end

-	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar)
+	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar)
 	classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2)
 	bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0)
 	bar.Holder = classBarHolder
diff --git a/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua b/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua
index 89f056a..0834db8 100644
--- a/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua
+++ b/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua
@@ -179,7 +179,7 @@ function MOD:CreateClassBar(playerFrame)
 	end
 	bar.Override = Update;

-	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar)
+	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar)
 	classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2)
 	bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0)
 	bar.Holder = classBarHolder
diff --git a/Interface/AddOns/SVUI/packages/unit/resources/priest.lua b/Interface/AddOns/SVUI/packages/unit/resources/priest.lua
index cd84430..394199a 100644
--- a/Interface/AddOns/SVUI/packages/unit/resources/priest.lua
+++ b/Interface/AddOns/SVUI/packages/unit/resources/priest.lua
@@ -151,7 +151,7 @@ function MOD:CreateClassBar(playerFrame)
 	end
 	bar.PreUpdate = PreUpdate

-	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar)
+	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar)
 	classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2)
 	bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0)
 	bar.Holder = classBarHolder
diff --git a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua
index 0a9c5f9..277931d 100644
--- a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua
+++ b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua
@@ -116,7 +116,7 @@ local ShowSmallPoint = function(self)
 	self:SetAlpha(1)
 end

-local HideSmallPoint = function(self)
+local HideSmallPoint = function(self, i)
 	self.Icon:SetVertexColor(unpack(cpointColor[i]))
 	self:SetAlpha(0)
 end
@@ -254,7 +254,7 @@ function MOD:CreateClassBar(playerFrame)

 	bar.Guile = guile;

-	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar)
+	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar)
 	classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2)
 	bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0)
 	bar.Holder = classBarHolder
diff --git a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua
index 0549aef..51cd23b 100644
--- a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua
+++ b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua
@@ -113,7 +113,7 @@ function MOD:CreateClassBar(playerFrame)
 		bar[i].backdrop:SetVertexColor(0.2,0.2,0.2,0.7)
 	end

-	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar)
+	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar)
 	classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2)
 	bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0)
 	bar.Holder = classBarHolder
diff --git a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua
index e02887b..b27f953 100644
--- a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua
+++ b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua
@@ -30,7 +30,7 @@ local tonumber  = _G.tonumber;
 local assert 	= _G.assert;
 local math 		= _G.math;
 --[[ MATH METHODS ]]--
-local random = math.random;
+local random, floor = math.random, math.floor;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -356,7 +356,7 @@ function MOD:CreateClassBar(playerFrame)
 	bar.CurrentSpec = 0;
 	bar.Override = Update;

-	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar)
+	local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar)
 	classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2)
 	bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0)
 	bar.Holder = classBarHolder
diff --git a/Interface/AddOns/SVUI/scripts/ego.lua b/Interface/AddOns/SVUI/scripts/ego.lua
index 4cbf1b5..5b6a9fa 100644
--- a/Interface/AddOns/SVUI/scripts/ego.lua
+++ b/Interface/AddOns/SVUI/scripts/ego.lua
@@ -31,29 +31,57 @@ GET ADDON DATA
 local SV = select(2, ...)
 local L = SV.L

-local EgoFrame = CreateFrame("Frame", "EgoFrame", UIParent);
+local Sequences = {
+	{65, 1000}, --shrug
+	{68, 1000}, --cheer
+	{70, 1000}, --laugh
+	{74, 1000}, --roar
+	{77, 1000}, --cry
+	{84, 1000}, --point
+	{82, 1000}, --flex
+};

-local LaunchPopup = function(self, emote)
+local EgoFrame = CreateFrame("PlayerModel", "SVUI_EgoModel", UIParent);
+
+local function rng()
+	return random(1, #Sequences)
+end
+
+local LaunchAnimation = function(self, key)
+	key = key or rng()
+	local emote = Sequences[key][1]
+	self:Show()
+	self:SetAnimation(emote)
+	self.anim:Play()
+end
+
+local LaunchFreezeFrame = function(self, key)
+	key = key or rng()
+	local animation = Sequences[key]
 	local size = SVUIParent:GetHeight()
-	self.Model:Show()
+	self:Show()
+	self:SetSequenceTime(unpack(animation))
 	self.anim[2]:SetOffset(size, -size)
 	self.anim[2]:SetOffset(0, 0)
 	self.anim:Play()
-	self.Model:SetAnimation(emote)
-end
+end
+
+local ResetPosition = function(self)
+	local size = SVUIParent:GetHeight()
+	self:SetPoint("TOP", SV.UIParent, "TOP", 0, 0)
+	self:SetWidth(size)
+	self:SetHeight(size)
+	self:SetUnit("player")
+end

 local Ego_OnEvent = function(self, event)
 	if event == "ACHIEVEMENT_EARNED" then
-		self:LaunchPopup(74)
+		self:LaunchAnimation(4)
 	else
-		self:LaunchPopup(84)
+		self:LaunchAnimation(6)
 	end
 end

-function BeAwesome()
-	EgoFrame:LaunchPopup(74)
-end
-
 function SV:ToggleEgo()
 	if not SV.db.general.ego then
 		EgoFrame:UnregisterEvent("ACHIEVEMENT_EARNED")
@@ -74,21 +102,19 @@ local function LoadSVEgo()
 	EgoFrame:SetPoint("TOP", SV.UIParent, "TOP", 0, 0)
 	EgoFrame:SetWidth(size)
 	EgoFrame:SetHeight(size)
-	EgoFrame.LaunchPopup = LaunchPopup
-
-	local model = CreateFrame("PlayerModel", "EgoFrameModel", EgoFrame)
-	model:SetAllPoints(EgoFrame)
-	model:SetUnit("player")
-	model:Hide()
-
-	EgoFrame.Model = model
-
-	SV.Animate:Slide(EgoFrame, size, -size, true, 1.5)
-	EgoFrame:SetAlpha(0)
+	EgoFrame:SetUnit("player")
+	EgoFrame.LaunchAnimation = LaunchAnimation
+	EgoFrame.LaunchFreezeFrame = LaunchFreezeFrame
+	EgoFrame.ResetPosition = ResetPosition
+	SV.Animate:Slide(EgoFrame, 0, 0, true, 1.5)
 	EgoFrame.anim[4]:SetScript("OnFinished", EgoPop_OnUpdate)

-	SLASH_SVUI_BADASS1="/badass"
-	SlashCmdList["SVUI_BADASS"] = BeAwesome;
+	EgoFrame:Hide()
+end
+
+_G.SlashCmdList["BADASS"] = function()
+	EgoFrame:LaunchAnimation(4)
 end
+_G.SLASH_BADASS1 = "/badass"

 SV:NewScript(LoadSVEgo)
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/scripts/misc.lua b/Interface/AddOns/SVUI/scripts/misc.lua
index c51e038..8465157 100644
--- a/Interface/AddOns/SVUI/scripts/misc.lua
+++ b/Interface/AddOns/SVUI/scripts/misc.lua
@@ -26,6 +26,8 @@ local type 		= _G.type;
 local tinsert 	= _G.tinsert;
 local math 		= _G.math;
 local cos, deg, rad, sin = math.cos, math.deg, math.rad, math.sin;
+
+local hooksecurefunc = _G.hooksecurefunc;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -39,8 +41,7 @@ local toonclass = select(2, UnitClass('player'))
 MERCHANT MAX STACK
 ##########################################################
 ]]--
-local savedMerchantItemButton_OnModifiedClick = MerchantItemButton_OnModifiedClick
-function MerchantItemButton_OnModifiedClick(self, ...)
+local BuyMaxStack = function(self, ...)
 	if ( IsAltKeyDown() ) then
 		local itemLink = GetMerchantItemLink(self:GetID())
 		if not itemLink then return end
@@ -49,8 +50,8 @@ function MerchantItemButton_OnModifiedClick(self, ...)
 			BuyMerchantItem(self:GetID(), GetMerchantItemMaxStack(self:GetID()))
 		end
 	end
-	savedMerchantItemButton_OnModifiedClick(self, ...)
 end
+hooksecurefunc("MerchantItemButton_OnModifiedClick", BuyMaxStack);
 --[[
 ##########################################################
 CHAT BUBBLES
@@ -361,7 +362,7 @@ local function RaidMarkShowIcons()
 	RaidMarkFrame:Show()
 end

-function RaidMark_HotkeyPressed(button)
+_G.RaidMark_HotkeyPressed = function(button)
 	ButtonIsDown = button == "down" and RaidMarkAllowed()
 	if(RaidMarkFrame) then
 		if ButtonIsDown then
@@ -568,8 +569,8 @@ local function GetThreatBarColor(unitWithHighestThreat)
 		local colors = RAID_CLASS_COLORS[unitClass]
 		if not colors then return 15,15,15 end
 		return colors.r*255, colors.g*255, colors.b*255
-	elseif react then
-		local reaction=oUF_Villain['colors'].reaction[react]
+	elseif(react and SV.oUF) then
+		local reaction = SV.oUF['colors'].reaction[react]
 		return reaction[1]*255, reaction[2]*255, reaction[3]*255
 	else
 		return 15,15,15
@@ -624,13 +625,18 @@ end

 local function LoadThreatBar()
 	if(SV.db.general.threatbar == true) then
+		local anchor = _G.SVUI_Target
 		local ThreatBar = CreateFrame('StatusBar', 'SVUI_ThreatBar', SV.UIParent);
 		ThreatBar:SetStatusBarTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Doodads\\THREAT-BAR")
 		ThreatBar:SetSize(50,100)
 		ThreatBar:SetFrameStrata('MEDIUM')
 		ThreatBar:SetOrientation("VERTICAL")
 		ThreatBar:SetMinMaxValues(0,100)
-		ThreatBar:Point('LEFT',SVUI_Target,'RIGHT',0,10)
+		if(anchor) then
+			ThreatBar:Point('LEFT', _G.SVUI_Target, 'RIGHT', 0, 10)
+		else
+			ThreatBar:Point('LEFT', UIParent, 'CENTER', 50, -50)
+		end
 		ThreatBar.backdrop = ThreatBar:CreateTexture(nil,"BACKGROUND")
 		ThreatBar.backdrop:SetAllPoints(ThreatBar)
 		ThreatBar.backdrop:SetTexture(BARFILE)
diff --git a/Interface/AddOns/SVUI/scripts/mounts.lua b/Interface/AddOns/SVUI/scripts/mounts.lua
index 6a98ada..16259c1 100644
--- a/Interface/AddOns/SVUI/scripts/mounts.lua
+++ b/Interface/AddOns/SVUI/scripts/mounts.lua
@@ -16,17 +16,17 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
-if(select(4, GetBuildInfo()) >= 60000) then return end;
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack 	= _G.unpack;
-local select 	= _G.select;
-local pairs 	= _G.pairs;
-local tonumber	= _G.tonumber;
-local tinsert 	= _G.tinsert;
-local table 	= _G.table;
-local bit 		= _G.bit;
-
+local unpack 		= _G.unpack;
+local select 		= _G.select;
+local pairs 		= _G.pairs;
+local tonumber		= _G.tonumber;
+local tinsert 		= _G.tinsert;
+local table 		= _G.table;
+local math 			= _G.math;
+local bit 			= _G.bit;
+local random 		= math.random;
 local twipe,band 	= table.wipe, bit.band;
 --[[
 ##########################################################
@@ -41,14 +41,59 @@ LOCAL VARIABLES
 ##########################################################
 ]]--
 local ttSummary = "";
+local NewHook = hooksecurefunc;
+local CountMounts, MountInfo, RandomMount, MountUp, UnMount, CHECKED, UNCHECKED;
+
 local MountListener = CreateFrame("Frame");
+MountListener.favorites = false
 --[[
 ##########################################################
 LOCAL FUNCTIONS
 ##########################################################
 ]]--
+if(select(4, GetBuildInfo()) >= 60000) then
+	CHECKED = true;
+	UNCHECKED = false;
+	function CountMounts()
+		return C_MountJournal.GetNumMounts()
+	end
+	function MountInfo(index)
+		return true, C_MountJournal.GetMountInfo(index)
+	end
+	function RandomMount()
+		if(MountListener.favorites) then
+			return 0
+		end
+		maxMounts = C_MountJournal.GetNumMounts()
+		return random(1, maxMounts)
+	end
+	function MountUp(index)
+		index = index or RandomMount()
+		return C_MountJournal.Summon(index)
+	end
+	UnMount = C_MountJournal.Dismiss
+else
+	CHECKED = 1;
+	UNCHECKED = 0;
+	function CountMounts()
+		return GetNumCompanions("MOUNT")
+	end
+	function MountInfo(index)
+		return GetCompanionInfo("MOUNT", index)
+	end
+	function RandomMount()
+		maxMounts = GetNumCompanions("MOUNT")
+		return random(1, maxMounts)
+	end
+	function MountUp(index)
+		index = index or RandomMount()
+		return CallCompanion("MOUNT", index)
+	end
+	UnMount = Dismount
+end
+
 local function UpdateMountCheckboxes(button, index)
-	local _, creatureName = GetCompanionInfo("MOUNT", index);
+	local _, creatureName = MountInfo(index);

 	local n = button.MountBar
 	local bar = _G[n]
@@ -67,45 +112,50 @@ local function UpdateMountCheckboxes(button, index)
 			if(SV.cache.Mounts.types["GROUND"] ~= index) then
 				SV.cache.Mounts.types["GROUND"] = index
 			end
-			bar["GROUND"]:SetChecked(1)
+			bar["GROUND"]:SetChecked(CHECKED)
 		else
-			bar["GROUND"]:SetChecked(0)
+			bar["GROUND"]:SetChecked(UNCHECKED)
 		end

 		if(SV.cache.Mounts.names["FLYING"] == creatureName) then
 			if(SV.cache.Mounts.types["FLYING"] ~= index) then
 				SV.cache.Mounts.types["FLYING"] = index
 			end
-			bar["FLYING"]:SetChecked(1)
+			bar["FLYING"]:SetChecked(CHECKED)
 		else
-			bar["FLYING"]:SetChecked(0)
+			bar["FLYING"]:SetChecked(UNCHECKED)
 		end

 		if(SV.cache.Mounts.names["SWIMMING"] == creatureName) then
 			if(SV.cache.Mounts.types["SWIMMING"] ~= index) then
 				SV.cache.Mounts.types["SWIMMING"] = index
 			end
-			bar["SWIMMING"]:SetChecked(1)
+			bar["SWIMMING"]:SetChecked(CHECKED)
 		else
-			bar["SWIMMING"]:SetChecked(0)
+			bar["SWIMMING"]:SetChecked(UNCHECKED)
 		end

 		if(SV.cache.Mounts.names["SPECIAL"] == creatureName) then
 			if(SV.cache.Mounts.types["SPECIAL"] ~= index) then
 				SV.cache.Mounts.types["SPECIAL"] = index
 			end
-			bar["SPECIAL"]:SetChecked(1)
+			bar["SPECIAL"]:SetChecked(CHECKED)
 		else
-			bar["SPECIAL"]:SetChecked(0)
+			bar["SPECIAL"]:SetChecked(UNCHECKED)
 		end
 	end
 end

 local function UpdateMountsCache()
-	if(not MountJournal or not MountJournal.cachedMounts) then return end
-	local num = GetNumCompanions("MOUNT")
+	if(not MountJournal) then return end
+	local num = CountMounts()
+	MountListener.favorites = false
+
 	for index = 1, num, 1 do
-		local _, info, id = GetCompanionInfo("MOUNT", index)
+		local _, info, id, _, _, _, _, _, favorite = MountInfo(index)
+		if(favorite == true) then
+			MountListener.favorites = true
+		end
 		if(SV.cache.Mounts.names["GROUND"] == info) then
 			if(SV.cache.Mounts.types["GROUND"] ~= index) then
 				SV.cache.Mounts.types["GROUND"] = index
@@ -130,7 +180,7 @@ local function UpdateMountsCache()
 end

 local function Update_MountCheckButtons()
-	if(not MountJournal or not MountJournal.cachedMounts) then return end
+	if(not MountJournal or (MountJournal and not MountJournal.cachedMounts)) then return end
 	local count = #MountJournal.cachedMounts
 	if(type(count) ~= "number") then return end
 	local scrollFrame = MountJournal.ListScrollFrame;
@@ -192,7 +242,7 @@ local CheckButton_OnClick = function(self)
 	local key = self.key

 	if(index) then
-		if(self:GetChecked() == 1) then
+		if(self:GetChecked() == true) then
 			SV.cache.Mounts.types[key] = index
 			SV.cache.Mounts.names[key] = name
 		else
@@ -254,7 +304,7 @@ local function SetMountCheckButtons()
 	UpdateMountsCache()

 	local scrollFrame = MountJournal.ListScrollFrame;
-	local scrollBar = _G["MountJournalListScrollFrameScrollBar"]
+	-- local scrollBar = _G["MountJournalListScrollFrameScrollBar"]
     local buttons = scrollFrame.buttons;

 	for i = 1, #buttons do
@@ -277,11 +327,7 @@ local function SetMountCheckButtons()
 	    buttonBar["GROUND"]:SetPanelColor(0.2, 0.7, 0.1, 0.15)
 	    buttonBar["GROUND"]:GetCheckedTexture():SetVertexColor(0.2, 0.7, 0.1, 1)
 	    buttonBar["GROUND"].key = "GROUND"
-		if(enabled) then
-			buttonBar["GROUND"]:SetChecked(1)
-		else
-			buttonBar["GROUND"]:SetChecked(0)
-		end
+		buttonBar["GROUND"]:SetChecked(UNCHECKED)
 		buttonBar["GROUND"]:SetScript("OnClick", CheckButton_OnClick)
 		buttonBar["GROUND"]:SetScript("OnEnter", CheckButton_OnEnter)
 		buttonBar["GROUND"]:SetScript("OnLeave", CheckButton_OnLeave)
@@ -294,11 +340,7 @@ local function SetMountCheckButtons()
 	    buttonBar["FLYING"]:SetPanelColor(1, 1, 0.2, 0.15)
 	    buttonBar["FLYING"]:GetCheckedTexture():SetVertexColor(1, 1, 0.2, 1)
 	    buttonBar["FLYING"].key = "FLYING"
-		if(enabled) then
-			buttonBar["FLYING"]:SetChecked(1)
-		else
-			buttonBar["FLYING"]:SetChecked(0)
-		end
+		buttonBar["FLYING"]:SetChecked(UNCHECKED)
 		buttonBar["FLYING"]:SetScript("OnClick", CheckButton_OnClick)
 		buttonBar["FLYING"]:SetScript("OnEnter", CheckButton_OnEnter)
 		buttonBar["FLYING"]:SetScript("OnLeave", CheckButton_OnLeave)
@@ -311,11 +353,7 @@ local function SetMountCheckButtons()
 	    buttonBar["SWIMMING"]:SetPanelColor(0.2, 0.42, 0.76, 0.15)
 	    buttonBar["SWIMMING"]:GetCheckedTexture():SetVertexColor(0.2, 0.42, 0.76, 1)
 	    buttonBar["SWIMMING"].key = "SWIMMING"
-		if(enabled) then
-			buttonBar["SWIMMING"]:SetChecked(1)
-		else
-			buttonBar["SWIMMING"]:SetChecked(0)
-		end
+		buttonBar["SWIMMING"]:SetChecked(UNCHECKED)
 		buttonBar["SWIMMING"]:SetScript("OnClick", CheckButton_OnClick)
 		buttonBar["SWIMMING"]:SetScript("OnEnter", CheckButton_OnEnter)
 		buttonBar["SWIMMING"]:SetScript("OnLeave", CheckButton_OnLeave)
@@ -328,11 +366,7 @@ local function SetMountCheckButtons()
 	    buttonBar["SPECIAL"]:SetPanelColor(0.7, 0.1, 0.1, 0.15)
 	    buttonBar["SPECIAL"]:GetCheckedTexture():SetVertexColor(0.7, 0.1, 0.1, 1)
 	    buttonBar["SPECIAL"].key = "SPECIAL"
-		if(special) then
-			buttonBar["SPECIAL"]:SetChecked(1)
-		else
-			buttonBar["SPECIAL"]:SetChecked(0)
-		end
+		buttonBar["SPECIAL"]:SetChecked(UNCHECKED)
 		buttonBar["SPECIAL"]:SetScript("OnClick", CheckButton_OnClick)
 		buttonBar["SPECIAL"]:SetScript("OnEnter", CheckButton_OnEnter)
 		buttonBar["SPECIAL"]:SetScript("OnLeave", CheckButton_OnLeave)
@@ -343,8 +377,8 @@ local function SetMountCheckButtons()
 	end


-	scrollFrame:HookScript("OnMouseWheel", Update_MountCheckButtons)
-	scrollBar:HookScript("OnValueChanged", Update_MountCheckButtons)
+	-- scrollFrame:HookScript("OnMouseWheel", Update_MountCheckButtons)
+	-- scrollBar:HookScript("OnValueChanged", Update_MountCheckButtons)
 	UpdateCurrentMountSelection()

 	if(SV.GameVersion >= 60000) then
@@ -355,90 +389,52 @@ local function SetMountCheckButtons()
 	MountListener:RegisterEvent("COMPANION_UNLEARNED")
 	MountListener:RegisterEvent("COMPANION_UPDATE")
 	MountListener:SetScript("OnEvent", ProxyUpdate_Mounts)
+
+	NewHook("MountJournal_UpdateMountList", Update_MountCheckButtons)
 end
 --[[
 ##########################################################
 SLASH FUNCTION
 ##########################################################
 ]]--
-function SVUILetsRide()
-	local checkList = SV.cache.Mounts.types
-	local letsFly, letsSwim, letsSeahorse, vjZone, IbelieveIcantFly
-	local maxMounts = GetNumCompanions("MOUNT")
+_G.SVUILetsRide = function()
+	local maxMounts = CountMounts()
+
 	if(not maxMounts or IsMounted()) then
-		Dismount()
+		UnMount()
 		return
 	end
+
 	if(CanExitVehicle()) then
 		VehicleExit()
 		return
 	end
-	if(IsUsableSpell(59569) == nil) then
-		IbelieveIcantFly = true
-	end
-	if(not IbelieveIcantFly and IsFlyableArea()) then
-		letsFly = true
-	end
-	for i = 1, 40 do
-		local auraID = select(11, UnitBuff("player", i))
-		if(auraID == 73701 or auraID == 76377) then
-			vjZone = true
-		end
-	end
-	if(vjZone and IsSwimming()) then
-		letsSeahorse = true
-	end
-	if(IsSwimming() and IbelieveIcantFly and not letsSeahorse) then
-		letsSwim = true
-	end
-	if(IsModifierKeyDown()) then
-		if(checkList["SPECIAL"]) then
-			CallCompanion("MOUNT", checkList["SPECIAL"])
-			return
-		elseif(checkList["GROUND"]) then
-			CallCompanion("MOUNT", checkList["GROUND"])
-			return
-		end
-	end
-	if(letsSeahorse) then
-		for index = 1, maxMounts, 1 do
-			local _, info, id = GetCompanionInfo("MOUNT", index)
-			if(letsSeahorse and id == 75207) then CallCompanion("MOUNT", index) end
-		end
-	end
-	if(letsFly and not letsSwim) then
-		if(checkList["FLYING"]) then
-			CallCompanion("MOUNT", checkList["FLYING"])
-			return
-		else
-			if(checkList["GROUND"]) then
-				SV:AddonMessage("No flying mount selected! Using your ground mount.")
-				CallCompanion("MOUNT", checkList["GROUND"])
-				return
+
+	local checkList = SV.cache.Mounts.types
+	local letsFly = IsFlyableArea()
+	local letsSwim = IsSwimming()
+
+	if(IsModifierKeyDown() and checkList["SPECIAL"]) then
+		MountUp(checkList["SPECIAL"])
+	else
+		if(letsSwim) then
+			if(checkList["SWIMMING"]) then
+				MountUp(checkList["SWIMMING"])
+			elseif(letsFly) then
+				MountUp(checkList["FLYING"])
+			else
+				MountUp(checkList["GROUND"])
 			end
+		elseif(letsFly) then
+			if(checkList["FLYING"]) then
+				MountUp(checkList["FLYING"])
+			else
+				MountUp(checkList["GROUND"])
+			end
+		else
+			MountUp(checkList["GROUND"])
 		end
-	elseif(not letsFly and not letsSwim) then
-		if(checkList["GROUND"]) then
-			CallCompanion("MOUNT", checkList["GROUND"])
-			return
-		end
-	elseif(letsSwim) then
-		if(checkList["SWIMMING"]) then
-			CallCompanion("MOUNT", checkList["SWIMMING"])
-			return
-		elseif(letsFly and checkList["FLYING"]) then
-			SV:AddonMessage("No swimming mount selected! Using your flying mount.")
-			CallCompanion("MOUNT", checkList["FLYING"])
-			return
-		end
-	elseif(checkList["GROUND"]) then
-		CallCompanion("MOUNT", checkList["GROUND"])
-		return
-	end
-	if(not checkList["GROUND"] and not checkList["FLYING"] and not checkList["SWIMMING"]) then
-		CallCompanion("MOUNT", random(1, maxMounts))
 	end
-	return
 end
 --[[
 ##########################################################
diff --git a/Interface/AddOns/SVUI/scripts/questwatch.lua b/Interface/AddOns/SVUI/scripts/questwatch.lua
index e4e9627..e7884af 100644
--- a/Interface/AddOns/SVUI/scripts/questwatch.lua
+++ b/Interface/AddOns/SVUI/scripts/questwatch.lua
@@ -64,6 +64,14 @@ local SuperDockWindowRight;
 local currentQuestItems = {};
 local QuestDockletFrame, QuestDockletFrameTitle, QuestDockletFrameList, QuestDockletFrameSlider;
 local ICON_FILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-QUESTS]]
+local WATCHFRAME_MAXLINEWIDTH = _G.WATCHFRAME_MAXLINEWIDTH;
+local WATCHFRAME_EXPANDEDWIDTH = _G.WATCHFRAME_EXPANDEDWIDTH;
+local WATCHFRAME_FILTER_TYPE = _G.WATCHFRAME_FILTER_TYPE;
+local WATCHFRAME_FILTER_COMPLETED_QUESTS = _G.WATCHFRAME_FILTER_COMPLETED_QUESTS;
+local WATCHFRAME_FILTER_ACHIEVEMENTS = _G.WATCHFRAME_FILTER_ACHIEVEMENTS;
+local WATCHFRAME_FILTER_REMOTE_ZONES = _G.WATCHFRAME_FILTER_REMOTE_ZONES;
+local OBJECTIVES_TRACKER_LABEL = _G.OBJECTIVES_TRACKER_LABEL;
+local WATCHFRAME_NUM_ITEMS = _G.WATCHFRAME_NUM_ITEMS;
 --[[
 ##########################################################
 PRE VARS/FUNCTIONS
@@ -257,14 +265,16 @@ end

 local function SetQuestDockEvents()
 	WatchFrame:HookScript("OnEvent", QWQuestItems)
-	WatchFrame.ScrollListUpdate = function()
+	WatchFrame.ScrollListUpdate = function(self)
+		local WatchFrame = _G.WatchFrame
 		QWSetWatchFrameTitle();
 		WATCHFRAME_MAXLINEWIDTH = WatchFrame:GetWidth();
 		if QuestDockletFrameList then
 			WATCHFRAME_MAXLINEWIDTH = QuestDockletFrameList:GetWidth() - 62
 		end
 	end
-	WatchFrame.OnUpdate = function()
+	WatchFrame.OnUpdate = function(self)
+		local WatchFrame = _G.WatchFrame
 		WATCHFRAME_MAXLINEWIDTH = WatchFrame:GetWidth()
 		if QuestDockletFrameList then
 			WATCHFRAME_MAXLINEWIDTH = QuestDockletFrameList:GetWidth() - 62
@@ -273,21 +283,22 @@ local function SetQuestDockEvents()
 		--QWSetAllLevels()
 		WatchFrame.ScrollListUpdate()
 	end
-	WatchFrame.OnShow = function()
-		Collapsed = (WatchFrame.collapsed or false);
-		if WatchFrameHeader == nil then
-			WatchFrame.userCollapsed = true
-		end
-		UserCollapsed = (WatchFrame.userCollapsed or false);
-		if Collapsed then
-			WatchFrame_Collapse(WatchFrame)
-			WatchFrame.userCollapsed=UserCollapsed
-		else
-			WatchFrame_Expand(WatchFrame)
-		end
-		WatchFrame.OnUpdate();
-	end
-	WatchFrame.OnShow()
+	-- WatchFrame.OnShow = function(self)
+	-- 	local WatchFrame = _G.WatchFrame
+	-- 	Collapsed = (WatchFrame.collapsed or false);
+	-- 	if WatchFrameHeader == nil then
+	-- 		WatchFrame.userCollapsed = true
+	-- 	end
+	-- 	UserCollapsed = (WatchFrame.userCollapsed or false);
+	-- 	if Collapsed then
+	-- 		WatchFrame_Collapse(WatchFrame)
+	-- 		WatchFrame.userCollapsed=UserCollapsed
+	-- 	else
+	-- 		WatchFrame_Expand(WatchFrame)
+	-- 	end
+	-- 	WatchFrame.OnUpdate();
+	-- end
+	-- WatchFrame.OnShow()

 	hooksecurefunc("QuestLog_Update", WatchFrame.OnUpdate)
 end
@@ -296,9 +307,9 @@ end
 CORE FUNCTIONS
 ##########################################################
 ]]--
-local QuestDocklet_OnEvent = function(self, event)
+local QuestDocklet_OnEvent = function(self, event, arg)
 	if event == "CVAR_UPDATE" then
-		if action == "WATCH_FRAME_WIDTH_TEXT"then
+		if arg == "WATCH_FRAME_WIDTH_TEXT" then
 			if WatchFrame then
 				WatchFrame.OnUpdate()
 			end
diff --git a/Interface/AddOns/SVUI/scripts/reactions.lua b/Interface/AddOns/SVUI/scripts/reactions.lua
index aa97378..caffc56 100644
--- a/Interface/AddOns/SVUI/scripts/reactions.lua
+++ b/Interface/AddOns/SVUI/scripts/reactions.lua
@@ -238,7 +238,7 @@ local ChatLogHandler_OnEvent = function(self, event, ...)
 			elseif (spellID == 126499 or spellID == 126500) then
 				outbound = (L["%s has prepared a %s - [%s]."]):format(sourceName, GetSpellLink(spellID), SPELL_STAT5_NAME)
 			elseif (spellID == 104958 or spellID == 105193 or spellID == 126503 or spellID == 126504 or spellID == 145166 or spellID == 145169 or spellID == 145196) then
-				outbound = (L["%s has prepared a %s - [%s]."]):format(sourceName, GetSpellLink(spellID))
+				outbound = (L["%s has prepared a %s."]):format(sourceName, GetSpellLink(spellID))
 			-- Refreshment Table
 			elseif spellID == 43987 then
 				outbound = (L["%s has prepared a %s."]):format(sourceName, GetSpellLink(spellID))
diff --git a/Interface/AddOns/SVUI/scripts/spellbind.lua b/Interface/AddOns/SVUI/scripts/spellbind.lua
index 006f15c..22d5eb8 100644
--- a/Interface/AddOns/SVUI/scripts/spellbind.lua
+++ b/Interface/AddOns/SVUI/scripts/spellbind.lua
@@ -26,14 +26,24 @@ local ipairs 	= _G.ipairs;
 local type 		= _G.type;
 local tinsert 	= _G.tinsert;
 local string 	= _G.string;
-
-local SVLib = LibSuperVillain
+--TABLE
+local table         = _G.table;
+local tsort         = table.sort;
+local tconcat       = table.concat;
+local tinsert       = _G.tinsert;
+local tremove       = _G.tremove;
+
+local SVLib = _G.LibSuperVillain
 --[[
 ##########################################################
 Simple click2cast spell SpellBinder(sBinder by Fernir)
 ##########################################################
 ]]--
-ClickCastFrames = _G.ClickCastFrames or {}
+local ClickCastFrames
+do
+	_G.ClickCastFrames = _G.ClickCastFrames or {}
+	ClickCastFrames = _G.ClickCastFrames
+end

 local UnitParseListing = {
 	"PlayerFrame", "PetFrame",
@@ -168,7 +178,7 @@ local SpellBindMask_OnClick = function(self, button)

 			for i, v in pairs(SV.cache.SpellBinder.spells) do if v.spell == spellname then return end end

-			tinsert(SV.cache.SpellBinder.spells, {["id"] = slot, ["modifier"] = modifier, ["button"] = button, ["spell"] = spellname, ["rank"] = rank, ["texture"] = texture, ["origbutton"] = originalbutton,})
+			tinsert(SV.cache.SpellBinder.spells, {["id"] = slot, ["modifier"] = modifier, ["button"] = button, ["spell"] = spellname, ["rank"] = "", ["texture"] = texture, ["origbutton"] = originalbutton,})
 			SpellBinder:BuildSpells(false)
 		end
 	end
@@ -213,7 +223,7 @@ function SpellBinder:BuildSpells(delete)
 	scroll:SetSize(270, 300)

 	if delete then
-		i = 1
+		local i = 1
 		while _G[i.."_cbs"] do
 			_G[i.."_fs"]:SetText("")
 			_G[i.."_texture"]:SetTexture(0,0,0,0)
@@ -386,6 +396,7 @@ local _hook_SpellBookFrame_OnUpdate = function(self)
 end

 local _hook_SpellBookFrame_OnHide = function(self)
+	if not SpellBinder then return end
 	SpellBinder:Hide()
 	SpellBinder.sbOpen = false
 	SpellBinder:ToggleButtons()
diff --git a/Interface/AddOns/SVUI/setup/configs.lua b/Interface/AddOns/SVUI/setup/configs.lua
index fc10475..0cb41f9 100644
--- a/Interface/AddOns/SVUI/setup/configs.lua
+++ b/Interface/AddOns/SVUI/setup/configs.lua
@@ -350,7 +350,7 @@ SV.configs["SVBar"] = {
 		["mouseover"] = false,
 		["buttons"] = NUM_STANCE_SLOTS,
 		["buttonsPerRow"] = NUM_STANCE_SLOTS,
-		["point"] = "BOTTOMRIGHT",
+		["point"] = "BOTTOMLEFT",
 		["backdrop"] = false,
 		["buttonsize"] = 24,
 		["buttonspacing"] = 5,
diff --git a/Interface/AddOns/SVUI/setup/installer.lua b/Interface/AddOns/SVUI/setup/installer.lua
index 3ab0d4e..cf4385e 100644
--- a/Interface/AddOns/SVUI/setup/installer.lua
+++ b/Interface/AddOns/SVUI/setup/installer.lua
@@ -18,9 +18,20 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack 	= _G.unpack;
-local select 	= _G.select;
-local type 		= _G.type;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
 local string 	= _G.string;
 local table     = _G.table;
 local format = string.format;
@@ -31,7 +42,7 @@ GET ADDON DATA
 ##########################################################
 ]]--
 local SV = select(2, ...)
-local SVLib = LibSuperVillain;
+local SVLib = _G.LibSuperVillain;
 local L = SV.L;
 --[[
 ##########################################################
@@ -51,6 +62,9 @@ local rcc = RAID_CLASS_COLORS[SV.class];
 local r2 = .1 + (rcc.r * .1)
 local g2 = .1 + (rcc.g * .1)
 local b2 = .1 + (rcc.b * .1)
+local SetCVar = _G.SetCVar;
+local ToggleChatColorNamesByClassGroup = _G.ToggleChatColorNamesByClassGroup;
+local ChatFrame_AddMessageGroup = _G.ChatFrame_AddMessageGroup;
 --[[
 ##########################################################
 SETUP CLASS OBJECT
@@ -291,13 +305,21 @@ end

 function SV.Setup:ChatConfigs(mungs)
 	forceCVars()
+
+	local ChatFrame1 = _G.ChatFrame1;
 	FCF_ResetChatWindows()
 	FCF_SetLocked(ChatFrame1, 1)
+
+	local ChatFrame2 = _G.ChatFrame2;
 	FCF_DockFrame(ChatFrame2)
 	FCF_SetLocked(ChatFrame2, 1)
+
 	FCF_OpenNewWindow(LOOT)
+
+	local ChatFrame3 = _G.ChatFrame3;
 	FCF_DockFrame(ChatFrame3)
 	FCF_SetLocked(ChatFrame3, 1)
+
 	for i = 1, NUM_CHAT_WINDOWS do
 		local chat = _G["ChatFrame"..i]
 		local chatID = chat:GetID()
diff --git a/Interface/AddOns/SVUI/setup/presets.lua b/Interface/AddOns/SVUI/setup/presets.lua
index a2d61a8..ecb2a56 100644
--- a/Interface/AddOns/SVUI/setup/presets.lua
+++ b/Interface/AddOns/SVUI/setup/presets.lua
@@ -18,9 +18,20 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack 	= _G.unpack;
-local select 	= _G.select;
-local type 		= _G.type;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
 local string 	= _G.string;
 local table     = _G.table;
 local format = string.format;
@@ -31,7 +42,7 @@ GET ADDON DATA
 ##########################################################
 ]]--
 local SV = select(2, ...)
-local SVLib = LibSuperVillain
+local SVLib = _G.LibSuperVillain
 local L = SV.L;
 --[[
 ##########################################################
@@ -40,6 +51,11 @@ LOCAL VARS
 ]]--
 local SVUI_CLASS_COLORS = _G.SVUI_CLASS_COLORS
 local RAID_CLASS_COLORS = _G.RAID_CLASS_COLORS
+
+local CONTINUED = _G.CONTINUED
+local SETTINGS = _G.SETTINGS
+local HIGH = _G.HIGH
+local LOW = _G.LOW
 local scc = SVUI_CLASS_COLORS[SV.class];
 local rcc = RAID_CLASS_COLORS[SV.class];
 local r2 = .1 + (rcc.r * .1)
diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua
index f8197a2..a1228e1 100644
--- a/Interface/AddOns/SVUI/system/alerts.lua
+++ b/Interface/AddOns/SVUI/system/alerts.lua
@@ -42,7 +42,7 @@ GET ADDON DATA
 ##########################################################
 ]]--
 local SV = select(2, ...)
-local SVLib = LibSuperVillain;
+local SVLib = _G.LibSuperVillain;
 local L = SV.L;
 --[[
 ##########################################################
@@ -126,7 +126,7 @@ SV.SystemAlert["DELETE_GRAYS"] = {
 	button1 = YES,
 	button2 = NO,
 	OnAccept = function()SV.SVBag:VendorGrays(true) end,
-	OnShow = function(a)MoneyFrame_Update(a.moneyFrame, SV.SystemAlert["DELETE_GRAYS"].Money)end,
+	OnShow = function(self)MoneyFrame_Update(self.moneyFrame, SV.SystemAlert["DELETE_GRAYS"].Money)end,
 	timeout = 0,
 	whileDead = 1,
 	hideOnEscape = false,
@@ -136,8 +136,25 @@ SV.SystemAlert["BUY_BANK_SLOT"] = {
 	text = CONFIRM_BUY_BANK_SLOT,
 	button1 = YES,
 	button2 = NO,
-	OnAccept = function(a)PurchaseSlot()end,
-	OnShow = function(a)MoneyFrame_Update(a.moneyFrame, GetBankSlotCost())end,
+	OnAccept = function(self)PurchaseSlot()end,
+	OnShow = function(self)MoneyFrame_Update(self.moneyFrame, GetBankSlotCost())end,
+	hasMoneyFrame = 1,
+	timeout = 0,
+	hideOnEscape = 1
+};
+SV.SystemAlert["CONFIRM_BUY_REAGENTBANK_TAB"] = {
+	text = L["Purchase Reagents Bank?"],
+	button1 = YES,
+	button2 = NO,
+	OnAccept = function(self)BuyReagentBank()end,
+	OnShow = function(self)
+		MoneyFrame_Update(self.moneyFrame, GetReagentBankCost());
+		if(_G["SVUI_ReagentContainerFrame"]) then
+			_G["SVUI_ReagentContainerFrame"].swapButton:SetNormalTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-REAGENTS]])
+			_G["SVUI_ReagentContainerFrame"]:UpdateLayout()
+			_G["SVUI_ReagentContainerFrame"]:Show()
+		end
+	end,
 	hasMoneyFrame = 1,
 	timeout = 0,
 	hideOnEscape = 1
@@ -821,8 +838,8 @@ local function rng()
 end

 local function SetConfigAlertAnim(f)
-	local x = x or 50;
-	local y = y or 150;
+	local x = 50;
+	local y = 150;
 	f.trans = f:CreateAnimationGroup()
 	f.trans[1] = f.trans:CreateAnimation("Translation")
 	f.trans[1]:SetOrder(1)
@@ -873,6 +890,7 @@ function SV:LoadSystemAlerts()
 		configAlert:Size(300, 300)
 		configAlert:Point("CENTER", 200, -150)
 		configAlert:Hide()
+
 		configAlert.bg = CreateFrame("Frame", nil, configAlert)
 		configAlert.bg:Size(300, 300)
 		configAlert.bg:Point("CENTER")
@@ -881,6 +899,8 @@ function SV:LoadSystemAlerts()
 		local bgtex = configAlert.bg:CreateTexture(nil, "BACKGROUND")
 		bgtex:SetAllPoints()
 		bgtex:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\SAVED-BG")
+		SetConfigAlertAnim(configAlert.bg)
+
 		configAlert.fg = CreateFrame("Frame", nil, configAlert)
 		configAlert.fg:Size(300, 300)
 		configAlert.fg:Point("CENTER", bgtex, "CENTER")
@@ -889,8 +909,8 @@ function SV:LoadSystemAlerts()
 		local fgtex = configAlert.fg:CreateTexture(nil, "ARTWORK")
 		fgtex:SetAllPoints()
 		fgtex:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\SAVED-FG")
-		SetConfigAlertAnim(configAlert.bg, configAlert)
-		SetConfigAlertAnim(configAlert.fg, configAlert)
+		SetConfigAlertAnim(configAlert.fg)
+
 		SV.Animate:Orbit(configAlert.bg, 10, false, true)
 	end
 	for i = 1, 4 do
diff --git a/Interface/AddOns/SVUI/system/animate.lua b/Interface/AddOns/SVUI/system/animate.lua
index 5208c28..c5e5d0a 100644
--- a/Interface/AddOns/SVUI/system/animate.lua
+++ b/Interface/AddOns/SVUI/system/animate.lua
@@ -155,7 +155,7 @@ end

 local Slide_FadeStart = function(self)
 	local parent = self.parent
-	UIFrameFadeOut(parent, 0.3, 1, 0)
+	_G.UIFrameFadeOut(parent, 0.3, 1, 0)
 end

 local Slide_FadeStop = function(self)
diff --git a/Interface/AddOns/SVUI/system/common.lua b/Interface/AddOns/SVUI/system/common.lua
index 8dca0d5..bd4b3b1 100644
--- a/Interface/AddOns/SVUI/system/common.lua
+++ b/Interface/AddOns/SVUI/system/common.lua
@@ -169,6 +169,15 @@ function SV:ScreenCalibration(event)
         self.ActualWidth = self.UIParent:GetWidth()
     end
 end
+
+local function scaled(value)
+    if(not SCREEN_MOD) then
+        SV:ScreenCalibration()
+    end
+    return SCREEN_MOD * floor(value / SCREEN_MOD + .5);
+end
+
+SV.Scale = scaled
 --[[
 ##########################################################
 APPENDED POSITIONING METHODS
@@ -177,13 +186,6 @@ APPENDED POSITIONING METHODS
 do
     local PARAMS = {}

-    local function scaled(value)
-        if(not SCREEN_MOD) then
-            SV:ScreenCalibration()
-        end
-        return SCREEN_MOD * floor(value / SCREEN_MOD + .5);
-    end
-
     function SizeScaled(self, width, height)
         if(type(width) == "number") then
             local h = (height and type(height) == "number") and height or width
@@ -240,7 +242,7 @@ do
         end
         self:SetPoint("TOPLEFT", parent, "TOPLEFT", nx, -ny)
         self:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT", -nx, ny)
-    end
+    end
 end
 --[[
 ##########################################################
@@ -857,10 +859,10 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd
         needsHooks = true

         local panel = NewFrame('Frame', nil, frame)
-        panel:Point('TOPLEFT', frame, 'TOPLEFT', (xOffset * -1), yOffset)
-        panel:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', xOffset, (yOffset * -1))
+        panel:SetPoint('TOPLEFT', frame, 'TOPLEFT', (xOffset * -1), yOffset)
+        panel:SetPoint('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', xOffset, yOffset * -1)

-        if(padding > 0 and type(t) == 'table') then
+        if(padding > 0) then
             panel[1] = panel:CreateTexture(nil,"BORDER")
             panel[1]:SetTexture(0,0,0)
             panel[1]:SetPoint("TOPLEFT")
@@ -903,12 +905,12 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd
         if(not frame.Panel[5]) then
             if(underlay) then
                 frame.Panel[5] = NewFrame('Frame', nil, frame.Panel)
-                frame.Panel[5]:Point('TOPLEFT', frame.Panel, 'TOPLEFT', -3, 3)
-                frame.Panel[5]:Point('BOTTOMRIGHT', frame.Panel, 'BOTTOMRIGHT', 3, -3)
+                frame.Panel[5]:SetPoint('TOPLEFT', frame.Panel, 'TOPLEFT', -3, 3)
+                frame.Panel[5]:SetPoint('BOTTOMRIGHT', frame.Panel, 'BOTTOMRIGHT', 3, -3)
             else
                 frame.Panel[5] = NewFrame('Frame', nil, frame)
-                frame.Panel[5]:Point('TOPLEFT', frame, 'TOPLEFT', -3, 3)
-                frame.Panel[5]:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', 3, -3)
+                frame.Panel[5]:SetPoint('TOPLEFT', frame, 'TOPLEFT', -3, 3)
+                frame.Panel[5]:SetPoint('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', 3, -3)
             end
         end

diff --git a/Interface/AddOns/SVUI/system/load.lua b/Interface/AddOns/SVUI/system/load.lua
index c9c5db0..bf48f8a 100644
--- a/Interface/AddOns/SVUI/system/load.lua
+++ b/Interface/AddOns/SVUI/system/load.lua
@@ -36,7 +36,7 @@ GET ADDON DATA
 ##########################################################
 ]]--
 local SV = select(2, ...)
-local SVLib = LibSuperVillain
+local SVLib = _G.LibSuperVillain
 local L = SV.L
 --[[
 ##########################################################
diff --git a/Interface/AddOns/SVUI/system/media.lua b/Interface/AddOns/SVUI/system/media.lua
index 9a620c8..cc169e0 100644
--- a/Interface/AddOns/SVUI/system/media.lua
+++ b/Interface/AddOns/SVUI/system/media.lua
@@ -19,6 +19,7 @@ LOCALIZED LUA FUNCTIONS
 --[[ GLOBALS ]]--
 local _G = _G;
 local select  = _G.select;
+local unpack  = _G.unpack;
 local pairs   = _G.pairs;
 local ipairs  = _G.ipairs;
 local type    = _G.type;
@@ -38,7 +39,7 @@ GET ADDON DATA
 ##########################################################
 ]]--
 local SV = select(2, ...)
-local SVLib = LibSuperVillain
+local SVLib = _G.LibSuperVillain
 local L = SV.L
 local LSM = LibStub("LibSharedMedia-3.0")
 --[[
@@ -46,18 +47,23 @@ local LSM = LibStub("LibSharedMedia-3.0")
 LOCALIZED GLOBALS
 ##########################################################
 ]]--
-local STANDARD_TEXT_FONT = _G.STANDARD_TEXT_FONT
-local UNIT_NAME_FONT = _G.UNIT_NAME_FONT
-local DAMAGE_TEXT_FONT = _G.DAMAGE_TEXT_FONT
-local SVUI_CLASS_COLORS = _G.SVUI_CLASS_COLORS
-local RAID_CLASS_COLORS = _G.RAID_CLASS_COLORS
+local NAMEPLATE_FONT      = _G.NAMEPLATE_FONT
+local CHAT_FONT_HEIGHTS   = _G.CHAT_FONT_HEIGHTS
+local STANDARD_TEXT_FONT  = _G.STANDARD_TEXT_FONT
+local UNIT_NAME_FONT      = _G.UNIT_NAME_FONT
+local DAMAGE_TEXT_FONT    = _G.DAMAGE_TEXT_FONT
+local SVUI_CLASS_COLORS   = _G.SVUI_CLASS_COLORS
+local RAID_CLASS_COLORS   = _G.RAID_CLASS_COLORS
+local UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT  = _G.UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT
 --[[
 ##########################################################
 PRE VARS/FUNCTIONS
 ##########################################################
 ]]--
-local function SetFont(fontObject, font, fontSize, fontOutline, fontAlpha, color, shadowColor, offsetX, offsetY)
-  if not font then return end
+local function SetFont(globalName, font, fontSize, fontOutline, fontAlpha, color, shadowColor, offsetX, offsetY)
+  if not font then return end
+  local fontObject = _G[globalName]
+  if not fontObject then return end
   fontObject:SetFont(font,fontSize,fontOutline);
   if fontAlpha then
     fontObject:SetAlpha(fontAlpha)
@@ -272,62 +278,58 @@ function SV:RefreshSystemFonts()
   CHAT_FONT_HEIGHTS = {8,9,10,11,12,13,14,15,16,17,18,19,20}
   UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = fontsize

-  -- SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32)
-  -- SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE")
-  -- SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE")
-
-  SetFont(QuestFont_Large, UNIT_NAME_FONT, fontsize+4)
-  SetFont(ZoneTextString, UNIT_NAME_FONT, fontsize*4.2, "OUTLINE")
-  SetFont(SubZoneTextString, UNIT_NAME_FONT, fontsize*3.2, "OUTLINE")
-  SetFont(PVPInfoTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE")
-  SetFont(PVPArenaTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE")
-  SetFont(SystemFont_Shadow_Outline_Huge2, UNIT_NAME_FONT, fontsize*1.8, "OUTLINE")
-
-  SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER_TEXT_FONT, fontsize, "OUTLINE")
-  SetFont(NumberFont_Outline_Huge, NUMBER_TEXT_FONT, fontsize*2, "THICKOUTLINE", 28)
-  SetFont(NumberFont_Outline_Large, NUMBER_TEXT_FONT, fontsize+4, "OUTLINE")
-  SetFont(NumberFont_Outline_Med, NUMBER_TEXT_FONT, fontsize+2, "OUTLINE")
-  SetFont(NumberFontNormal, NUMBER_TEXT_FONT, fontsize, "OUTLINE")
-
-  SetFont(GameFontHighlight, STANDARD_TEXT_FONT, fontsize)
-  SetFont(GameFontWhite, STANDARD_TEXT_FONT, fontsize, 'OUTLINE', 1, {1,1,1})
-  SetFont(GameFontWhiteSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {1,1,1})
-  SetFont(GameFontBlack, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0})
-  SetFont(GameFontBlackSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0})
-  SetFont(GameFontNormal, STANDARD_TEXT_FONT, fontsize)
-  SetFont(QuestFont, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Large, STANDARD_TEXT_FONT, fontsize+2)
-  SetFont(GameFontNormalMed3, STANDARD_TEXT_FONT, fontsize+1)
-  SetFont(SystemFont_Med1, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Med3, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Outline_Small, STANDARD_TEXT_FONT, fontsize, "OUTLINE")
-  SetFont(SystemFont_Shadow_Large, STANDARD_TEXT_FONT, fontsize+2)
-  SetFont(SystemFont_Shadow_Med1, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Shadow_Med3, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Shadow_Small, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Small, STANDARD_TEXT_FONT, fontsize)
-  SetFont(FriendsFont_Normal, STANDARD_TEXT_FONT, fontsize)
-  SetFont(FriendsFont_Small, STANDARD_TEXT_FONT, fontsize-2)
-  SetFont(FriendsFont_Large, STANDARD_TEXT_FONT, fontsize)
-  SetFont(FriendsFont_UserText, STANDARD_TEXT_FONT, fontsize)
-
-  SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32)
-  SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, 200, "OUTLINE")
-  SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, 200, "THICKOUTLINE")
-
-  SetFont(SystemFont_Shadow_Huge3, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE")
-  SetFont(CombatTextFont, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE")
+  SetFont("QuestFont_Large", UNIT_NAME_FONT, fontsize+4)
+  SetFont("ZoneTextString", UNIT_NAME_FONT, fontsize*4.2, "OUTLINE")
+  SetFont("SubZoneTextString", UNIT_NAME_FONT, fontsize*3.2, "OUTLINE")
+  SetFont("PVPInfoTextString", UNIT_NAME_FONT, fontsize*1.9, "OUTLINE")
+  SetFont("PVPArenaTextString", UNIT_NAME_FONT, fontsize*1.9, "OUTLINE")
+  SetFont("SystemFont_Shadow_Outline_Huge2", UNIT_NAME_FONT, fontsize*1.8, "OUTLINE")
+
+  SetFont("NumberFont_OutlineThick_Mono_Small", NUMBER_TEXT_FONT, fontsize, "OUTLINE")
+  SetFont("NumberFont_Outline_Huge", NUMBER_TEXT_FONT, fontsize*2, "THICKOUTLINE", 28)
+  SetFont("NumberFont_Outline_Large", NUMBER_TEXT_FONT, fontsize+4, "OUTLINE")
+  SetFont("NumberFont_Outline_Med", NUMBER_TEXT_FONT, fontsize+2, "OUTLINE")
+  SetFont("NumberFontNormal", NUMBER_TEXT_FONT, fontsize, "OUTLINE")
+
+  SetFont("GameFontHighlight", STANDARD_TEXT_FONT, fontsize)
+  SetFont("GameFontWhite", STANDARD_TEXT_FONT, fontsize, 'OUTLINE', 1, {1,1,1})
+  SetFont("GameFontWhiteSmall", STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {1,1,1})
+  SetFont("GameFontBlack", STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0})
+  SetFont("GameFontBlackSmall", STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0})
+  SetFont("GameFontNormal", STANDARD_TEXT_FONT, fontsize)
+  SetFont("QuestFont", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Large", STANDARD_TEXT_FONT, fontsize+2)
+  SetFont("GameFontNormalMed3", STANDARD_TEXT_FONT, fontsize+1)
+  SetFont("SystemFont_Med1", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Med3", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Outline_Small", STANDARD_TEXT_FONT, fontsize, "OUTLINE")
+  SetFont("SystemFont_Shadow_Large", STANDARD_TEXT_FONT, fontsize+2)
+  SetFont("SystemFont_Shadow_Med1", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Shadow_Med3", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Shadow_Small", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Small", STANDARD_TEXT_FONT, fontsize)
+  SetFont("FriendsFont_Normal", STANDARD_TEXT_FONT, fontsize)
+  SetFont("FriendsFont_Small", STANDARD_TEXT_FONT, fontsize-2)
+  SetFont("FriendsFont_Large", STANDARD_TEXT_FONT, fontsize)
+  SetFont("FriendsFont_UserText", STANDARD_TEXT_FONT, fontsize)
+
+  SetFont("GameFont_Gigantic", GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32)
+  SetFont("SystemFont_Shadow_Huge1", GIANT_TEXT_FONT, 200, "OUTLINE")
+  SetFont("SystemFont_OutlineThick_Huge2", GIANT_TEXT_FONT, 200, "THICKOUTLINE")
+
+  SetFont("SystemFont_Shadow_Huge3", DAMAGE_TEXT_FONT, 200, "THICKOUTLINE")
+  SetFont("CombatTextFont", DAMAGE_TEXT_FONT, 200, "THICKOUTLINE")

   local UNICODE_FONT = self.Media.font.roboto;

-  SetFont(GameTooltipHeader, UNICODE_FONT, unicodesize+2)
-  SetFont(Tooltip_Med, UNICODE_FONT, unicodesize)
-  SetFont(Tooltip_Small, UNICODE_FONT, unicodesize)
-  SetFont(GameFontNormalSmall, UNICODE_FONT, unicodesize)
-  SetFont(GameFontHighlightSmall, UNICODE_FONT, unicodesize)
-  SetFont(NumberFont_Shadow_Med, UNICODE_FONT, unicodesize)
-  SetFont(NumberFont_Shadow_Small, UNICODE_FONT, unicodesize)
-  SetFont(SystemFont_Tiny, UNICODE_FONT, unicodesize)
+  SetFont("GameTooltipHeader", UNICODE_FONT, unicodesize+2)
+  SetFont("Tooltip_Med", UNICODE_FONT, unicodesize)
+  SetFont("Tooltip_Small", UNICODE_FONT, unicodesize)
+  SetFont("GameFontNormalSmall", UNICODE_FONT, unicodesize)
+  SetFont("GameFontHighlightSmall", UNICODE_FONT, unicodesize)
+  SetFont("NumberFont_Shadow_Med", UNICODE_FONT, unicodesize, "OUTLINE")
+  SetFont("NumberFont_Shadow_Small", UNICODE_FONT, unicodesize, "OUTLINE")
+  SetFont("SystemFont_Tiny", UNICODE_FONT, unicodesize)

   self:UpdateFontTemplates()
 end
@@ -345,62 +347,58 @@ function SV:RefreshAllSystemMedia()
   CHAT_FONT_HEIGHTS = {8,9,10,11,12,13,14,15,16,17,18,19,20}
   UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = fontsize

-  -- SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32)
-  -- SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE")
-  -- SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE")
-
-  SetFont(QuestFont_Large, UNIT_NAME_FONT, fontsize+4)
-  SetFont(ZoneTextString, UNIT_NAME_FONT, fontsize*4.2, "OUTLINE")
-  SetFont(SubZoneTextString, UNIT_NAME_FONT, fontsize*3.2, "OUTLINE")
-  SetFont(PVPInfoTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE")
-  SetFont(PVPArenaTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE")
-  SetFont(SystemFont_Shadow_Outline_Huge2, UNIT_NAME_FONT, fontsize*1.8, "OUTLINE")
-
-  SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER_TEXT_FONT, fontsize, "OUTLINE")
-  SetFont(NumberFont_Outline_Huge, NUMBER_TEXT_FONT, fontsize*2, "THICKOUTLINE", 28)
-  SetFont(NumberFont_Outline_Large, NUMBER_TEXT_FONT, fontsize+4, "OUTLINE")
-  SetFont(NumberFont_Outline_Med, NUMBER_TEXT_FONT, fontsize+2, "OUTLINE")
-  SetFont(NumberFontNormal, NUMBER_TEXT_FONT, fontsize, "OUTLINE")
-
-  SetFont(GameFontHighlight, STANDARD_TEXT_FONT, fontsize)
-  SetFont(GameFontWhite, STANDARD_TEXT_FONT, fontsize, 'OUTLINE', 1, {1,1,1})
-  SetFont(GameFontWhiteSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {1,1,1})
-  SetFont(GameFontBlack, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0})
-  SetFont(GameFontBlackSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0})
-  SetFont(GameFontNormal, STANDARD_TEXT_FONT, fontsize)
-  SetFont(QuestFont, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Large, STANDARD_TEXT_FONT, fontsize+2)
-  SetFont(GameFontNormalMed3, STANDARD_TEXT_FONT, fontsize+1)
-  SetFont(SystemFont_Med1, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Med3, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Outline_Small, STANDARD_TEXT_FONT, fontsize, "OUTLINE")
-  SetFont(SystemFont_Shadow_Large, STANDARD_TEXT_FONT, fontsize+2)
-  SetFont(SystemFont_Shadow_Med1, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Shadow_Med3, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Shadow_Small, STANDARD_TEXT_FONT, fontsize)
-  SetFont(SystemFont_Small, STANDARD_TEXT_FONT, fontsize)
-  SetFont(FriendsFont_Normal, STANDARD_TEXT_FONT, fontsize)
-  SetFont(FriendsFont_Small, STANDARD_TEXT_FONT, fontsize-2)
-  SetFont(FriendsFont_Large, STANDARD_TEXT_FONT, fontsize)
-  SetFont(FriendsFont_UserText, STANDARD_TEXT_FONT, fontsize)
-
-  SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32)
-  SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, 200, "OUTLINE")
-  SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, 200, "THICKOUTLINE")
-
-  SetFont(SystemFont_Shadow_Huge3, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE")
-  SetFont(CombatTextFont, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE")
+  SetFont("QuestFont_Large", UNIT_NAME_FONT, fontsize+4)
+  SetFont("ZoneTextString", UNIT_NAME_FONT, fontsize*4.2, "OUTLINE")
+  SetFont("SubZoneTextString", UNIT_NAME_FONT, fontsize*3.2, "OUTLINE")
+  SetFont("PVPInfoTextString", UNIT_NAME_FONT, fontsize*1.9, "OUTLINE")
+  SetFont("PVPArenaTextString", UNIT_NAME_FONT, fontsize*1.9, "OUTLINE")
+  SetFont("SystemFont_Shadow_Outline_Huge2", UNIT_NAME_FONT, fontsize*1.8, "OUTLINE")
+
+  SetFont("NumberFont_OutlineThick_Mono_Small", NUMBER_TEXT_FONT, fontsize, "OUTLINE")
+  SetFont("NumberFont_Outline_Huge", NUMBER_TEXT_FONT, fontsize*2, "THICKOUTLINE", 28)
+  SetFont("NumberFont_Outline_Large", NUMBER_TEXT_FONT, fontsize+4, "OUTLINE")
+  SetFont("NumberFont_Outline_Med", NUMBER_TEXT_FONT, fontsize+2, "OUTLINE")
+  SetFont("NumberFontNormal", NUMBER_TEXT_FONT, fontsize, "OUTLINE")
+
+  SetFont("GameFontHighlight", STANDARD_TEXT_FONT, fontsize)
+  SetFont("GameFontWhite", STANDARD_TEXT_FONT, fontsize, 'OUTLINE', 1, {1,1,1})
+  SetFont("GameFontWhiteSmall", STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {1,1,1})
+  SetFont("GameFontBlack", STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0})
+  SetFont("GameFontBlackSmall", STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0})
+  SetFont("GameFontNormal", STANDARD_TEXT_FONT, fontsize)
+  SetFont("QuestFont", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Large", STANDARD_TEXT_FONT, fontsize+2)
+  SetFont("GameFontNormalMed3", STANDARD_TEXT_FONT, fontsize+1)
+  SetFont("SystemFont_Med1", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Med3", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Outline_Small", STANDARD_TEXT_FONT, fontsize, "OUTLINE")
+  SetFont("SystemFont_Shadow_Large", STANDARD_TEXT_FONT, fontsize+2)
+  SetFont("SystemFont_Shadow_Med1", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Shadow_Med3", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Shadow_Small", STANDARD_TEXT_FONT, fontsize)
+  SetFont("SystemFont_Small", STANDARD_TEXT_FONT, fontsize)
+  SetFont("FriendsFont_Normal", STANDARD_TEXT_FONT, fontsize)
+  SetFont("FriendsFont_Small", STANDARD_TEXT_FONT, fontsize-2)
+  SetFont("FriendsFont_Large", STANDARD_TEXT_FONT, fontsize)
+  SetFont("FriendsFont_UserText", STANDARD_TEXT_FONT, fontsize)
+
+  SetFont("GameFont_Gigantic", GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32)
+  SetFont("SystemFont_Shadow_Huge1", GIANT_TEXT_FONT, 200, "OUTLINE")
+  SetFont("SystemFont_OutlineThick_Huge2", GIANT_TEXT_FONT, 200, "THICKOUTLINE")
+
+  SetFont("SystemFont_Shadow_Huge3", DAMAGE_TEXT_FONT, 200, "THICKOUTLINE")
+  SetFont("CombatTextFont", DAMAGE_TEXT_FONT, 200, "THICKOUTLINE")

   local UNICODE_FONT = self.Media.font.roboto;

-  SetFont(GameTooltipHeader, UNICODE_FONT, unicodesize+2)
-  SetFont(Tooltip_Med, UNICODE_FONT, unicodesize)
-  SetFont(Tooltip_Small, UNICODE_FONT, unicodesize)
-  SetFont(GameFontNormalSmall, UNICODE_FONT, unicodesize)
-  SetFont(GameFontHighlightSmall, UNICODE_FONT, unicodesize)
-  SetFont(NumberFont_Shadow_Med, UNICODE_FONT, unicodesize)
-  SetFont(NumberFont_Shadow_Small, UNICODE_FONT, unicodesize)
-  SetFont(SystemFont_Tiny, UNICODE_FONT, unicodesize)
+  SetFont("GameTooltipHeader", UNICODE_FONT, unicodesize+2)
+  SetFont("Tooltip_Med", UNICODE_FONT, unicodesize)
+  SetFont("Tooltip_Small", UNICODE_FONT, unicodesize)
+  SetFont("GameFontNormalSmall", UNICODE_FONT, unicodesize)
+  SetFont("GameFontHighlightSmall", UNICODE_FONT, unicodesize)
+  SetFont("NumberFont_Shadow_Med", UNICODE_FONT, unicodesize)
+  SetFont("NumberFont_Shadow_Small", UNICODE_FONT, unicodesize)
+  SetFont("SystemFont_Tiny", UNICODE_FONT, unicodesize)

   self:MediaUpdate()
   self.MediaInitialized = true
@@ -413,22 +411,22 @@ INIT SOME COMBAT FONTS
 do
   local fontFile = "Interface\\AddOns\\SVUI\\assets\\fonts\\Combat.ttf"

-  DAMAGE_TEXT_FONT = fontFile
-  NUM_COMBAT_TEXT_LINES = 20;
-  COMBAT_TEXT_SCROLLSPEED = 1.0;
-  COMBAT_TEXT_FADEOUT_TIME = 1.0;
-  COMBAT_TEXT_HEIGHT = 18;
-  COMBAT_TEXT_CRIT_MAXHEIGHT = 2.0;
-  COMBAT_TEXT_CRIT_MINHEIGHT = 1.2;
-  COMBAT_TEXT_CRIT_SCALE_TIME = 0.7;
-  COMBAT_TEXT_CRIT_SHRINKTIME = 0.2;
-  COMBAT_TEXT_TO_ANIMATE = {};
-  COMBAT_TEXT_STAGGER_RANGE = 20;
-  COMBAT_TEXT_SPACING = 7;
-  COMBAT_TEXT_MAX_OFFSET = 130;
-  COMBAT_TEXT_LOW_HEALTH_THRESHOLD = 0.2;
-  COMBAT_TEXT_LOW_MANA_THRESHOLD = 0.2;
-  COMBAT_TEXT_LOCATIONS = {};
+  _G.DAMAGE_TEXT_FONT = fontFile
+  _G.NUM_COMBAT_TEXT_LINES = 20;
+  _G.COMBAT_TEXT_SCROLLSPEED = 1.0;
+  _G.COMBAT_TEXT_FADEOUT_TIME = 1.0;
+  _G.COMBAT_TEXT_HEIGHT = 18;
+  _G.COMBAT_TEXT_CRIT_MAXHEIGHT = 2.0;
+  _G.COMBAT_TEXT_CRIT_MINHEIGHT = 1.2;
+  _G.COMBAT_TEXT_CRIT_SCALE_TIME = 0.7;
+  _G.COMBAT_TEXT_CRIT_SHRINKTIME = 0.2;
+  _G.COMBAT_TEXT_TO_ANIMATE = {};
+  _G.COMBAT_TEXT_STAGGER_RANGE = 20;
+  _G.COMBAT_TEXT_SPACING = 7;
+  _G.COMBAT_TEXT_MAX_OFFSET = 130;
+  _G.COMBAT_TEXT_LOW_HEALTH_THRESHOLD = 0.2;
+  _G.COMBAT_TEXT_LOW_MANA_THRESHOLD = 0.2;
+  _G.COMBAT_TEXT_LOCATIONS = {};

   local fName, fHeight, fFlags = CombatTextFont:GetFont()

diff --git a/Interface/AddOns/SVUI/system/mentalo.lua b/Interface/AddOns/SVUI/system/mentalo.lua
index ca44714..209dba8 100644
--- a/Interface/AddOns/SVUI/system/mentalo.lua
+++ b/Interface/AddOns/SVUI/system/mentalo.lua
@@ -18,9 +18,15 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack 	= _G.unpack;
-local select 	= _G.select;
-local type 		= _G.type;
+local unpack    = _G.unpack;
+local select    = _G.select;
+local pairs     = _G.pairs;
+local ipairs    = _G.ipairs;
+local type      = _G.type;
+local error     = _G.error;
+local pcall     = _G.pcall;
+local tostring  = _G.tostring;
+local tonumber  = _G.tonumber;
 local string 	= _G.string;
 local math 		= _G.math;
 --[[ STRING METHODS ]]--
@@ -463,8 +469,8 @@ local Movable_OnDragStop = function(self)
 	MentaloUpdateHandler:SetScript("OnUpdate", nil)
 	MentaloUpdateHandler:Hide()

-	if(dragStopFunc ~= nil and type(dragStopFunc) == "function") then
-		dragStopFunc(self, Pinpoint(self))
+	if(self.postdrag ~= nil and type(self.postdrag) == "function") then
+		self:postdrag(Pinpoint(self))
 	end
 	self:SetUserPlaced(false)
 	TheHand:Disable()
@@ -669,7 +675,7 @@ function Mentalo:Reset(request)
 			end
 		end
 		if(SV.cache.Anchors) then
-			SV.cache.Anchors = {}
+			wipe(SV.cache.Anchors)
 		end
 	else
 		for name, _ in pairs(self.Frames)do
diff --git a/Interface/AddOns/SVUI/system/moveable.lua b/Interface/AddOns/SVUI/system/moveable.lua
index 9a32207..7426602 100644
--- a/Interface/AddOns/SVUI/system/moveable.lua
+++ b/Interface/AddOns/SVUI/system/moveable.lua
@@ -21,6 +21,7 @@ local _G = _G;
 local unpack 	= _G.unpack;
 local select 	= _G.select;
 local type 		= _G.type;
+local pairs     = _G.pairs;
 local string 	= _G.string;
 local math 		= _G.math;
 --[[ STRING METHODS ]]--
diff --git a/Interface/AddOns/SVUI/system/slash.lua b/Interface/AddOns/SVUI/system/slash.lua
index efe033d..49d4393 100644
--- a/Interface/AddOns/SVUI/system/slash.lua
+++ b/Interface/AddOns/SVUI/system/slash.lua
@@ -13,6 +13,46 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local select  		= _G.select;
+local unpack  		= _G.unpack;
+local pairs   		= _G.pairs;
+local ipairs  		= _G.ipairs;
+local type    		= _G.type;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local print         = _G.print;
+local string  		= _G.string;
+local math    		= _G.math;
+local table   		= _G.table;
+local GetTime 		= _G.GetTime;
+--[[ STRING METHODS ]]--
+local format = string.format;
+local lower, trim = string.lower, string.trim
+--[[ MATH METHODS ]]--
+local floor, modf = math.floor, math.modf;
+--[[ TABLE METHODS ]]--
+local twipe, tsort = table.wipe, table.sort;
+--BLIZZARD API
+local ReloadUI              = _G.ReloadUI;
+local UnitName   			= _G.UnitName;
+local IsInGroup             = _G.IsInGroup;
+local CreateFrame           = _G.CreateFrame;
+local IsInRaid         		= _G.IsInRaid;
+local UnitIsGroupLeader     = _G.UnitIsGroupLeader;
+local GetAddOnInfo          = _G.GetAddOnInfo;
+local UnitIsGroupAssistant  = _G.UnitIsGroupAssistant;
+local EnableAddOn           = _G.EnableAddOn;
+local DisableAddOn          = _G.DisableAddOn;
+local IsEveryoneAssistant   = _G.IsEveryoneAssistant;
+local GetAddOnMetadata      = _G.GetAddOnMetadata;
+local SendChatMessage   	= _G.SendChatMessage;
+local PlaySoundFile   		= _G.PlaySoundFile;
+
+local LE_PARTY_CATEGORY_HOME = _G.LE_PARTY_CATEGORY_HOME;
+local LE_PARTY_CATEGORY_INSTANCE = _G.LE_PARTY_CATEGORY_INSTANCE;
+
 local SV = select(2, ...)
 local L = SV.L;
 --[[
@@ -20,8 +60,6 @@ local L = SV.L;
 LOCAL VARS
 ##########################################################
 ]]--
-local lower, trim = string.lower, string.trim
-
 local MsgTest = function(warning)
 	if IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
 		return "INSTANCE_CHAT"
@@ -36,7 +74,6 @@ local MsgTest = function(warning)
 	end
 	return "SAY"
 end
-
 --[[
 ##########################################################
 LOCAL SLASH FUNCTIONS
@@ -138,8 +175,8 @@ do
 		end
 	end

-	SLASH_PULLCOUNTDOWN1 = "/jenkins"
-	SlashCmdList["PULLCOUNTDOWN"] = function(msg)
+	_G.SLASH_PULLCOUNTDOWN1 = "/jenkins"
+	_G.SlashCmdList["PULLCOUNTDOWN"] = function(msg)
 		if(tonumber(msg) ~= nil) then
 			PullCountdown.Pull(msg)
 		else
@@ -147,26 +184,29 @@ do
 		end
 	end
 end
+--[[
+##########################################################
+LOAD ALL SLASH FUNCTIONS
+##########################################################
+]]--
+_G.SlashCmdList["SVUISV"] = SVUIMasterCommand;
+_G.SLASH_SVUISV1="/sv"
+
+_G.SlashCmdList["SVUISVUI"] = SVUIMasterCommand;
+_G.SLASH_SVUISVUI1="/svui"
+
+_G.SlashCmdList["SVUIENABLE"] = EnableAddon;
+_G.SLASH_SVUIENABLE1="/enable"

-SLASH_KOMBAT1 = "/kombat"
-SlashCmdList["KOMBAT"] = function(msg)
+_G.SlashCmdList["SVUIDISABLE"] = DisableAddon;
+_G.SLASH_SVUIDISABLE1="/disable"
+
+_G.SlashCmdList["KOMBAT"] = function(msg)
 	SV:ToastyKombat()
 end
+_G.SLASH_KOMBAT1 = "/kombat"

-SLASH_LOLWUT1 = "/lolwut"
-SlashCmdList["LOLWUT"] = function(msg)
+_G.SlashCmdList["LOLWUT"] = function(msg)
 	PlaySoundFile("Sound\\Character\\Human\\HumanVocalFemale\\HumanFemalePissed04.wav")
 end
---[[
-##########################################################
-LOAD ALL SLASH FUNCTIONS
-##########################################################
-]]--
-SLASH_SVUI_SV1="/sv"
-SlashCmdList["SVUI_SV"] = SVUIMasterCommand;
-SLASH_SVUI_SVUI1="/svui"
-SlashCmdList["SVUI_SVUI"] = SVUIMasterCommand;
-SLASH_SVUI_ENABLE1="/enable"
-SlashCmdList["SVUI_ENABLE"] = EnableAddon;
-SLASH_SVUI_DISABLE1="/disable"
-SlashCmdList["SVUI_DISABLE"] = DisableAddon;
\ No newline at end of file
+_G.SLASH_LOLWUT1 = "/lolwut"
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/system/timers.lua b/Interface/AddOns/SVUI/system/timers.lua
index 88ecd49..ffbf1b1 100644
--- a/Interface/AddOns/SVUI/system/timers.lua
+++ b/Interface/AddOns/SVUI/system/timers.lua
@@ -21,6 +21,7 @@ local _G = _G;
 local unpack 	= _G.unpack;
 local select 	= _G.select;
 local type 		= _G.type;
+local pairs     = _G.pairs;
 local tinsert 	= _G.tinsert;
 local string 	= _G.string;
 local math 		= _G.math;
diff --git a/Interface/AddOns/SVUI/system/utilities.lua b/Interface/AddOns/SVUI/system/utilities.lua
index fe7abb1..93ac86c 100644
--- a/Interface/AddOns/SVUI/system/utilities.lua
+++ b/Interface/AddOns/SVUI/system/utilities.lua
@@ -18,14 +18,23 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack    = _G.unpack;
-local select    = _G.select;
-local pairs     = _G.pairs;
-local type      = _G.type;
-local tostring  = _G.tostring;
-local tonumber  = _G.tonumber;
-local string    = _G.string;
-local math      = _G.math;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local table         = _G.table;
+local string        = _G.string;
+local math          = _G.math;
 --[[ STRING METHODS ]]--
 local match, format = string.match, string.format;
 local gmatch, gsub = string.gmatch, string.gsub;
diff --git a/Interface/AddOns/SVUI/system/visibility.lua b/Interface/AddOns/SVUI/system/visibility.lua
index 3842d35..3836bdf 100644
--- a/Interface/AddOns/SVUI/system/visibility.lua
+++ b/Interface/AddOns/SVUI/system/visibility.lua
@@ -21,6 +21,9 @@ local _G = _G;
 local unpack    = _G.unpack;
 local select    = _G.select;
 local pairs     = _G.pairs;
+local tinsert       = _G.tinsert;
+local tremove       = _G.tremove;
+local twipe         = _G.wipe;
 --[[
 ##########################################################
 GET ADDON DATA
diff --git a/Interface/AddOns/SVUI_ChatOMatic/Loader.lua b/Interface/AddOns/SVUI_ChatOMatic/Loader.lua
index fe4dfea..fc761df 100644
--- a/Interface/AddOns/SVUI_ChatOMatic/Loader.lua
+++ b/Interface/AddOns/SVUI_ChatOMatic/Loader.lua
@@ -16,11 +16,18 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+
 local AddonName, AddonObject = ...

-assert(LibSuperVillain, AddonName .. " requires LibSuperVillain")
+assert(_G.LibSuperVillain, AddonName .. " requires LibSuperVillain")

-local PLUGIN = LibSuperVillain:NewPlugin(AddonName, AddonObject)
+local PLUGIN = _G.LibSuperVillain:NewPlugin(AddonName, AddonObject)

 local Schema = PLUGIN.Schema;
 local SV = _G["SVUI"];
diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua
index 78a9038..b4360ed 100644
--- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua
+++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua
@@ -47,7 +47,7 @@ function PLUGIN:CHAT_MSG_BN_WHISPER(event, ...)
 	if(SV.db.SVChat.enable and SV.db[Schema].saveChats) then
 		self:SAVE_CHAT_HISTORY(event, ...)
 	end
-	if(SV.db[Schema].service) then
+	if(SV.db[Schema].service and self.ServiceEnabled) then
 		self:AUTO_MSG_BN_WHISPER(event, ...)
 	end
 end
diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc
index b061970..ffc27ea 100644
--- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc
+++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## Title: |cffFF9900SVUI |r|cffFFEF00Chat-O-Matic|r
 ## Notes: Supervillain UI [|cff9911FFVarious Chat Gadgets|r]
 ## SavedVariables: ChatOMatic_Data
diff --git a/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua b/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua
index 3830b53..d1ce46c 100644
--- a/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua
+++ b/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua
@@ -12,10 +12,23 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 ##############################################################################
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
-##########################################################
-LOCALIZED LUA FUNCTIONS
-##########################################################
+
+CONCEPT AND SOME CODE COURTESY OF:
+##############################################################################
+_____/\\\\\\\\\________/\\\\\\\\\\\\__/\\\\\\\\\\\\\\\_
+ ___/\\\\\\\\\\\\\____/\\\//////////__\///////\\\/////__
+  __/\\\/////////\\\__/\\\___________________\/\\\_______
+   _\/\\\_______\/\\\_\/\\\____/\\\\\\\_______\/\\\_______
+    _\/\\\\\\\\\\\\\\\_\/\\\___\/////\\\_______\/\\\_______
+     _\/\\\/////////\\\_\/\\\_______\/\\\_______\/\\\_______
+      _\/\\\_______\/\\\_\/\\\_______\/\\\_______\/\\\_______
+       _\/\\\_______\/\\\_\//\\\\\\\\\\\\/________\/\\\_______
+        _\///________\///___\////////////__________\///________
+##############################################################################
+AUTOMATIC GOBLIN THERAPIST   By: Duugu                                       #
+##############################################################################
 ]]--
+
 --[[ GLOBALS ]]--
 local _G = _G;
 local unpack    = _G.unpack;
@@ -26,6 +39,7 @@ local type      = _G.type;
 local error     = _G.error;
 local pcall     = _G.pcall;
 local assert    = _G.assert;
+local print    	= _G.print;
 local tostring  = _G.tostring;
 local tonumber  = _G.tonumber;
 local tinsert   = _G.tinsert;
@@ -481,7 +495,7 @@ do
 	end

 	local function PadString(strng)
-		aString = " "..strng.." "
+		local aString = " "..strng.." "
 		for i = 1, 12, 1 do
 			aString = gsub(aString, punctuations[i].pattern, " "..punctuations[i].value.." ")
 		end
@@ -489,7 +503,7 @@ do
 	end

 	local function UnPadString(strng)
-		aString = strng
+		local aString = strng
 		aString = gsub(aString, "  ", " ")
 		if sub(aString, 1, 1) == " " then
 			aString = sub(aString, 2)
@@ -539,7 +553,7 @@ do
 		local phrase;
 		local wordkey = Responses[keyid].Key;
 		local links = Responses[keyid].Dialog;
-		idrange = #links
+		local idrange = #links
 		if idrange > 1 then
 			while(not phrase) do
 				local mod = floor(random(1, idrange))
@@ -551,7 +565,7 @@ do
 		else
 			data.LastKey = 1
 		end
-		local tempt = sub(phrase, -1, -1)
+		local tempt = phrase and sub(phrase, -1, -1) or ''
 		local sTemp = ""
 		if tempt == "*" or tempt == "@" then
 			sTemp = PadString(sString)
@@ -839,7 +853,8 @@ function PLUGIN:AUTO_MSG_BN_WHISPER(event, inbound_message, sender, _, _, _, _,
 	if(not presenceID) then return end
 	if not UnitIsAFK("player") and not UnitIsDND("player") then
 		local _, bnToon = BNGetToonInfo(presenceID);
-		local caller = bnToon or sender;
+		local realToon = select(5, BNGetFriendInfoByID(presenceID))
+		local caller = realToon or bnToon or sender;
 		if (not PhoneLines[caller]) then
 			self:AddCaller(caller)
 		end
@@ -931,7 +946,7 @@ function PLUGIN:EnableAnsweringService()
 	title:SetPoint("TOP", window, "TOP", 0, -2)
 	title:SetText("Henchman Answering Service")

-	for x = 1, 5, 1 do
+	for x = 1, 5 do
 		local phLn = CreateFrame("Button", "HenchmenPhoneLine"..x, window)
 		phLn:SetWidth(124)
 		phLn:SetHeight(20)
@@ -960,6 +975,7 @@ function PLUGIN:EnableAnsweringService()
 		strMsg = "The Henchmen Operators Are Standing By.."
 	end
 	SV:AddonMessage(strMsg)
+	self.ServiceEnabled = true
 end

 function PLUGIN:DisableAnsweringService()
diff --git a/Interface/AddOns/SVUI_ChatOMatic/components/chat_history.lua b/Interface/AddOns/SVUI_ChatOMatic/components/chat_history.lua
index d267cb8..378ff4c 100644
--- a/Interface/AddOns/SVUI_ChatOMatic/components/chat_history.lua
+++ b/Interface/AddOns/SVUI_ChatOMatic/components/chat_history.lua
@@ -22,10 +22,13 @@ local unpack 	= _G.unpack;
 local select 	= _G.select;
 local pairs 	= _G.pairs;
 local type 		= _G.type;
+local tostring  = _G.tostring;
+local tonumber  = _G.tonumber;
 local tinsert 	= _G.tinsert;
 local string 	= _G.string;
 local math 		= _G.math;
 local table 	= _G.table;
+local time 		= _G.time;
 --[[ STRING METHODS ]]--
 local format, split = string.format, string.split;
 --[[ MATH METHODS ]]--
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua
index 9b30328..21a940f 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua
@@ -1,4 +1,4 @@
---[[
+--[[
 ##############################################################################
 _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
  ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__      #
@@ -177,7 +177,7 @@ SV.Options.args.primary = {
 					type = "execute",
 					name = L["Reset Anchors"],
 					desc = L["Reset all frames to their original positions."],
-					func = function() SV:ResetUI() end
+					func = function() SV.Mentalo:Reset() end
 				},
 				toggleKeybind = {
 					order = 6,
@@ -500,7 +500,7 @@ SV.Options.args.common = {
 								return SV.db.media.textures[key[#key]]
 							end,
 							set = function(key, value)
-								SV.db.media.textures[key[#key]] = {"background", value}
+								SV.db.media.textures[key[#key]] = value
 								SV:RefreshEverything(true)
 							end,
 							args = {
@@ -836,35 +836,40 @@ SV.Options.args.common = {
 	}
 };

-local q, r, dnt = "", "", "";
+local q, r, community, dnt = "", "", "", "";
 local s = "\n";
 local p = "\n"..format("|cff4f4f4f%s|r", "---------------------------------------------");
-local t = {"Munglunch", "Elv", "Tukz", "Azilroka", "Sortokk", "AlleyKat", "Quokka", "Haleth", "P3lim", "Haste", "Totalpackage", "Kryso", "Thepilli"};
-local u = {"Wowinterface Community", "Doonga - (The man who keeps me busy)", "Judicate", "Cazart506", "Movster", "MuffinMonster", "Joelsoul", "Trendkill09", "Luamar", "Zharooz", "Lyn3x5", "Madh4tt3r", "Xarioth", "Sinnisterr", "Melonmaniac", "Hojowameeat", "Xandeca", "Bkan", "Daigan - (My current 2nd in command)", "AtomicKiller", "Meljen", "Moondoggy", "Stormblade", "Schreibstift", "Anj", "Risien", "Penguinsane", "Cromax", "Nitro_Turtle", "Shinzou", "Autolykus", "Taotao"};
+local t = {"Munglunch", "Elv", "Tukz", "Azilroka", "Sortokk", "Kkthnx", "AlleyKat", "Quokka", "Haleth", "P3lim", "Haste", "Totalpackage", "Kryso", "Thepilli"};
+local u = {"Sinnisterr - (My wife, the MOST ruthless Warlock you will ever meet)", "Doonga - (The man who keeps me busy)", "Daigan - (My current 2nd in command)", "Penguinsane - (Tester extraordinaire)", "FaolanKing - (King of the bug report portal)"};
 local v = {"Movster", "Cazart506", "FaolanKing", "Doonga", "Other Silent Partners.. (Let me know if I have forgotten you)"};
+local w = {"Wowinterface Community", "Judicate", "Cazart506", "Movster", "MuffinMonster", "Joelsoul", "Trendkill09", "Luamar", "Zharooz", "Lyn3x5", "Madh4tt3r", "Xarioth", "Melonmaniac", "Hojowameeat", "Xandeca", "Bkan", "AtomicKiller", "Meljen", "Moondoggy", "Stormblade", "Schreibstift", "Anj", "Risien", "Cromax", "Nitro_Turtle", "Shinzou", "Autolykus", "Taotao"};
 local credit_header = format("|cffff9900%s|r", "SUPERVILLAIN CREDITS:")..p;
 local credit_sub = format("|cffff9900%s|r", "CREATED BY:").."  Munglunch"..p;
-local credit_sub2 = format("|cffff9900%s|r", "USING ORIGINAL CODE BY:").."  Elv, Tukz, Azilroka, Sortokk"..p;
-local special_thanks = format("|cffff9900%s|r", "A VERY SPECIAL THANKS TO:  ")..format("|cffffff00%s|r", "Movster").."  ..who inspired me to bring this project back to life!"..p;
-local coding = format("|cff3399ff%s|r", L['CODE MONKEYS  (aka ORIGINAL AUTHORS):'])..p;
-local testing = format("|cffaa33ff%s|r", L['PERFECTIONISTS  (aka TESTERS):'])..p;
+local credit_sub2 = format("|cffff9900%s|r", "CODE GRANTS BY:").."  Elv, Tukz, Azilroka, Sortokk"..p;
+local special_thanks = format("|cffff9900%s|r", "SPECIAL THANKS TO:  ")..format("|cfff81422%s|r |cff2288cc(@WowInterface.com)|r", "Cairenn").."  ..the most patient and accomodating person I know!\n\n"..format("|cffff9900%s|r", "A VERY SPECIAL THANKS TO:  ")..format("|cffffff00%s|r", "Movster").."  ..who inspired me to bring this project back to life!"..p;
+local coding = format("|cff3399ff%s|r", L['CODE MONKEYS  (aka CONTRIBUTORS):'])..p;
+local testing = format("|cffaa33ff%s|r", L['PERFECTIONISTS  (aka CORE TESTING TEAM):'])..p;
+local testing2 = format("|cffaa33ff%s|r", L['MINIONS  (aka COMMUNITY TESTERS):'])..p;
 local doners = format("|cff99ff33%s|r", L['KINGPINS  (aka INVESTORS):'])..p;
 local music = format("|cff00ccff%s|r", 'Theme Song By: Fingathing [taken from the song: SuperHero Music]');

-tsort(t, function(o,n) return o < n end)
 for _, x in pairs(t) do
 	q = q..s..x
+end
+
+for _, x in pairs(u) do
+	r = r..s..x
 end
-tsort(u, function(o,n) return o < n end)
-for _, y in pairs(u) do
-	r = r..s..y
+
+for _, x in pairs(v) do
+	dnt = dnt..s..x
 end
-tsort(u, function(o,n) return o < n end)
-for _, z in pairs(v) do
-	dnt = dnt..s..z
+
+for _, x in pairs(w) do
+	community = community..s..x
 end

-local creditsString = credit_header..'\n'..credit_sub..'\n'..credit_sub2..'\n'..special_thanks..'\n\n'..coding..q..'\n\n'..testing..r..'\n\n'..doners..dnt..'\n\n'..music..'\n\n';
+local creditsString = credit_header..'\n'..credit_sub..'\n'..credit_sub2..'\n'..special_thanks..'\n\n'..coding..q..'\n\n'..testing..r..'\n\n'..testing2..community..'\n\n'..doners..dnt..'\n\n'..music..'\n\n';

 SV.Options.args.credits = {
 	type = "group",
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc
index 0bb6d7b..c6b20a4 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc
+++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## Title: |cffFF9900SVUI |r|cffFFEF00Config-O-Matic|r
 ## Notes: Supervillain UI [|cff9911FFConfig Options|r]
 ## RequiredDeps: SVUI
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/bag.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/bag.lua
index ee248ce..a82f95a 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/bag.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/bag.lua
@@ -82,7 +82,7 @@ SV.Options.args.SVBag = {
 							min = 15,
 							max = 45,
 							step = 1,
-							set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()end
+							set = function(a,b) MOD:ChangeDBVar(b,a[#a]) MOD:RefreshBagFrames("BagFrame") end
 						},
 						bankSize = {
 							order = 2,
@@ -92,7 +92,7 @@ SV.Options.args.SVBag = {
 							min = 15,
 							max = 45,
 							step = 1,
-							set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout(true)end
+							set = function(a,b) MOD:ChangeDBVar(b,a[#a]) MOD:RefreshBagFrames("BankFrame") end
 						},
 						sortInverted = {
 							order = 3,
@@ -108,7 +108,7 @@ SV.Options.args.SVBag = {
 							min = 150,
 							max = 700,
 							step = 1,
-							set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()end,
+							set = function(a,b) MOD:ChangeDBVar(b,a[#a]) MOD:RefreshBagFrames("BagFrame") end,
 							disabled = function()return SV.db.SVBag.alignToChat end
 						},
 						bankWidth = {
@@ -119,8 +119,8 @@ SV.Options.args.SVBag = {
 							min = 150,
 							max = 700,
 							step = 1,
-							set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout(true)end,
-							disabled = function()return SV.db.SVBag.alignToChat end
+							set = function(a,b) MOD:ChangeDBVar(b,a[#a]) MOD:RefreshBagFrames("BankFrame") end,
+							disabled = function() return SV.db.SVBag.alignToChat end
 						},
 						currencyFormat = {
 							order = 6,
@@ -131,7 +131,7 @@ SV.Options.args.SVBag = {
 								["ICON"] = L["Icons Only"],
 								["ICON_TEXT"] = L["Icons and Text"]
 							},
-							set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:RefreshTokens()end
+							set = function(a,b)MOD:ChangeDBVar(b,a[#a]) MOD:RefreshTokens() end
 						},
 						bagTools = {
 							order = 7,
@@ -163,7 +163,7 @@ SV.Options.args.SVBag = {
 							type = "toggle",
 							name = L["Align To Chat"],
 							desc = L["Align the width of the bag frame to fit inside the chat box."],
-							set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()MOD:Layout(true)end
+							set = function(a,b)MOD:ChangeDBVar(b,a[#a]) MOD:RefreshBagFrames() end
 						},
 						bags = {
 							order = 2,
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/bar.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/bar.lua
index b6e59a7..94cc304 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/bar.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/bar.lua
@@ -30,7 +30,7 @@ GET ADDON DATA
 ##########################################################
 ]]--
 local SV = _G["SVUI"];
-local SVLib = LibSuperVillain;
+local SVLib = _G.LibSuperVillain;
 local L = SV.L;
 local MOD = SV.SVBar;
 --[[
@@ -237,58 +237,8 @@ local function BarConfigLoader()
 		}
 	end

-	bar_configs["Micro"] = {
-		order = d,
-		name = L["Micro Menu"],
-		type = "group",
-		order = 100,
-		guiInline = false,
-		disabled = function()return not SV.db.SVBar.enable end,
-		get = function(key)
-			return SV.db.SVBar["Micro"][key[#key]]
-		end,
-		set = function(key, value)
-			MOD:ChangeDBVar(value, key[#key], "Micro");
-			MOD:UpdateMicroButtons()
-		end,
-		args = {
-			enable = {
-				order = 1,
-				type = "toggle",
-				name = L["Enable"]
-			},
-			mouseover = {
-				order = 2,
-				name = L["Mouse Over"],
-				desc = L["The frame is not shown unless you mouse over the frame."],
-				disabled = function()return not SV.db.SVBar["Micro"].enable end,
-				type = "toggle"
-			},
-			buttonsize = {
-				order = 3,
-				type = "range",
-				name = L["Button Size"],
-				desc = L["The size of the action buttons."],
-				min = 15,
-				max = 60,
-				step = 1,
-				disabled = function()return not SV.db.SVBar["Micro"].enable end,
-			},
-			buttonspacing = {
-				order = 4,
-				type = "range",
-				name = L["Button Spacing"],
-				desc = L["The spacing between buttons."],
-				min = 1,
-				max = 10,
-				step = 1,
-				disabled = function()return not SV.db.SVBar["Micro"].enable end,
-			},
-		}
-	};
-
 	bar_configs["Pet"] = {
-		order = d,
+		order = 7,
 		name = L["Pet Bar"],
 		type = "group",
 		order = 200,
@@ -439,7 +389,7 @@ local function BarConfigLoader()
 	};

 	bar_configs["Stance"] = {
-		order = d,
+		order = 8,
 		name = L["Stance Bar"],
 		type = "group",
 		order = 300,
@@ -606,7 +556,57 @@ local function BarConfigLoader()
 				}
 			}
 		}
-	}
+	};
+
+	bar_configs["Micro"] = {
+		order = 9,
+		name = L["Micro Menu"],
+		type = "group",
+		order = 100,
+		guiInline = false,
+		disabled = function()return not SV.db.SVBar.enable end,
+		get = function(key)
+			return SV.db.SVBar["Micro"][key[#key]]
+		end,
+		set = function(key, value)
+			MOD:ChangeDBVar(value, key[#key], "Micro");
+			MOD:UpdateMicroButtons()
+		end,
+		args = {
+			enable = {
+				order = 1,
+				type = "toggle",
+				name = L["Enable"]
+			},
+			mouseover = {
+				order = 2,
+				name = L["Mouse Over"],
+				desc = L["The frame is not shown unless you mouse over the frame."],
+				disabled = function()return not SV.db.SVBar["Micro"].enable end,
+				type = "toggle"
+			},
+			buttonsize = {
+				order = 3,
+				type = "range",
+				name = L["Button Size"],
+				desc = L["The size of the action buttons."],
+				min = 15,
+				max = 60,
+				step = 1,
+				disabled = function()return not SV.db.SVBar["Micro"].enable end,
+			},
+			buttonspacing = {
+				order = 4,
+				type = "range",
+				name = L["Button Spacing"],
+				desc = L["The spacing between buttons."],
+				min = 1,
+				max = 10,
+				step = 1,
+				disabled = function()return not SV.db.SVBar["Micro"].enable end,
+			},
+		}
+	};
 end

 SV.Options.args.SVBar = {
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua
index 9e71d08..4d218e2 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua
@@ -152,8 +152,8 @@ local function GetLiveDockletsA()
 	local t = {["None"] = L["None"]};
 	for n,l in pairs(acceptableDocklets) do
 		if IsAddOnLoaded(n) or IsAddOnLoaded(l) then
-			if n=="Skada" and Skada then
-				for index,window in pairs(Skada:GetWindows()) do
+			if n == "Skada" and _G.Skada then
+				for index,window in pairs(_G.Skada:GetWindows()) do
 				    local key = window.db.name
 				    t["Skada"..key] = (key=="Skada") and "Skada - Main" or "Skada - "..key;
 				end
@@ -170,8 +170,8 @@ local function GetLiveDockletsB()
 	local t = {["None"] = L["None"]};
 	for n,l in pairs(acceptableDocklets) do
 		if IsAddOnLoaded(n) or IsAddOnLoaded(l) then
-			if n=="Skada" and Skada then
-				for index,window in pairs(Skada:GetWindows()) do
+			if n == "Skada" and _G.Skada then
+				for index,window in pairs(_G.Skada:GetWindows()) do
 				    local key = window.db.name
 				    t["Skada"..key] = (key=="Skada") and "Skada - Main" or "Skada - "..key;
 				end
@@ -230,8 +230,8 @@ SV.Options.args.SVDock.args["rightDockGroup"] = {
 				MOD:ChangeDBVar(value,key[#key]);
 				MOD:UpdateSuperDock(true)
 				CHAT:RefreshChatFrames(true)
-				BAG:Layout()
-				BAG:Layout(true)
+				BAG.BagFrame:UpdateLayout()
+				BAG.BankFrame:UpdateLayout()
 			end,
 		},
 		quest = {
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/filter.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/filter.lua
index a59fabb..510a786 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/filter.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/filter.lua
@@ -18,8 +18,22 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack 	 =  _G.unpack;
-local pairs 	 =  _G.pairs;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local getmetatable  = _G.getmetatable;
+local setmetatable  = _G.setmetatable;
 local tinsert 	 =  _G.tinsert;
 local table 	 =  _G.table;
 --[[ TABLE METHODS ]]--
@@ -33,6 +47,7 @@ local SV = _G["SVUI"];
 local L = SV.L;
 local MOD = SV.SVUnit
 if(not MOD) then return end
+
 local _, ns = ...;
 local selectedSpell,filterType,filters;
 local nameMapping = {
@@ -47,6 +62,10 @@ local nameMapping = {
 	["PetBuffWatch"] = "(AuraWatch) Pet Buffs",
 }

+local NONE = _G.NONE;
+local GetSpellInfo = _G.GetSpellInfo;
+local collectgarbage = _G.collectgarbage;
+
 local function generateFilterOptions()
 	if filterType == 'AuraBar Colors' then

@@ -472,8 +491,11 @@ local function generateFilterOptions()
 				}
 			}
 		}
+
 		local registeredSpell;
+
 		for t,l in pairs(SV.db.filter.BuffWatch)do if l.id==selectedSpell then registeredSpell=t end end
+
 		if selectedSpell and registeredSpell then
 			local currentSpell=GetSpellInfo(selectedSpell)
 			SV.Options.args.filters.args.filterGroup.args[currentSpell] = {
@@ -667,7 +689,7 @@ local function generateFilterOptions()
 					name = L["Enable"],
 					type = "toggle",
 					get = function()
-						if selectedFolder or not selectedSpell then
+						if not selectedSpell then
 							return false
 						else
 							return SV.db.filter[filterType][selectedSpell].enable
@@ -683,7 +705,7 @@ local function generateFilterOptions()
 					name = L["Priority"],
 					type = "range",
 					get = function()
-						if selectedFolder or not selectedSpell then
+						if not selectedSpell then
 							return 0
 						else
 							return SV.db.filter[filterType][selectedSpell].priority
@@ -704,7 +726,8 @@ local function generateFilterOptions()
 	end
 	MOD:RefreshUnitFrames()
 	collectgarbage("collect")
-end
+end
+
 SV.Options.args.filters = {
 	type = "group",
 	name = L["Filters"],
@@ -777,5 +800,5 @@ SV.Options.args.filters = {
 function ns:SetToFilterConfig(newFilter)
 	filterType = newFilter or "BuffWatch"
 	generateFilterOptions()
-	LibStub("AceConfigDialog-3.0"):SelectGroup(SV.NameID, "filters")
+	_G.LibStub("AceConfigDialog-3.0"):SelectGroup(SV.NameID, "filters")
 end
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/plate.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/plate.lua
index 3f5e41c..32d824c 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/plate.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/plate.lua
@@ -431,7 +431,7 @@ SV.Options.args.SVPlate = {
 					order = 4,
 					name = L["Target Indicator"],
 					get = function(d)return SV.db.SVPlate.pointer[d[#d]]end,
-					set = function(d,e)MOD:ChangeDBVar(e,d[#d],"pointer");WorldFrame.elapsed = 3;MOD:UpdateAllPlates()end,
+					set = function(d,e) MOD:ChangeDBVar(e,d[#d],"pointer"); _G.WorldFrame.elapsed = 3; MOD:UpdateAllPlates() end,
 					args = {
 						enable = {
 							order = 1,
@@ -446,7 +446,7 @@ SV.Options.args.SVPlate = {
 							set = function(key, value)
 								MOD:ChangeDBVar(value, key[#key], "pointer");
 								if value then
-									WorldFrame.elapsed = 3
+									_G.WorldFrame.elapsed = 3
 								end
 							end
 						},
@@ -530,7 +530,7 @@ SV.Options.args.SVPlate = {
 							name = L["Additional Filter"],
 							values = function()
 								filters = {}
-								filters[""] = NONE;
+								filters[""] = _G.NONE;
 								for j in pairs(SV.db.filter) do
 									filters[j] = j
 								end
@@ -701,7 +701,7 @@ SV.Options.args.SVPlate = {
 							name = L["Remove Name"],
 							get = function(d)return""end,
 							set = function(d,e)
-								if G["SVPlate"]["filter"][e]then
+								if SV.db["SVPlate"]["filter"][e] then
 									SV.db["SVPlate"]["filter"][e].enable = false;
 									SV:AddonMessage(L["You can't remove a default name from the filter,disabling the name."])
 								else
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/profiles.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/profiles.lua
index d19affc..dbf99be 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/profiles.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/profiles.lua
@@ -1,4 +1,4 @@
---[[
+--[[
 ##############################################################################
 _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
  ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__      #
@@ -30,7 +30,7 @@ GET ADDON DATA
 ##########################################################
 ]]--
 local SV = _G["SVUI"];
-local SVLib = LibSuperVillain;
+local SVLib = _G.LibSuperVillain;
 local L = SV.L;

 local playerRealm = GetRealmName()
@@ -64,7 +64,7 @@ SV.Options.args.profiles = {
 			order = 4,
 			type = "execute",
 			name = SAVE,
-			desc = function() return SAVE .. " " .. L["current"] .. " " .. NORMAL_FONT_COLOR_CODE .. profileKey .. FONT_COLOR_CODE_CLOSE end,
+			desc = function() return _G.SAVE .. " " .. L["current"] .. " |cffFFFF00" .. profileKey .. "|r" end,
 			func = function() SVLib:ExportDatabase(profileKey) SV:SavedPopup() end,
 		},
 		export = {
@@ -122,7 +122,7 @@ SV.Options.args.profiles = {
 		reset = {
 			order = 12,
 			type = "execute",
-			name = function() return L["reset"] .. " " .. NORMAL_FONT_COLOR_CODE .. profileKey .. FONT_COLOR_CODE_CLOSE end,
+			name = function() return L["reset"] .. " " .. " |cffFFFF00" .. profileKey .. "|r" end,
 			desc = L["reset_sub"],
 			func = function() SV:StaticPopup_Show("RESET_PROFILE_PROMPT") end,
 			width = "full",
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua
index 8cdabd8..78806be 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua
@@ -1564,7 +1564,7 @@ SV.Options.args.SVUnit = {
 						return SV.db.media.textures[key[#key]]
 					end,
 					set = function(key, value)
-						SV.db.media.textures[key[#key]] = {"background", value}
+						SV.db.media.textures[key[#key]] = value
 						SV:RefreshEverything(true)
 					end,
 					args = {
diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/raid.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/raid.lua
index 927758e..dc6ec19 100644
--- a/Interface/AddOns/SVUI_ConfigOMatic/components/units/raid.lua
+++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/raid.lua
@@ -662,8 +662,8 @@ SV.Options.args.SVUnit.args.raidpet ={
 							type = "toggle",
 							name = L["Enable"],
 							order = 1,
-							get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.enable end,
-							set = function(l, m)MOD:ChangeDBVar(m, "enable", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end,
+							get = function(l)return SV.db.SVUnit["raidpet"].auraWatch.enable end,
+							set = function(l, m)MOD:ChangeDBVar(m, "enable", "raidpet", "auraWatch");MOD:SetGroupFrame("raidpet")end,
 						},
 						size = {
 							type = "range",
@@ -673,8 +673,8 @@ SV.Options.args.SVUnit.args.raidpet ={
 							min = 4,
 							max = 15,
 							step = 1,
-							get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.size end,
-							set = function(l, m)MOD:ChangeDBVar(m, "size", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end,
+							get = function(l)return SV.db.SVUnit["raidpet"].auraWatch.size end,
+							set = function(l, m)MOD:ChangeDBVar(m, "size", "raidpet", "auraWatch");MOD:SetGroupFrame("raidpet")end,
 						},
 						configureButton ={
 							type = 'execute',
diff --git a/Interface/AddOns/SVUI_CraftOMatic/Loader.lua b/Interface/AddOns/SVUI_CraftOMatic/Loader.lua
index 177cd79..b7bdd81 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/Loader.lua
+++ b/Interface/AddOns/SVUI_CraftOMatic/Loader.lua
@@ -16,11 +16,18 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+
 local AddonName, AddonObject = ...

-assert(LibSuperVillain, AddonName .. " requires LibSuperVillain")
+assert(_G.LibSuperVillain, AddonName .. " requires LibSuperVillain")

-local PLUGIN = LibSuperVillain:NewPlugin(AddonName, AddonObject)
+local PLUGIN = _G.LibSuperVillain:NewPlugin(AddonName, AddonObject)

 local Schema = PLUGIN.Schema;
 local SV = _G["SVUI"];
diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
index c095b36..2e92a98 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
+++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua
@@ -17,14 +17,6 @@ LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--

---[[  CONSTANTS ]]--
-
-BINDING_HEADER_SVUICRAFT = "Supervillain UI: Craft-O-Matic";
-BINDING_NAME_SVUICRAFT_FISH = "Toggle Fishing Mode";
-BINDING_NAME_SVUICRAFT_FARM = "Toggle Farming Mode";
-BINDING_NAME_SVUICRAFT_COOK = "Toggle Cooking Mode";
-BINDING_NAME_SVUICRAFT_ARCH = "Toggle Archaeology Mode";
-
 --[[ GLOBALS ]]--

 local _G = _G;
@@ -37,6 +29,15 @@ local table 	= _G.table;
 local rept      = string.rep;
 local tsort,twipe = table.sort,table.wipe;
 local floor,ceil  = math.floor, math.ceil;
+
+--[[  CONSTANTS ]]--
+
+_G.BINDING_HEADER_SVUICRAFT = "Supervillain UI: Craft-O-Matic";
+_G.BINDING_NAME_SVUICRAFT_FISH = "Toggle Fishing Mode";
+_G.BINDING_NAME_SVUICRAFT_FARM = "Toggle Farming Mode";
+_G.BINDING_NAME_SVUICRAFT_COOK = "Toggle Cooking Mode";
+_G.BINDING_NAME_SVUICRAFT_ARCH = "Toggle Archaeology Mode";
+
 --[[
 ##########################################################
 GET ADDON DATA
@@ -133,10 +134,10 @@ local function CheckForDoubleClick()
 end
 --[[
 ##########################################################
-CORE FUNCTIONS
+WORLDFRAME HANDLER
 ##########################################################
 ]]--
-function PLUGIN:WorldFrameHook(button)
+local _hook_WorldFrame_OnMouseDown = function(self, button)
 	if InCombatLockdown() then return end
 	if(currentModeKey and button == "RightButton" and CheckForDoubleClick()) then
 		local handle = PLUGIN[currentModeKey];
@@ -146,7 +147,7 @@ function PLUGIN:WorldFrameHook(button)
 	end
 end

-function SVUI_ModeCaptureWindow:PostClickHandler()
+local ModeCapture_PostClickHandler = function(self, button)
 	if InCombatLockdown() then
 		self:RegisterEvent("PLAYER_REGEN_ENABLED")
 		return
@@ -155,6 +156,36 @@ function SVUI_ModeCaptureWindow:PostClickHandler()
 	self.Grip:Hide()
 end

+local ModeCapture_EventHandler = function(self, event, ...)
+	if event == "PLAYER_REGEN_ENABLED" then
+		self:UnregisterEvent("PLAYER_REGEN_ENABLED")
+		PLUGIN:ChangeModeGear()
+		self:GetScript("PostClick")()
+	end
+	if event == "PLAYER_ENTERING_WORLD" then
+		if (IsSpellKnown(131474) or IsSpellKnown(80451) or IsSpellKnown(818)) then
+			WorldFrame:HookScript("OnMouseDown", _hook_WorldFrame_OnMouseDown)
+		end
+		self:UnregisterEvent("PLAYER_ENTERING_WORLD")
+	end
+end
+
+local ModeHandler = CreateFrame("Frame")
+ModeHandler:SetPoint("LEFT", UIParent, "RIGHT", 10000, 0)
+local ModeCapture = CreateFrame("Button", "SVUI_ModeCaptureWindow", ModeHandler, "SecureActionButtonTemplate")
+ModeCapture.Grip = ModeHandler
+ModeCapture:EnableMouse(true)
+ModeCapture:RegisterForClicks("RightButtonUp")
+ModeCapture:RegisterEvent("PLAYER_ENTERING_WORLD")
+ModeCapture:SetScript("PostClick", ModeCapture_PostClickHandler)
+ModeCapture:SetScript("OnEvent", ModeCapture_EventHandler)
+
+ModeCapture:Hide()
+--[[
+##########################################################
+CORE FUNCTIONS
+##########################################################
+]]--
 function PLUGIN:CraftingReset()
 	self.TitleWindow:Clear();
 	self.LogWindow:Clear();
diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc
index c32772a..168e57a 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc
+++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## Title: |cffFF9900SVUI |r|cffFFEF00Craft-O-Matic|r
 ## Notes: Supervillain UI [|cff9911FFProfession Tools|r].
 ## Interface: 60000
diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml
index 25b65c4..b59b839 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml
+++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml
@@ -1,39 +1,4 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/">
-	<Frame name="SVUI_ModesHandler" hidden="true" frameStrata="LOW" parent="UIParent">
-		<Anchors>
-            <Anchor point="LEFT" relativeTo="UIParent" relativePoint="RIGHT">
-                <Offset x="10000" y="0"/>
-            </Anchor>
-        </Anchors>
-        <Frames>
-            <Button name="SVUI_ModeCaptureWindow" inherits="SecureActionButtonTemplate" enableMouse="true">
-            	<Scripts>
-		            <PostClick>
-						if(self.PostClickHandler) then self:PostClickHandler() end
-		            </PostClick>
-		            <OnLoad>
-						self.Grip = _G["SVUI_ModesHandler"];
-						self:RegisterForClicks("RightButtonUp");
-					    self:Hide();
-						self:RegisterEvent("PLAYER_ENTERING_WORLD")
-						self:SetScript("OnEvent", function(self, event, ...)
-							if event == "PLAYER_REGEN_ENABLED" then
-								self:UnregisterEvent("PLAYER_REGEN_ENABLED")
-								CraftOMatic:ChangeModeGear()
-								self:PostClickHandler()
-							end
-							if event == "PLAYER_ENTERING_WORLD" then
-								if (IsSpellKnown(131474) or IsSpellKnown(80451) or IsSpellKnown(818)) then
-									WorldFrame:HookScript("OnMouseDown", CraftOMatic.WorldFrameHook)
-								end
-								self:UnregisterEvent("PLAYER_ENTERING_WORLD")
-							end
-						end)
-		            </OnLoad>
-		        </Scripts>
-            </Button>
-        </Frames>
-    </Frame>
 	<Script file='Loader.lua'/>
     <Script file='SVUI_CraftOMatic.lua'/>
     <Include file="components\_load.xml"/>
diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua b/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua
index 4f5e5b9..02e3b07 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua
+++ b/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua
@@ -55,11 +55,13 @@ local GetContainerNumSlots = GetContainerNumSlots
 local GetContainerItemInfo = GetContainerItemInfo
 local GetContainerItemID = GetContainerItemID
 local DockButton, ModeLogsFrame;
+
+local COUNT_TEX = [[Interface\AddOns\SVUI\assets\artwork\icons\COUNT-]]
+
 local refArtifacts = {};
 for i = 1, 12 do
 	refArtifacts[i] = {}
 end
-local NEEDS_UPDATE = true;
 local ArchCrafting = CreateFrame("Frame", "SVUI_ArchCrafting", UIParent)
 --[[
 ##########################################################
@@ -77,12 +79,6 @@ LOCAL FUNCTIONS
 local function EnableSolve(index, button)
 	button:SetAlpha(1)
 	button.text:SetTextColor(1, 1, 1)
-	button:SetScript("OnEnter", function(self)
-		self.text:SetTextColor(1, 1, 0)
-	end)
-	button:SetScript("OnLeave", function(self)
-		self.text:SetTextColor(1, 1, 1)
-	end)
 	button:SetScript("OnClick", function(self)
 		SetSelectedArtifact(index)
 		local _, _, _, _, _, numSockets = GetActiveArtifactByRace(index)
@@ -107,9 +103,7 @@ local function DisableSolve(button)
 	button:SetAlpha(0)
 	button.text:SetTextColor(0.5, 0.5, 0.5)
 	button.text:SetText("")
-	button:SetScript("OnEnter", SV.fubar)
-	button:SetScript("OnLeave", SV.fubar)
-	button:SetScript("OnMouseUp", SV.fubar)
+	button:SetScript("OnClick", SV.fubar)
 end

 local function UpdateArtifactBars(index)
@@ -120,7 +114,7 @@ local function UpdateArtifactBars(index)

 	if GetNumArtifactsByRace(index) ~= 0 then
 		local keystoneBonus = 0
-		bar["race"]:SetTextColor(1, 1, 1)
+		bar["race"]:SetTextColor(1, 0.8, 0)
 		bar["progress"]:SetTextColor(1, 1, 1)
 		if cache["numKeysockets"] then
 			keystoneBonus = min(cache["numKeystones"], cache["numKeysockets"]) * 12
@@ -205,7 +199,6 @@ local function UpdateArtifactCache()
 		end
 		UpdateArtifactBars(index)
 	end
-	NEEDS_UPDATE = false
 end

 local function GetTitleAndSkill()
@@ -230,7 +223,12 @@ EVENT HANDLER
 ]]--
 do
 	local SURVEYCDFONT = SV.Media.font.numbers
-	local SURVEYRED = {0,0.5,1}
+	local SURVEYCOLOR = {
+		{0.1, 1, 0.1, 0.2},
+		{1, 0.5, 0.1, 0.4},
+		{1, 0.1, 0, 0.6}
+	}
+	local SURVEYSCALE = {3, 2, 1}
 	local last = 0
 	local time = 3

@@ -239,26 +237,28 @@ do
 	local ArchSiteFound;
 	local ArchCanSurvey, ArchWillSurvey = false, false;

-	SurveyCooldown:SetPoint("CENTER", 0, -80)
-	SurveyCooldown:SetSize(150, 150)
-	SurveyCooldown.text = SurveyCooldown:CreateFontString(nil, "OVERLAY")
+	SurveyCooldown:SetPoint("TOP", UIParent, "CENTER", 0, 0)
+	SurveyCooldown:SetSize(50, 50)
+	SurveyCooldown.text = SurveyCooldown:CreateTexture(nil, "OVERLAY")
 	SurveyCooldown.text:SetAllPoints(SurveyCooldown)
-	SurveyCooldown.text:SetFont(SURVEYCDFONT, 150, "OUTLINE")
-	SurveyCooldown.text:SetTextColor(0,1,0.12,0.5)
-	SurveyCooldown.text:SetPoint("CENTER")
-	SurveyCooldown:SetScale(1.5)
+	SurveyCooldown.text:SetVertexColor(0,1,0.12,0.5)
+	SurveyCooldown:SetScale(1)

 	local Arch_OnEvent = function(self, event, ...)
 		if(InCombatLockdown() or not archSpell) then return end
+		local NEEDS_UPDATE = false;
 		if(event == "CURRENCY_DISPLAY_UPDATE" or event == "CHAT_MSG_SKILL" or event == "ARTIFACT_COMPLETE") then
 			local msg = GetTitleAndSkill()
 			PLUGIN.TitleWindow:Clear()
 			PLUGIN.TitleWindow:AddMessage(msg)
+			if(event ~= "CHAT_MSG_SKILL") then
+				NEEDS_UPDATE = true
+			end
 		end
 		if(CanScanResearchSite() and (event == "CURRENCY_DISPLAY_UPDATE")) then
-			UpdateArtifactCache()
+			NEEDS_UPDATE = true
 		elseif(event == "ARCHAEOLOGY_SURVEY_CAST" or event == "ARTIFACT_COMPLETE" or event == "ARTIFACT_DIG_SITE_UPDATED") then
-			UpdateArtifactCache()
+			NEEDS_UPDATE = true
 		elseif(event == "ARTIFACT_HISTORY_READY" or event == "ARTIFACT_DIGSITE_COMPLETE") then
 			NEEDS_UPDATE = true
 		else
@@ -284,9 +284,10 @@ do
 					ArchSiteFound = nil
 				end
 			end
-			if(NEEDS_UPDATE) then
-				UpdateArtifactCache()
-			end
+		end
+
+		if(NEEDS_UPDATE) then
+			UpdateArtifactCache()
 		end
 	end

@@ -294,13 +295,17 @@ do
 		last = last + elapsed
 		if last > 1 then
 			time = time - 1
-			self.text:SetText(time)
+			local img = COUNT_TEX .. time
 			if time <= 0 then
 				self:SetScript("OnUpdate", nil)
-				self.text:SetText("")
+				self.text:SetTexture(nil)
+				self:SetScale(1)
 				time = 3
+			else
+				self.text:SetTexture(img)
+				self.text:SetVertexColor(unpack(SURVEYCOLOR[time]))
+				self:SetScale(SURVEYSCALE[time])
 			end
-			self.text:SetTextColor(SURVEYRED[time],1,0.12,0.8)
 			last = 0
 		end
 	end
@@ -308,7 +313,8 @@ do
 	local Survey_OnEvent = function(self, event, unit, _, _, _, spellid)
 		if not unit == "player" then return end
 		if spellid == 80451 then
-			self.text:SetText("3")
+			self.text:SetTexture(COUNT_TEX .. 3)
+			self:SetScale(1)
 			self:SetScript("OnUpdate", Survey_OnUpdate)
 		end
 	end
@@ -434,12 +440,10 @@ function PLUGIN:LoadArchaeologyMode()

 	for i = 1, 12 do
 		local bar = CreateFrame("StatusBar", nil, ArchCrafting)
-		local race = bar:CreateFontString()
-		local progress = bar:CreateFontString()
 		local solve = CreateFrame("Button", nil, bar, "SecureHandlerClickTemplate")
 		local yOffset;

-		bar:SetPanelTemplate("Inset")
+		bar:SetPanelTemplate("Bar")
 		bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]])
 		bar:SetSize(BAR_WIDTH,BAR_HEIGHT)
 		if(i > 6) then
@@ -450,11 +454,44 @@ function PLUGIN:LoadArchaeologyMode()
 			bar:SetPoint("TOPLEFT", ArchCrafting, "TOPLEFT", 2, -yOffset)
 		end
 		bar:SetStatusBarColor(0.2, 0.2, 0.8, 0.5)
-		bar:SetScript("OnEnter", function(self)
+
+		local sOffset = SV.Scale(1)
+		-- Race Text
+		local race = bar:CreateFontString()
+		race:SetFontObject(NumberFont_Outline_Large)
+		race:SetText(RACE)
+		race:SetPoint("TOPLEFT", bar, "TOPLEFT", sOffset, -sOffset)
+		race:SetTextColor(1,0.8,0)
+
+		-- Progress Text
+		local progress = bar:CreateFontString()
+		progress:SetFont(SV.Media.font.roboto, 11, "OUTLINE")
+		progress:SetText("")
+		progress:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -sOffset, sOffset)
+
+		-- Solve
+		solve:SetAllPoints(bar)
+
+		solve.bg = solve:CreateTexture(nil,"BORDER")
+		solve.bg:SetAllPoints(solve)
+		solve.bg:SetTexture(SV.Media.bar.default)
+		solve.bg:SetVertexColor(0.1,0.5,0)
+
+		solve.text = solve:CreateFontString(nil,"OVERLAY")
+		solve.text:SetFont(SV.Media.font.roboto, 14, "NONE")
+		solve.text:SetShadowOffset(-1,-1)
+		solve.text:SetShadowColor(0,0,0,0.5)
+		solve.text:SetText(SOLVE)
+		solve.text:SetPoint("CENTER", solve, "CENTER", 2, 0)
+		solve.RaceIndex = i
+		solve.border = bar
+		solve:SetScript("OnEnter", function(self)
 			GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT", 2, 250)
 			GameTooltip:ClearLines()
-			if GetNumArtifactsByRace(i) > 0 then
-				SetSelectedArtifact(i)
+			if GetNumArtifactsByRace(self.RaceIndex) > 0 then
+				self.text:SetTextColor(1, 1, 0)
+				self.border:SetBackdropBorderColor(0,0.8,1)
+				SetSelectedArtifact(self.RaceIndex)
 				local artifactName, artifactDescription, artifactRarity, _, _, keystoneCount = GetSelectedArtifactInfo()
 				local numFragmentsCollected, numFragmentsAdded, numFragmentsRequired = GetArtifactProgress()
 				local r, g, b
@@ -473,35 +510,12 @@ function PLUGIN:LoadArchaeologyMode()
 				GameTooltip:Show()
 			end
 		end)
-		bar:SetScript("OnLeave", function()
+		solve:SetScript("OnLeave", function(self)
+			self.text:SetTextColor(0.7, 0.7, 0.7)
+			self.border:SetBackdropBorderColor(0,0,0)
 			GameTooltip:Hide()
 		end)

-		-- Race Text
-		race:SetFont(SV.Media.font.roboto, 12, "OUTLINE")
-		race:SetText(RACE)
-		race:SetPoint("LEFT", bar, "LEFT", 2, 0)
-
-		-- Progress Text
-		progress:SetFont(SV.Media.font.roboto, 12, "OUTLINE")
-		progress:SetText("")
-		progress:SetPoint("RIGHT", bar, "RIGHT", 1, 0)
-
-		-- Solve
-		solve:SetAllPoints(bar)
-
-		solve.bg = solve:CreateTexture(nil,"BORDER")
-		solve.bg:SetAllPoints(solve)
-		solve.bg:SetTexture(SV.Media.bar.default)
-		solve.bg:SetVertexColor(0.1,0.5,0)
-
-		solve.text = solve:CreateFontString(nil,"OVERLAY")
-		solve.text:SetFont(SV.Media.font.roboto, 14, "NONE")
-		solve.text:SetShadowOffset(-1,-1)
-		solve.text:SetShadowColor(0,0,0,0.5)
-		solve.text:SetText(SOLVE)
-		solve.text:SetPoint("CENTER", solve, "CENTER", 2, 0)
-
 		progressBars[i] = {
 			["bar"] = bar,
 			["race"] = race,
diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua b/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua
index 749480d..29b42ae 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua
+++ b/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua
@@ -27,6 +27,7 @@ local table 	= _G.table;
 local rept      = string.rep;
 local tsort,twipe = table.sort,table.wipe;
 local floor,ceil  = math.floor, math.ceil;
+local band 		= _G.bit.band;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -101,12 +102,13 @@ EVENT HANDLER
 ]]--
 local EnableListener, DisableListener
 do
+	local proxyTest = false;
 	local CookEventHandler = CreateFrame("Frame")
 	local LootProxy = function(item, name)
 		if(item) then
 			local mask = [[0x10000]];
 			local itemType = GetItemFamily(item);
-			local pass = bit.band(itemType, mask);
+			local pass = band(itemType, mask);
 			if pass > 0 then
 				proxyTest = true;
 			end
diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua b/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua
index f52d192..7d37633 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua
+++ b/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua
@@ -18,10 +18,30 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack 	= _G.unpack;
-local select 	= _G.select;
-local type 		= _G.type;
-local string    = _G.string;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local getmetatable  = _G.getmetatable;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local upper         = string.upper;
+local format        = string.format;
+local find          = string.find;
+local match         = string.match;
+local gsub          = string.gsub;
+
 local math 		= _G.math;
 local table 	= _G.table;
 local rept      = string.rep;
diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua b/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua
index 995b328..d802e80 100644
--- a/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua
+++ b/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua
@@ -18,15 +18,35 @@ LOCALIZED LUA FUNCTIONS
 ]]--
 --[[ GLOBALS ]]--
 local _G = _G;
-local unpack 	= _G.unpack;
-local select 	= _G.select;
-local type 		= _G.type;
-local string    = _G.string;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+local next          = _G.next;
+local rawset        = _G.rawset;
+local rawget        = _G.rawget;
+local tostring      = _G.tostring;
+local tonumber      = _G.tonumber;
+local getmetatable  = _G.getmetatable;
+local setmetatable  = _G.setmetatable;
+--STRING
+local string        = _G.string;
+local upper         = string.upper;
+local format        = string.format;
+local find          = string.find;
+local match         = string.match;
+local gsub          = string.gsub;
+local rept      = string.rep;
 local math 		= _G.math;
 local table 	= _G.table;
-local rept      = string.rep;
 local tsort,twipe = table.sort,table.wipe;
 local floor,ceil  = math.floor, math.ceil;
+local band 		= _G.bit.band;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -202,7 +222,7 @@ local function LootProxy(item, name)
 	if(item) then
 		local mask = [[0x100000]];
 		local itemType = GetItemFamily(item);
-		local pass = bit.band(itemType, mask);
+		local pass = band(itemType, mask);
 		if pass > 0 then
 			proxyTest = true;
 		end
@@ -242,7 +262,7 @@ do
 		if(item) then
 			local mask = [[0x10000]];
 			local itemType = GetItemFamily(item);
-			local pass = bit.band(itemType, mask);
+			local pass = band(itemType, mask);
 			if pass > 0 then
 				proxyTest = true;
 			end
diff --git a/Interface/AddOns/SVUI_FightOMatic/Loader.lua b/Interface/AddOns/SVUI_FightOMatic/Loader.lua
index a6b4ee3..488d0ef 100644
--- a/Interface/AddOns/SVUI_FightOMatic/Loader.lua
+++ b/Interface/AddOns/SVUI_FightOMatic/Loader.lua
@@ -16,11 +16,18 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+
 local AddonName, AddonObject = ...

-assert(LibSuperVillain, AddonName .. " requires LibSuperVillain")
+assert(_G.LibSuperVillain, AddonName .. " requires LibSuperVillain")

-local PLUGIN = LibSuperVillain:NewPlugin(AddonName, AddonObject)
+local PLUGIN = _G.LibSuperVillain:NewPlugin(AddonName, AddonObject)

 local Schema = PLUGIN.Schema;
 local SV = _G["SVUI"];
diff --git a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.lua b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.lua
index 684631e..22fc309 100644
--- a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.lua
+++ b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.lua
@@ -16,10 +16,6 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
---[[  CONSTANTS ]]--
-
-BINDING_HEADER_SVUIFIGHT = "Supervillain UI: Fight-O-Matic";
-BINDING_NAME_SVUIFIGHT_RADIO = "Call Out Incoming";

 --[[ GLOBALS ]]--

@@ -42,11 +38,16 @@ local bit       = _G.bit;
 --[[ STRING METHODS ]]--
 local format, sub = string.format, string.sub;
 --[[ MATH METHODS ]]--
-local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round;
+local abs, ceil, floor, round, random = math.abs, math.ceil, math.floor, math.round, math.random;
 --[[ TABLE METHODS ]]--
-local tremove, twipe = table.remove, table.wipe;
+local tremove, wipe = table.remove, table.wipe;
 --[[ BINARY METHODS ]]--
 local band, bor = bit.band, bit.bor;
+
+--[[  CONSTANTS ]]--
+
+_G.BINDING_HEADER_SVUIFIGHT = "Supervillain UI: Fight-O-Matic";
+_G.BINDING_NAME_SVUIFIGHT_RADIO = "Call Out Incoming";
 --[[
 ##########################################################
 GET ADDON DATA
@@ -592,7 +593,7 @@ local function ParseIncomingLog(timestamp, event, eGuid, eName, pGuid)
 	if(cached) then
 		if(needsUpdate) then
 			EnemyAlarm(eName, cached.class, cached.colors, kos)
-			cached.time = timeStamp
+			cached.time = timestamp
 		end

 		if(pGuid == playerGUID and not AlertedCache[eName]) then
diff --git a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc
index b58b7c1..c43eaec 100644
--- a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc
+++ b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## Title: |cffFF9900SVUI |r|cffFFEF00Fight-O-Matic|r
 ## Notes: Supervillain UI [|cff9911FFPvP Tools|r].
 ## SavedVariables: FightOMatic_Data
diff --git a/Interface/AddOns/SVUI_LogOMatic/Loader.lua b/Interface/AddOns/SVUI_LogOMatic/Loader.lua
index c07686b..81ea16f 100644
--- a/Interface/AddOns/SVUI_LogOMatic/Loader.lua
+++ b/Interface/AddOns/SVUI_LogOMatic/Loader.lua
@@ -16,11 +16,18 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+
 local AddonName, AddonObject = ...

-assert(LibSuperVillain, AddonName .. " requires LibSuperVillain")
+assert(_G.LibSuperVillain, AddonName .. " requires LibSuperVillain")

-local PLUGIN = LibSuperVillain:NewPlugin(AddonName, AddonObject)
+local PLUGIN = _G.LibSuperVillain:NewPlugin(AddonName, AddonObject)

 local Schema = PLUGIN.Schema;
 local SV = _G["SVUI"];
diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua
index a12c511..a55841e 100644
--- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua
+++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua
@@ -67,82 +67,78 @@ PLUGIN.HasAltInventory = false;
 LOCAL FUNCTIONS
 ##########################################################
 ]]--
-local RefreshLoggedSlot = function(self, bag, slotID, save)
-	if self.Bags[bag] and self.Bags[bag].numSlots ~= GetContainerNumSlots(bag) or not self.Bags[bag] or not self.Bags[bag][slotID] then return end
-	local slot, _ = self.Bags[bag][slotID], nil;
-	local bagType = self.Bags[bag].bagFamily;
-	local texture, count, locked = GetContainerItemInfo(bag, slotID)
-	local itemLink = GetContainerItemLink(bag, slotID);
-	local key;
+local RefreshLoggedSlot = function(self, slotID, save)
+	if(not self[slotID]) then return end
+	--print(self[slotID]:GetName())
+	local bag = self:GetID();
+	local slot = self[slotID];
+	local bagType = self.bagFamily;
+
 	slot:Show()
-	slot.name, slot.rarity = nil, nil;
-	local start, duration, enable = GetContainerItemCooldown(bag, slotID)
-	CooldownFrame_SetTimer(slot.cooldown, start, duration, enable)
-	if duration > 0 and enable == 0 then
+
+	local texture, count, locked, rarity = GetContainerItemInfo(bag, slotID);
+	local start, duration, enable = GetContainerItemCooldown(bag, slotID);
+	local itemLink = GetContainerItemLink(bag, slotID);
+
+	CooldownFrame_SetTimer(slot.cooldown, start, duration, enable);
+
+	if(duration > 0 and enable == 0) then
 		SetItemButtonTextureVertexColor(slot, 0.4, 0.4, 0.4)
 	else
 		SetItemButtonTextureVertexColor(slot, 1, 1, 1)
-	end
-	if bagType then
+	end
+
+	if(bagType) then
 		local r, g, b = bagType[1], bagType[2], bagType[3];
 		slot:SetBackdropColor(r, g, b, 0.5)
 		slot:SetBackdropBorderColor(r, g, b, 1)
-	elseif itemLink then
-		local class, subclass, maxStack;
-		key, _, slot.rarity, _, _, class, subclass, maxStack = GetItemInfo(itemLink)
-		slot.name = key
-		local z, A, C = GetContainerItemQuestInfo(bag, slotID)
-		if A and not isActive then
-			slot:SetBackdropBorderColor(1.0, 0.3, 0.3)
-		elseif A or z then
-			slot:SetBackdropBorderColor(1.0, 0.3, 0.3)
-		elseif slot.rarity and slot.rarity>1 then
-			local D, E, F = GetItemQualityColor(slot.rarity)
-			slot:SetBackdropBorderColor(D, E, F)
+	elseif(itemLink) then
+		local key, _, rarity, _, _, class, subclass, maxStack = GetItemInfo(itemLink)
+		if(rarity and rarity > 1) then
+			local r, g, b = GetItemQualityColor(rarity)
+			slot:SetBackdropBorderColor(r, g, b)
 		else
 			slot:SetBackdropBorderColor(0, 0, 0)
 		end
-		if (key and save) then
+
+		if(key and save) then
 			local id = GetContainerItemID(bag,slotID)
 			if id ~= 6948 then PLUGIN.myStash[bag][key] = GetItemCount(id,true) end
 		end
 	else
 		slot:SetBackdropBorderColor(0, 0, 0)
-	end
-	if C_NewItems.IsNewItem(bag, slotID)then
+	end
+
+	if(C_NewItems.IsNewItem(bag, slotID)) then
 		ActionButton_ShowOverlayGlow(slot)
 	else
 		ActionButton_HideOverlayGlow(slot)
-	end
+	end
+
 	SetItemButtonTexture(slot, texture)
 	SetItemButtonCount(slot, count)
 	SetItemButtonDesaturated(slot, locked, 0.5, 0.5, 0.5)
 end

-local RefreshLoggedBagSlots = function(self, bag, save)
-	if(not bag) then return end
-	for i = 1, GetContainerNumSlots(bag)do
-		local container = self
-		if not self.RefreshSlot then
-			container = self:GetParent()
-		end
-		RefreshLoggedSlot(container, bag, i, save)
+local RefreshLoggedSlots = function(self, bagID, save)
+	local id = bagID or self:GetID()
+	if(not id or (not self.SlotUpdate)) then return end
+	local maxcount = GetContainerNumSlots(id)
+	for i = 1, maxcount do
+		RefreshLoggedSlot(self, i, save)
 	end
 end

-local RefreshLoggedBagsSlots = function(self)
-	for _,bag in ipairs(self.BagIDs)do
-		local container = self.Bags[bag]
-		if container then
-			if PLUGIN.myStash[bag] then
-				twipe(PLUGIN.myStash[bag])
-			else
-				PLUGIN.myStash[bag] = {};
-			end
-			RefreshLoggedBagSlots(container, bag, true)
-		end
+local RefreshLoggedBags = function(self)
+	for id,bag in pairs(self.Bags)do
+		if PLUGIN.myStash[id] then
+			twipe(PLUGIN.myStash[id])
+		else
+			PLUGIN.myStash[id] = {};
+		end
+		RefreshLoggedSlots(bag, id, true)
 	end
-	for bag,items in pairs(PLUGIN.myStash) do
+	for id,items in pairs(PLUGIN.myStash) do
 		for id,amt in pairs(items) do
 			PLUGIN.BagItemCache[id] = PLUGIN.BagItemCache[id] or {}
 			PLUGIN.BagItemCache[id][nameKey] = amt
@@ -173,7 +169,7 @@ CORE FUNCTIONS
 function PLUGIN:AppendBankFunctions()
 	local BAGS = SV.SVBag;
 	if(BAGS.BankFrame) then
-		BAGS.BankFrame.RefreshBagsSlots = RefreshLoggedBagsSlots
+		BAGS.BankFrame.RefreshBags = RefreshLoggedBags
 	end
 end
 --[[
@@ -233,9 +229,9 @@ function PLUGIN:Load()
 	if SV.db.SVBag.enable then
 		local BAGS = SV.SVBag;
 		if BAGS.BagFrame then
-			BAGS.BagFrame.RefreshBagsSlots = RefreshLoggedBagsSlots;
+			BAGS.BagFrame.RefreshBags = RefreshLoggedBags;
 			NewHook(BAGS, "MakeBankOrReagent", self.AppendBankFunctions);
-			RefreshLoggedBagsSlots(BAGS.BagFrame)
+			RefreshLoggedBags(BAGS.BagFrame)
 		end
 	end
 	if SV.db.SVTip.enable then
diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
index 0196894..1438078 100644
--- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
+++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## Title: |cffFF9900SVUI |r|cffFFEF00Log-O-Matic|r
 ## Notes: Supervillain UI [|cff9911FFData Logging|r].
 ## SavedVariables: LogOMatic_Data
diff --git a/Interface/AddOns/SVUI_StyleOMatic/Loader.lua b/Interface/AddOns/SVUI_StyleOMatic/Loader.lua
index 2865ff9..9814082 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/Loader.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/Loader.lua
@@ -16,11 +16,18 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+
 local AddonName, AddonObject = ...

-assert(LibSuperVillain, AddonName .. " requires LibSuperVillain")
+assert(_G.LibSuperVillain, AddonName .. " requires LibSuperVillain")

-local PLUGIN = LibSuperVillain:NewPlugin(AddonName, AddonObject)
+local PLUGIN = _G.LibSuperVillain:NewPlugin(AddonName, AddonObject)

 local Schema = PLUGIN.Schema;
 local SV = _G["SVUI"];
diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua
index a8dfd52..bd7d1d6 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua
@@ -22,6 +22,9 @@ local unpack 	= _G.unpack;
 local select 	= _G.select;
 local pairs 	= _G.pairs;
 local type 		= _G.type;
+local tostring 	= _G.tostring;
+local print 	= _G.print;
+local pcall 	= _G.pcall;
 local tinsert 	= _G.tinsert;
 local string 	= _G.string;
 local math 		= _G.math;
@@ -32,6 +35,8 @@ local format,find = string.format, string.find;
 local floor = math.floor;
 --[[ TABLE METHODS ]]--
 local twipe, tcopy = table.wipe, table.copy;
+local IsAddOnLoaded = _G.IsAddOnLoaded;
+local LoadAddOn = _G.LoadAddOn;
 --[[
 ##########################################################
 GET ADDON DATA
@@ -373,7 +378,7 @@ function PLUGIN:Load()
 	alert.Accept.Text = alert.Accept:CreateFontString(nil, "OVERLAY");
 	alert.Accept.Text:SetFont(SV.Media.font.default, 10);
 	alert.Accept.Text:SetPoint('CENTER');
-	alert.Accept.Text:SetText(YES);
+	alert.Accept.Text:SetText(_G.YES);
 	alert.Close = CreateFrame('Button', nil, alert);
 	alert.Close:SetSize(70, 25);
 	alert.Close:SetPoint('LEFT', alert, 'BOTTOM', 10, 20);
@@ -381,7 +386,7 @@ function PLUGIN:Load()
 	alert.Close.Text = alert.Close:CreateFontString(nil, "OVERLAY");
 	alert.Close.Text:SetFont(SV.Media.font.default, 10);
 	alert.Close.Text:SetPoint('CENTER');
-	alert.Close.Text:SetText(NO);
+	alert.Close.Text:SetText(_G.NO);
 	alert.Accept:SetButtonTemplate();
 	alert.Close:SetButtonTemplate();
 	alert:Hide();
diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc
index a7f1c43..8ccf115 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc
+++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch, Azilroka, Sortokk
-## Version: 4.8
+## Version: 4.9
 ## Title: |cffFF9900SVUI |r|cffFFEF00Style-O-Matic|r
 ## Notes: Supervillain UI [|cff9911FFAddon Skins|r].
 ## RequiredDeps: SVUI
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Ace3.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Ace3.lua
index 68fec6b..b01fd8b 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Ace3.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Ace3.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua
index 502fa9b..b13fdd8 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua
@@ -65,8 +65,8 @@ local function skada_panel_loader(holder, window)
   window.db.spark=false;
   window.db.barslocked = true;
   window.bargroup:ClearAllPoints()
-  window.bargroup:SetPoint('BOTTOMLEFT',holder,'BOTTOMLEFT',0,0)
-  window.bargroup:SetParent(holder)
+  window.bargroup:SetPoint('BOTTOMLEFT', holder, 'BOTTOMLEFT', 0, 0)
+  window.bargroup:SetParent(UIParent)
   window.bargroup:SetFrameStrata('LOW')

   local bgroup = window.bargroup.backdrop;
@@ -76,6 +76,7 @@ local function skada_panel_loader(holder, window)
   end

   bars:ApplySettings(window)
+  window.bargroup:SetParent(holder)
 end

 function STYLE:Docklet_Skada()
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua
index 8f4ed77..4d28483 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua
@@ -13,6 +13,18 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+local type          = _G.type;
+local error         = _G.error;
+local pcall         = _G.pcall;
+local print         = _G.print;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -197,15 +209,21 @@ local function AchievementStyle()
 	AchievementFrameComparisonSummaryFriendStatusBar.text:SetPoint("CENTER")
 	AchievementFrameComparisonHeader:Point("BOTTOMRIGHT", AchievementFrameComparison, "TOPRIGHT", 45, -20)

-	for f = 1, 10 do
-		local d = _G["AchievementFrameSummaryCategoriesCategory"..f]
-		local i = _G["AchievementFrameSummaryCategoriesCategory"..f.."Button"]
-		local j = _G["AchievementFrameSummaryCategoriesCategory"..f.."ButtonHighlight"]
-		BarStyleHelper(d)
-		i:RemoveTextures()
-		j:RemoveTextures()
-		_G[j:GetName().."Middle"]:SetTexture(1, 1, 1, 0.3)
-		_G[j:GetName().."Middle"]:SetAllPoints(d)
+	for i = 1, 12 do
+		local categoryName = ("AchievementFrameSummaryCategoriesCategory%d"):format(i)
+		if(_G[categoryName]) then
+			if _G[categoryName.."Button"] then
+				_G[categoryName.."Button"]:RemoveTextures()
+			end
+			local hlName = categoryName.."ButtonHighlight"
+			local highlight = _G[hlName]
+			if(highlight) then
+				highlight:RemoveTextures()
+				_G[hlName.."Middle"]:SetTexture(1, 1, 1, 0.3)
+				_G[hlName.."Middle"]:SetAllPoints(categoryName)
+			end
+			BarStyleHelper(_G[categoryName])
+		end
 	end

 	AchievementFrame:HookScript("OnShow", function(self)
@@ -280,13 +298,11 @@ local function AchievementStyle()
 			end

 			if(track) then
-				track:RemoveTextures()
-				track:SetCheckboxTemplate(true)
 				track:ClearAllPoints()
-				track:Point("BOTTOMLEFT", d, "BOTTOMLEFT", -1, -3)
+				track:Point("BOTTOMLEFT", 1, 1)
+				track:RemoveTextures()
+				track:SetCheckboxTemplate(true, -3, -3)
 				track.ListParent = button
-
-				hooksecurefunc(track, "SetPoint", _hook_TrackingPoint)
 			end
 		end
 	end
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua
index 04dc87d..023d1a7 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua
index 251045e..a1c720e 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/auctionhouse.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/auctionhouse.lua
index f7e4f24..c5b0e72 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/auctionhouse.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/auctionhouse.lua
@@ -13,6 +13,12 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/barbershop.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/barbershop.lua
index c2ad149..fd5bae3 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/barbershop.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/barbershop.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -23,41 +28,57 @@ BARBERSHOP STYLER
 ##########################################################
 ]]--
 local function BarberShopStyle()
-	if SV.db[Schema].blizzard.enable~=true or SV.db[Schema].blizzard.barber~=true then return end
+	if SV.db[Schema].blizzard.enable~=true or SV.db[Schema].blizzard.barber~=true then return end
+
 	local buttons = {"BarberShopFrameOkayButton", "BarberShopFrameCancelButton", "BarberShopFrameResetButton"}
+
 	BarberShopFrameOkayButton:Point("RIGHT", BarberShopFrameSelector4, "BOTTOM", 2, -50)
+
 	for b = 1, #buttons do
 		_G[buttons[b]]:RemoveTextures()
 		_G[buttons[b]]:SetButtonTemplate()
-	end
-	for b = 1, 4 do
-		local c = _G["BarberShopFrameSelector"..b]
-		local d = _G["BarberShopFrameSelector"..b-1]
-		STYLE:ApplyPaginationStyle(_G["BarberShopFrameSelector"..b.."Prev"])
-		STYLE:ApplyPaginationStyle(_G["BarberShopFrameSelector"..b.."Next"])
-		if b ~= 1 then
-			c:ClearAllPoints()c:Point("TOP", d, "BOTTOM", 0, -3)
-		end
-		if c then
-			c:RemoveTextures()
-		end
-	end
-	BarberShopFrameSelector1:ClearAllPoints()
-	BarberShopFrameSelector1:Point("TOP", 0, -12)
-	BarberShopFrameResetButton:ClearAllPoints()
-	BarberShopFrameResetButton:Point("BOTTOM", 0, 12)
+	end
+
 	BarberShopFrame:RemoveTextures()
 	BarberShopFrame:SetPanelTemplate("Halftone")
 	BarberShopFrame:Size(BarberShopFrame:GetWidth()-30, BarberShopFrame:GetHeight()-56)
+
+	local lastframe;
+	for i = 1, 5 do
+		local selector = _G["BarberShopFrameSelector"..i]
+		if selector then
+			STYLE:ApplyPaginationStyle(_G["BarberShopFrameSelector"..i.."Prev"])
+			STYLE:ApplyPaginationStyle(_G["BarberShopFrameSelector"..i.."Next"])
+			selector:ClearAllPoints()
+
+			if lastframe then
+				selector:Point("TOP", lastframe, "BOTTOM", 0, -3)
+			else
+				selector:Point("TOP", BarberShopFrame, "TOP", 0, -12)
+			end
+
+			selector:RemoveTextures()
+			if(selector:IsShown()) then
+				lastframe = selector
+			end
+		end
+	end
+
 	BarberShopFrameMoneyFrame:RemoveTextures()
-	BarberShopFrameMoneyFrame:SetPanelTemplate()
+	BarberShopFrameMoneyFrame:SetPanelTemplate("Inset")
+	BarberShopFrameMoneyFrame:Point("TOP", lastframe, "BOTTOM", 0, -10)
+
 	BarberShopFrameBackground:Die()
 	BarberShopBannerFrameBGTexture:Die()
 	BarberShopBannerFrame:Die()
+
 	BarberShopAltFormFrameBorder:RemoveTextures()
 	BarberShopAltFormFrame:Point("BOTTOM", BarberShopFrame, "TOP", 0, 5)
 	BarberShopAltFormFrame:RemoveTextures()
-	BarberShopAltFormFrame:SetBasicPanel()
+	BarberShopAltFormFrame:SetPanelTemplate("Action")
+
+	BarberShopFrameResetButton:ClearAllPoints()
+	BarberShopFrameResetButton:Point("BOTTOM", BarberShopFrame.Panel, "BOTTOM", 0, 4)
 end
 --[[
 ##########################################################
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/battlefield.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/battlefield.lua
index 044ff6c..a44b939 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/battlefield.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/battlefield.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/blackmarket.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/blackmarket.lua
index 88bc2c6..21ff8b3 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/blackmarket.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/blackmarket.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/calendar.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/calendar.lua
index ba4091f..9a999ed 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/calendar.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/calendar.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs        = _G.ipairs;
+local pairs         = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -53,12 +60,6 @@ local function CalendarStyle()
 			cfframe:Width(155)
 			cfframe:SetPanelTemplate("Default")

-			local cftext = _G["CalendarFilterFrameText"]
-			if(cftext) then
-				cftext:ClearAllPoints()
-				cftext:SetPoint("RIGHT", cfbutton, "LEFT", -2, 0)
-			end
-
 			local cfbutton = _G["CalendarFilterButton"];
 			if(cfbutton) then
 				cfbutton:ClearAllPoints()
@@ -66,6 +67,12 @@ local function CalendarStyle()
 				STYLE:ApplyPaginationStyle(cfbutton, true)
 				cfframe.Panel:SetPoint("TOPLEFT", 20, 2)
 				cfframe.Panel:SetPoint("BOTTOMRIGHT", cfbutton, "BOTTOMRIGHT", 2, -2)
+
+				local cftext = _G["CalendarFilterFrameText"]
+				if(cftext) then
+					cftext:ClearAllPoints()
+					cftext:SetPoint("RIGHT", cfbutton, "LEFT", -2, 0)
+				end
 			end
 		end
 	end
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/challenges.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/challenges.lua
index bfcfe58..1ad71b2 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/challenges.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/challenges.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/character.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/character.lua
index ea9fc7c..5fa7f77 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/character.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/character.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/chat.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/chat.lua
index 5f11298..bd44ba3 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/chat.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/chat.lua
@@ -13,6 +13,18 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local string 	= _G.string;
+local math 		= _G.math;
+local table 	= _G.table;
+--[[ STRING METHODS ]]--
+local format, join, gsub = string.format, string.join, string.gsub;
+--[[ MATH METHODS ]]--
+local ceil = math.ceil;  -- Basic
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -22,6 +34,9 @@ local Schema = STYLE.Schema;
 FRAME LISTS
 ##########################################################
 ]]--
+local CHAT_CONFIG_CHANNEL_LIST = _G.CHAT_CONFIG_CHANNEL_LIST;
+local CHANNELS = _G.CHANNELS;
+
 local ChatMenuList = {
 	"ChatMenu",
 	"EmoteMenu",
@@ -414,7 +429,13 @@ local function ChatStyle()

 	ChatConfigChannelSettingsLeft:HookScript("OnShow", ChatConfigChannelSettingsLeft_OnEvent)

-	CreateChatChannelList(ChatConfigChannelSettings, GetChannelList())
+	-- do
+	-- 	local chatchannellist = GetChannelList()
+	-- 	local CreateChatChannelList = _G.CreateChatChannelList;
+	-- 	local ChatConfigChannelSettings = _G.ChatConfigChannelSettings;
+	-- 	CreateChatChannelList(ChatConfigChannelSettings, chatchannellist)
+	-- end
+
 	ChatConfig_CreateCheckboxes(ChatConfigChannelSettingsLeft, CHAT_CONFIG_CHANNEL_LIST, "ChatConfigCheckBoxWithSwatchAndClassColorTemplate", CHANNELS)
 	ChatConfig_UpdateCheckboxes(ChatConfigChannelSettingsLeft)

diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/dressup.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/dressup.lua
index 0f6f3b5..df512dd 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/dressup.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/dressup.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/encounterjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/encounterjournal.lua
index 3920bb7..e807a0a 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/encounterjournal.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/encounterjournal.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/friends.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/friends.lua
index 5c8c50f..bfa7b46 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/friends.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/friends.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/gossip.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/gossip.lua
index d45542a..d76c24a 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/gossip.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/gossip.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/guild.lua
index 6d1c9c0..43a78af 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/guild.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/guild.lua
@@ -13,6 +13,17 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  	= _G.unpack;
+local select  	= _G.select;
+local ipairs  	= _G.ipairs;
+local pairs   	= _G.pairs;
+local next    	= _G.next;
+local time 		= _G.time;
+local date 		= _G.date;
+local ceil, modf = math.ceil, math.modf;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -106,9 +117,9 @@ local function GCTabHelper(tab)
 	tab.bg3:SetAllPoints(tab.Panel)
 end

-local RankOrder_OnUpdate = function()
-	for b=1,GuildControlGetNumRanks()do
-		local frame = _G["GuildControlUIRankOrderFrameRank"..b]
+local _hook_RankOrder_OnUpdate = function()
+	for i = 1, GuildControlGetNumRanks()do
+		local frame = _G["GuildControlUIRankOrderFrameRank"..i]
 		if frame then
 			frame.downButton:SetButtonTemplate()
 			frame.upButton:SetButtonTemplate()
@@ -157,6 +168,87 @@ function GuildInfoEvents_SetButton(button, eventIndex)
 		button.icon:SetTexture("Interface\\LFGFrame\\LFGIcon-"..textureName)
 	end
 end
+
+local _hook_UIRankOrder = function(self)
+	SV.Timers:ExecuteTimer(1, _hook_RankOrder_OnUpdate)
+end
+
+local _hook_GuildBankFrame_Update = function(self)
+	if GuildBankFrame.mode ~= "bank" then return end
+	local curTab = GetCurrentGuildBankTab()
+	local numSlots = NUM_SLOTS_PER_GUILDBANK_GROUP
+	local maxSlots = MAX_GUILDBANK_SLOTS_PER_TAB
+	local button, btnName, btnID, slotID, itemLink;
+	for i = 1, maxSlots do
+		btnID = i % numSlots
+		if btnID == 0 then
+			btnID = numSlots
+		end
+		slotID = ceil((i - 0.5) / numSlots)
+		btnName = ("GuildBankColumn%dButton%d"):format(slotID, btnID)
+		button = _G[btnName]
+		if(button) then
+			itemLink = GetGuildBankItemLink(curTab, i)
+			local r, g, b, a = 0,0,0,1
+			if(itemLink) then
+				local quality = select(3, GetItemInfo(itemLink))
+				if(quality > 1) then
+					r, g, b = GetItemQualityColor(quality)
+				end
+			end
+			button:SetBackdropBorderColor(r, g, b, a)
+		end
+	end
+end
+
+local _hook_BankTabPermissions = function(self)
+	local tab, tabs, baseName, ownedName, purchase, view, stack, deposit, update
+
+	tabs = GetNumGuildBankTabs()
+
+	if tabs < MAX_BUY_GUILDBANK_TABS then
+		tabs = tabs + 1
+	end
+
+	for i = 1, tabs do
+		baseName = ("GuildControlBankTab%d"):format(i)
+		ownedName = ("%sOwned"):format(baseName)
+		tab = _G[ownedName]
+
+		if(tab) then
+			if(tab.tabIcon) then tab.tabIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) end
+			if(tab.editBox) then tab.editBox:SetEditboxTemplate() end
+
+			if internalTest == false then
+				purchase =  _G[baseName.."BuyPurchaseButton"]
+				if(purchase) then
+					purchase:SetButtonTemplate()
+				end
+				view =  _G[ownedName.."ViewCheck"]
+				if(view) then
+					view:SetCheckboxTemplate(true)
+					GCTabHelper(view)
+				end
+				stack =  _G[ownedName.."StackBox"]
+				if(stack) then
+					stack:SetEditboxTemplate()
+					GCTabHelper(stack)
+				end
+				deposit =  _G[ownedName.."DepositCheck"]
+				if(deposit) then
+					deposit:SetCheckboxTemplate(true)
+					GCTabHelper(deposit)
+				end
+				update =  _G[ownedName.."UpdateInfoCheck"]
+				if(update) then
+					update:SetCheckboxTemplate(true)
+					GCTabHelper(update)
+				end
+			end
+		end
+	end
+	internalTest = true
+end
 --[[
 ##########################################################
 GUILDFRAME STYLERS
@@ -173,10 +265,10 @@ local function GuildBankStyle()
 	GuildBankMoneyFrameBackground:Die()
 	STYLE:ApplyScrollFrameStyle(GuildBankPopupScrollFrameScrollBar)

-	for b = 1, GuildBankFrame:GetNumChildren() do
-		local c = select(b, GuildBankFrame:GetChildren())
-		if c.GetPushedTexture and c:GetPushedTexture() and not c:GetName() then
-			STYLE:ApplyCloseButtonStyle(c)
+	for i = 1, GuildBankFrame:GetNumChildren() do
+		local child = select(i, GuildBankFrame:GetChildren())
+		if(child and child.GetPushedTexture and child:GetPushedTexture() and not child:GetName()) then
+			STYLE:ApplyCloseButtonStyle(child)
 		end
 	end

@@ -190,68 +282,62 @@ local function GuildBankStyle()
 	GuildBankInfoScrollFrame:Width(GuildBankInfoScrollFrame:GetWidth()-8)
 	GuildBankTransactionsScrollFrame:RemoveTextures()

-	for b = 1, NUM_GUILDBANK_COLUMNS do
-		if(_G["GuildBankColumn"..b]) then
-			_G["GuildBankColumn"..b]:RemoveTextures()
-
-			for d = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do
-				local e = _G["GuildBankColumn"..b.."Button"..d]
-				local icon = _G["GuildBankColumn"..b.."Button"..d.."IconTexture"]
-				local texture = _G["GuildBankColumn"..b.."Button"..d.."NormalTexture"]
-				if texture then
-					texture:SetTexture(0,0,0,0)
-				end
-				e:SetSlotTemplate()
-				icon:FillInner()
-				icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+	for i = 1, NUM_GUILDBANK_COLUMNS do
+		local frame = _G["GuildBankColumn"..i]
+		if(frame) then
+			frame:RemoveTextures()
+			local baseName = ("GuildBankColumn%dButton"):format(i)
+			for slotID = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do
+				local btnName = ("%s%d"):format(baseName, slotID)
+				local button = _G[btnName]
+				if(button) then
+					local texture = _G[btnName.."NormalTexture"]
+					if texture then
+						texture:SetTexture(0,0,0,0)
+					end
+
+					button:SetSlotTemplate()
+
+					local icon = _G[btnName.."IconTexture"]
+					if(icon) then
+						icon:FillInner()
+						icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+					end
+				end
 			end
 		end
 	end

-	for b = 1, 8 do
-		local e = _G["GuildBankTab"..b.."Button"]
-		if(e) then
-			local texture = _G["GuildBankTab"..b.."ButtonIconTexture"]
-			_G["GuildBankTab"..b]:RemoveTextures(true)
-			e:RemoveTextures()
-			e:SetButtonTemplate()
-			e:SetFixedPanelTemplate("Default")
-			texture:FillInner()
-			texture:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+	for i = 1, 8 do
+		local baseName = ("GuildBankTab%d"):format(i)
+		local tab = _G[baseName]
+		if(tab) then
+			local btnName = ("%sButton"):format(baseName)
+			local button = _G[baseName]
+			if(button) then
+				tab:RemoveTextures(true)
+				button:RemoveTextures()
+				button:SetButtonTemplate()
+				button:SetFixedPanelTemplate("Default")
+
+				local texture = _G[btnName.."IconTexture"]
+				if(texture) then
+					texture:FillInner()
+					texture:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+				end
+			end
 		end
 	end

-	for b = 1, 4 do
-		STYLE:ApplyTabStyle(_G["GuildBankFrameTab"..b])
+	for i = 1, 4 do
+		local baseName = ("GuildBankFrameTab%d"):format(i)
+		local frame = _G[baseName]
+		if(frame) then
+			STYLE:ApplyTabStyle(_G[baseName])
+		end
 	end

-	hooksecurefunc('GuildBankFrame_Update', function()
-		if GuildBankFrame.mode ~= "bank" then
-			return
-		end
-		local f = GetCurrentGuildBankTab()
-		local e, g, h, i, j, k, l, m;
-		for b = 1, MAX_GUILDBANK_SLOTS_PER_TAB do
-			g = mod(b, NUM_SLOTS_PER_GUILDBANK_GROUP)
-			if g == 0 then
-				g = NUM_SLOTS_PER_GUILDBANK_GROUP
-			end
-			h = ceil((b-0.5)/NUM_SLOTS_PER_GUILDBANK_GROUP)
-			e = _G["GuildBankColumn"..h.."Button"..g]
-			i = GetGuildBankItemLink(f, b)
-			if i then
-				j = select(3, GetItemInfo(i))
-				if j > 1 then
-					k, l, m = GetItemQualityColor(j)
-				else
-					k, l, m = 0,0,0,1
-				end
-			else
-				k, l, m = 0,0,0,1
-			end
-			e:SetBackdropBorderColor(k, l, m)
-		end
-	end)
+	hooksecurefunc('GuildBankFrame_Update', _hook_GuildBankFrame_Update)

 	GuildBankPopupFrame:RemoveTextures()
 	GuildBankPopupScrollFrame:RemoveTextures()
@@ -268,15 +354,19 @@ local function GuildBankStyle()
 	GuildItemSearchBox.Panel:Point("TOPLEFT", 10, -1)
 	GuildItemSearchBox.Panel:Point("BOTTOMRIGHT", 4, 1)

-	for b = 1, 16 do
-		local e = _G["GuildBankPopupButton"..b]
-		if(e) then
-			local icon = _G[e:GetName().."Icon"]
-			e:RemoveTextures()
-			e:SetFixedPanelTemplate("Default")
-			e:SetButtonTemplate()
-			icon:FillInner()
-			icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+	for i = 1, 16 do
+		local btnName = ("GuildBankPopupButton%d"):format(i)
+		local button = _G[btnName]
+		if(button) then
+			button:RemoveTextures()
+			button:SetFixedPanelTemplate("Default")
+			button:SetButtonTemplate()
+
+			local icon = _G[btnName.."Icon"]
+			if(icon) then
+				icon:FillInner()
+				icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+			end
 		end
 	end

@@ -542,11 +632,8 @@ local function GuildControlStyle()

 	STYLE:ApplyScrollFrameStyle(GuildControlUIRankBankFrameInsetScrollFrameScrollBar)

-	hooksecurefunc("GuildControlUI_RankOrder_Update",RankOrder_OnUpdate)
-
-	GuildControlUIRankOrderFrameNewButton:HookScript("OnClick", function()
-		SV.Timers:ExecuteTimer(1,RankOrder_OnUpdate)
-	end)
+	hooksecurefunc("GuildControlUI_RankOrder_Update", _hook_RankOrder_OnUpdate)
+	GuildControlUIRankOrderFrameNewButton:HookScript("OnClick", _hook_UIRankOrder)

 	STYLE:ApplyDropdownStyle(GuildControlUINavigationDropDown)
 	STYLE:ApplyDropdownStyle(GuildControlUIRankSettingsFrameRankDropDown,180)
@@ -565,36 +652,7 @@ local function GuildControlStyle()
 	GuildControlUIRankSettingsFrameGoldBox:RemoveTextures()
 	GuildControlUIRankBankFrame:RemoveTextures()

-	hooksecurefunc("GuildControlUI_BankTabPermissions_Update",function()
-		local tabs = GetNumGuildBankTabs()
-
-		if tabs < MAX_BUY_GUILDBANK_TABS then
-			tabs = tabs + 1
-		end
-
-		for i=1, tabs do
-			local tab = _G["GuildControlBankTab"..i.."Owned"]
-
-			if(tab) then
-				if(tab.tabIcon) then tab.tabIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) end
-				if(tab.editBox) then tab.editBox:SetEditboxTemplate() end
-
-				if internalTest == false then
-					_G["GuildControlBankTab"..i.."BuyPurchaseButton"]:SetButtonTemplate()
-					_G["GuildControlBankTab"..i.."OwnedStackBox"]:SetEditboxTemplate()
-					_G["GuildControlBankTab"..i.."OwnedViewCheck"]:SetCheckboxTemplate(true)
-					_G["GuildControlBankTab"..i.."OwnedDepositCheck"]:SetCheckboxTemplate(true)
-					_G["GuildControlBankTab"..i.."OwnedUpdateInfoCheck"]:SetCheckboxTemplate(true)
-
-					GCTabHelper(_G["GuildControlBankTab"..i.."OwnedStackBox"])
-					GCTabHelper(_G["GuildControlBankTab"..i.."OwnedViewCheck"])
-					GCTabHelper(_G["GuildControlBankTab"..i.."OwnedDepositCheck"])
-					GCTabHelper(_G["GuildControlBankTab"..i.."OwnedUpdateInfoCheck"])
-				end
-			end
-		end
-		internalTest = true
-	end)
+	hooksecurefunc("GuildControlUI_BankTabPermissions_Update", _hook_BankTabPermissions)

 	STYLE:ApplyDropdownStyle(GuildControlUIRankBankFrameRankDropDown, 180)

diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/help.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/help.lua
index bf38890..9b05609 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/help.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/help.lua
@@ -13,6 +13,12 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local tinsert = _G.tinsert;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/inspect.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/inspect.lua
index f0ed23f..8e41af9 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/inspect.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/inspect.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemsocketing.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemsocketing.lua
index b4c53f2..a81c81d 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemsocketing.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemsocketing.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemupgrade.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemupgrade.lua
index 86aab3e..d6d8d32 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemupgrade.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemupgrade.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/keybinding.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/keybinding.lua
index bd456a5..d7f88b7 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/keybinding.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/keybinding.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua
index 19859c9..bd04c57 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/loothistory.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/loothistory.lua
index 6294540..8b5c624 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/loothistory.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/loothistory.lua
@@ -13,6 +13,14 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local math    = _G.math;
+--[[ MATH METHODS ]]--
+local ceil = math.ceil;  -- Basic
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -22,48 +30,92 @@ local Schema = STYLE.Schema;
 HELPERS
 ##########################################################
 ]]--
-local MissingLootFrame_OnShow = function()
-  local N = GetNumMissingLootItems()
-  for u = 1, N do
-    local O = _G["MissingLootFrameItem"..u]
-    local icon = O.icon;
-    STYLE:ApplyItemButtonStyle(O, true)
-    local g, f, y, P = GetMissingLootItemInfo(u)
-    local color = GetItemQualityColor(P) or 0,0,0,1
-    icon:SetTexture(g)
-    M:SetBackdropBorderColor(color)
+local MissingLootFrame_OnShow = function(self)
+  local numMissing = GetNumMissingLootItems()
+  for i = 1, numMissing do
+    local slot = _G["MissingLootFrameItem"..i]
+    local icon = slot.icon;
+    STYLE:ApplyItemButtonStyle(slot, true)
+    local texture, name, count, quality = GetMissingLootItemInfo(i);
+    local r,g,b,hex = GetItemQualityColor(quality)
+    if(not r) then
+      r,g,b = 0,0,0
+    end
+    icon:SetTexture(texture)
+    _G.MissingLootFrame:SetBackdropBorderColor(r,g,b)
   end
-  local Q = ceil(N/2)
-  MissingLootFrame:SetHeight(Q * 43 + 38 + MissingLootFrameLabel:GetHeight())
+  local calc = (ceil(numMissing * 0.5) * 43) + 38
+  _G.MissingLootFrame:SetHeight(calc + _G.MissingLootFrameLabel:GetHeight())
 end

-local LootHistoryFrame_OnUpdate = function(o)
-  local N = C_LootHistory.GetNumItems()
-  for u = 1, N do
-    local M = LootHistoryFrame.itemFrames[u]
-    if not M.isStyled then
-      local Icon = M.Icon:GetTexture()
-      M:RemoveTextures()
-      M.Icon:SetTexture(Icon)
-      M.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
-      M:SetFixedPanelTemplate("Button")
-      M.Panel:WrapOuter(M.Icon)
-      M.Icon:SetParent(M.Panel)
-      M.isStyled = true
+local LootHistoryFrame_OnUpdate = function(self)
+  local numItems = _G.C_LootHistory.GetNumItems()
+  for i = 1, numItems do
+    local frame = _G.LootHistoryFrame.itemFrames[i]
+    if not frame.isStyled then
+      local Icon = frame.Icon:GetTexture()
+      frame:RemoveTextures()
+      frame.Icon:SetTexture(Icon)
+      frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+
+      frame:SetFixedPanelTemplate("Button")
+      frame.Panel:WrapOuter(frame.Icon)
+      frame.Icon:SetParent(frame.Panel)
+
+      frame.isStyled = true
     end
   end
-end
+end
+
+local _hook_MasterLootFrame_OnShow = function()
+  local MasterLooterFrame = _G.MasterLooterFrame;
+  local item = MasterLooterFrame.Item;
+  local LootFrame = _G.LootFrame;
+  if item then
+    local icon = item.Icon;
+    local tex = icon:GetTexture()
+    local colors = ITEM_QUALITY_COLORS[LootFrame.selectedQuality]
+    item:RemoveTextures()
+    icon:SetTexture(tex)
+    icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+    item:SetPanelTemplate("Pattern")
+    item.Panel:WrapOuter(icon)
+    item.Panel:SetBackdropBorderColor(colors.r, colors.g, colors.b)
+  end
+  for i = 1, MasterLooterFrame:GetNumChildren()do
+    local child = select(i, MasterLooterFrame:GetChildren())
+    if child and not child.isStyled and not child:GetName() then
+      if child:GetObjectType() == "Button" then
+        if child:GetPushedTexture() then
+          STYLE:ApplyCloseButtonStyle(child)
+        else
+          child:SetFixedPanelTemplate()
+          child:SetButtonTemplate()
+        end
+        child.isStyled = true
+      end
+    end
+  end
+end
 --[[
 ##########################################################
 LOOTHISTORY STYLER
 ##########################################################
 ]]--
 local function LootHistoryStyle()
-  LootHistoryFrame:SetFrameStrata('HIGH')
   if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.loot ~= true then return end
-  local M = MissingLootFrame;
-  M:RemoveTextures()
-  M:SetPanelTemplate("Pattern")
+
+  local MasterLooterFrame = _G.MasterLooterFrame;
+  local MissingLootFrame = _G.MissingLootFrame;
+  local LootHistoryFrame = _G.LootHistoryFrame;
+  local BonusRollFrame = _G.BonusRollFrame;
+  local MissingLootFramePassButton = _G.MissingLootFramePassButton;
+
+  LootHistoryFrame:SetFrameStrata('HIGH')
+
+  MissingLootFrame:RemoveTextures()
+  MissingLootFrame:SetPanelTemplate("Pattern")
+
   STYLE:ApplyCloseButtonStyle(MissingLootFramePassButton)
   hooksecurefunc("MissingLootFrame_Show", MissingLootFrame_OnShow)
   LootHistoryFrame:RemoveTextures()
@@ -87,37 +139,13 @@ local function LootHistoryStyle()
   LootHistoryFrameScrollFrame:RemoveTextures()
   STYLE:ApplyScrollFrameStyle(LootHistoryFrameScrollFrameScrollBar)
   hooksecurefunc("LootHistoryFrame_FullUpdate", LootHistoryFrame_OnUpdate)
+
   MasterLooterFrame:RemoveTextures()
   MasterLooterFrame:SetFixedPanelTemplate()
   MasterLooterFrame:SetFrameStrata('FULLSCREEN_DIALOG')
-  hooksecurefunc("MasterLooterFrame_Show", function()
-    local J = MasterLooterFrame.Item;
-    if J then
-      local u = J.Icon;
-      local icon = u:GetTexture()
-      local S = ITEM_QUALITY_COLORS[LootFrame.selectedQuality]
-      J:RemoveTextures()
-      u:SetTexture(icon)
-      u:SetTexCoord(0.1, 0.9, 0.1, 0.9)
-      J:SetPanelTemplate("Pattern")
-      J.Panel:WrapOuter(u)
-      J.Panel:SetBackdropBorderColor(S.r, S.g, S.b)
-    end
-    for u = 1, MasterLooterFrame:GetNumChildren()do
-      local T = select(u, MasterLooterFrame:GetChildren())
-      if T and not T.isStyled and not T:GetName() then
-        if T:GetObjectType() == "Button" then
-          if T:GetPushedTexture() then
-            STYLE:ApplyCloseButtonStyle(T)
-          else
-            T:SetFixedPanelTemplate()
-            T:SetButtonTemplate()
-          end
-          T.isStyled = true
-        end
-      end
-    end
-  end)
+
+  hooksecurefunc("MasterLooterFrame_Show", _hook_MasterLootFrame_OnShow)
+
   BonusRollFrame:RemoveTextures()
   STYLE:ApplyAlertStyle(BonusRollFrame)
   BonusRollFrame.PromptFrame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lossofcontrol.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lossofcontrol.lua
index b96660e..82793a8 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lossofcontrol.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lossofcontrol.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/macro.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/macro.lua
index 67f8299..b3eb9c1 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/macro.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/macro.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -34,34 +39,66 @@ MACRO UI STYLER
 ##########################################################
 ]]--
 local function MacroUIStyle()
-	if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.macro ~= true then return end
+	if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.macro ~= true then return end
+
+	local MacroFrame = _G.MacroFrame;
+	local MacroFrameCloseButton = _G.MacroFrameCloseButton;
+	local MacroButtonScrollFrameScrollBar = _G.MacroButtonScrollFrameScrollBar;
+	local MacroFrameScrollFrameScrollBar = _G.MacroFrameScrollFrameScrollBar;
+	local MacroPopupScrollFrameScrollBar = _G.MacroPopupScrollFrameScrollBar;
+
+	local MacroPopupScrollFrame = _G.MacroPopupScrollFrame;
+	local MacroPopupFrame = _G.MacroPopupFrame;
+	local MacroFrameSelectedMacroButton = _G.MacroFrameSelectedMacroButton;
+	local MacroFrameSelectedMacroButtonIcon = _G.MacroFrameSelectedMacroButtonIcon;
+
 	STYLE:ApplyCloseButtonStyle(MacroFrameCloseButton)
 	STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrameScrollBar)
 	STYLE:ApplyScrollFrameStyle(MacroFrameScrollFrameScrollBar)
 	STYLE:ApplyScrollFrameStyle(MacroPopupScrollFrameScrollBar)
+
 	MacroFrame:Width(360)
-	for b = 1, #MacroButtonList do
-		_G[MacroButtonList[b]]:RemoveTextures()
-		_G[MacroButtonList[b]]:SetButtonTemplate()
+
+	for i = 1, #MacroButtonList do
+		local button = _G[MacroButtonList[i]]
+		if(button) then
+			button:RemoveTextures()
+			button:SetButtonTemplate()
+		end
 	end
-	for b = 1, #MacroButtonList2 do
-		local a1,p,a2,x,y = _G[MacroButtonList2[b]]:GetPoint()
-		_G[MacroButtonList2[b]]:SetPoint(a1,p,a2,x,-25)
+
+	for i = 1, #MacroButtonList2 do
+		local button = _G[MacroButtonList2[i]]
+		if(button) then
+			local a1,p,a2,x,y = button:GetPoint()
+			button:SetPoint(a1,p,a2,x,-25)
+		end
 	end
-	for b = 1, 2 do
-		tab = _G[format("MacroFrameTab%s", b)]
-		tab:Height(22)
+
+	local firstTab
+	for i = 1, 2 do
+		local tab = _G[("MacroFrameTab%d"):format(i)]
+		if(tab) then
+			tab:Height(22)
+			if(i == 1) then
+				tab:Point("TOPLEFT", MacroFrame, "TOPLEFT", 85, -39)
+				firstTab = tab
+			elseif(firstTab) then
+				tab:Point("LEFT", firstTab, "RIGHT", 4, 0)
+			end
+		end
 	end
-	MacroFrameTab1:Point("TOPLEFT", MacroFrame, "TOPLEFT", 85, -39)
-	MacroFrameTab2:Point("LEFT", MacroFrameTab1, "RIGHT", 4, 0)
+
 	MacroFrame:RemoveTextures()
 	MacroFrame:SetPanelTemplate("Action")
 	MacroFrame.Panel:SetPoint("BOTTOMRIGHT",MacroFrame,"BOTTOMRIGHT",0,-25)
 	MacroFrameText:SetFont(SV.Media.font.roboto, 10, "OUTLINE")
 	MacroFrameTextBackground:RemoveTextures()
 	MacroFrameTextBackground:SetBasicPanel()
+
 	MacroPopupFrame:RemoveTextures()
 	MacroPopupFrame:SetBasicPanel()
+
 	MacroPopupScrollFrame:RemoveTextures()
 	MacroPopupScrollFrame:SetPanelTemplate("Pattern")
 	MacroPopupScrollFrame.Panel:Point("TOPLEFT", 51, 2)
@@ -71,20 +108,25 @@ local function MacroUIStyle()
 	MacroPopupNameLeft:SetTexture(0,0,0,0)
 	MacroPopupNameMiddle:SetTexture(0,0,0,0)
 	MacroPopupNameRight:SetTexture(0,0,0,0)
+
 	MacroFrameInset:Die()
 	MacroEditButton:ClearAllPoints()
 	MacroEditButton:Point("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 10, 0)
+
 	STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrame)
+
 	MacroPopupFrame:HookScript("OnShow", function(c)
 		c:ClearAllPoints()
 		c:Point("TOPLEFT", MacroFrame, "TOPRIGHT", 5, -2)
 	end)
+
 	MacroFrameSelectedMacroButton:RemoveTextures()
 	MacroFrameSelectedMacroButton:SetSlotTemplate()
 	MacroFrameSelectedMacroButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
 	MacroFrameSelectedMacroButtonIcon:FillInner()
 	MacroFrameCharLimitText:ClearAllPoints()
 	MacroFrameCharLimitText:Point("BOTTOM", MacroFrameTextBackground, -25, -35)
+
 	for b = 1, MAX_ACCOUNT_MACROS do
 		local d = _G["MacroButton"..b]
 		local e = _G["MacroButton"..b.."Icon"]
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/mailbox.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/mailbox.lua
index 972bf14..c05a651 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/mailbox.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/mailbox.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/merchant.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/merchant.lua
index ee68517..532e3bc 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/merchant.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/merchant.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua
index 807a9c5..d0bfb87 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua
@@ -13,6 +13,14 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+local hooksecurefunc = _G.hooksecurefunc;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -25,6 +33,7 @@ HELPERS
 local PBAB_WIDTH = 382;
 local PBAB_HEIGHT = 72;
 local PetBattleActionBar = CreateFrame("Frame", "SVUI_PetBattleActionBar", UIParent)
+local ITEM_QUALITY_COLORS = _G.ITEM_QUALITY_COLORS;

 local function PetBattleButtonHelper(frame)
 	frame:SetPanelTemplate("Blackout")
@@ -37,7 +46,156 @@ local function PetBattleButtonHelper(frame)
 	if(frame.pushed) then frame.pushed:FillInner(frame.Panel) end
 	if(frame.hover) then frame.hover:FillInner(frame.Panel) end
 	frame:SetFrameStrata('LOW')
-end
+end
+
+local _hook_UpdateSpeedIndicators = function()
+	local frame = _G.PetBattleFrame;
+
+	if not frame.ActiveAlly.SpeedIcon:IsShown() and not frame.ActiveEnemy.SpeedIcon:IsShown() then
+		frame.ActiveAlly.FirstAttack:Hide()
+		frame.ActiveEnemy.FirstAttack:Hide()
+		return
+	end
+
+	frame.ActiveAlly.FirstAttack:Show()
+
+	if frame.ActiveAlly.SpeedIcon:IsShown() then
+		frame.ActiveAlly.FirstAttack:SetVertexColor(0, 1, 0, 1)
+	else
+		frame.ActiveAlly.FirstAttack:SetVertexColor(.8, 0, .3, 1)
+	end
+
+	frame.ActiveEnemy.FirstAttack:Show()
+
+	if frame.ActiveEnemy.SpeedIcon:IsShown() then
+		frame.ActiveEnemy.FirstAttack:SetVertexColor(0, 1, 0, 1)
+	else
+		frame.ActiveEnemy.FirstAttack:SetVertexColor(.8, 0, .3, 1)
+	end
+end
+
+local _hook_UpdatePetType = function(self)
+	if self.PetType then
+		local C_PetBattles = _G.C_PetBattles;
+		local pettype = C_PetBattles.GetPetType(self.petOwner, self.petIndex)
+		if self.PetTypeFrame then
+			local text = _G.PET_TYPE_SUFFIX[pettype]
+			self.PetTypeFrame.text:SetText(text)
+		end
+	end
+end
+
+local _hook_AuraHolderUpdate = function(self)
+    if ( not self.petOwner or not self.petIndex ) then
+        self:Hide();
+        return;
+    end
+
+    local nextFrame = 1;
+    local C_PetBattles = _G.C_PetBattles;
+    for i=1, C_PetBattles.GetNumAuras(self.petOwner, self.petIndex) do
+        local auraID, instanceID, turnsRemaining, isBuff = C_PetBattles.GetAuraInfo(self.petOwner, self.petIndex, i);
+        if ( (isBuff and self.displayBuffs) or (not isBuff and self.displayDebuffs) ) then
+			local frame = self.frames[nextFrame]
+			frame.DebuffBorder:Hide()
+			if not frame.isStyled then
+				frame:SetSlotTemplate(true, 2, -8,-2)
+				frame.Icon:FillInner(frame.Panel, 2, 2)
+				frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+				frame.isStyled = true
+			end
+			if isBuff then
+				frame:SetBackdropBorderColor(0, 1, 0)
+			else
+				frame:SetBackdropBorderColor(1, 0, 0)
+			end
+			frame.Duration:SetFont(SV.Media.font.numbers, 16, "OUTLINE")
+			frame.Duration:ClearAllPoints()
+			frame.Duration:SetPoint("BOTTOMLEFT", frame.Icon, "BOTTOMLEFT", 4, 4)
+			if turnsRemaining > 0 then
+				frame.Duration:SetText(turnsRemaining)
+			end
+			nextFrame = nextFrame + 1
+		end
+	end
+end
+
+local _hook_WeatherFrameUpdate = function(self)
+	local LE_BATTLE_PET_WEATHER = _G.LE_BATTLE_PET_WEATHER;
+	local PET_BATTLE_PAD_INDEX = _G.PET_BATTLE_PAD_INDEX;
+	local C_PetBattles = _G.C_PetBattles;
+	local auraID = C_PetBattles.GetAuraInfo(LE_BATTLE_PET_WEATHER, PET_BATTLE_PAD_INDEX, 1)
+	if auraID then
+		self.Icon:Hide()
+		self.Name:Hide()
+		self.DurationShadow:Hide()
+		self.Label:Hide()
+		self.Duration:SetPoint("CENTER", self, 0, 8)
+		self:ClearAllPoints()
+		self:SetPoint("TOP", SV.UIParent, 0, -15)
+	end
+end
+
+local _hook_UpdateDisplay = function(self)
+	self.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+	--Update the pet rarity border
+    if (self.IconBackdrop) then
+    	local petOwner = self.petOwner;
+		local petIndex = self.petIndex;
+        local rarity = _G.C_PetBattles.GetBreedQuality(petOwner, petIndex);
+        if (_G.ENABLE_COLORBLIND_MODE ~= "1") then
+        	self.IconBackdrop:SetBackdropColor(ITEM_QUALITY_COLORS[rarity-1].r, ITEM_QUALITY_COLORS[rarity-1].g, ITEM_QUALITY_COLORS[rarity-1].b);
+            self.IconBackdrop:SetBackdropBorderColor(ITEM_QUALITY_COLORS[rarity-1].r, ITEM_QUALITY_COLORS[rarity-1].g, ITEM_QUALITY_COLORS[rarity-1].b);
+        end
+    end
+end
+
+local _hook_AbilityTooltipShow = function()
+	SV:AnchorToCursor(PetBattlePrimaryAbilityTooltip)
+end
+
+local _hook_SkipButtonSetPoint = function(self, arg1, _, arg2, arg3, arg4)
+	if (arg1 ~= "BOTTOMLEFT" or arg2 ~= "TOPLEFT" or arg3 ~= 2 or arg4 ~= 2) then
+		self:ClearAllPoints()
+		self:SetPoint("BOTTOMLEFT", PetBattleActionBar.Panel, "TOPLEFT", 2, 2)
+	end
+end
+
+local _hook_PetSelectionFrameShow = function()
+	local frame = _G.PetBattleFrame;
+	if(frame and frame.BottomFrame) then
+		frame.BottomFrame.PetSelectionFrame:ClearAllPoints()
+		frame.BottomFrame.PetSelectionFrame:SetPoint("BOTTOM", frame.BottomFrame.xpBar, "TOP", 0, 8)
+	end
+end
+
+local _hook_UpdateActionBarLayout = function(self)
+	local list = _G.NUM_BATTLE_PET_ABILITIES;
+	for i = 1, list do
+		local actionButton = self.BottomFrame.abilityButtons[i]
+		PetBattleButtonHelper(actionButton)
+		actionButton:SetParent(PetBattleActionBar)
+		actionButton:ClearAllPoints()
+		if i == 1 then
+			actionButton:SetPoint("BOTTOMLEFT", 10, 10)
+		else
+			local lastActionButton = self.BottomFrame.abilityButtons[i - 1]
+			actionButton:SetPoint("LEFT", lastActionButton, "RIGHT", 10, 0)
+		end
+	end
+	self.BottomFrame.SwitchPetButton:SetParent(PetBattleActionBar)
+	self.BottomFrame.SwitchPetButton:ClearAllPoints()
+	self.BottomFrame.SwitchPetButton:SetPoint("LEFT", self.BottomFrame.abilityButtons[3], "RIGHT", 10, 0)
+	PetBattleButtonHelper(self.BottomFrame.SwitchPetButton)
+	self.BottomFrame.CatchButton:SetParent(PetBattleActionBar)
+	self.BottomFrame.CatchButton:ClearAllPoints()
+	self.BottomFrame.CatchButton:SetPoint("LEFT", self.BottomFrame.SwitchPetButton, "RIGHT", 10, 0)
+	PetBattleButtonHelper(self.BottomFrame.CatchButton)
+	self.BottomFrame.ForfeitButton:SetParent(PetBattleActionBar)
+	self.BottomFrame.ForfeitButton:ClearAllPoints()
+	self.BottomFrame.ForfeitButton:SetPoint("LEFT", self.BottomFrame.CatchButton, "RIGHT", 10, 0)
+	PetBattleButtonHelper(self.BottomFrame.ForfeitButton)
+end
 --[[
 ##########################################################
 PETBATTLE STYLER
@@ -48,7 +206,7 @@ local function PetBattleStyle()
 		return
 	end

-	local PetBattleFrame = _G["PetBattleFrame"];
+	local PetBattleFrame = _G.PetBattleFrame;
 	local BottomFrame = PetBattleFrame.BottomFrame;
 	local ActiveFramesList = { PetBattleFrame.ActiveAlly, PetBattleFrame.ActiveEnemy }
 	local StandardFramesList = { PetBattleFrame.Ally2, PetBattleFrame.Ally3, PetBattleFrame.Enemy2, PetBattleFrame.Enemy3 }
@@ -64,8 +222,8 @@ local function PetBattleStyle()

 			frame.IconBackdrop = CreateFrame("Frame", nil, frame)
 			frame.IconBackdrop:SetFrameLevel(0)
-			frame.IconBackdrop:WrapOuter(frame.Icon, 3, 3)
-			frame.IconBackdrop:SetSlotTemplate(true, 3, 0, 0, true);
+			frame.IconBackdrop:SetAllPoints(frame.Icon)
+			frame.IconBackdrop:SetSlotTemplate(true, 1, 0, 0, true);

 			frame.IconBackdrop.Panel:SetFixedPanelTemplate("Blackout")

@@ -144,15 +302,15 @@ local function PetBattleStyle()

 			frame.IconBackdrop = CreateFrame("Frame", nil, frame)
 			frame.IconBackdrop:SetFrameLevel(0)
-			frame.IconBackdrop:WrapOuter(frame, 2, 2)
-			frame.IconBackdrop:SetSlotTemplate(true, 2, 0, 0, true);
+			frame.IconBackdrop:SetAllPoints(frame)
+			frame.IconBackdrop:SetSlotTemplate(true, 1, 0, 0, true);

 			frame.IconBackdrop.Panel:SetFixedPanelTemplate("Blackout")

 			frame:ClearAllPoints()
 			frame.healthBarWidth = 40;
 			frame.ActualHealthBar:ClearAllPoints()
-			frame.ActualHealthBar:SetPoint("TOPLEFT", frame.IconBackdrop, 'BOTTOMLEFT', 2, -3)
+			frame.ActualHealthBar:SetPoint("TOPLEFT", frame.IconBackdrop, 'BOTTOMLEFT', 0, -6)
 			frame.ActualHealthBar:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]])
 			frame.HealthBarBackdrop = CreateFrame("Frame", nil, frame)
 			frame.HealthBarBackdrop:SetFrameLevel(frame:GetFrameLevel()-1)
@@ -171,6 +329,7 @@ local function PetBattleStyle()
 	PetBattleActionBar:SetFrameStrata('BACKGROUND')
 	PetBattleActionBar:SetFixedPanelTemplate("Blackout")

+	local SuperDockBottomDataAnchor = _G.SuperDockBottomDataAnchor;
 	if(SuperDockBottomDataAnchor) then
 		PetBattleActionBar:SetPoint("BOTTOM", SuperDockBottomDataAnchor, "TOP", 0, 4)
 	else
@@ -229,6 +388,8 @@ local function PetBattleStyle()
 		pet.HealthText:SetAlpha(0)
 	end

+	local PetBattleQueueReadyFrame = _G.PetBattleQueueReadyFrame;
+
 	PetBattleQueueReadyFrame:RemoveTextures()
 	PetBattleQueueReadyFrame:SetBasicPanel()
 	PetBattleQueueReadyFrame.AcceptButton:SetButtonTemplate()
@@ -236,138 +397,15 @@ local function PetBattleStyle()
 	PetBattleQueueReadyFrame.Art:SetTexture([[Interface\PetBattles\PetBattlesQueue]])

 	--[[ TOO MANY GOD DAMN HOOKS ]]--
-	hooksecurefunc("PetBattleFrame_UpdateSpeedIndicators", function()
-		if not PetBattleFrame.ActiveAlly.SpeedIcon:IsShown() and not PetBattleFrame.ActiveEnemy.SpeedIcon:IsShown() then
-			PetBattleFrame.ActiveAlly.FirstAttack:Hide()
-			PetBattleFrame.ActiveEnemy.FirstAttack:Hide()
-			return
-		end
-		PetBattleFrame.ActiveAlly.FirstAttack:Show()
-		if PetBattleFrame.ActiveAlly.SpeedIcon:IsShown() then
-			PetBattleFrame.ActiveAlly.FirstAttack:SetVertexColor(0, 1, 0, 1)
-		else
-			PetBattleFrame.ActiveAlly.FirstAttack:SetVertexColor(.8, 0, .3, 1)
-		end
-		PetBattleFrame.ActiveEnemy.FirstAttack:Show()
-		if PetBattleFrame.ActiveEnemy.SpeedIcon:IsShown() then
-			PetBattleFrame.ActiveEnemy.FirstAttack:SetVertexColor(0, 1, 0, 1)
-		else
-			PetBattleFrame.ActiveEnemy.FirstAttack:SetVertexColor(.8, 0, .3, 1)
-		end
-	end)
-
-	hooksecurefunc("PetBattleUnitFrame_UpdatePetType", function(self)
-		if self.PetType then
-			local pettype = C_PetBattles.GetPetType(self.petOwner, self.petIndex)
-			if self.PetTypeFrame then
-				self.PetTypeFrame.text:SetText(PET_TYPE_SUFFIX[pettype])
-			end
-		end
-	end)
-
-	hooksecurefunc("PetBattleAuraHolder_Update", function(self)
-	    if ( not self.petOwner or not self.petIndex ) then
-	        self:Hide();
-	        return;
-	    end
-
-	    local nextFrame = 1;
-	    for i=1, C_PetBattles.GetNumAuras(self.petOwner, self.petIndex) do
-	        local auraID, instanceID, turnsRemaining, isBuff = C_PetBattles.GetAuraInfo(self.petOwner, self.petIndex, i);
-	        if ( (isBuff and self.displayBuffs) or (not isBuff and self.displayDebuffs) ) then
-				local frame = self.frames[nextFrame]
-				frame.DebuffBorder:Hide()
-				if not frame.isStyled then
-					frame:SetSlotTemplate(true, 2, -8,-2)
-					frame.Icon:FillInner(frame.Panel, 2, 2)
-					frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
-					frame.isStyled = true
-				end
-				if isBuff then
-					frame:SetBackdropBorderColor(0, 1, 0)
-				else
-					frame:SetBackdropBorderColor(1, 0, 0)
-				end
-				frame.Duration:SetFont(SV.Media.font.numbers, 16, "OUTLINE")
-				frame.Duration:ClearAllPoints()
-				frame.Duration:SetPoint("BOTTOMLEFT", frame.Icon, "BOTTOMLEFT", 4, 4)
-				if turnsRemaining > 0 then
-					frame.Duration:SetText(turnsRemaining)
-				end
-				nextFrame = nextFrame + 1
-			end
-		end
-	end)
-
-	hooksecurefunc("PetBattleWeatherFrame_Update", function(self)
-		local auraID = C_PetBattles.GetAuraInfo(LE_BATTLE_PET_WEATHER, PET_BATTLE_PAD_INDEX, 1)
-		if auraID then
-			self.Icon:Hide()
-			self.Name:Hide()
-			self.DurationShadow:Hide()
-			self.Label:Hide()
-			self.Duration:SetPoint("CENTER", self, 0, 8)
-			self:ClearAllPoints()
-			self:SetPoint("TOP", SV.UIParent, 0, -15)
-		end
-	end)
-
-	hooksecurefunc("PetBattleUnitFrame_UpdateDisplay", function(self)
-		self.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
-		--Update the pet rarity border
-	    if (self.IconBackdrop) then
-	    	local petOwner = self.petOwner;
-    		local petIndex = self.petIndex;
-	        local rarity = C_PetBattles.GetBreedQuality(petOwner, petIndex);
-	        if (ENABLE_COLORBLIND_MODE ~= "1") then
-	        	self.IconBackdrop:SetBackdropColor(ITEM_QUALITY_COLORS[rarity-1].r, ITEM_QUALITY_COLORS[rarity-1].g, ITEM_QUALITY_COLORS[rarity-1].b);
-	            self.IconBackdrop:SetBackdropBorderColor(ITEM_QUALITY_COLORS[rarity-1].r, ITEM_QUALITY_COLORS[rarity-1].g, ITEM_QUALITY_COLORS[rarity-1].b);
-	        end
-	    end
-	end)
-
-	hooksecurefunc("PetBattleAbilityTooltip_Show", function()
-		SV:AnchorToCursor(PetBattlePrimaryAbilityTooltip)
-	end)
-
-	hooksecurefunc(BottomFrame.TurnTimer.SkipButton, "SetPoint", function(self, arg1, _, arg2, arg3, arg4)
-		if (arg1 ~= "BOTTOMLEFT" or arg2 ~= "TOPLEFT" or arg3 ~= 2 or arg4 ~= 2) then
-			self:ClearAllPoints()
-			self:SetPoint("BOTTOMLEFT", PetBattleActionBar.Panel, "TOPLEFT", 2, 2)
-		end
-	end)
-
-	hooksecurefunc("PetBattlePetSelectionFrame_Show", function()
-		BottomFrame.PetSelectionFrame:ClearAllPoints()
-		BottomFrame.PetSelectionFrame:SetPoint("BOTTOM", BottomFrame.xpBar, "TOP", 0, 8)
-	end)
-
-	hooksecurefunc("PetBattleFrame_UpdateActionBarLayout", function(self)
-		for i = 1, NUM_BATTLE_PET_ABILITIES do
-			local actionButton = self.BottomFrame.abilityButtons[i]
-			PetBattleButtonHelper(actionButton)
-			actionButton:SetParent(PetBattleActionBar)
-			actionButton:ClearAllPoints()
-			if i == 1 then
-				actionButton:SetPoint("BOTTOMLEFT", 10, 10)
-			else
-				local lastActionButton = self.BottomFrame.abilityButtons[i - 1]
-				actionButton:SetPoint("LEFT", lastActionButton, "RIGHT", 10, 0)
-			end
-		end
-		self.BottomFrame.SwitchPetButton:SetParent(PetBattleActionBar)
-		self.BottomFrame.SwitchPetButton:ClearAllPoints()
-		self.BottomFrame.SwitchPetButton:SetPoint("LEFT", self.BottomFrame.abilityButtons[3], "RIGHT", 10, 0)
-		PetBattleButtonHelper(self.BottomFrame.SwitchPetButton)
-		self.BottomFrame.CatchButton:SetParent(PetBattleActionBar)
-		self.BottomFrame.CatchButton:ClearAllPoints()
-		self.BottomFrame.CatchButton:SetPoint("LEFT", self.BottomFrame.SwitchPetButton, "RIGHT", 10, 0)
-		PetBattleButtonHelper(self.BottomFrame.CatchButton)
-		self.BottomFrame.ForfeitButton:SetParent(PetBattleActionBar)
-		self.BottomFrame.ForfeitButton:ClearAllPoints()
-		self.BottomFrame.ForfeitButton:SetPoint("LEFT", self.BottomFrame.CatchButton, "RIGHT", 10, 0)
-		PetBattleButtonHelper(self.BottomFrame.ForfeitButton)
-	end)
+	hooksecurefunc("PetBattleFrame_UpdateSpeedIndicators", _hook_UpdateSpeedIndicators)
+	hooksecurefunc("PetBattleUnitFrame_UpdatePetType", _hook_UpdatePetType)
+	hooksecurefunc("PetBattleAuraHolder_Update", _hook_AuraHolderUpdate)
+	hooksecurefunc("PetBattleWeatherFrame_Update", _hook_WeatherFrameUpdate)
+	hooksecurefunc("PetBattleUnitFrame_UpdateDisplay", _hook_UpdateDisplay)
+	hooksecurefunc("PetBattleAbilityTooltip_Show", _hook_AbilityTooltipShow)
+	hooksecurefunc(BottomFrame.TurnTimer.SkipButton, "SetPoint", _hook_SkipButtonSetPoint)
+	hooksecurefunc("PetBattlePetSelectionFrame_Show", _hook_PetSelectionFrameShow)
+	hooksecurefunc("PetBattleFrame_UpdateActionBarLayout", _hook_UpdateActionBarLayout)

 	SV.SVTip:ReLoad()
 end
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petition.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petition.lua
index ec4aecb..94233ab 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petition.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petition.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua
index fac1626..7b1b302 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -22,6 +27,8 @@ local Schema = STYLE.Schema;
 HELPERS
 ##########################################################
 ]]--
+local FAV_ICON = [[Interface\Addons\SVUI\assets\artwork\Icons\GENERIC-STAR]]
+
 local function PetJournal_UpdateMounts()
 	for b = 1, #MountJournal.ListScrollFrame.buttons do
 		local d = _G["MountJournalListScrollFrameButton"..b]
@@ -89,6 +96,7 @@ FRAME STYLER
 ##########################################################
 ]]--
 local function PetJournalStyle()
+	STYLE.Debugging = true
 	if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.mounts ~= true then return end

 	STYLE:ApplyWindowStyle(PetJournalParent)
@@ -105,18 +113,29 @@ local function PetJournalStyle()
 	MountJournal.MountDisplay.ShadowOverlay:RemoveTextures()
 	MountJournal.MountCount:RemoveTextures()
 	MountJournalListScrollFrame:RemoveTextures()
+	MountJournalMountButton:RemoveTextures()
 	MountJournalMountButton:SetButtonTemplate()
 	MountJournalSearchBox:SetEditboxTemplate()

 	STYLE:ApplyScrollFrameStyle(MountJournalListScrollFrameScrollBar)
 	MountJournal.MountDisplay:SetFixedPanelTemplate("ModelComic")

-	for i = 1, #MountJournal.ListScrollFrame.buttons do
-		local button = _G["MountJournalListScrollFrameButton"..i]
+	local buttons = MountJournal.ListScrollFrame.buttons
+	for i = 1, #buttons do
+		local button = buttons[i]
 		if(button) then
 			STYLE:ApplyItemButtonStyle(button, nil, true, true)
 			local bar = _G["SVUI_MountSelectBar"..i]
 			if(bar) then bar:SetParent(button.Panel) end
+			if(SV.GameVersion >= 60000) then
+				if(button.favorite) then
+					local fg = CreateFrame("Frame", nil, button)
+					fg:SetAllPoints(favorite)
+					fg:SetFrameLevel(button:GetFrameLevel() + 30)
+					button.favorite:SetParent(fg)
+					button.favorite:SetTexture([[Interface\Addons\SVUI\assets\artwork\Icons\GENERIC-STAR]])
+				end
+			end
 		end
 	end

@@ -149,11 +168,12 @@ local function PetJournalStyle()
 		STYLE:ApplyItemButtonStyle(button, false, true)
 		if(favorite) then
 			local fg = CreateFrame("Frame", nil, button)
-			fg:SetSize(40,40)
-			fg:SetPoint("TOPLEFT", button, "TOPLEFT", -1, 1)
+			fg:SetAllPoints(favorite)
 			fg:SetFrameLevel(button:GetFrameLevel() + 30)
 			favorite:SetParent(fg)
 			button.dragButton.favorite:SetParent(fg)
+			favorite:SetTexture([[Interface\Addons\SVUI\assets\artwork\Icons\GENERIC-STAR]])
+			favorite:SetTexCoord(0,1,0,1)
 		end

 		button.dragButton.levelBG:SetAlpha(0)
@@ -211,19 +231,23 @@ local function PetJournalStyle()
 	PetJournalPetCardPetInfo.levelBG:SetAlpha(0)
 	PetJournalPetCardPetInfoIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
 	STYLE:ApplyItemButtonStyle(PetJournalPetCardPetInfo, nil, true, true)
+
 	local fg = CreateFrame("Frame", nil, PetJournalPetCardPetInfo)
 	fg:SetSize(40,40)
 	fg:SetPoint("TOPLEFT", PetJournalPetCardPetInfo, "TOPLEFT", -1, 1)
 	fg:SetFrameLevel(PetJournalPetCardPetInfo:GetFrameLevel() + 30)
+
 	PetJournalPetCardPetInfo.favorite:SetParent(fg)
 	PetJournalPetCardPetInfo.Panel:WrapOuter(PetJournalPetCardPetInfoIcon)
 	PetJournalPetCardPetInfoIcon:SetParent(PetJournalPetCardPetInfo.Panel)
 	PetJournalPetCardPetInfo.level:SetParent(PetJournalPetCardPetInfo.Panel)
+
 	local R = PetJournalPrimaryAbilityTooltip;R.Background:SetTexture(0,0,0,0)
 	if R.Delimiter1 then
 		R.Delimiter1:SetTexture(0,0,0,0)
 		R.Delimiter2:SetTexture(0,0,0,0)
-	end
+	end
+
 	R.BorderTop:SetTexture(0,0,0,0)
 	R.BorderTopLeft:SetTexture(0,0,0,0)
 	R.BorderTopRight:SetTexture(0,0,0,0)
@@ -233,6 +257,7 @@ local function PetJournalStyle()
 	R.BorderBottomRight:SetTexture(0,0,0,0)
 	R.BorderBottomLeft:SetTexture(0,0,0,0)
 	R:SetFixedPanelTemplate("Transparent", true)
+
 	for b = 1, 6 do
 		local S = _G['PetJournalPetCardSpell'..b]
 		S:SetFrameLevel(S:GetFrameLevel() + 2)
@@ -241,7 +266,8 @@ local function PetJournalStyle()
 		S.Panel:SetAllPoints()
 		S.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
 		S.icon:FillInner(S.Panel)
-	end
+	end
+
 	PetJournalPetCardHealthFrame.healthBar:RemoveTextures()
 	PetJournalPetCardHealthFrame.healthBar:SetPanelTemplate('Default')
 	PetJournalPetCardHealthFrame.healthBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]])
@@ -254,9 +280,18 @@ local function PetJournalStyle()
 		ToyBox:RemoveTextures()
 		ToyBoxProgressBar:SetPanelTemplate("Bar", true)
 		ToyBoxSearchBox:SetEditboxTemplate()
+		ToyBoxFilterButton:RemoveTextures()
 		ToyBoxFilterButton:SetButtonTemplate()
-		STYLE:ApplyDropdownStyle(ToyBoxFilterDropDown)
-		ToyBoxIconsFrame:SetBasicPanel()
+		ToyBoxIconsFrame:RemoveTextures()
+		ToyBoxIconsFrame:SetFixedPanelTemplate('ModelComic')
+
+		MountJournalFilterButton:RemoveTextures()
+		MountJournalFilterButton:SetButtonTemplate()
+
+		MountJournal.SummonRandomFavoriteButton:RemoveTextures()
+		MountJournal.SummonRandomFavoriteButton:SetSlotTemplate(true, 2, 0, 0, true)
+		MountJournal.SummonRandomFavoriteButton.texture:SetTexture([[Interface\ICONS\ACHIEVEMENT_GUILDPERK_MOUNTUP]])
+		MountJournal.SummonRandomFavoriteButton.texture:SetTexCoord(0.1, 0.9, 0.1, 0.9)

 		for i = 1, 18 do
 			local gName = ("ToySpellButton%d"):format(i)
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petstable.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petstable.lua
index e296f8e..c874d6e 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petstable.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petstable.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/pvp.lua
index f7d643e..7646504 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/pvp.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/pvp.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -22,13 +27,30 @@ local Schema = STYLE.Schema;
 PVP STYLER
 ##########################################################
 ]]--
--- LoadAddOn("Blizzard_PVPUI")
+local _hook_PVPReadyDialogDisplay = function(self, _, _, _, queueType, _, queueRole)
+	if(queueRole == "DAMAGER") then
+		PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonDPS.background:GetTexCoord())
+	elseif(queueRole == "TANK") then
+		PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonTank.background:GetTexCoord())
+	elseif(queueRole == "HEALER") then
+		PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonHealer.background:GetTexCoord())
+	end
+	if(queueType == "ARENA") then
+		self:SetHeight(100)
+	end
+end

 local function PVPFrameStyle()
 	if (SV.db[Schema] and (SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.pvp ~= true)) then
 		return
 	end

+	local HonorFrame = _G.HonorFrame;
+	local ConquestFrame = _G.ConquestFrame;
+	local PVPUIFrame = _G.PVPUIFrame;
+	local WarGamesFrame = _G.WarGamesFrame;
+	local PVPReadyDialog = _G.PVPReadyDialog;
+
 	STYLE:ApplyWindowStyle(PVPUIFrame, true)

 	STYLE:ApplyCloseButtonStyle(PVPUIFrameCloseButton)
@@ -102,6 +124,8 @@ local function PVPFrameStyle()
 		end
 	end)

+	local ConquestPointsBar = _G.ConquestPointsBar;
+
 	ConquestFrame.Inset:RemoveTextures()
 	ConquestPointsBarLeft:Die()
 	ConquestPointsBarRight:Die()
@@ -141,18 +165,7 @@ local function PVPFrameStyle()
 	ConquestFrame.Inset:SetFixedPanelTemplate("Inset")
 	WarGamesFrameScrollFrame:SetPanelTemplate("Inset",false,2,2,6)

-	hooksecurefunc("PVPReadyDialog_Display", function(self, l, N, O, P, Q, R)
-		if R == "DAMAGER" then
-			PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonDPS.background:GetTexCoord())
-		elseif R == "TANK" then
-			PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonTank.background:GetTexCoord())
-		elseif R == "HEALER" then
-			PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonHealer.background:GetTexCoord())
-		end
-		if P == "ARENA" then
-			self:SetHeight(100)
-		end
-	end)
+	hooksecurefunc("PVPReadyDialog_Display", _hook_PVPReadyDialogDisplay)
 end
 --[[
 ##########################################################
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua
index 8e2ceb7..665ad9d 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua
@@ -15,6 +15,13 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 credit: Elv.                      original logic from ElvUI. Adapted to SVUI #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -46,6 +53,8 @@ local function QuestScrollHelper(b, c, d, e)
 end

 local function QueuedWatchFrameItems()
+	local WATCHFRAME_NUM_ITEMS = _G.WATCHFRAME_NUM_ITEMS
+	if(not WATCHFRAME_NUM_ITEMS) then return end;
 	for i=1, WATCHFRAME_NUM_ITEMS do
 		local button = _G["WatchFrameItem"..i]
 		local point, relativeTo, relativePoint, xOffset, yOffset = button:GetPoint(1)
@@ -75,6 +84,8 @@ local QuestRewardScrollFrame_OnShow = function(self)
 end

 local Hook_QuestInfo_Display = function(self, ...)
+	local MAX_NUM_ITEMS = _G.MAX_NUM_ITEMS
+	if(not MAX_NUM_ITEMS) then return end;
 	for i = 1, MAX_NUM_ITEMS do
 		local name = ("QuestInfoItem%d"):format(i)
 		local item = _G[name]
@@ -92,13 +103,43 @@ local Hook_QuestInfo_Display = function(self, ...)
 end

 local Hook_QuestInfoItem_OnClick = function(self)
-	QuestInfoItemHighlight:ClearAllPoints()
-	QuestInfoItemHighlight:SetAllPoints(self)
+	_G.QuestInfoItemHighlight:ClearAllPoints()
+	_G.QuestInfoItemHighlight:SetAllPoints(self)
 end

 local Hook_QuestNPCModel = function(self, _, _, _, x, y)
-	QuestNPCModel:ClearAllPoints()
-	QuestNPCModel:SetPoint("TOPLEFT", self, "TOPRIGHT", x + 18, y)
+	_G.QuestNPCModel:ClearAllPoints()
+	_G.QuestNPCModel:SetPoint("TOPLEFT", self, "TOPRIGHT", x + 18, y)
+end
+
+local _hook_GreetingPanelShow = function(self)
+	self:RemoveTextures()
+
+	_G.QuestFrameGreetingGoodbyeButton:SetButtonTemplate()
+	_G.QuestGreetingFrameHorizontalBreak:Die()
+end
+
+local _hook_DetailScrollShow = function(self)
+	if not self.Panel then
+		self:SetPanelTemplate("Default")
+		QuestScrollHelper(self, 509, 630, false)
+	end
+	self.spellTex:Height(self:GetHeight() + 217)
+end
+
+local _hook_QuestLogFrameShow = function(self)
+	local QuestLogScrollFrame = _G.QuestLogScrollFrame;
+	if not QuestLogScrollFrame.spellTex then
+		QuestLogScrollFrame:SetFixedPanelTemplate("Default")
+		QuestLogScrollFrame.spellTex = QuestLogScrollFrame:CreateTexture(nil, 'ARTWORK')
+		QuestLogScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBookBG]])
+		QuestLogScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2)
+		QuestLogScrollFrame.spellTex:Size(514, 616)
+		QuestLogScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1)
+		QuestLogScrollFrame.spellTex2 = QuestLogScrollFrame:CreateTexture(nil, 'BORDER')
+		QuestLogScrollFrame.spellTex2:SetTexture([[Interface\FrameGeneral\UI-Background-Rock]])
+		QuestLogScrollFrame.spellTex2:FillInner()
+	end
 end
 --[[
 ##########################################################
@@ -109,12 +150,7 @@ local function QuestGreetingStyle()
 	if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.greeting ~= true then
 		return
 	end
-
-	QuestFrameGreetingPanel:HookScript("OnShow", function()
-		QuestFrameGreetingPanel:RemoveTextures()
-		QuestFrameGreetingGoodbyeButton:SetButtonTemplate()
-		QuestGreetingFrameHorizontalBreak:Die()
-	end)
+	_G.QuestFrameGreetingPanel:HookScript("OnShow", _hook_GreetingPanelShow)
 end

 local function QuestFrameStyle()
@@ -148,29 +184,8 @@ local function QuestFrameStyle()

 		QuestLogFramePushQuestButton:Point("LEFT", QuestLogFrameAbandonButton, "RIGHT", 2, 0)
 		QuestLogFramePushQuestButton:Point("RIGHT", QuestLogFrameTrackButton, "LEFT", -2, 0)
-
-		QuestLogDetailScrollFrame:HookScript('OnShow', function(k)
-			if not QuestLogDetailScrollFrame.Panel then
-				QuestLogDetailScrollFrame:SetPanelTemplate("Default")
-				QuestScrollHelper(QuestLogDetailScrollFrame, 509, 630, false)
-				QuestLogDetailScrollFrame:Height(k:GetHeight() - 2)
-			end
-			QuestLogDetailScrollFrame.spellTex:Height(k:GetHeight() + 217)
-		end)
-
-		QuestLogFrame:HookScript("OnShow", function()
-			if not QuestLogScrollFrame.spellTex then
-				QuestLogScrollFrame:SetFixedPanelTemplate("Default")
-				QuestLogScrollFrame.spellTex = QuestLogScrollFrame:CreateTexture(nil, 'ARTWORK')
-				QuestLogScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBookBG]])
-				QuestLogScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2)
-				QuestLogScrollFrame.spellTex:Size(514, 616)
-				QuestLogScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1)
-				QuestLogScrollFrame.spellTex2 = QuestLogScrollFrame:CreateTexture(nil, 'BORDER')
-				QuestLogScrollFrame.spellTex2:SetTexture([[Interface\FrameGeneral\UI-Background-Rock]])
-				QuestLogScrollFrame.spellTex2:FillInner()
-			end
-		end)
+		QuestLogDetailScrollFrame:HookScript('OnShow', _hook_DetailScrollShow)
+		QuestLogFrame:HookScript("OnShow", _hook_QuestLogFrameShow)
 	end
 	--[[ ############################### ]]--

diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/raid.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/raid.lua
index 05c420e..4679348 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/raid.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/raid.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/reforging.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/reforging.lua
index 6ea57b8..cf8d20c 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/reforging.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/reforging.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/spellbook.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/spellbook.lua
index ea1731a..b111159 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/spellbook.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/spellbook.lua
@@ -13,6 +13,13 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+local ipairs  = _G.ipairs;
+local pairs   = _G.pairs;
+
 local SV = _G["SVUI"];
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/store.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/store.lua
index d4c8056..c0ba879 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/store.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/store.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -28,7 +33,7 @@ local function StoreStyle()
 	-- end

 	--STYLE:ApplyWindowStyle(StoreFrame)
-	STYLE:ApplyTooltipStyle(StoreTooltip)
+	STYLE:ApplyTooltipStyle(_G.StoreTooltip)
 end
 --[[
 ##########################################################
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua
index 39f1ff1..dcac39d 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -382,10 +387,10 @@ local SystemFrameList21 = {
 HELPER FUNCTIONS
 ##########################################################
 ]]--
-local function forceBackdropColor(self, r, g, b, a)
+local _hook_GhostFrameBackdropColor = function(self, r, g, b, a)
 	if r ~= 0 or g ~= 0 or b ~= 0 or a ~= 0 then
-		GhostFrame:SetBackdropColor(0,0,0,0)
-		GhostFrame:SetBackdropBorderColor(0,0,0,0)
+		self:SetBackdropColor(0,0,0,0)
+		self:SetBackdropBorderColor(0,0,0,0)
 	end
 end
 --[[
@@ -396,6 +401,14 @@ SYSTEM WIDGET STYLERS
 local function SystemPanelQue()
 	if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.misc ~= true then return end

+	local GhostFrame = _G.GhostFrame;
+	local ReadyCheckFrame = _G.ReadyCheckFrame;
+	local InterfaceOptionsFrame = _G.InterfaceOptionsFrame;
+	local MacOptionsFrame = _G.MacOptionsFrame;
+	local GuildInviteFrame = _G.GuildInviteFrame;
+	local BattleTagInviteFrame = _G.BattleTagInviteFrame;
+	local SideDressUpFrame = _G.SideDressUpFrame;
+
 	QueueStatusFrame:RemoveTextures()

 	for i = 1, #SystemPopList do
@@ -456,12 +469,13 @@ local function SystemPanelQue()
 	if IsAddOnLoaded("OptionHouse") then
 		GameMenuButtonOptionHouse:SetButtonTemplate()
 	end
+
 	do
 		GhostFrame:SetButtonTemplate()
 		GhostFrame:SetBackdropColor(0,0,0,0)
 		GhostFrame:SetBackdropBorderColor(0,0,0,0)
-		hooksecurefunc(GhostFrame, "SetBackdropColor", forceBackdropColor)
-		hooksecurefunc(GhostFrame, "SetBackdropBorderColor", forceBackdropColor)
+		hooksecurefunc(GhostFrame, "SetBackdropColor", _hook_GhostFrameBackdropColor)
+		hooksecurefunc(GhostFrame, "SetBackdropBorderColor", _hook_GhostFrameBackdropColor)
 		GhostFrame:ClearAllPoints()
 		GhostFrame:SetPoint("TOP", SV.UIParent, "TOP", 0, -150)
 		GhostFrameContentsFrame:SetButtonTemplate()
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tabard.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tabard.lua
index 663f239..a371433 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tabard.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tabard.lua
@@ -13,6 +13,14 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  	= _G.unpack;
+local select  	= _G.select;
+local ipairs  	= _G.ipairs;
+local pairs   	= _G.pairs;
+local type 		= _G.type;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -64,24 +72,24 @@ local function TabardFrameStyle()
 		local c = "TabardFrameCustomization"..b;_G[c]:RemoveTextures()
 		STYLE:ApplyPaginationStyle(_G[c.."LeftButton"])
 		STYLE:ApplyPaginationStyle(_G[c.."RightButton"])
-		if b>1 then
+		if b > 1 then
 			 _G[c]:ClearAllPoints()
 			_G[c]:Point("TOP", _G["TabardFrameCustomization"..b-1], "BOTTOM", 0, -6)
 		else
 			local d, e, f, g, h = _G[c]:GetPoint()
-			_G[c]:Point(d, e, f, g, h+4)
+			_G[c]:Point(d, e, f, g, h + 4)
 		end
 	end
-	TabardCharacterModelRotateLeftButton:Point("BOTTOMLEFT", 4, 4)
-	TabardCharacterModelRotateRightButton:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0)
-	hooksecurefunc(TabardCharacterModelRotateLeftButton, "SetPoint", function(i, d, j, k, l, m)
-		if d ~= "BOTTOMLEFT"or l ~= 4 or m ~= 4 then
-			 i:Point("BOTTOMLEFT", 4, 4)
+	TabardCharacterModelRotateLeftButton:SetPoint("BOTTOMLEFT", 4, 4)
+	TabardCharacterModelRotateRightButton:SetPoint("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0)
+	hooksecurefunc(TabardCharacterModelRotateLeftButton, "SetPoint", function(self, d, j, k, l, m)
+		if d ~= "BOTTOMLEFT" or l ~= 4 or m ~= 4 then
+			 self:SetPoint("BOTTOMLEFT", 4, 4)
 		end
 	end)
-	hooksecurefunc(TabardCharacterModelRotateRightButton, "SetPoint", function(i, d, j, k, l, m)
-		if d ~= "TOPLEFT"or l ~= 4 or m ~= 0 then
-			 i:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0)
+	hooksecurefunc(TabardCharacterModelRotateRightButton, "SetPoint", function(self, d, j, k, l, m)
+		if d ~= "TOPLEFT" or l ~= 4 or m ~= 0 then
+			 self:SetPoint("TOPLEFT", _G.TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0)
 		end
 	end)
 end
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/talents.lua
index f9fcfa4..9d68137 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/talents.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/talents.lua
@@ -13,6 +13,14 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  	= _G.unpack;
+local select  	= _G.select;
+local ipairs  	= _G.ipairs;
+local pairs   	= _G.pairs;
+local type 		= _G.type;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -168,7 +176,9 @@ local function TalentFrameStyle()
 		PlayerSpecTab1:Point(d, x, f, -1, h)
 	end)

-	for i = 1, MAX_NUM_TALENT_TIERS do
+	local maxTiers = (SV.GameVersion >= 60000) and MAX_TALENT_TIERS or MAX_NUM_TALENT_TIERS
+
+	for i = 1, maxTiers do
 		local gName = ("PlayerTalentFrameTalentsTalentRow%d"):format(i)
 		local rowFrame = _G[gName]
 		if(rowFrame) then
@@ -190,7 +200,7 @@ local function TalentFrameStyle()
 	end

 	hooksecurefunc("TalentFrame_Update", function()
-		for i = 1, MAX_NUM_TALENT_TIERS do
+		for i = 1, maxTiers do
 			local gName = ("PlayerTalentFrameTalentsTalentRow%d"):format(i)

 			for z = 1, NUM_TALENT_COLUMNS do
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/taxi.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/taxi.lua
index 2e3c82a..45a33d1 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/taxi.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/taxi.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/timemanager.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/timemanager.lua
index 0a49a23..5c3e9df 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/timemanager.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/timemanager.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trade.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trade.lua
index a724c3f..c2254f3 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trade.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trade.lua
@@ -13,6 +13,14 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  	= _G.unpack;
+local select  	= _G.select;
+local ipairs  	= _G.ipairs;
+local pairs   	= _G.pairs;
+local type 		= _G.type;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tradeskill.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tradeskill.lua
index 77634d4..bd6dbb2 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tradeskill.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tradeskill.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trainer.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trainer.lua
index f5dbb31..7a8e06d 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trainer.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trainer.lua
@@ -13,6 +13,14 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  	= _G.unpack;
+local select  	= _G.select;
+local ipairs  	= _G.ipairs;
+local pairs   	= _G.pairs;
+local type 		= _G.type;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/transmog.lua
index a91f476..45762a2 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/transmog.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/transmog.lua
@@ -13,6 +13,14 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  	= _G.unpack;
+local select  	= _G.select;
+local ipairs  	= _G.ipairs;
+local pairs   	= _G.pairs;
+local type 		= _G.type;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/voidstorage.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/voidstorage.lua
index 981f67e..629092b 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/voidstorage.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/voidstorage.lua
@@ -13,6 +13,14 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack    = _G.unpack;
+local select    = _G.select;
+local ipairs    = _G.ipairs;
+local pairs     = _G.pairs;
+local type    = _G.type;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldmap.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldmap.lua
index c38c8b2..84f48e2 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldmap.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldmap.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
@@ -23,7 +28,8 @@ HELPERS
 ##########################################################
 ]]--
 local function AdjustMapLevel()
-  if InCombatLockdown()then return end
+  if InCombatLockdown()then return end
+    local WorldMapFrame = _G.WorldMapFrame;
     WorldMapFrame:SetFrameLevel(4)
     WorldMapDetailFrame:SetFrameLevel(6)
     WorldMapFrame:SetFrameStrata('HIGH')
@@ -32,12 +38,14 @@ local function AdjustMapLevel()
 end

 local function WorldMap_SmallView()
+  local WorldMapFrame = _G.WorldMapFrame;
   WorldMapFrame.Panel:ClearAllPoints()
   WorldMapFrame.Panel:WrapOuter(WorldMapFrame, 4, 4)
   WorldMapFrame.Panel.Panel:WrapOuter(WorldMapFrame.Panel)
 end

 local function WorldMap_FullView()
+  local WorldMapFrame = _G.WorldMapFrame;
   WorldMapFrame.Panel:ClearAllPoints()

   if(SV.GameVersion >= 60000) then
@@ -84,6 +92,8 @@ local function WorldMap_QuestView()
 end

 local function StripQuestMapFrame()
+  local WorldMapFrame = _G.WorldMapFrame;
+
   WorldMapFrame.BorderFrame:RemoveTextures(true)
   WorldMapFrame.BorderFrame.ButtonFrameEdge:SetTexture(0,0,0,0)
   WorldMapFrame.BorderFrame.InsetBorderTop:SetTexture(0,0,0,0)
@@ -137,7 +147,8 @@ local function StripQuestMapFrame()
 end

 local function WorldMap_OnShow()
-
+  local WorldMapFrame = _G.WorldMapFrame;
+
   if(SV.GameVersion >= 60000) then
     --StripQuestMapFrame()
     if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldstate.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldstate.lua
index 29182bd..6a89c98 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldstate.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldstate.lua
@@ -13,6 +13,11 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_       #
 S U P E R - V I L L A I N - U I   By: Munglunch                              #
 ##############################################################################
 --]]
+--[[ GLOBALS ]]--
+local _G = _G;
+local unpack  = _G.unpack;
+local select  = _G.select;
+--[[ ADDON ]]--
 local SV = _G.SVUI;
 local L = SV.L;
 local STYLE = select(2, ...);
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua
index 110e7c0..e82ca79 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua
@@ -41,6 +41,8 @@ local STYLE = select(2, ...);
 local Schema = STYLE.Schema;
 local LSM = LibStub("LibSharedMedia-3.0")
 local NewHook = hooksecurefunc;
+
+local ScaledOffset = SV.Scale(1)
 --[[
 ##########################################################
  /$$$$$$$$/$$$$$$$   /$$$$$$  /$$      /$$ /$$$$$$$$
@@ -182,7 +184,7 @@ function STYLE:ApplyItemButtonStyle(frame, adjust, shrink, noScript)

 	if(not frame.Panel) then
 		if shrink then
-			frame:SetPanelTemplate("Button", true, 1, -2, -2)
+			frame:SetPanelTemplate("Button", true, 1, -1, -1)
 		else
 			frame:SetFixedPanelTemplate("Button")
 		end
diff --git a/Interface/AddOns/SVUI_TrackOMatic/Loader.lua b/Interface/AddOns/SVUI_TrackOMatic/Loader.lua
index d8875c7..3494f8f 100644
--- a/Interface/AddOns/SVUI_TrackOMatic/Loader.lua
+++ b/Interface/AddOns/SVUI_TrackOMatic/Loader.lua
@@ -16,11 +16,18 @@ S U P E R - V I L L A I N - U I   By: Munglunch                              #
 LOCALIZED LUA FUNCTIONS
 ##########################################################
 ]]--
+--GLOBAL NAMESPACE
+local _G = _G;
+--LUA
+local unpack        = _G.unpack;
+local select        = _G.select;
+local assert        = _G.assert;
+
 local AddonName, AddonObject = ...

-assert(LibSuperVillain, AddonName .. " requires LibSuperVillain")
+assert(_G.LibSuperVillain, AddonName .. " requires LibSuperVillain")

-local PLUGIN = LibSuperVillain:NewPlugin(AddonName, AddonObject)
+local PLUGIN = _G.LibSuperVillain:NewPlugin(AddonName, AddonObject)

 local Schema = PLUGIN.Schema;
 local SV = _G["SVUI"];
diff --git a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua
index 19ca479..7223fc5 100644
--- a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua
+++ b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua
@@ -42,6 +42,11 @@ local sqrt2, max = math.sqrt(2), math.max;
 local tcopy, twipe, tsort, tconcat, tdump = table.copy, table.wipe, table.sort, table.concat, table.dump;
 --[[ BINARY METHODS ]]--
 local band = bit.band;
+
+--[[  CONSTANTS ]]--
+
+_G.BINDING_HEADER_SVUITRACK = "Supervillain UI: Track-O-Matic";
+_G.BINDING_NAME_SVUITRACK_DOODAD = "Toggle Tracking Device";
 --[[
 ##########################################################
 GET ADDON DATA
@@ -55,12 +60,9 @@ local SV = _G["SVUI"];
 local L = SV.L;
 --[[
 ##########################################################
-LOCALS AND BINDING
+LOCALS
 ##########################################################
 ]]--
-BINDING_HEADER_SVUITRACK = "Supervillain UI: Track-O-Matic";
-BINDING_NAME_SVUITRACK_DOODAD = "Toggle Tracking Device";
-
 local NewHook = hooksecurefunc;
 local playerGUID = UnitGUID('player')
 local classColor = RAID_CLASS_COLORS
@@ -198,7 +200,7 @@ function PLUGIN:Load()
         _TRACKER.Range:SetFont(SV.Media.font.roboto, 14, "OUTLINE")
         _TRACKER.Range:SetTextColor(1, 1, 1, 0.75)
         _TRACKER.Spin = Rotate_Arrow
-        _TRACKER.Track = Triangulate
+        _TRACKER.Track = _G.Triangulate

         _TRACKER:RegisterForDrag("LeftButton");
         _TRACKER:SetScript("OnUpdate", Tracker_OnUpdate)
diff --git a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc
index 10c2ffa..78cb107 100644
--- a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc
+++ b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc
@@ -1,6 +1,6 @@
 ## Interface: 60000
 ## Author: Munglunch
-## Version: 4.8
+## Version: 4.9
 ## Title: |cffFF9900SVUI |r|cffFFEF00Track-O-Matic|r
 ## Notes: Supervillain UI [|cff9911FFRaid & Party Member Tracking|r].
 ## RequiredDeps: SVUI
diff --git a/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua b/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua
index 576b5f7..60f9f92 100644
--- a/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua
+++ b/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua
@@ -388,7 +388,7 @@ local function GetDistance(map1, floor1, x1, y1, map2, floor2, x2, y2)
     return dist, angle;
 end

-function Triangulate(unit, noMapLocation)
+_G.Triangulate = function(unit, noMapLocation)
     if(WorldMap and WorldMap:IsShown()) then return end

     local plot1, plot2, plot3, plot4, plot5, plot6, plot7, plot8;
diff --git a/Interface/AddOns/SVUI_TrackOMatic/components/unitframe_gps.lua b/Interface/AddOns/SVUI_TrackOMatic/components/unitframe_gps.lua
index b058285..0e68778 100644
--- a/Interface/AddOns/SVUI_TrackOMatic/components/unitframe_gps.lua
+++ b/Interface/AddOns/SVUI_TrackOMatic/components/unitframe_gps.lua
@@ -51,6 +51,10 @@ local oUF = oUF_Villain or oUF
 assert(oUF, 'oUF not loaded')

 local PLUGIN = select(2, ...);
+local Schema = PLUGIN.Schema;
+
+local SV = _G["SVUI"];
+local L = SV.L;

 local GPS_UpdateHandler = CreateFrame("Frame");

@@ -59,6 +63,7 @@ local _FRAMES, _PROXIMITY = {}, {}
 local minThrottle = 0.02
 local numArrows, inRange, GPS
 local Triangulate = Triangulate
+local NewHook = hooksecurefunc;
 --[[
 ##########################################################
 oUF TAGS
@@ -231,7 +236,7 @@ local Update = function(self, elapsed)
 				GPS = object.GPS
 				local unit = object.unit
 				if(unit) then
-					if(GPS.PreUpdate) then GPS:PreUpdate(frame) end
+					if(GPS.PreUpdate) then GPS:PreUpdate(object) end

 					local outOfRange = GPS.outOfRange and UnitInRange(unit) or false

@@ -269,7 +274,7 @@ local Update = function(self, elapsed)
 								GPS.Text:SetText(floor(distance))
 							end

-							if(GPS.PostUpdate) then GPS:PostUpdate(frame, distance, angle) end
+							if(GPS.PostUpdate) then GPS:PostUpdate(object, distance, angle) end
 							numArrows = numArrows + 1
 						end
 					end