Quantcast

test again

Jennifer [08-17-18 - 17:56]
test again
Filename
.pkgmeta
Bindings.xml
Core/Communications.lua
Core/Core.lua
Core/Message.lua
Core/Module.lua
Core/Tag.lua
Core/Team.lua
EMA.toc
EMA/Bindings.xml
EMA/Core/Communications.lua
EMA/Core/Core.lua
EMA/Core/Message.lua
EMA/Core/Module.lua
EMA/Core/Tag.lua
EMA/Core/Team.lua
EMA/EMA.toc
EMA/EbonyUtilities.lua
EMA/Embeds.xml
EMA/GUI/AceGUIContainer-EMATreeGroup.lua
EMA/GUI/AceGUIContainer-EMAWindow.lua
EMA/GUI/AceGUIWidget-EMAContinueLabel.lua
EMA/GUI/AceGUIWidget-EMAKeybinding.lua
EMA/GUI/AceGUIWidget-EMANormalLabel.lua
EMA/GUI/EMAHelperSettings.lua
EMA/LICENSE
EMA/Libs/AceAddon-3.0/AceAddon-3.0.lua
EMA/Libs/AceAddon-3.0/AceAddon-3.0.xml
EMA/Libs/AceBucket-3.0/AceBucket-3.0.lua
EMA/Libs/AceBucket-3.0/AceBucket-3.0.xml
EMA/Libs/AceComm-3.0/AceComm-3.0.lua
EMA/Libs/AceComm-3.0/AceComm-3.0.xml
EMA/Libs/AceComm-3.0/ChatThrottleLib.lua
EMA/Libs/AceConfig-3.0/AceConfig-3.0.lua
EMA/Libs/AceConfig-3.0/AceConfig-3.0.xml
EMA/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
EMA/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml
EMA/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
EMA/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml
EMA/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
EMA/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml
EMA/Libs/AceConsole-3.0/AceConsole-3.0.lua
EMA/Libs/AceConsole-3.0/AceConsole-3.0.xml
EMA/Libs/AceDB-3.0/AceDB-3.0.lua
EMA/Libs/AceDB-3.0/AceDB-3.0.xml
EMA/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
EMA/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml
EMA/Libs/AceEvent-3.0/AceEvent-3.0.lua
EMA/Libs/AceEvent-3.0/AceEvent-3.0.xml
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt
EMA/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
EMA/Libs/AceGUI-3.0/AceGUI-3.0.lua
EMA/Libs/AceGUI-3.0/AceGUI-3.0.xml
EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
EMA/Libs/AceHook-3.0/AceHook-3.0.lua
EMA/Libs/AceHook-3.0/AceHook-3.0.xml
EMA/Libs/AceLocale-3.0/AceLocale-3.0.lua
EMA/Libs/AceLocale-3.0/AceLocale-3.0.xml
EMA/Libs/AceSerializer-3.0/AceSerializer-3.0.lua
EMA/Libs/AceSerializer-3.0/AceSerializer-3.0.xml
EMA/Libs/AceTab-3.0/AceTab-3.0.lua
EMA/Libs/AceTab-3.0/AceTab-3.0.xml
EMA/Libs/AceTimer-3.0/AceTimer-3.0.lua
EMA/Libs/AceTimer-3.0/AceTimer-3.0.xml
EMA/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
EMA/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
EMA/Libs/Changelog-Ace3-Release-r1151.txt
EMA/Libs/Changelog-Ace3-r1130.txt
EMA/Libs/EMALibActionButton-1.0.lua
EMA/Libs/LICENSE.txt
EMA/Libs/LibAuras/CHANGES.txt
EMA/Libs/LibAuras/LibAuras.lua
EMA/Libs/LibAuras/LibAuras.toc
EMA/Libs/LibAuras/Libs/LibStub/LibStub.lua
EMA/Libs/LibAuras/Libs/LibStub/LibStub.toc
EMA/Libs/LibAuras/Libs/LibStub/tests/test.lua
EMA/Libs/LibAuras/Libs/LibStub/tests/test2.lua
EMA/Libs/LibAuras/Libs/LibStub/tests/test3.lua
EMA/Libs/LibAuras/Libs/LibStub/tests/test4.lua
EMA/Libs/LibAuras/Libs/libs.xml
EMA/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua
EMA/Libs/LibBagUtils-1.0/LibBagUtils-1.0.xml
EMA/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua
EMA/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc
EMA/Libs/LibButtonGlow-1.0/LibStub/LibStub.lua
EMA/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc
EMA/Libs/LibDeformat-3.0/Changelog-LibDeformat-3.0-v1.txt
EMA/Libs/LibDeformat-3.0/LibDeformat-3.0.lua
EMA/Libs/LibDeformat-3.0/LibDeformat-3.0.toc
EMA/Libs/LibDeformat-3.0/LibStub/LibStub.lua
EMA/Libs/LibDeformat-3.0/lib.xml
EMA/Libs/LibItemUpgradeInfo-1.0/CHANGES.txt
EMA/Libs/LibItemUpgradeInfo-1.0/Core.lua
EMA/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc
EMA/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.xml
EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.lua
EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc
EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua
EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test2.lua
EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua
EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua
EMA/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
EMA/Libs/LibSharedMedia-3.0/lib.xml
EMA/Libs/LibStub/LibStub.lua
EMA/Libs/LibStub/LibStub.toc
EMA/Libs/UTF8/Changelog-UTF8-v1.1.txt
EMA/Libs/UTF8/UTF8.toc
EMA/Libs/UTF8/utf8.lua
EMA/Libs/UTF8/utf8data.lua
EMA/Libs/changelog-Ace3-r1173.txt
EMA/Locales/Core-Locale-deDE.lua
EMA/Locales/Core-Locale-enUS.lua
EMA/Locales/Locales.xml
EMA/Media/AddGroup.tga
EMA/Media/AddPlayerIcon.tga
EMA/Media/CharAdd.tga
EMA/Media/CharAddParty.tga
EMA/Media/CharDown.tga
EMA/Media/CharMaster.tga
EMA/Media/CharRemove.tga
EMA/Media/CharRemoveParty.tga
EMA/Media/CharUp.tga
EMA/Media/ChatIcon.tga
EMA/Media/CommsLogo.tga
EMA/Media/EMALogo.tga
EMA/Media/FollowIcon.tga
EMA/Media/GoldIcon.tga
EMA/Media/GroupIcon.tga
EMA/Media/GuildIcon.tga
EMA/Media/HeaderLogo.tga
EMA/Media/InteractionIcon.tga
EMA/Media/Isboxer_Add.tga
EMA/Media/ItemUseIcon.tga
EMA/Media/NewsIcon.tga
EMA/Media/QuestCompletionIcon.tga
EMA/Media/QuestIcon.tga
EMA/Media/QuestTrackerIcon.tga
EMA/Media/RemoveGroup.tga
EMA/Media/SellIcon.tga
EMA/Media/SettingsIcon.tga
EMA/Media/TeamCore.tga
EMA/Media/Toon.tga
EMA/Media/TradeIcon.tga
EMA/Media/WarningIcon.tga
EMA/Media/moduleIconRepair.tga
EMA/Modules/DisplayTeam.lua
EMA/Modules/Follow.lua
EMA/Modules/Guild.lua
EMA/Modules/Information.lua
EMA/Modules/Interaction.lua
EMA/Modules/ItemUse.lua
EMA/Modules/Modules.xml
EMA/Modules/Purchase.lua
EMA/Modules/Quest.lua
EMA/Modules/QuestWatcher.lua
EMA/Modules/Sell.lua
EMA/Modules/Sync.lua
EMA/Modules/Talk.lua
EMA/Modules/Toon.lua
EMA/Modules/Trade.lua
EbonyUtilities.lua
Embeds.xml
GUI/AceGUIContainer-EMATreeGroup.lua
GUI/AceGUIContainer-EMAWindow.lua
GUI/AceGUIWidget-EMAContinueLabel.lua
GUI/AceGUIWidget-EMAKeybinding.lua
GUI/AceGUIWidget-EMANormalLabel.lua
GUI/EMAHelperSettings.lua
LICENSE
Libs/AceAddon-3.0/AceAddon-3.0.lua
Libs/AceAddon-3.0/AceAddon-3.0.xml
Libs/AceBucket-3.0/AceBucket-3.0.lua
Libs/AceBucket-3.0/AceBucket-3.0.xml
Libs/AceComm-3.0/AceComm-3.0.lua
Libs/AceComm-3.0/AceComm-3.0.xml
Libs/AceComm-3.0/ChatThrottleLib.lua
Libs/AceConfig-3.0/AceConfig-3.0.lua
Libs/AceConfig-3.0/AceConfig-3.0.xml
Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml
Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml
Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml
Libs/AceConsole-3.0/AceConsole-3.0.lua
Libs/AceConsole-3.0/AceConsole-3.0.xml
Libs/AceDB-3.0/AceDB-3.0.lua
Libs/AceDB-3.0/AceDB-3.0.xml
Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml
Libs/AceEvent-3.0/AceEvent-3.0.lua
Libs/AceEvent-3.0/AceEvent-3.0.xml
Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc
Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua
Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml
Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt
Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt
Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt
Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
Libs/AceGUI-3.0/AceGUI-3.0.lua
Libs/AceGUI-3.0/AceGUI-3.0.xml
Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua
Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
Libs/AceHook-3.0/AceHook-3.0.lua
Libs/AceHook-3.0/AceHook-3.0.xml
Libs/AceLocale-3.0/AceLocale-3.0.lua
Libs/AceLocale-3.0/AceLocale-3.0.xml
Libs/AceSerializer-3.0/AceSerializer-3.0.lua
Libs/AceSerializer-3.0/AceSerializer-3.0.xml
Libs/AceTab-3.0/AceTab-3.0.lua
Libs/AceTab-3.0/AceTab-3.0.xml
Libs/AceTimer-3.0/AceTimer-3.0.lua
Libs/AceTimer-3.0/AceTimer-3.0.xml
Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
Libs/Changelog-Ace3-Release-r1151.txt
Libs/Changelog-Ace3-r1130.txt
Libs/EMALibActionButton-1.0.lua
Libs/LICENSE.txt
Libs/LibAuras/CHANGES.txt
Libs/LibAuras/LibAuras.lua
Libs/LibAuras/LibAuras.toc
Libs/LibAuras/Libs/LibStub/LibStub.lua
Libs/LibAuras/Libs/LibStub/LibStub.toc
Libs/LibAuras/Libs/LibStub/tests/test.lua
Libs/LibAuras/Libs/LibStub/tests/test2.lua
Libs/LibAuras/Libs/LibStub/tests/test3.lua
Libs/LibAuras/Libs/LibStub/tests/test4.lua
Libs/LibAuras/Libs/libs.xml
Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua
Libs/LibBagUtils-1.0/LibBagUtils-1.0.xml
Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua
Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc
Libs/LibButtonGlow-1.0/LibStub/LibStub.lua
Libs/LibButtonGlow-1.0/LibStub/LibStub.toc
Libs/LibDeformat-3.0/Changelog-LibDeformat-3.0-v1.txt
Libs/LibDeformat-3.0/LibDeformat-3.0.lua
Libs/LibDeformat-3.0/LibDeformat-3.0.toc
Libs/LibDeformat-3.0/LibStub/LibStub.lua
Libs/LibDeformat-3.0/lib.xml
Libs/LibItemUpgradeInfo-1.0/CHANGES.txt
Libs/LibItemUpgradeInfo-1.0/Core.lua
Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc
Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.xml
Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.lua
Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc
Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua
Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test2.lua
Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua
Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua
Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
Libs/LibSharedMedia-3.0/lib.xml
Libs/LibStub/LibStub.lua
Libs/LibStub/LibStub.toc
Libs/UTF8/Changelog-UTF8-v1.1.txt
Libs/UTF8/UTF8.toc
Libs/UTF8/utf8.lua
Libs/UTF8/utf8data.lua
Libs/changelog-Ace3-r1173.txt
Locales/Core-Locale-deDE.lua
Locales/Core-Locale-enUS.lua
Locales/Locales.xml
Media/AddGroup.tga
Media/AddPlayerIcon.tga
Media/CharAdd.tga
Media/CharAddParty.tga
Media/CharDown.tga
Media/CharMaster.tga
Media/CharRemove.tga
Media/CharRemoveParty.tga
Media/CharUp.tga
Media/ChatIcon.tga
Media/CommsLogo.tga
Media/EMALogo.tga
Media/FollowIcon.tga
Media/GoldIcon.tga
Media/GroupIcon.tga
Media/GuildIcon.tga
Media/HeaderLogo.tga
Media/InteractionIcon.tga
Media/Isboxer_Add.tga
Media/ItemUseIcon.tga
Media/NewsIcon.tga
Media/QuestCompletionIcon.tga
Media/QuestIcon.tga
Media/QuestTrackerIcon.tga
Media/RemoveGroup.tga
Media/SellIcon.tga
Media/SettingsIcon.tga
Media/TeamCore.tga
Media/Toon.tga
Media/TradeIcon.tga
Media/WarningIcon.tga
Media/moduleIconRepair.tga
Modules/DisplayTeam.lua
Modules/Follow.lua
Modules/Guild.lua
Modules/Information.lua
Modules/Interaction.lua
Modules/ItemUse.lua
Modules/Modules.xml
Modules/Purchase.lua
Modules/Quest.lua
Modules/QuestWatcher.lua
Modules/Sell.lua
Modules/Sync.lua
Modules/Talk.lua
Modules/Toon.lua
Modules/Trade.lua
diff --git a/.pkgmeta b/.pkgmeta
index 63faec8..25fdad7 100644
--- a/.pkgmeta
+++ b/.pkgmeta
@@ -2,4 +2,7 @@ package-as: ema

 manual-changelog: CHANGELOG.txt

-enable-nolib-creation: no
\ No newline at end of file
+enable-nolib-creation: no
+
+move-folders:
+    EMA/EMA: EMA
\ No newline at end of file
diff --git a/Bindings.xml b/Bindings.xml
deleted file mode 100644
index ceeeb89..0000000
--- a/Bindings.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<!--
-				EMA - ( Ebony's MultiBoxing Assistant )
-				Current Author: Jennifer Cally (Ebony)
-				License: MIT License 2018 Jennifer Cally
-
-				Some Code Used from 'Jamba' that is
-				Released under the MIT License
-				'Jamba' Copyright 2008-2015  Michael "Jafula" Miller
--->
-<Bindings>
-	<!-- Team Bindings -->
-	<Binding name="TEAMINVITE" header="TEAM" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="TEAMDISBAND" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="TEAMMASTER" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<!-- Follow Bindings-->
-	<Binding name="FOLLOWME" header="FOLLOW" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="FOLLOWSTROBEME" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="FOLLOWSTROBEOFF" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="FOLLOWTEAIN" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<!-- ItemUse Bindings-->
-	<Binding name="ITEMUSE1" header="ITEMUSE" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE2" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE3" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE4" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE5" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE6" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="JITEMUSE7" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE8" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE9" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE10" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE11" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE12" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE13" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE14" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE15" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE16" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE17" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE18" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE19" category="EMA">
-		--[[dummy]]
-	</Binding>
-	<Binding name="ITEMUSE20" category="EMA">
-		--[[dummy]]
-	</Binding>
-</Bindings>
diff --git a/Core/Communications.lua b/Core/Communications.lua
deleted file mode 100644
index cd8afe1..0000000
--- a/Core/Communications.lua
+++ /dev/null
@@ -1,664 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "EMA" that is 								--
---				Released under the MIT License 										--
---				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Communications",
-	"AceComm-3.0",
-	"AceEvent-3.0",
-	"AceConsole-3.0",
-	"AceTimer-3.0",
-	"AceHook-3.0"
-)
-
--- Get the locale for EMACommunications.
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-
--- Get libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local AceSerializer = LibStub:GetLibrary( "AceSerializer-3.0" )
-
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-
--- EMACommunications is not a module, but the same naming convention for these values is convenient.
-EMA.moduleName = "Communications"
-EMA.moduleDisplayName = L["COMMUNICATIONS"]
-EMA.settingsDatabaseName = "CommunicationsProfileDB"
-EMA.parentDisplayName = L["OPTIONS"]
-EMA.chatCommand = "ema-comm"
-EMA.teamModuleName = "Team"
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\CommsLogo.tga"
--- order
-EMA.moduleOrder = 20
-
--------------------------------------------------------------------------------------------------------------
--- Constants
--------------------------------------------------------------------------------------------------------------
-
--- Communication methods.
-EMA.COMMUNICATION_WHISPER = "WHISPER"
-EMA.COMMUNICATION_GROUP = "RAID"
-EMA.COMMUNICATION_GUILD = "GUILD"
-
--- Communication message prefix.
-EMA.MESSAGE_PREFIX = "JmbCmMsg"
-
-
--- Communication priorities.
-EMA.COMMUNICATION_PRIORITY_BULK = "BULK"
-EMA.COMMUNICATION_PRIORITY_NORMAL = "NORMAL"
-EMA.COMMUNICATION_PRIORITY_ALERT = "ALERT"
-
--- Communication command.
-EMA.COMMAND_PREFIX = "JmbCmCmd"
-EMA.COMMAND_SEPERATOR = "\004"
-EMA.COMMAND_ARGUMENT_SEPERATOR = "\005"
-
--- Internal commands sent by EMA Communications.
-EMA.COMMAND_INTERNAL_SEND_SETTINGS = "JmbCmSdSet"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
-
--- Get a settings value.
-function EMA:ConfigurationGetSetting( key )
-	return EMA.db[key[#key]]
-end
-
--- Set a settings value.
-function EMA:ConfigurationSetSetting( key, value )
-	EMA.db[key[#key]] = value
-end
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		autoSetTeamOnlineorOffline = true,
-		boostCommunication = true,
-		useGuildComms = false,
-	},
-}
-
--- Configuration.
-local function GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		get = "ConfigurationGetSetting",
-		set = "ConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/ema-comm push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
-
--- Debug message.
-function EMA:DebugMessage( ... )
-    --EMA:Print( ... )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Character online management.
--------------------------------------------------------------------------------------------------------------
-local function IsCharacterOnline( characterName )
-	return EMAPrivate.Team.GetCharacterOnlineStatus( characterName )
-end
-
-local function AssumeTeamAlwaysOnline()
-	return "false"
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- Command management.
--------------------------------------------------------------------------------------------------------------
-
--- Creates a command to send.
-local function CreateCommandToSend( moduleName, commandName, ... )
-	--EMA:Print("Create", moduleName, commandName)
-	-- Start the message with the module name and a seperator.
-	local message = moduleName..EMA.COMMAND_SEPERATOR
-	-- Add the command  name and a seperator.
-	message = message..commandName..EMA.COMMAND_SEPERATOR
-	-- Add any arguments to the message (serialized and seperated).
-	local numberArguments = select( "#", ... )
-
-	for iterateArguments = 1, numberArguments do
-		local argument = select( iterateArguments, ... )
-		message = message..AceSerializer:Serialize( argument )
-		if iterateArguments < numberArguments then
-			message = message..EMA.COMMAND_ARGUMENT_SEPERATOR
-		end
-	end
-	-- Return the command to send.
-	--EMA:Print("Create", moduleName, commandName, iterateArguments)
-	return message
-end
-
-
-local function CommandAll( moduleName, commandName, ... )
-   -- EMA:DebugMessage( "Command All: ", moduleName, commandName, ... )
-	--EMA:Print( "Command All: ", moduleName, commandName, ... )
-	-- Get the message to send.
-	local message = CreateCommandToSend( moduleName, commandName, ... )
-	local channel
-	if EMA.db.useGuildComms == true then
-			EMA:SendCommMessage(
-			EMA.COMMAND_PREFIX,
-			message,
-			EMA.COMMUNICATION_GUILD,
-			nil,
-			EMA.COMMUNICATION_PRIORITY_ALERT
-			)
-		return
-	end
-	-- toon has to be in a group
-	if UnitInBattleground( "player" ) then
-		EMA:DebugMessage( "PvP_INSTANCE")
-		channel = "INSTANCE_CHAT"
-	elseif IsInGroup() then
-		EMA:DebugMessage( "Group")
-		local isInstance, instanceType = IsInInstance()
-		local name, Type, difficulty, difficultyName, maxPlayers, playerDifficulty, isDynamicInstance = GetInstanceInfo()
-		if isInstance or instanceType == "raid" or IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
-			if IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
-				channel = "INSTANCE_CHAT"
-			else
-				if IsInRaid() then
-					channel = "RAID"
-				else
-					channel = "PARTY"
-				end
-			end
-		else
-			if IsInRaid() then
-				channel = "RAID"
-			else
-				channel = "PARTY"
-			end
-		end
-	end
-	--EMA:Print( "CHANNEL", channel)
-	if channel then
-	EMA:DebugMessage("Sending command to group.", message, "channel", channel, nil)
-		--EMA:Print("Sending command to group.", message, "channel", channel, nil)
-			--EMA.COMMUNICATION_GROUP,
-			EMA:SendCommMessage(
-			EMA.COMMAND_PREFIX,
-			message,
-			channel,
-			nil,
-			EMA.COMMUNICATION_PRIORITY_ALERT
-			)
-			--EMA:Print("testChennel", EMA.COMMAND_PREFIX, channel, EMA.COMMUNICATION_PRIORITY_ALERT)
-			--return
-	end
-	--if the unit is not in the party then it unlikely did not get the party message,
-	for characterName, characterOrder in EMAPrivate.Team.TeamList() do
-		if UnitInParty( Ambiguate( characterName, "none" ) ) == false then
-			EMA:DebugMessage( "Toon not in party:", characterName)
-			if IsCharacterOnline( characterName ) == true then
-				EMA:DebugMessage("Sending command to others not in party/raid.", message, "WHISPER", characterName)
-				EMA:SendCommMessage(
-				EMA.COMMAND_PREFIX,
-				message,
-				EMA.COMMUNICATION_WHISPER,
-				characterName,
-				EMA.COMMUNICATION_PRIORITY_ALERT
-				)
-				--EMA:Print("testWis", EMA.COMMAND_PREFIX, EMA.COMMUNICATION_WHISPER, characterName , EMA.COMMUNICATION_PRIORITY_ALERT)
-			end
-		end
-	end
-end
-
-
-
--- Should this get removed at some point and use all comms on one channel???
--- WHISPER's don't work cross-realm but do work connected-realm so sending msg to masters would not send.
--- TODO: Maybe remove masters???, and fall back to everyone being the master?
--- Not really sure what to do so for now will keep with the master, and whisper them,
--- if was to use party/raid then everyone will get the command and masters would not work.
-
--- Send a command to the master.
-local function CommandMaster( moduleName, commandName, ... )
-    EMA:DebugMessage( "Command Master: ", moduleName, commandName, ... )
-	-- Get the message to send.
-	local message = CreateCommandToSend( moduleName, commandName, ... )
-	-- Send the message to the master.
-	local characterName = EMAPrivate.Team.GetMasterName()
-		if IsCharacterOnline( characterName ) == true then
-			EMA:DebugMessage("Sending command to others not in party/raid.", message, "WHISPER", characterName)
-				EMA:SendCommMessage(
-				EMA.COMMAND_PREFIX,
-				message,
-				EMA.COMMUNICATION_WHISPER,
-				characterName,
-				EMA.COMMUNICATION_PRIORITY_ALERT
-				)
-		end
-end
-
--- Send a command to the master.
-local function CommandToon( moduleName, characterName, commandName, ... )
-	-- Get the message to send.
-	local message = CreateCommandToSend( moduleName, commandName, ... )
-		if IsCharacterOnline( characterName ) == true then
-			EMA:DebugMessage("Sending command to others not in party/raid.", message, "WHISPER", characterName)
-				EMA:SendCommMessage(
-				EMA.COMMAND_PREFIX,
-				message,
-				EMA.COMMUNICATION_WHISPER,
-				characterName,
-				EMA.COMMUNICATION_PRIORITY_ALERT
-				)
-		end
-end
-
--- EbonyTest
--- hide offline player spam Not really the best way but it works, Maybe adding tick box's to set members offline? This should now work with elvUI?
-
-local function SystemSpamFilter(frame, event, message)
-	if( event == "CHAT_MSG_SYSTEM") then
-		if message:match(string.format(ERR_CHAT_PLAYER_NOT_FOUND_S, "(.+)")) then
-			local SearchPlayerNotFound = gsub(ERR_CHAT_PLAYER_NOT_FOUND_S, "%%s", "(.+)")  -- Get from "No player named '%s' is currently playing."
-			local _, _, characterName = strfind(message, SearchPlayerNotFound)
-			if EMAApi.IsCharacterInTeam(characterName) == true then
-				--EMA:Print("player offline in team", characterName )
-				if EMA.db.autoSetTeamOnlineorOffline == true then
-					if IsCharacterOnline( characterName ) == true then
-						EMAApi.setOffline( characterName, false )
-						--EMA:Print("player offline in team", characterName )
-					end
-				end
-				return true
-			else
-				--EMA:Print("player offline Not in team")
-				return
-			end
-		end
-		if message:match(string.format(ERR_NOT_IN_RAID, "(.+)")) then
-			return true
-		end
-	end
-    return false
-end
-ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", SystemSpamFilter)
-
-
-
--- Receive a command from another character.
-function EMA:CommandReceived( prefix, message, distribution, sender )
-    local characterName = EMAUtilities:AddRealmToNameIfMissing( sender )
-	EMA:DebugMessage( "Command received: ", prefix, message, distribution, sender )
-	--EMA:Print( "Command received: ", prefix, message, distribution, sender )
-	-- Check if the command is for EMA Communications.
-	if prefix == EMA.COMMAND_PREFIX then
-		--checks the char is in the team if not everyone can change settings and we do not want that
-		if EMAPrivate.Team.IsCharacterInTeam( sender ) == true then
-		    EMA:DebugMessage( "Sender is in team list." )
-		   --automaic setting team members online.
-			--EMA:Print("toonnonline", sender )
-				if EMAPrivate.Team.GetCharacterOnlineStatus( characterName ) == false then
-					--EMA:Print("Setting Toon online", distribution, sender, characterName )
-					EMAApi.setOnline( characterName, true)
-				end
-			-- Split the command into its components.
-			local moduleName, commandName, argumentsStringSerialized = strsplit( EMA.COMMAND_SEPERATOR, message )
-			local argumentsTable  = {}
-			-- Are there any arguments?
-			if (argumentsStringSerialized ~= nil) and (argumentsStringSerialized:trim() == "") then
-				-- No.
-				else
-					-- Deserialize the arguments.
-					local argumentsTableSerialized = { strsplit( EMA.COMMAND_ARGUMENT_SEPERATOR, argumentsStringSerialized ) }
-					for index, argumentSerialized in ipairs( argumentsTableSerialized ) do
-						local success, argument = AceSerializer:Deserialize( argumentSerialized )
-						if success == true then
-							table.insert( argumentsTable, argument )
-						else
-							error( L["A: Failed to deserialize command arguments for B from C."]( "EMA", moduleName, sender ) )
-						end
-					end
-				end
-				-- Look for internal EMA Communication commands.
-				if commandName == EMA.COMMAND_INTERNAL_SEND_SETTINGS then
-					-- Tell EMACore to handle the settings received.
-					EMAPrivate.Core.OnSettingsReceived( sender, moduleName, unpack( argumentsTable ) )
-				else
-					-- Any other command can go directly to the module that sent it.
-					EMA:DebugMessage( "Sending command on to module: ", sender, moduleName, commandName, unpack( argumentsTable ) )
-					EMAPrivate.Core.OnCommandReceived( sender, moduleName, commandName, unpack( argumentsTable ) )
-				end
-			else
-				EMA:DebugMessage( "Sender is NOT in team list." )
-			end
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMA Communications API.  These methods should only be called by EMA Core.
--------------------------------------------------------------------------------------------------------------
-
--- Send settings to all members of the current team.
-local function SendSettings( moduleName, settings )
-	-- Send a push settings command to all.
-	--EMA:Print("test", moduleName, EMA.COMMAND_INTERNAL_SEND_SETTINGS, settings )
-	CommandAll( moduleName, EMA.COMMAND_INTERNAL_SEND_SETTINGS, settings )
-end
-
--- Command all members of the current team.
-local function SendCommandAll( moduleName, commandName, ... )
-	-- Send the command to all.
-	CommandAll( moduleName, commandName, ... )
-end
-
--- TODO: needs to be cleaned up at some point with other communication stuff
-
--- Command the master.
-local function SendCommandMaster( moduleName, commandName, ... )
-	-- Send the command to the master character.
-	CommandMaster( moduleName, commandName, ... )
-end
-
--- Command the master.
-local function SendCommandToon( moduleName, characterName, commandName, ... )
-	-- Send the command to the master character.
-	CommandToon( moduleName, characterName, commandName, ... )
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMA Communications Initialization.
--------------------------------------------------------------------------------------------------------------
-
--- Initialize the addon.
-function EMA:OnInitialize()
-	--EMA.channelPollTimer = nil
-	-- Register commands with AceComms - tell AceComms to call the CommandReceived function when a command is received.
-	EMA:RegisterComm( EMA.COMMAND_PREFIX, "CommandReceived" )
-	-- Create the settings database supplying the settings values along with defaults.
-    EMA.completeDatabase = LibStub( "AceDB-3.0" ):New( EMA.settingsDatabaseName, EMA.settings )
-	EMA.db = EMA.completeDatabase.profile
-	-- Create the settings.
-	LibStub( "AceConfig-3.0" ):RegisterOptionsTable(
-		EMA.moduleName,
-		GetConfiguration()
-	)
-	EMA:SettingsCreate()
-	EMA.settingsFrame = EMA.settingsControl.widgetSettings.frame
-	EMA:SettingsRefresh()
-	--TODO: Is this needed? as its already in a module??
-	local k = GetRealmName()
-	local realm = k:gsub( "%s+", "" )
-	self.characterRealm = realm
-	self.characterNameLessRealm = UnitName( "player" )
-	self.characterName = self.characterNameLessRealm.."-"..self.characterRealm
-	EMA.characterGUID = UnitGUID( "player" )
-	-- End of needed:
-	-- Register communications as a module.
-	EMAPrivate.Core.RegisterModule( EMA, EMA.moduleName )
-end
-
-function EMA:OnEnable()
-
-	EMA:RegisterEvent("GUILD_ROSTER_UPDATE")
-	if EMA.db.boostCommunication == true then
-		EMA:BoostCommunication()
-		-- Repeat every 5 minutes.
-		EMA:ScheduleRepeatingTimer( "BoostCommunication", 300 )
-	end
-end
-
-function EMA:BoostCommunication()
-	if EMA.db.boostCommunication == true then
-		-- 2000 seems to be safe if NOTHING ELSE is happening. let's call it 800.
-		ChatThrottleLib.MAX_CPS = 1200 --800
-		-- Guesstimate overhead for sending a message; source+dest+chattype+protocolstuff
-		ChatThrottleLib.MSG_OVERHEAD = 40
-		-- WoW's server buffer seems to be about 32KB. 8KB should be safe, but seen disconnects on _some_ servers. Using 4KB now.
-		ChatThrottleLib.BURST = 6000 --4000
-		-- Reduce output CPS to half (and don't burst) if FPS drops below this value
-		ChatThrottleLib.MIN_FPS = 10 --20
-	end
-end
-
--- Handle the chat command.
-function EMA:EMAChatCommand( input )
-    if not input or input:trim() == "" then
-        InterfaceOptionsFrame_OpenToCategory( EMA.moduleDisplayName )
-    else
-        LibStub( "AceConfigCmd-3.0" ):HandleCommand( EMA.chatCommand, EMA.moduleName, input )
-    end
-end
-
-function EMA:OnDisable()
-end
-
-function EMA:GUILD_ROSTER_UPDATE(event, ... )
-	if EMA.db.useGuildComms == false then
-		return
-	end
-	local numGuildMembers, numOnline, numOnlineAndMobile = GetNumGuildMembers()
-	for index = 1, numGuildMembers do
-		characterName,_,_,_,class,_,_,_,online,status,classFileName,_, _,isMobile = GetGuildRosterInfo(index)
-		--EMA:Print("Name", fullName, "online", online )
-		if online == false then
-			if EMA.db.autoSetTeamOnlineorOffline == true then
-				if EMAApi.IsCharacterInTeam(characterName) == true and IsCharacterOnline( characterName ) == true then
-					EMAApi.setOffline( characterName, false )
-					--EMA:Print("player offline in team", characterName )
-				end
-			end
-		end
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsCreate()
-	EMA.settingsControl = {}
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.EMASendSettings,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-
-	)
-	local bottomOfOptions = EMA:SettingsCreateOptions( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfOptions )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, GetConfiguration() )
-end
-
-function EMA:SettingsCreateOptions( top )
-	-- Get positions and dimensions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local column1Left = left
-	local column2Left = left + 10
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["COMMUNICATIONS"]..L[" "]..L["OPTIONS"] , movingTop, false )--
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxAutoSetTeamOnlineorOffline = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["AUTO_SET_TEAM"],
-		EMA.CheckBoxAutoSetTeamOnlineorOffline
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxBoostCommunication = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["BOOST_COMMUNICATIONS"],
-		EMA.CheckBoxBoostCommunication,
-		L["BOOST_COMMUNICATIONS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxUseGuildComms = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["USE_GUILD_COMMS"],
-		EMA.CheckBoxUseGuildComms,
-		L["USE_GUILD_COMMS_INFO"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	return movingTop
-end
-
-function EMA:CheckBoxUseGuildComms( event, value )
-	EMA.db.useGuildComms = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:CheckBoxBoostCommunication( event, value )
-	EMA.db.boostCommunication = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:CheckBoxAssumeAlwaysOnline( event, value )
-	EMA.db.assumeTeamAlwaysOnline = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:CheckBoxAutoSetTeamOnlineorOffline( event, value )
-	EMA.db.autoSetTeamOnlineorOffline = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	EMA.settingsControl.checkBoxAutoSetTeamOnlineorOffline:SetValue( EMA.db.autoSetTeamOnlineorOffline )
-	EMA.settingsControl.checkBoxBoostCommunication:SetValue( EMA.db.boostCommunication )
-	EMA.settingsControl.checkBoxUseGuildComms:SetValue( EMA.db.useGuildComms )
-end
-
--- Settings received.
-function EMA:EMASendSettings()
-	SendSettings( EMA.moduleName, EMA.db )
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.autoSetTeamOnlineorOffline = settings.autoSetTeamOnlineorOffline
-		EMA.db.boostCommunication = settings.boostCommunication
-		EMA.db.useGuildComms = settings.useGuildComms
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
--- text = message to send -- This is mosty used for sending over EMA Own Comms mosty of Whispers
--- chatDestination = "PARTY, WHISPER, RAID, CHANNEL, etc"
--- characterOrChannelName = character name if WHISPER or channel name if CHANNEL or nil otherwise
--- If we clean up EMA-msg then we can remove this maybe again Eboyn TODO::::
--- priority = one of
---   EMA.COMMUNICATION_PRIORITY_BULK,
---   EMA.COMMUNICATION_PRIORITY_NORMAL
---   EMA.COMMUNICATION_PRIORITY_ALERT
-
-local function SendChatMessage( text, chatDestination, characterOrChannelName, priority )
-	-- Message small enough to send?
-	--EMA:Print("test", text, chatDestination, characterOrChannelName, priority)
-	if text:len() <= 255 then
-		--EMA:Print("test TURE!!!!! TOBIG" )
-		ChatThrottleLib:SendChatMessage( priority, EMA.MESSAGE_PREFIX, text, chatDestination, nil, characterOrChannelName, nil )
-
-
-	else
-		-- No, message is too big, split into smaller messages, taking UTF8 characters into account.
-		local bytesAvailable = string.utf8len(text1)
-		local currentPosition = 1
-		local countBytes = 1
-		local startPosition = currentPosition
-		local splitText = ""
-		-- Iterate all the utf8 characters, character by character until we reach 255 characters, then send
-		-- those off and start counting over.
-		while currentPosition <= bytesAvailable do
-			-- Count the number of bytes the character at this position takes up.
-			countBytes = countBytes + EMAutf8charbytes( text, currentPosition )
-			-- More than 255 bytes yet?
-			if countBytes <= 255 then
-				-- No, increment the position and keep counting.
-				currentPosition = currentPosition + EMAutf8charbytes( text, currentPosition )
-			else
-				-- Yes, more than 255.  Send this amount off.
-				splitText = text:sub( startPosition, currentPosition )
-				ChatThrottleLib:SendChatMessage( priority, EMA.MESSAGE_PREFIX, splitText, chatDestination, nil, characterOrChannelName, nil )
-				-- New start position and count.
-				startPosition = currentPosition + 1
-				countBytes = 1
-			end
-		end
-		-- Any more bytes left to send?
-		if startPosition < currentPosition then
-			-- Yes, send them.
-			splitText = text:sub( startPosition, currentPosition )
-			ChatThrottleLib:SendChatMessage( priority, EMA.MESSAGE_PREFIX, splitText, chatDestination, nil, characterOrChannelName, nil )
-		end
-	end
-end
-
-EMAPrivate.Communications.COMMUNICATION_PRIORITY_BULK = EMA.COMMUNICATION_PRIORITY_BULK
-EMAPrivate.Communications.COMMUNICATION_PRIORITY_NORMAL = EMA.COMMUNICATION_PRIORITY_NORMAL
-EMAPrivate.Communications.COMMUNICATION_PRIORITY_ALERT = EMA.COMMUNICATION_PRIORITY_ALERT
-EMAPrivate.Communications.SendChatMessage = SendChatMessage
-EMAPrivate.Communications.SendSettings = SendSettings
-EMAPrivate.Communications.SendCommandAll = SendCommandAll
-EMAPrivate.Communications.SendCommandMaster = SendCommandMaster
-EMAPrivate.Communications.SendCommandToon = SendCommandToon
-EMAPrivate.Communications.SendCommandMaster = SendCommandMaster
-EMAPrivate.Communications.SendCommandToon = SendCommandToon
-EMAPrivate.Communications.AssumeTeamAlwaysOnline = AssumeTeamAlwaysOnline
\ No newline at end of file
diff --git a/Core/Core.lua b/Core/Core.lua
deleted file mode 100644
index bb151b4..0000000
--- a/Core/Core.lua
+++ /dev/null
@@ -1,842 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "EMA" that is 								--
---				Released under the MIT License 										--
---				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- The global private table for EMA.
-EMAPrivate = {}
-EMAPrivate.Core = {}
-EMAPrivate.Communications = {}
-EMAPrivate.Message = {}
-EMAPrivate.Team = {}
-EMAPrivate.Tag = {}
-
--- The global public API table for EMA.
-_G.EMAApi = {}
-
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"EMACore",
-	"AceConsole-3.0"
-)
-
--- EMACore is not a module, but the same naming convention for these values is convenient.
-EMA.moduleName = "EMA-Core"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.moduleDisplayName = L["NEWS"]
-EMA.settingsDatabaseName = "CoreProfileDB"
-EMA.parentDisplayName = L["NEWS"]
-EMA.chatCommand = "ema"
-EMA.teamModuleName = "Team"
--- Icon's
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\NewsIcon.tga"
-EMA.pofileIcon = "Interface\\Addons\\EMA\\Media\\SettingsIcon.tga"
--- order
-EMA.moduleOrder = 1
-
-
--- Load libraries.
-local AceGUI = LibStub("AceGUI-3.0")
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-
-
--- Create frame for EMA Settings.
-EMAPrivate.SettingsFrame = {}
-EMAPrivate.SettingsFrame.Widget = AceGUI:Create( "EMAWindow" )
-EMAPrivate.SettingsFrame.Widget:SetTitle( "" )
-EMAPrivate.SettingsFrame.Widget:SetStatusText(L["STATUSTEXT"])
-EMAPrivate.SettingsFrame.Widget:SetWidth(900)
-EMAPrivate.SettingsFrame.Widget:SetHeight(650)
-EMAPrivate.SettingsFrame.Widget:SetLayout( "Fill" )
-EMAPrivate.SettingsFrame.WidgetTree = AceGUI:Create( "EMATreeGroup" )
-EMAPrivate.SettingsFrame.WidgetTree:SetLayout( "Fill" )
-EMAPrivate.SettingsFrame.TreeGroupStatus = { treesizable = false, groups = {} }
-EMAPrivate.SettingsFrame.WidgetTree:SetStatusTable( EMAPrivate.SettingsFrame.TreeGroupStatus )
-EMAPrivate.SettingsFrame.WidgetTree:EnableButtonTooltips( false )
-EMAPrivate.SettingsFrame.Widget:AddChild( EMAPrivate.SettingsFrame.WidgetTree )
-
-
-function EMA:OnEnable()
-	if EMA.db.showStartupMessage8000 then
-		StaticPopup_Show( "ALL_SETTINGS HAVE BEEN RESET" )
-	end
-end
-
-function EMA:OnDisable()
-end
-
-local function InitializePopupDialogs()
-	StaticPopupDialogs["ALL_SETTINGS HAVE BEEN RESET"] = {
-		text = L["ALL_SETTINGS_RESET"],
-		button1 = OKAY,
-		OnAccept = function()
-			EMA.db.showStartupMessage8000 = false
-		end,
-		showAlert = 1,
-		timeout = 0,
-		exclusive = 1,
-		hideOnEscape = 1,
-		whileDead = 1,
-	}
-end
-
-local function EMASettingsTreeSort( a, b )
-	local aText = ""
-	local bText = ""
-	local aEMAOrder = 0
-	local bEMAOrder = 0
-	if a ~= nil then
-		aText = a.text
-		aEMAOrder = a.EMAOrder
-	end
-	if b ~= nil then
-		bText = b.text
-		bEMAOrder = b.EMAOrder
-	end
-	if aText == L["EMA"] or bText == L["EMA"] then
-		if aText == L["EMA"] then
-			return true
-		end
-		if bText == L["EMA"] then
-			return false
-		end
-	end
-	if aEMAOrder == bEMAOrder then
-		return aText < bText
-	end
-	return aEMAOrder < bEMAOrder
-end
-
-local function EMATreeGroupTreeGetParent( parentName )
-	local parent
-	for index, tableInfo in ipairs( EMAPrivate.SettingsFrame.Tree.Data ) do
-		if tableInfo.value == parentName then
-			parent = tableInfo
-		end
-	end
-	return parent
-end
-
-local function EMAAddModuleToSettings( childName, parentName, moduleIcon, order, moduleFrame )
-	-- 	childName is the parentName then make the child the parent.
-	if childName == parentName then
-		local parent = EMATreeGroupTreeGetParent( parentName )
-		if parent == nil then
-			table.insert( EMAPrivate.SettingsFrame.Tree.Data, { value = childName, text = childName, EMAOrder = order, icon = moduleIcon } )
-			table.sort( EMAPrivate.SettingsFrame.Tree.Data, EMASettingsTreeSort )
-			EMAPrivate.SettingsFrame.Tree.ModuleFrames[childName] = moduleFrame
-		end
-
-	else
-	local parent = EMATreeGroupTreeGetParent( parentName )
-	if parent == nil then
-		table.insert( EMAPrivate.SettingsFrame.Tree.Data, { value = parentName, text = parentName, EMAOrder = order } )
-	end
-	local parent = EMATreeGroupTreeGetParent( parentName )
-	if parent.children == nil then
-		parent.children = {}
-	end
-		table.insert( parent.children, { value = childName, text = childName, EMAOrder = order, icon = moduleIcon } )
-		table.sort( EMAPrivate.SettingsFrame.Tree.Data, EMASettingsTreeSort )
-		table.sort( parent.children, EMASettingsTreeSort )
-		EMAPrivate.SettingsFrame.Tree.ModuleFrames[childName] = moduleFrame
-	end
-end
-
-
-
-local function EMAModuleSelected( tree, event, treeValue, selected )
-	--EMA:Print("test", tree, event, treeValue, selected)
-	local parentValue, value = strsplit( "\001", treeValue )
-	if tree == nil and event == nil then
-		-- Came from chat command.
-		value = treeValue
-	end
-	if value == nil then
-		value = parentValue
-	end
-	EMAPrivate.SettingsFrame.Widget:Show()
-	if EMAPrivate.SettingsFrame.Tree.CurrentChild ~= nil then
-		EMAPrivate.SettingsFrame.Tree.CurrentChild.frame:Hide()
-		EMAPrivate.SettingsFrame.Tree.CurrentChild = nil
-	end
-	for moduleValue, moduleFrame in pairs( EMAPrivate.SettingsFrame.Tree.ModuleFrames ) do
-		if 	moduleValue == value then
-			moduleFrame:SetParent( EMAPrivate.SettingsFrame.WidgetTree )
-			moduleFrame:SetWidth( EMAPrivate.SettingsFrame.WidgetTree.content:GetWidth() or 0 )
-			moduleFrame:SetHeight( EMAPrivate.SettingsFrame.WidgetTree.content:GetHeight() or 0 )
-			moduleFrame.frame:SetAllPoints()
-			moduleFrame.frame:Show()
-			EMAPrivate.SettingsFrame.Tree.CurrentChild = moduleFrame
-			if value == L["OPTIONS"] then
-				LibStub( "AceConfigDialog-3.0" ):Open( EMA.moduleName..L["OPTIONS"], moduleFrame )
-			end
-			return
-		end
-	end
-end
-EMAPrivate.SettingsFrame.Tree = {}
-EMAPrivate.SettingsFrame.Tree.Data = {}
-EMAPrivate.SettingsFrame.Tree.ModuleFrames = {}
-EMAPrivate.SettingsFrame.Tree.CurrentChild = nil
-EMAPrivate.SettingsFrame.Tree.Add = EMAAddModuleToSettings
-EMAPrivate.SettingsFrame.Tree.ButtonClick = EMAModuleSelected
-EMAPrivate.SettingsFrame.WidgetTree:SetTree( EMAPrivate.SettingsFrame.Tree.Data )
-EMAPrivate.SettingsFrame.WidgetTree:SetCallback( "OnClick", EMAPrivate.SettingsFrame.Tree.ButtonClick )
-EMAPrivate.SettingsFrame.Widget:Hide()
---table.insert( UISpecialFrames, "EMASettingsWindowsFrame" )
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-	showStartupMessage8000 = true,
-	},
-}
-
--- Configuration.
-local function GetConfiguration()
-	local configuration = {
-		name = "EMA",
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "ConfigurationGetSetting",
-		set = "ConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA push",
-				get = false,
-				set = "SendSettingsAllModules",
-				order = 4,
-				guiHidden = true,
-			},
-			resetsettingsframe = {
-				type = "input",
-				name = L["RESET_SETTINGS_FRAME"],
-				desc = L["RESET_SETTINGS_FRAME"],
-				usage = "/EMA resetsettingsframe",
-				get = false,
-				set = "ResetSettingsFrame",
-				order = 5,
-				guiHidden = true,
-			},
-		},
-	}
-	return configuration
-end
-
--- Get a settings value.
-function EMA:ConfigurationGetSetting( key )
-	return EMA.db[key[#key]]
-end
-
--- Set a settings value.
-function EMA:ConfigurationSetSetting( key, value )
-	EMA.db[key[#key]] = value
-end
-
-local function DebugMessage( ... )
-	EMA:Print( ... )
-end
-
---WOW BetaBuild!
-local function isBetaBuild()
-	local _, _, _, tocversion = GetBuildInfo()
-	-- Build For BFA 8.0.1 2018
-	if tocversion >= 80000 then
-		return true
-	else
-		return  false
-	end
-end
-
---Ema Alpha
-local function isEmaAlphaBuild()
-	local EMAVersion = GetAddOnMetadata("EMA", "version")
-	-- EMA Alpha Build
-	local Alpha = EMAVersion:find( "Alpha" )
-	if Alpha then
-		return true
-	else
-		return false
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Module management.
--------------------------------------------------------------------------------------------------------------
-
--- Register a EMA module.
-local function RegisterModule( moduleAddress, moduleName )
-	if EMA.registeredModulesByName == nil then
-		EMA.registeredModulesByName = {}
-	end
-	if EMA.registeredModulesByAddress == nil then
-		EMA.registeredModulesByAddress = {}
-	end
-	EMA.registeredModulesByName[moduleName] = moduleAddress
-	EMA.registeredModulesByAddress[moduleAddress] = moduleName
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings sending and receiving.
--------------------------------------------------------------------------------------------------------------
-
--- Send the settings for the module specified (using its address) to other EMA Team characters.
-local function SendSettings( moduleAddress, settings )
-	-- Get the name of the module.
-	local moduleName = EMA.registeredModulesByAddress[moduleAddress]
-	-- Send the settings identified by the module name.
-	EMAPrivate.Communications.SendSettings( moduleName, settings )
-end
-
--- Settings are received, pass them to the relevant module.
-local function OnSettingsReceived( sender, moduleName, settings )
-	sender = EMAUtilities:AddRealmToNameIfMissing( sender )
-	--EMA:Print("onsettings", sender, moduleName )
-	-- Get the address of the module.
-	local moduleAddress = EMA.registeredModulesByName[moduleName]
-	-- can not receive a message from a Module not Loaded so ignore it. Better tell them its not loaded --ebony.
-	if moduleAddress == nil then
-		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
-		return
-	else
-	-- loaded? Pass the module its settings.
-		moduleAddress:EMAOnSettingsReceived( sender, settings )
-	end
-end
-
-function EMA:SendSettingsAllModules()
-	EMA:Print( "Sending settings for all modules." )
-	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
-		EMA:Print( "Sending settings for: ", moduleName )
-		moduleAddress:EMASendSettings()
-	end
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- Commands sending and receiving.
--------------------------------------------------------------------------------------------------------------
-
--- Send a command for the module specified (using its address) to other EMA Team characters.
-local function SendCommandToTeam( moduleAddress, commandName, ... )
-	-- Get the name of the module.
-	local moduleName = EMA.registeredModulesByAddress[moduleAddress]
-	-- Send the command identified by the module name.
-	if moduleAddress == nil then
-		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
-		return
-	else
-	EMAPrivate.Communications.SendCommandAll( moduleName, commandName, ... )
-	end
-end
-
--- Send a command for the module specified (using its address) to the master character.
-local function SendCommandToMaster( moduleAddress, commandName, ... )
-	-- Get the name of the module.
-	local moduleName = EMA.registeredModulesByAddress[moduleAddress]
-	-- Send the command identified by the module name.
-	if moduleAddress == nil then
-		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
-		return
-	else
-	EMAPrivate.Communications.SendCommandMaster( moduleName, commandName, ... )
-	end
-end
-
-local function SendCommandToToon( moduleAddress, characterName, commandName, ... )
-	-- Get the name of the module.
-	local moduleName = EMA.registeredModulesByAddress[moduleAddress]
-	-- Send the command identified by the module name.
-	if moduleAddress == nil then
-		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
-		return
-	else
-	EMAPrivate.Communications.SendCommandToon( moduleName, characterName, commandName, ... )
-	end
-end
-
--- A command is received, pass it to the relevant module.
-local function OnCommandReceived( sender, moduleName, commandName, ... )
-	sender = EMAUtilities:AddRealmToNameIfMissing( sender )
-	-- Get the address of the module.
-	local moduleAddress = EMA.registeredModulesByName[moduleName]
-	-- Pass the module its settings.
-	if moduleAddress == nil then
-		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
-		return
-	else
-		moduleAddress:EMAOnCommandReceived( sender, commandName, ... )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMA Core Profile Support.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:FireBeforeProfileChangedEvent()
-	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
-		if moduleName ~= EMA.moduleName then
-			moduleAddress:BeforeEMAProfileChanged()
-		end
-	end
-end
-
-function EMA:CanChangeProfileForModule( moduleName )
-	if (moduleName ~= EMA.moduleName) and (moduleName ~= EMA.teamModuleName) then
-		return true
-	end
-	return false
-end
-
-function EMA:FireOnProfileChangedEvent( moduleAddress )
-	moduleAddress.db = moduleAddress.completeDatabase.profile
-	moduleAddress:OnEMAProfileChanged()
-end
-
-function EMA:OnProfileChanged( event, database, newProfileKey, ... )
-	EMA:Print( "Profile changed - iterating all modules.")
-	EMA:FireBeforeProfileChangedEvent()
-	-- Do the team module before all the others.
-	local teamModuleAddress = EMA.registeredModulesByName[EMA.teamModuleName]
-	EMA:Print( "Changing profile: ", EMA.teamModuleName )
-	teamModuleAddress.completeDatabase:SetProfile( newProfileKey )
-	EMA:FireOnProfileChangedEvent( teamModuleAddress )
-	-- Do the other modules.
-	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
-		if EMA:CanChangeProfileForModule( moduleName ) == true then
-			EMA:Print( L["CHANGING_PROFILE"] , moduleName )
-			moduleAddress.completeDatabase:SetProfile( newProfileKey )
-			EMA:FireOnProfileChangedEvent( moduleAddress )
-		end
-	end
-end
-
-function EMA:OnProfileCopied( event, database, sourceProfileKey )
-	EMA:Print( "Profile copied - iterating all modules." )
-	EMA:FireBeforeProfileChangedEvent()
-	-- Do the team module before all the others.
-	local teamModuleAddress = EMA.registeredModulesByName[EMA.teamModuleName]
-	EMA:Print( L["COPYING_PROFILE"], EMA.teamModuleName )
-	teamModuleAddress.completeDatabase:CopyProfile( sourceProfileKey, true )
-	EMA:FireOnProfileChangedEvent( teamModuleAddress )
-	-- Do the other modules.
-	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
-		if EMA:CanChangeProfileForModule( moduleName ) == true then
-			EMA:Print( L["COPYING_PROFILE"], moduleName )
-			moduleAddress.completeDatabase:CopyProfile( sourceProfileKey, true )
-			EMA:FireOnProfileChangedEvent( moduleAddress )
-		end
-	end
-end
-
-function EMA:OnProfileReset( event, database )
-	EMA:Print( L["PROFILE_RESET"] )
-	EMA:FireBeforeProfileChangedEvent()
-	-- Do the team module before all the others.
-	local teamModuleAddress = EMA.registeredModulesByName[EMA.teamModuleName]
-	EMA:Print( L["RESETTING_PROFILE"], EMA.teamModuleName )
-	teamModuleAddress.completeDatabase:ResetProfile()
-	EMA:FireOnProfileChangedEvent( teamModuleAddress )
-	-- Do the other modules.
-	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
-		if EMA:CanChangeProfileForModule( moduleName ) == true then
-			EMA:Print( L["RESETTING_PROFILE"], moduleName )
-			moduleAddress.completeDatabase:ResetProfile()
-			EMA:FireOnProfileChangedEvent( moduleAddress )
-		end
-	end
-end
-
-function EMA:OnProfileDeleted( event, database, profileKey )
-	EMA:Print( L["PROFILE_DELETED"] )
-	EMA:FireBeforeProfileChangedEvent()
-	-- Do the team module before all the others.
-	local teamModuleAddress = EMA.registeredModulesByName[EMA.teamModuleName]
-	EMA:Print( L["DELETING_PROFILE"], EMA.teamModuleName )
-	teamModuleAddress.completeDatabase:DeleteProfile( profileKey, true )
-	EMA:FireOnProfileChangedEvent( teamModuleAddress )
-	-- Do the other modules.
-	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
-		if EMA:CanChangeProfileForModule( moduleName ) == true then
-			EMA:Print( L["DELETING_PROFILE"], moduleName )
-			moduleAddress.completeDatabase:DeleteProfile( profileKey, true )
-			EMA:FireOnProfileChangedEvent( moduleAddress )
-		end
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMA Core Initialization.
--------------------------------------------------------------------------------------------------------------
-
--- Initialize the addon.
-function EMA:OnInitialize()
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-	-- Tables to hold registered modules - lookups by name and by address.
-	-- By name is used for communication between clients and by address for communication between addons on the same client.
-	EMA.registeredModulesByName = {}
-	EMA.registeredModulesByAddress = {}
-	-- Create the settings database supplying the settings values along with defaults.
-   EMA.completeDatabase = LibStub( "AceDB-3.0" ):New( EMA.settingsDatabaseName, EMA.settings )
-	EMA.completeDatabase.RegisterCallback( EMA, "OnProfileChanged", "OnProfileChanged" )
-	EMA.completeDatabase.RegisterCallback( EMA, "OnProfileCopied", "OnProfileCopied" )
-	EMA.completeDatabase.RegisterCallback( EMA, "OnProfileReset", "OnProfileReset" )
-	EMA.completeDatabase.RegisterCallback( EMA, "OnProfileDeleted", "OnProfileDeleted" )
-
-	EMA.db = EMA.completeDatabase.profile
-	-- Create the settings.
-	LibStub( "AceConfig-3.0" ):RegisterOptionsTable(
-		EMA.moduleName,
-		GetConfiguration()
-	)
-	-- Create the settings frame.
-	EMA:CoreSettingsCreate()
-	EMA.settingsFrame = EMA.settingsControl.widgetSettings.frame
-	-- TODO DO WE NEED THIS ??????
-	--[[
-	-- Blizzard options frame.
-	local frame = CreateFrame( "Frame" )
-	frame.name = L["EMA"]
-	local button = CreateFrame( "Button", nil, frame, "OptionsButtonTemplate" )
-	button:SetPoint( "CENTER" )
-	button:SetText( "/EMA" )
-	button:SetScript( "OnClick", EMA.LoadEMASettings )
-	InterfaceOptions_AddCategory( frame )
-	]]
-	-- Create the settings profile support.
-	LibStub( "AceConfig-3.0" ):RegisterOptionsTable(
-		EMA.moduleName..L["OPTIONS"],
-		LibStub( "AceDBOptions-3.0" ):GetOptionsTable( EMA.completeDatabase )
-	)
-	local profileContainerWidget = AceGUI:Create( "ScrollFrame" )
-	profileContainerWidget:SetLayout( "Fill" )
-	-- We need this to make it a working Module
-	local order  = 10
-	EMAPrivate.SettingsFrame.Tree.Add( L["OPTIONS"], L["OPTIONS"], EMA.pofileIcon, order, profileContainerWidget )
-
-	-- Register the core as a module.
-	RegisterModule( EMA, EMA.moduleName )
-	-- Register the chat command.
-	EMA:RegisterChatCommand( EMA.chatCommand, "EMAChatCommand" )
-end
-
-function EMA:LoadEMAModule( moduleName )
-	local loaded, reason = LoadAddOn( moduleName )
-	if not loaded then
-		if reason ~= "DISABLED" and reason ~= "MISSING" then
-			EMA:Print(L["Failed_LOAD_MODULE"]..moduleName.."' ["..reason.."]." )
-		end
-	end
-end
-
-function EMA:CoreSettingsCreateInfo( top )
-	-- Get positions and dimensions.
-	local buttonPushAllSettingsWidth = 200
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local radioBoxHeight = EMAHelperSettings:GetRadioBoxHeight()
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local indent = horizontalSpacing * 10
-	local indentContinueLabel = horizontalSpacing * 18
-	local indentSpecial = indentContinueLabel + 9
-	local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3
-	local column1Left = left
-	local column2Left = column1Left + checkBoxThirdWidth + horizontalSpacing - 35
-	local column1LeftIndent = left + indentContinueLabel
-	local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing
-	local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	--Main Heading
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["STATUSTEXT"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.labelInformation1 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["ME"]
-	)
-	movingTop = movingTop + movingTop * 2
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["RELEASE_NOTES"]..GetAddOnMetadata("EMA", "version") , movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.labelInformation10 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT1"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation11 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT2"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation12 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT3"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation13	= EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT4"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation14 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT5"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation15 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT6"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation16 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT7"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation17 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT8"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation18 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT9"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation19 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEXT10"]
-	)
-	--movingTop = movingTop - labelContinueHeight
-	-- Useful websites Heading
-	movingTop = movingTop - labelContinueHeight * 2
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["WEBSITES"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.labelInformation30 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEMP_WEBSITE1"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation21 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["ME_TWITTER"]
-
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation22 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["D-B"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation23 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["ISB"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation24 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEMP_WEBSITE2"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation25 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["TEMP_WEBSITE3"]
-	)
-	-- Special thanks Heading
-	movingTop = movingTop - buttonHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SPECIAL_THANKS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.labelInformation20 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["THANKS1"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation21 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["THANKS2"]
-
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation22 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["THANKS3"]
-	)
-	--CopyRight heading
-	movingTop = movingTop - labelContinueHeight * 4
-	EMA.settingsControl.labelInformation40 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["COPYRIGHT"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControl.labelInformation41 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column2Left,
-		movingTop,
-		L["COPYRIGHTTWO"]
-	)
-	return movingTop
-end
-
-function EMA:CoreSettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SendSettingsAllModules,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfInfo = EMA:CoreSettingsCreateInfo( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
-end
-
--- Send core settings.
-function EMA:EMASendSettings()
-	EMAPrivate.Communications.SendSettings( EMA.moduleName, EMA.db )
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-end
-
--- Core settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	--Checks character is not the the character that send the settings. Now checks the character has a realm on there name to match EMA team list.
-	--characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-        -- TODO: What is this minimap icon?
-		EMA.db.showMinimapIcon = settings.showMinimapIcon
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
---[[
-function EMA:LoadEMASettings()
-	InterfaceOptionsFrameCancel_OnClick()
-	HideUIPanel( GameMenuFrame )
-	EMA:EMAChatCommand( "" )
-end
-]]
-
--- Handle the chat command.
-function EMA:EMAChatCommand( input )
-    if not input or input:trim() == "" then
-		EMAPrivate.SettingsFrame.Widget:Show()
-		EMAPrivate.SettingsFrame.WidgetTree:SelectByValue( L["NEWS"] )
-		EMAPrivate.SettingsFrame.Tree.ButtonClick( nil, nil, EMA.moduleDisplayName, false)
-    else
-        LibStub( "AceConfigCmd-3.0" ):HandleCommand( EMA.chatCommand, EMA.moduleName, input )
-    end
-end
-
-function EMA:ResetSettingsFrame()
-	EMA:Print( L["FRAME_RESET"] )
-	EMAPrivate.SettingsFrame.Widget:SetPoint("TOPLEFT", 0, 0)
-	EMAPrivate.SettingsFrame.Widget:SetWidth(900)
-	EMAPrivate.SettingsFrame.Widget:SetHeight(650)
-	EMAPrivate.SettingsFrame.Widget:Show()
-end
-
--- Functions available from EMA Core for other EMA internal objects.
-EMAPrivate.Core.RegisterModule = RegisterModule
-EMAPrivate.Core.SendSettings = SendSettings
-EMAPrivate.Core.OnSettingsReceived = OnSettingsReceived
-EMAPrivate.Core.SendCommandToTeam = SendCommandToTeam
-EMAPrivate.Core.SendCommandToMaster = SendCommandToMaster
-EMAPrivate.Core.SendCommandToToon = SendCommandToToon
-EMAPrivate.Core.OnCommandReceived = OnCommandReceived
-EMAPrivate.Core.isBetaBuild = isBetaBuild
-EMAPrivate.Core.isEmaAlphaBuild = isEmaAlphaBuild
diff --git a/Core/Message.lua b/Core/Message.lua
deleted file mode 100644
index 82bbe88..0000000
--- a/Core/Message.lua
+++ /dev/null
@@ -1,990 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "EMA" that is 								--
---				Released under the MIT License 										--
---				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- THIS FILE NEED A GOOD REWIRE ONEDAY, AND A PAIN IN THE NECK TO USE.........
-
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Message",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0"
-)
-
--- Load libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local Media = LibStub("LibSharedMedia-3.0")
-
--- Built in Sounds
-Media:Register("sound", "EMA: RaidWarning", "Sound\\interface\\RaidWarning.ogg")
-
-
--- Constants and Locale for this module.
-EMA.moduleName = "Message"
-EMA.settingsDatabaseName = "MessageProfileDB"
-EMA.chatCommand = "ema-message"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["OPTIONS"]
-EMA.moduleDisplayName = L["MESSAGE_DISPLAY"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\ChatIcon.tga"
--- order
-EMA.moduleOrder = 80
-
-
-
--------------------------------------------------------------------------------------------------------------
--- Message area management.
--------------------------------------------------------------------------------------------------------------
-
--- areas = {}
--- areas["areaname"].type
--- areas["areaname"].tag
--- areas["areaname"].channelName
--- areas["areaname"].channelPassword
--- areas["areaname"].chatWindowName
--- areas["areaname"].areaOnScreenName
--- areas["areaname"].soundToPlay
-
--- Message area types.
-EMA.AREA_TYPE_DEFAULT_CHAT = 1
---EMA.AREA_TYPE_SPECIFIC_CHAT = 2
-EMA.AREA_TYPE_WHISPER = 3
-EMA.AREA_TYPE_PARTY = 4
-EMA.AREA_TYPE_GUILD = 5
-EMA.AREA_TYPE_GUILD_OFFICER = 6
-EMA.AREA_TYPE_RAID = 7
-EMA.AREA_TYPE_RAID_WARNING = 8
---EMA.AREA_TYPE_CHANNEL = 9
---EMA.AREA_TYPE_PARROT = 10
---EMA.AREA_TYPE_MSBT = 11
-EMA.AREA_TYPE_MUTE = 12
-
--- Message area types names and uses information.
-EMA.areaTypes = {}
--- Default chat window.
-EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT] = {}
-EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].name = L["DEFAULT_CHAT_WINDOW"]
-EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesTag = true
-EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesChannel = false
-EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesChatWindowName = false
-EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].mustBeWired = true
-EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesSound = true
--- Specific chat window.
---[[
-EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT] = {}
-EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].name = L["Specific Chat Window"]
-EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesTag = true
-EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesChannel = false
-EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesChatWindowName = true
-EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].mustBeWired = true
-EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesSound = true
-]]--
--- Whisper.
-EMA.areaTypes[EMA.AREA_TYPE_WHISPER] = {}
-EMA.areaTypes[EMA.AREA_TYPE_WHISPER].name = L["WHISPER"]
-EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesTag = true
-EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesChannel = false
-EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesChatWindowName = false
-EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_WHISPER].mustBeWired = true
-EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesSound = true
--- Party.
-EMA.areaTypes[EMA.AREA_TYPE_PARTY] = {}
-EMA.areaTypes[EMA.AREA_TYPE_PARTY].name = L["PARTY"]
-EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesTag = false
-EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesChannel = false
-EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesChatWindowName = false
-EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_PARTY].mustBeWired = false
-EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesSound = true
--- Guild.
-EMA.areaTypes[EMA.AREA_TYPE_GUILD] = {}
-EMA.areaTypes[EMA.AREA_TYPE_GUILD].name = L["GUILD"]
-EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesTag = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesChannel = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesChatWindowName = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD].mustBeWired = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesSound = true
--- Guild Officer.
-EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER] = {}
-EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].name = L["GUILD_OFFICER"]
-EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesTag = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesChannel = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesChatWindowName = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].mustBeWired = false
-EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesSound = true
--- Raid.
-EMA.areaTypes[EMA.AREA_TYPE_RAID] = {}
-EMA.areaTypes[EMA.AREA_TYPE_RAID].name = L["RAID"]
-EMA.areaTypes[EMA.AREA_TYPE_RAID].usesTag = false
-EMA.areaTypes[EMA.AREA_TYPE_RAID].usesChannel = false
-EMA.areaTypes[EMA.AREA_TYPE_RAID].usesChatWindowName = false
-EMA.areaTypes[EMA.AREA_TYPE_RAID].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_RAID].mustBeWired = false
-EMA.areaTypes[EMA.AREA_TYPE_RAID].usesSound = true
--- Raid Warning.
-EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING] = {}
-EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].name = L["RAID_WARNING"]
-EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesTag = true
-EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesChannel = false
-EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesChatWindowName = false
-EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].mustBeWired = true
-EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesSound = true
--- Private Channel.
---[[
-EMA.areaTypes[EMA.AREA_TYPE_CHANNEL] = {}
-EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].name = L["Channel"]
-EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesTag = false
-EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesChannel = true
-EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesChatWindowName = false
-EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].mustBeWired = false
-EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesSound = true
---]]
--- Mute.
-EMA.areaTypes[EMA.AREA_TYPE_MUTE] = {}
-EMA.areaTypes[EMA.AREA_TYPE_MUTE].name = L["MUTE"]
-EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesTag = false
-EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesChannel = false
-EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesChatWindowName = false
-EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesScreen = false
-EMA.areaTypes[EMA.AREA_TYPE_MUTE].mustBeWired = false
-EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesSound = false
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		["areas"] = {
-			{
-				["type"] = 1,
-				["name"] = L["DEFAULT_MESSAGE"],
-				["tag"] = EMAPrivate.Tag.MasterTag(),
-			},
-			{
-				["type"] = 8,
-				["name"] = L["DEFAULT_WARNING"],
-				["tag"] = EMAPrivate.Tag.MasterTag(),
-				["soundToPlay"] = "EMA: RaidWarning",
-			},
-			{
-				["type"] = 12,
-				["name"] = L["MUTE_POFILE"],
-			},
-		},
-	},
-}
-
- EMA.simpleAreaList = {}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = "group",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-message push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_MESSAGE = "EMAMessageMessage"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--- Master changed, parameter: new master name.
-EMA.MESSAGE_MESSAGE_AREAS_CHANGED = "EMAMessageMessageAreasChanged"
-
--------------------------------------------------------------------------------------------------------------
--- Constants used by module.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	-- Update the settings area list.
-	EMA:SettingsAreaListScrollRefresh()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.areas = EMAUtilities:CopyTable( settings.areas )
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Area management.
--------------------------------------------------------------------------------------------------------------
-
-local function MessageAreaList()
-	EMAUtilities:ClearTable( EMA.simpleAreaList )
-	for index, area in ipairs( EMA.db.areas ) do
-		EMA.simpleAreaList[area.name] = area.name
-	end
-	table.sort( EMA.simpleAreaList )
-	return EMA.simpleAreaList
-end
-
-local function GetAreaByName( areaName )
-	for index, area in ipairs( EMA.db.areas ) do
-		if area.name == areaName then
-			return area
-		end
-	end
-	return nil
-end
-
-local function GetAreaAtPosition( position )
-	return EMA.db.areas[position]
-end
-
-local function SetAreaAtPosition( position, areaInformation )
-	EMA.db.areas[position] = areaInformation
-end
-
-local function GetAreaListMaxPosition()
-	return #EMA.db.areas
-end
-
-local function DoesAreaListContainArea( name )
-	local containsArea = false
-	for index, area in ipairs( EMA.db.areas ) do
-		if area.name == name then
-			containsArea = true
-			break
-		end
-	end
-	return containsArea
-end
-
-local function AddArea( name )
-	if DoesAreaListContainArea( name ) == false then
-		-- Add a new area.
-		local newArea = {}
-		newArea.name = name
-		newArea.type = EMA.AREA_TYPE_DEFAULT_CHAT
-		table.insert( EMA.db.areas, newArea )
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		EMA:SendMessage( EMA.MESSAGE_MESSAGE_AREAS_CHANGED )
-	end
-end
-
-local function RemoveArea( name )
-	if DoesAreaListContainArea( name ) == true then
-		local areaIndex = 0
-		for index, area in ipairs( EMA.db.areas ) do
-			if area.name == name then
-				areaIndex = index
-				break
-			end
-		end
-		if areaIndex ~= 0 then
-			table.remove( EMA.db.areas, areaIndex )
-			-- Send a message to any listeners that the message areas have changed.
-			EMA:SendMessage( EMA.MESSAGE_MESSAGE_AREAS_CHANGED )
-		end
-	end
-end
-
-function EMA:AddAreaGUI( name )
-	AddArea( name )
-	EMA:SettingsAreaListScrollRefresh()
-end
-
-function EMA:RemoveAreaGUI()
-	local area = GetAreaAtPosition( EMA.settingsControl.areaListHighlightRow )
-	RemoveArea( area.name )
-	EMA.settingsControl.areaListHighlightRow = 1
-	EMA:SettingsAreaListScrollRefresh()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreateAreaList()
-	-- Position and size constants.
-	local areaListButtonControlWidth = 125
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local top = EMAHelperSettings:TopOfSettings()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local areaListWidth = headingWidth
-	-- Team list internal variables (do not change).
-	EMA.settingsControl.areaListHighlightRow = 1
-	EMA.settingsControl.areaListOffset = 1
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	top = top - headingHeight
-	-- Create a heading.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MESSAGE_AREA_LIST"], top, false )
-	-- Create an area list frame.
-
-	local list = {}
-	list.listFrameName = "EMAMessageSettingsAreaListFrame"
-	list.parentFrame = EMA.settingsControl.widgetSettings.content
-	list.listTop = top - headingHeight
-	list.listLeft = left
-	list.listWidth = areaListWidth
-	list.rowHeight = 20
-	list.rowsToDisplay = 8
-	list.columnsToDisplay = 2
-	list.columnInformation = {}
-	list.columnInformation[1] = {}
-	list.columnInformation[1].width = 60
-	list.columnInformation[1].alignment = "LEFT"
-	list.columnInformation[2] = {}
-	list.columnInformation[2].width = 40
-	list.columnInformation[2].alignment = "LEFT"
-	list.scrollRefreshCallback = EMA.SettingsAreaListScrollRefresh
-	list.rowClickCallback = EMA.SettingsAreaListRowClick
-	EMA.settingsControl.areaList = list
-	EMAHelperSettings:CreateScrollList( EMA.settingsControl.areaList )
-	-- Position and size constants (once list height is known).
-	local bottomOfList = top - headingHeight - list.listHeight - verticalSpacing
-	local bottomOfSection = bottomOfList - verticalSpacing - buttonHeight - verticalSpacing
-	-- Create buttons.
-	EMA.settingsControl.areaListButtonAdd = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		areaListButtonControlWidth,
-		left,
-		bottomOfList,
-		L["ADD"],
-		EMA.SettingsAddClick,
-		L["ADD_MSG_HELP"]
-	)
-	EMA.settingsControl.areaListButtonRemove = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		areaListButtonControlWidth,
-		left + horizontalSpacing + areaListButtonControlWidth,
-		bottomOfList,
-		L["REMOVE"],
-		EMA.SettingsRemoveClick,
-		L["REMOVE_MSG_HELP"]
-	)
-
-	return bottomOfSection
-end
-
-local function SettingsCreateAreaTypes( top )
-	local areaListButtonControlWidth = 125
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - (horizontalSpacing  * 3)) / 2
-	local column1Left = left
-	local column2Left = left + halfWidth + (horizontalSpacing * 3)
-	local areaConfigurationTop = top - headingHeight
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	top = top - headingHeight
-	--Main Heading
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MESSAGE_AREA_CONFIGURATION"], top, false )
-	EMA.settingsControl.areaTypeDropdown = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		areaConfigurationTop,
-		L["MESSAGE_AREA"]
-	)
-	areaConfigurationTop = areaConfigurationTop - dropdownHeight
-	local areaList = {}
-	for areaType, areaTypeInformation in pairs( EMA.areaTypes ) do
-		areaList[areaType] = areaTypeInformation.name
-	end
-	EMA.settingsControl.areaTypeDropdown:SetList( areaList )
-	EMA.settingsControl.areaTypeDropdown:SetCallback( "OnValueChanged", EMA.UpdateAreaTypeControls )
-	EMA.settingsControl.areaEditBoxTag = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		areaConfigurationTop,
-		L["GROUP"]
-	)
-	EMA.settingsControl.areaEditBoxTag:SetCallback( "OnEnterPressed", EMA.EditBoxTagChanged )
-	areaConfigurationTop = areaConfigurationTop - dropdownHeight
-	EMA.settingsControl.areaEditBoxName = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		areaConfigurationTop,
-		L["NAME"]
-	)
-	EMA.settingsControl.areaEditBoxName:SetCallback( "OnEnterPressed", EMA.EditBoxNameChanged )
-	areaConfigurationTop = areaConfigurationTop - dropdownHeight
-	EMA.settingsControl.areaEditBoxPassword = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		areaConfigurationTop,
-		L["PASSWORD"]
-	)
-	EMA.settingsControl.areaEditBoxPassword:SetCallback( "OnEnterPressed", EMA.EditBoxPasswordChanged )
-	areaConfigurationTop = areaConfigurationTop - dropdownHeight
-	EMA.settingsControl.areaOnScreenDropdown = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		areaConfigurationTop,
-		L["AREA"]
-	)
-	EMA.settingsControl.areaOnScreenDropdown:SetCallback( "OnValueChanged", EMA.UpdateAreaOnScreenControls )
-	areaConfigurationTop = areaConfigurationTop - dropdownHeight
-	areaConfigurationTop = areaConfigurationTop - verticalSpacing - verticalSpacing
-	EMA.settingsControl.areaSoundDropdown = EMAHelperSettings:CreateMediaSound(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		areaConfigurationTop,
-		L["SOUND_TO_PLAY"]
-	)
-	EMA.settingsControl.areaSoundDropdown:SetCallback( "OnValueChanged", EMA.UpdateSoundControls )
-
-	areaConfigurationTop = areaConfigurationTop - dropdownHeight
-	areaConfigurationTop = areaConfigurationTop - verticalSpacing - verticalSpacing
-	EMA.settingsControl.areaListButtonUpdate = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		areaListButtonControlWidth,
-		column1Left,
-		areaConfigurationTop,
-		L["SAVE"],
-		EMA.SettingsUpdateClick
-	)
-	areaConfigurationTop = areaConfigurationTop - buttonHeight
-	EMA.settingsControl.areaEditBoxTag:SetDisabled( true )
-	EMA.settingsControl.areaEditBoxTag:SetText( "" )
-	EMA.settingsControl.areaEditBoxName:SetDisabled( true )
-	EMA.settingsControl.areaEditBoxName:SetText( "" )
-	EMA.settingsControl.areaEditBoxPassword:SetDisabled( true )
-	EMA.settingsControl.areaEditBoxPassword:SetText( "" )
-	EMA.settingsControl.areaOnScreenDropdown:SetDisabled( true )
-	EMA.settingsControl.areaOnScreenDropdown:SetText( "" )
-	EMA.settingsControl.areaSoundDropdown:SetDisabled( true )
-	EMA.settingsControl.areaSoundDropdown:SetText( "" )
-	local bottomOfSection = areaConfigurationTop
-	return bottomOfSection
-end
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	-- Create the area list controls.
-	local bottomOfAreaList = SettingsCreateAreaList()
-	-- Create the area type configuration controls.
-	local bottomOfAreaTypes = SettingsCreateAreaTypes( bottomOfAreaList )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfAreaTypes )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Callbacks.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsAreaListScrollRefresh()
-	FauxScrollFrame_Update(
-		EMA.settingsControl.areaList.listScrollFrame,
-		GetAreaListMaxPosition(),
-		EMA.settingsControl.areaList.rowsToDisplay,
-		EMA.settingsControl.areaList.rowHeight
-	)
-
-	EMA.settingsControl.areaListOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.areaList.listScrollFrame )
-	for iterateDisplayRows = 1, EMA.settingsControl.areaList.rowsToDisplay do
-		-- Reset.
-		EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
-		EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.areaList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
-		-- Get data.
-		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.areaListOffset
-		if dataRowNumber <= GetAreaListMaxPosition() then
-			-- Put area name and type into columns.
-			local areaInformation = GetAreaAtPosition( dataRowNumber )
-			local areaName = areaInformation.name
-			local areaType = EMA.areaTypes[areaInformation.type].name
-			EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[1].textString:SetText( areaName )
-			EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[2].textString:SetText( areaType )
-			-- Highlight the selected row.
-			if dataRowNumber == EMA.settingsControl.areaListHighlightRow then
-				EMA.settingsControl.areaList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
-			end
-		end
-	end
-end
-
-function EMA:UpdateAreaTypeControls( event, areaTypeIdentifier )
-	EMA.currentlySelectedAreaTypeIdentifier = areaTypeIdentifier
-	local areaType = EMA.areaTypes[areaTypeIdentifier]
-	-- Disable all controls.
-	EMA.settingsControl.areaEditBoxTag:SetDisabled( true )
-	EMA.settingsControl.areaEditBoxName:SetDisabled( true )
-	EMA.settingsControl.areaEditBoxPassword:SetDisabled( true )
-	EMA.settingsControl.areaOnScreenDropdown:SetDisabled( true )
-	EMA.settingsControl.areaSoundDropdown:SetDisabled( true )
-	-- Enable controls if they are used.
-	if areaType.usesTag == true then
-		EMA.settingsControl.areaEditBoxTag:SetDisabled( false )
-	end
-	if areaType.usesChannel == true then
-		EMA.settingsControl.areaEditBoxName:SetDisabled( false )
-		EMA.settingsControl.areaEditBoxPassword:SetDisabled( false )
-	end
-	if areaType.usesChatWindowName == true then
-		EMA.settingsControl.areaEditBoxName:SetDisabled( false )
-	end
-	if areaType.usesScreen == true then
-		-- Nothing here anymore!
-
-	end
-	if areaType.usesSound == true then
-		EMA.settingsControl.areaSoundDropdown:SetDisabled( false )
-	end
-end
-
-local function UpdateAreaTypeInformation()
-	-- Update the area type controls to reflect the information for this selection.
-	local areaInformation = GetAreaAtPosition( EMA.settingsControl.areaListHighlightRow )
-	local areaType = EMA.areaTypes[areaInformation.type]
-	-- Set the area type control.
-	EMA.settingsControl.areaTypeDropdown:SetValue( areaInformation.type )
-	EMA:UpdateAreaTypeControls( "OnValueChanged", areaInformation.type )
-	-- Clear controls.
-	EMA.settingsControl.areaEditBoxTag:SetText( "" )
-	EMA.settingsControl.areaEditBoxName:SetText( "" )
-	EMA.settingsControl.areaEditBoxPassword:SetText( "" )
-	EMA.settingsControl.areaOnScreenDropdown:SetText( "" )
-	-- Populate controls if they are used.
-	if areaType.usesTag == true then
-		EMA.settingsControl.areaEditBoxTag:SetText( areaInformation.tag )
-		EMA.currentEditBoxTagText = areaInformation.tag
-	end
-	if areaType.usesChannel == true then
-		EMA.settingsControl.areaEditBoxName:SetText( areaInformation.channelName )
-		EMA.currentEditBoxNameText = areaInformation.channelName
-		EMA.settingsControl.areaEditBoxPassword:SetText( areaInformation.channelPassword )
-		EMA.currentEditBoxPasswordText = areaInformation.channelPassword
-	end
-	if areaType.usesChatWindowName == true then
-		EMA.settingsControl.areaEditBoxName:SetText( areaInformation.chatWindowName )
-		EMA.currentEditBoxNameText = areaInformation.chatWindowName
-	end
-	if areaType.usesScreen == true then
-		EMA.settingsControl.areaOnScreenDropdown:SetValue( areaInformation.areaOnScreenName )
-		EMA:UpdateAreaOnScreenControls( "OnValueChanged", areaInformation.areaOnScreenName )
-	end
-	if areaType.usesSound == true then
-		EMA.settingsControl.areaSoundDropdown:SetValue( areaInformation.soundToPlay )
-	end
-end
-
-function EMA:SettingsAreaListRowClick( rowNumber, columnNumber )
-	if EMA.settingsControl.areaListOffset + rowNumber <= GetAreaListMaxPosition() then
-		EMA.settingsControl.areaListHighlightRow = EMA.settingsControl.areaListOffset + rowNumber
-		UpdateAreaTypeInformation()
-		EMA:SettingsAreaListScrollRefresh()
-	end
-end
-
-function EMA:EditBoxTagChanged( event, text )
-	EMA.currentEditBoxTagText = text
-end
-
-function EMA:EditBoxNameChanged( event, text )
-	EMA.currentEditBoxNameText = text
-end
-
-function EMA:EditBoxPasswordChanged( event, text )
-	EMA.currentEditBoxPasswordText = text
-end
-
-local function SetAreaConfigurationIntoCurrentArea()
-	-- Get information from table at position.
-	local areaInformation = GetAreaAtPosition( EMA.settingsControl.areaListHighlightRow )
-	-- Update the area type for this area.
-	areaInformation.type = EMA.currentlySelectedAreaTypeIdentifier
-	-- Get the area information.
-	local areaType = EMA.areaTypes[areaInformation.type]
-	-- Update the area information according to the area type.
-	if areaType.usesTag == true then
-		areaInformation.tag = EMA.currentEditBoxTagText
-	end
-	if areaType.usesChannel == true then
-		areaInformation.channelName = EMA.currentEditBoxNameText
-		areaInformation.channelPassword = EMA.currentEditBoxPasswordText
-	end
-	if areaType.usesChatWindowName == true then
-		areaInformation.chatWindowName = EMA.currentEditBoxNameText
-	end
-	if areaType.usesScreen == true then
-		areaInformation.areaOnScreenName = EMA.currentlySelectedAreaOnScreenName
-	end
-	if areaType.usesSound == true then
-		areaInformation.soundToPlay = EMA.currentlySelectedAreaSoundToPlay
-	end
-	-- Put information back into table at position.
-	SetAreaAtPosition( EMA.settingsControl.areaListHighlightRow, areaInformation )
-	-- Refresh the settings.
-	EMA:SettingsRefresh()
-end
-
-function EMA:UpdateAreaOnScreenControls( event, areaOnScreenName )
-	EMA.currentlySelectedAreaOnScreenName = areaOnScreenName
-end
-
-function EMA:UpdateSoundControls( event, value )
-	EMA.settingsControl.areaSoundDropdown:SetValue( value )
-	EMA.currentlySelectedAreaSoundToPlay = value
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsUpdateClick( event )
-	SetAreaConfigurationIntoCurrentArea()
-end
-
-function EMA:SettingsAddClick( event )
-	StaticPopup_Show( "EMAMESSAGE_ASK_AREA_NAME" )
-end
-
-function EMA:SettingsRemoveClick( event )
-	local area = GetAreaAtPosition( EMA.settingsControl.areaListHighlightRow )
-	StaticPopup_Show( "EMAMESSAGE_CONFIRM_REMOVE_AREA", area.name )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Popup Dialogs.
--------------------------------------------------------------------------------------------------------------
-
--- Initialize Popup Dialogs.
-local function InitializePopupDialogs()
-   StaticPopupDialogs["EMAMESSAGE_ASK_AREA_NAME"] = {
-        text = L["STATICPOPUP_ADD_MSG"],
-        button1 = ACCEPT,
-        button2 = CANCEL,
-        hasEditBox = 1,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-		OnShow = function( self )
-			self.editBox:SetText("")
-            self.button1:Disable()
-            self.editBox:SetFocus()
-        end,
-        OnAccept = function( self )
-			EMA:AddAreaGUI( self.editBox:GetText() )
-		end,
-        EditBoxOnTextChanged = function( self )
-            if not self:GetText() or self:GetText():trim() == "" then
-				self:GetParent().button1:Disable()
-            else
-                self:GetParent().button1:Enable()
-            end
-        end,
-		EditBoxOnEnterPressed = function( self )
-            if self:GetParent().button1:IsEnabled() then
-				EMA:AddAreaGUI( self:GetText() )
-            end
-            self:GetParent():Hide()
-        end,
-    }
-   StaticPopupDialogs["EMAMESSAGE_CONFIRM_REMOVE_AREA"] = {
-        text = L["REMOVE_MESSAGE_AREA"],
-        button1 = YES,
-        button2 = NO,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function( self )
-			EMA:RemoveAreaGUI()
-		end,
-    }
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	EMA.currentlySelectedAreaTypeIdentifier = EMA.AREA_TYPE_DEFAULT_CHAT
-	EMA.currentEditBoxTagText = ""
-	EMA.currentEditBoxNameText = ""
-	EMA.currentEditBoxPasswordText = ""
-	EMA.currentlySelectedAreaOnScreenName = ""
-	EMA.currentlySelectedAreaSoundToPlay = ""
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-	-- Click the area list first row, column to set the child controls.
-	EMA:SettingsAreaListRowClick( 1, 1 )
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	-- Kickstart the settings team list scroll frame.
-	EMA:SettingsAreaListScrollRefresh()
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Send messages.
--------------------------------------------------------------------------------------------------------------
-
-local function DefaultMessageArea()
-	return L["DEFAULT_MESSAGE"]
-end
-
-local function DefaultWarningArea()
-	return L["DEFAULT_WARNING"]
-end
-
-local function DisplayMessageDefaultChat( sender, message, suppressSender )
-	local senderName = Ambiguate(sender, "none")
-	local chatTimestamp = ""
-	if (CHAT_TIMESTAMP_FORMAT) then
-		chatTimestamp = BetterDate( CHAT_TIMESTAMP_FORMAT, time() )
-	end
-	local completeMessage = chatTimestamp
-	if suppressSender == false then
-		completeMessage = completeMessage.."|Hplayer:"..sender.."|h["..senderName.."]|h"..L[": "]
-	end
-	completeMessage = completeMessage..message
-	DEFAULT_CHAT_FRAME:AddMessage( completeMessage )
-end
-
-local function DisplayMessageChatWhisper( sender, message, suppressSender )
-	-- The whisper comes across the wire and you whisper yourself...
-	-- If we clean up EMA-msg then we can remove this maybe again Eboyn TODO::::
-	EMAPrivate.Communications.SendChatMessage( message, "WHISPER", sender, EMAPrivate.Communications.COMMUNICATION_PRIORITY_ALERT )
-end
-
-local function DisplayMessageChat( sender, message, chatDestination, suppressSender )
-	local canSend = false
-	if (chatDestination == "GUILD" or chatDestination == "OFFICER") then
-		if IsInGuild() then
-			canSend = true
-		else
-			EMA:Print( L["ERROR: Not in a Guild"] )
-		end
-	end
-	if chatDestination == "PARTY" then
-		if GetNumSubgroupMembers() > 0 then
-			canSend = true
-		else
-			EMA:Print( L["ERROR: Not in a Party"] )
-		end
-	end
-	if chatDestination == "RAID" then
-		if GetNumGroupMembers() > 0 and IsInRaid() then
-			canSend = true
-		else
-			EMA:Print( L["ERROR: Not in a Raid"] )
-		end
-	end
-	if canSend == true then
-		-- If we clean up EMA-msg then we can remove this maybe again Eboyn TODO::::
-		EMAPrivate.Communications.SendChatMessage( message, chatDestination, nil, EMAPrivate.Communications.COMMUNICATION_PRIORITY_ALERT )
-	else
-		EMA:Print( message )
-	end
-end
-
-local function DisplayMessageRaidWarning( sender, message, suppressSender )
-	local completeMessage = ""
-	local senderName = Ambiguate(sender, "none")
-	if suppressSender == false then
-		completeMessage = completeMessage..senderName..L[": "]
-	end
-	completeMessage = completeMessage..message
-	RaidNotice_AddMessage( RaidWarningFrame, completeMessage, ChatTypeInfo["RAID_WARNING"] )
-end
-
-
-local function PlayMessageSound( soundToPlay )
-	PlaySoundFile( Media:Fetch( 'sound', soundToPlay ), "Ambience" )
-end
-
-local function ProcessReceivedMessage( sender, areaName, message, suppressSender, ... )
-	-- Get the area requested.
-	local area = GetAreaByName( areaName )
-	if area == nil then
-		EMA:Print( L["ERROR: Could not find area: A"]( areaName ) )
-		EMA:Print( message )
-		return
-	end
-	-- What sort of area is this?
-	local areaType = EMA.areaTypes[area.type]
-	-- Does this area type use tags?  If so, check the tag.
-	if areaType.usesTag == true then
-		if EMAPrivate.Tag.DoesCharacterHaveTag( EMA.characterName, area.tag ) == false then
-			-- Tag not on this character, bail.
-			return
-		end
-	end
-	-- Display the message.
-	if area.type == EMA.AREA_TYPE_DEFAULT_CHAT then
-		DisplayMessageDefaultChat( sender, message, suppressSender )
-	end
-	if area.type == EMA.AREA_TYPE_SPECIFIC_CHAT then
-		-- TODO
-	end
-	if area.type == EMA.AREA_TYPE_WHISPER then
-		DisplayMessageChatWhisper( sender, message, suppressSender )
-	end
-	if area.type == EMA.AREA_TYPE_PARTY then
-		DisplayMessageChat( sender, message, "PARTY", suppressSender )
-	end
-	if area.type == EMA.AREA_TYPE_GUILD then
-		DisplayMessageChat( sender, message, "GUILD", suppressSender )
-	end
-	if area.type == EMA.AREA_TYPE_GUILD_OFFICER then
-		DisplayMessageChat( sender, message, "OFFICER", suppressSender )
-	end
-	if area.type == EMA.AREA_TYPE_RAID then
-		DisplayMessageChat( sender, message, "RAID", suppressSender )
-	end
-	if area.type == EMA.AREA_TYPE_RAID_WARNING then
-		DisplayMessageRaidWarning( sender, message, suppressSender )
-	end
-	if area.type == EMA.AREA_TYPE_CHANNEL then
-		-- TODO
-	end
---[[
-	if area.type == EMA.AREA_TYPE_PARROT then
-		DisplayMessageParrot( sender, message, area.areaOnScreenName, suppressSender )
-	end
-	if area.type == EMA.AREA_TYPE_MSBT then
-		DisplayMessageMikSBT( sender, message, area.areaOnScreenName, suppressSender )
-	end
-]]
-	if area.type == EMA.AREA_TYPE_MUTE then
-		-- Do nothing! Mute means eat the message.
-	end
-	if areaType.usesSound == true and area.soundToPlay ~= "None" then
-		PlayMessageSound(area.soundToPlay)
-	end
-end
-
-local function SendMessage( areaName, message, suppressSender, ... )
-	-- Get the area requested.
-	local area = GetAreaByName( areaName )
-	if area == nil then
-		EMA:Print( L["ERR_COULD_NOT_FIND_AREA"]( areaName ) )
-
-		EMA:Print( message )
-		return
-	end
-	-- What sort of area is this?
-	local areaType = EMA.areaTypes[area.type]
-	-- Does this area type use tags?  If so, find out if the message needs to be sent over the wire.
-	local sendToJustMe = false
-	if areaType.usesTag == true then
-		--if area.tag == EMAPrivate.Tag.JustMeTag() then
-		--	sendToJustMe = true
-		--end
-		if area.tag == EMAPrivate.Tag.MasterTag() and EMAPrivate.Team.IsCharacterTheMaster( EMA.characterName ) == true then
-			sendToJustMe = true
-		end
-	end
-	-- Send over the wire or process locally?
-	if sendToJustMe == true or areaType.mustBeWired == false then
-		ProcessReceivedMessage( EMA.characterName, areaName, message, suppressSender, ... )
-	else
-		EMA:EMASendCommandToTeam( EMA.COMMAND_MESSAGE, areaName, message, suppressSender, ... )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Commands.
--------------------------------------------------------------------------------------------------------------
-
--- A EMA command has been recieved.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if commandName == EMA.COMMAND_MESSAGE then
-		ProcessReceivedMessage( characterName, ... )
-	end
-end
-
--- Functions available from EMA Message for other EMA internal objects.
-EMAPrivate.Message.SendMessage = SendMessage
-
--- Functions available for other addons.
-EMAApi.MessageAreaList = MessageAreaList
-EMAApi.DefaultMessageArea = DefaultMessageArea
-EMAApi.DefaultWarningArea = DefaultWarningArea
-EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED = EMA.MESSAGE_MESSAGE_AREAS_CHANGED
diff --git a/Core/Module.lua b/Core/Module.lua
deleted file mode 100644
index 5d9303a..0000000
--- a/Core/Module.lua
+++ /dev/null
@@ -1,148 +0,0 @@
--- ================================================================================ --
---				EMA EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )    --
---				Current Author: Jennifer Cally (Ebony)								--
---				Copyright 2015 - 2018 Jennifer Cally "Ebony"						--
---																					--
---				License: The MIT License (MIT)										--
---				Copyright (c) 2008-2015  Michael "Jafula" Miller					--
---																					--
--- ================================================================================ --
-
-local MAJOR, MINOR = "Module-1.0", 1
-local EMAModule, oldMinor = LibStub:NewLibrary( MAJOR, MINOR )
-
-if not EMAModule then
-	return
-end
-
--- Load libraries.
-LibStub( "AceConsole-3.0" ):Embed( EMAModule )
-
--------------------------------------------------------------------------------------------------------------
--- EMA Module Mixin Management.
--------------------------------------------------------------------------------------------------------------
-
--- A list of modules that embed this module.
-EMAModule.embeddedModules = EMAModule.embeddedModules or {}
-
--- These methods are the embbedable methods.
-
-local mixinMethods = {
-	"EMARegisterModule", "EMAModuleInitialize",
-	"EMASendCommandToTeam", "EMASendCommandToMaster",
-	"EMASendMessageToTeam", "EMASendCommandToToon",
-	"EMASendSettings", "EMAOnSettingsReceived",
-	"EMAChatCommand",
-	"EMAConfigurationGetSetting", "EMAConfigurationSetSetting",
-}
-
--- Embed all the embeddable methods into the target module.
-function EMAModule:Embed( targetModule )
-	for key, value in pairs( mixinMethods ) do
-		targetModule[value] = self[value]
-	end
-	LibStub( "AceConsole-3.0" ):Embed( targetModule )
-	self.embeddedModules[targetModule] = true
-	return targetModule
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMA Module Registration.
--------------------------------------------------------------------------------------------------------------
-
--- Register a module with EMA.  EMA needs modules to be registered in order to faciliate communications.
-function EMAModule:EMARegisterModule( moduleName )
-	EMAPrivate.Core.RegisterModule( self, moduleName )
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMA Communications.
--------------------------------------------------------------------------------------------------------------
-
--- Send settings to all available EMA Team characters.
-function EMAModule:EMASendSettings()
-	EMAPrivate.Core.SendSettings( self, self.db )
-end
-
--- Send a command to all available EMA Team characters.
-function EMAModule:EMASendCommandToTeam( commandName, ... )
-	EMAPrivate.Core.SendCommandToTeam( self, commandName, ... )
-end
-
--- Send a command to just the master character.
-function EMAModule:EMASendCommandToMaster( commandName, ... )
-	EMAPrivate.Core.SendCommandToMaster( self, commandName, ... )
-end
-
-function EMAModule:EMASendCommandToToon( characterName, commandName, ... )
-	EMAPrivate.Core.SendCommandToToon( self, characterName, commandName, ... )
-end
-
--- Send a message to the team.
-function EMAModule:EMASendMessageToTeam( areaName, message, suppressSender, ... )
-	EMAPrivate.Message.SendMessage( areaName, message, suppressSender, ... )
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMA Chat Commands.
--------------------------------------------------------------------------------------------------------------
-
--- Handle the chat command.
-function EMAModule:EMAChatCommand( input )
-    if not input or input:trim() == "" then
-		EMAPrivate.SettingsFrame.Widget:Show()
-		EMAPrivate.SettingsFrame.TreeGroupStatus.groups[self.parentDisplayName] = true
-		EMAPrivate.SettingsFrame.WidgetTree:SelectByPath( self.parentDisplayName, self.moduleDisplayName )
-		EMAPrivate.SettingsFrame.Tree.ButtonClick( nil, nil, self.moduleDisplayName, false)
-    else
-        LibStub( "AceConfigCmd-3.0" ):HandleCommand( self.chatCommand, self.moduleName, input )
-    end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Module initialization and settings management.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMAModule:EMAModuleInitialize( settingsFrame )
-    -- Create the settings database supplying the settings values along with defaults.
-    self.completeDatabase = LibStub( "AceDB-3.0" ):New( self.settingsDatabaseName, self.settings )
-	self.db = self.completeDatabase.profile
-	-- Create the settings.
-	LibStub( "AceConfig-3.0" ):RegisterOptionsTable( self.moduleName, self:GetConfiguration() )
-	self.settingsFrame = settingsFrame
-	-- Register the chat command for this module.
-	self:RegisterChatCommand( self.chatCommand, "EMAChatCommand" )
-	-- Remember the characters name.
-	-- If server has a space in realm name GetRealmName() will show space this will not work with blizzard API so we need to hack this to work --ebony
-	--local _, k = UnitFullName("player")
-	local k = GetRealmName()
-	local realm = k:gsub( "%s+", "")
-	self.characterRealm = realm
-	self.characterNameLessRealm = UnitName( "player" )
-	--self.characterName = UnitFullName( "player" )
-	self.characterName = self.characterNameLessRealm.."-"..self.characterRealm
-	--self.characterName = UnitFullName("player")
-	self.characterGUID = UnitGUID( "player" )
-	-- Register this module with EMA.
-	self:EMARegisterModule( self.moduleName )
-end
-
--- Get a settings value.
-function EMAModule:EMAConfigurationGetSetting( key )
-	return self.db[key[#key]]
-end
-
--- Set a settings value.
-function EMAModule:EMAConfigurationSetSetting( key, value )
-	self.db[key[#key]] = value
-end
-
--------------------------------------------------------------------------------------------------------------
--- Upgrade Library.
--------------------------------------------------------------------------------------------------------------
-
--- Upgrade all modules that are already using this library to use the newer version.
-for targetModule, value in pairs( EMAModule.embeddedModules ) do
-	EMAModule:Embed( targetModule )
-end
diff --git a/Core/Tag.lua b/Core/Tag.lua
deleted file mode 100644
index c77fc7b..0000000
--- a/Core/Tag.lua
+++ /dev/null
@@ -1,771 +0,0 @@
--- ================================================================================ --
---				EMA EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )    --
---				Current Author: Jennifer Cally (Ebony)								--
---				Copyright 2015 - 2018 Jennifer Cally "Ebony"						--
---																					--
---				License: The MIT License (MIT)										--
---				Copyright (c) 2008-2015  Michael "Jafula" Miller					--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Tag",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0"
-)
-
--- Load libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local AceGUI = LibStub( "AceGUI-3.0" )
-
--- Constants required by EMAModule and Locale for this module.
-EMA.moduleName = "Tag"
-EMA.settingsDatabaseName = "TagProfileDB"
-EMA.chatCommand = "ema-group"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["TEAM"]
-EMA.moduleDisplayName = L["GROUP_LIST"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\GroupIcon.tga"
--- order
-EMA.moduleOrder = 10
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-        tagList = {},
-		groupList = {}
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = "group",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			add = {
-				type = "input",
-				name = L["ADD"],
-				desc = L["ADD_TAG_HELP"],
-				usage = "/EMA-group add <NewGroupName>",
-				get = false,
-				set = "AddTagCommand",
-			},
-			remove = {
-				type = "input",
-				name = L["REMOVE"],
-				desc = L["REMMOVE_TAG_HELP"],
-				usage = "/EMA-group remove <NewGroupName>",
-				get = false,
-				set = "RemoveTagCommand",
-			},
-			addtogroup = {
-				type = "input",
-				name = L["ADD_TO_GROUP"],
-				desc = L["ADD_TO_GROUP_HELP"],
-				usage = "/EMA-group addtogroup <characterName> <GroupName>",
-				get = false,
-				set = "AddToGroupCommand",
-			},
-			removefromgroup = {
-				type = "input",
-				name = L["REMOVE_FROM_GROUP"],
-				desc = L["REMOVE_FROM_GROUP_HELP"],
-				usage = "/EMA-group removefromgroup <characterName> <NewGroupName>",
-				get = false,
-				set = "RemovefromGroupCommand",
-			},
-			push = {
-				type = "input",
-				name = L["PUSH_ALL_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-tag push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-EMA.GROUP_LIST_CHANGED = "EMAMessageGroupListChanged"
--------------------------------------------------------------------------------------------------------------
--- Constants used by module.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreateGroupList()
-	-- Position and size constants.
-	local top = EMAHelperSettings:TopOfSettings()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local iconSize = 30
-	local iconHight = iconSize + 10
-	local lefticon =  left + iconSize
-	local teamListWidth = headingWidth - 90
-	local topOfList = top - headingHeight
-	-- Team list internal variables (do not change).
-	EMA.settingsControl.teamListHighlightRow = 1
-	EMA.settingsControl.teamListOffset = 1
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	topOfList = topOfList - headingHeight
-	--Main Heading
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["GROUP_LIST"], top, false )
-	-- Create a team list frame.
-
-	local list = {}
-	list.listFrameName = "EMATagSettingsGroupListFrame"
-	list.parentFrame = EMA.settingsControl.widgetSettings.content
-	list.listTop = topOfList
-	list.listLeft = lefticon
-	list.listWidth = teamListWidth
-	list.rowHeight = 20
-	list.rowsToDisplay = 15
-	list.columnsToDisplay = 1
-	list.columnInformation = {}
-	list.columnInformation[1] = {}
-	list.columnInformation[1].width = 100
-	list.columnInformation[1].alignment = "LEFT"
-	list.scrollRefreshCallback = EMA.SettingsGroupListScrollRefresh
-	list.rowClickCallback = EMA.SettingsGroupListRowClick
-	EMA.settingsControl.groupList = list
-	EMAHelperSettings:CreateScrollList( EMA.settingsControl.groupList )
-	-- Position and size constants (once list height is known).
-	local bottomOfList = topOfList - list.listHeight - verticalSpacing
-
-	EMA.settingsControl.tagListButtonAdd = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\CharAddParty.tga", --icon Image
-		left - iconSize - 11,
-		topOfList - verticalSpacing ,
-		L[""],
-		EMA.SettingsAddClick,
-		L["BUTTON_TAG_ADD_HELP"]
-	)
-	EMA.settingsControl.groupListButtonRemove = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\CharRemoveParty.tga", --icon Image
-		left - iconSize - 11,
-		topOfList - verticalSpacing - iconHight,
-		L[""],
-		EMA.SettingsRemoveClick,
-		L["BUTTON_TAG_REMOVE_HELP"]
-	)
-	local bottomOfSection = bottomOfList -  buttonHeight - verticalSpacing
-
-	return bottomOfSection
-end
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	-- Create the team list controls.
-	local bottomOfGroupList = SettingsCreateGroupList()
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	-- Update the settings team list.
-	EMA:SettingsGroupListScrollRefresh()
-	--EMA:SettingsTagListScrollRefresh()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.tagList = EMAUtilities:CopyTable( settings.tagList )
-		EMA.db.groupList = EMAUtilities:CopyTable( settings.groupList )
-		EMA:InitializeAllTagsList()
-		-- New team and tag lists coming up, highlight first item in each list.
-		EMA.settingsControl.groupListHighlightRow = 1
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		EMA:SettingsGroupListRowClick( 1, 1 )
-		EMA:SendMessage( EMA.GROUP_LIST_CHANGED )
-		EMAApi.refreshDropDownList()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Popup Dialogs.
--------------------------------------------------------------------------------------------------------------
-
--- Initialize Popup Dialogs.
-local function InitializePopupDialogs()
-   -- Ask the name of the tag to add as to the character.
-   StaticPopupDialogs["EMATAG_ASK_TAG_NAME"] = {
-        text = L["NEW_GROUP_NAME"],
-        button1 = ACCEPT,
-        button2 = CANCEL,
-        hasEditBox = 1,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-		OnShow = function( self )
-			self.editBox:SetText("")
-            self.button1:Disable()
-            self.editBox:SetFocus()
-        end,
-		OnAccept = function( self )
-			EMA:AddTagGUI( self.editBox:GetText() )
-		end,
-		EditBoxOnTextChanged = function( self )
-            if not self:GetText() or self:GetText():trim() == "" then
-				self:GetParent().button1:Disable()
-            else
-                self:GetParent().button1:Enable()
-            end
-        end,
-		EditBoxOnEnterPressed = function( self )
-            if self:GetParent().button1:IsEnabled() then
-				EMA:AddTagGUI( self:GetText() )
-            end
-            self:GetParent():Hide()
-        end,
-    }
-   -- Confirm removing characters from member list.
-   StaticPopupDialogs["EMATAG_CONFIRM_REMOVE_TAG"] = {
-        text = L["REMOVE_FROM_TAG_LIST"],
-		button1 = ACCEPT,
-        button2 = CANCEL,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function( self )
-			EMA:RemoveTagGUI()
-		end,
-    }
-end
-
--------------------------------------------------------------------------------------------------------------
--- Group Management.
--------------------------------------------------------------------------------------------------------------
-
-local function AllTag()
-	return L["ALL_LOWER"]
-end
-
-local function MasterTag()
-	return L["MASTER_LOWER"]
-end
-
-local function MinionTag()
-	return L["MINION_LOWER"]
-end
-
-local function GroupList()
-	return EMA.db.groupList
-end
-
--- Does the Group list have this tag?
-local function DoesGroupExist( group )
-	local tag = EMAUtilities:Lowercase(group)
-	local haveTag = false
-	for index, findTag in ipairs( EMA.db.groupList ) do
-		--EMA:Print("find", findTag, index )
-		if findTag == tag then
-			haveTag = true
-			break
-		end
-	end
-	return haveTag
-end
-
-local function AddGroup( group )
-	if group ~= nil then
-		if DoesGroupExist( group ) == false then
-			table.insert( EMA.db.groupList, group )
-			table.sort( EMA.db.groupList )
-			EMAApi.refreshDropDownList()
-			EMA:SendMessage( EMA.GROUP_LIST_CHANGED )
-		end
-	end
-end
-
--- If Calling to Remove a group we should Use EMAApi.RemoveGroup( Groupname ) or RemoveGroup then using This
-local function RemoveFromGroupList( tag )
-	if DoesGroupExist( tag ) == true then
-		for index, group in pairs( EMA.db.groupList ) do
-			if group == tag then
-			table.remove( EMA.db.groupList, index )
-			table.sort( EMA.db.groupList )
-			end
-		end
-	EMA:SettingsGroupListScrollRefresh()
-	EMAApi.refreshDropDownList()
-	EMA:SendMessage( EMA.GROUP_LIST_CHANGED )
-	end
-end
-
-local function RemoveGroup( tag )
-	--  We don't Want to Tag to be part of the character Groups as it has been removed!
-	for characterName, tagList in pairs( EMA.db.tagList ) do
-		for index, tagIterated in ipairs( tagList ) do
-			if tagIterated == tag then
-				--EMA:Print("Remove tag:", tag, "from character:", characterName )
-				EMAApi.RemoveGroupFromCharacter( characterName, tag )
-			end
-		end
-	end
-	RemoveFromGroupList( tag )
-	EMA:SettingsGroupListScrollRefresh()
-	EMAPrivate.Team.RefreshGroupList()
-	EMA:SendMessage( EMA.GROUP_LIST_CHANGED )
-end
-
--- We Do Not Want To Remove "System" Groups!
-local function IsASystemGroup( tag )
-	if tag == MasterTag() or tag == MinionTag() or tag == AllTag() then
-		return true
-	end
-	--[[
-	for id, apiClass in pairs( CLASS_SORT_ORDER ) do
-		if tag == EMAUtilities:Lowercase(apiClass) then
-			return true
-		end
-	end
-	]]
-	return false
-end
-
-local function GetGroupListMaximumOrder()
-	local largestPosition = 0
-	for groupId, tag in pairs( EMA.db.groupList ) do
-		if groupId > largestPosition then
-			largestPosition = groupId
-		end
-	end
-	return largestPosition
-end
-
-local function GetGroupAtPosition( position )
-	--EMA:Print("test", position )
-	groupAtPosition = nil
-		for groupId, groupName in pairs( EMA.db.groupList ) do
-			if groupId == position then
-				--EMA:Print("cptest",characterName, groupId, groupName)
-				groupAtPosition = groupName
-			end
-		end
-	return groupAtPosition
-end
-
--------------------------------------------------------------------------------------------------------------
--- Team Group Management.
--------------------------------------------------------------------------------------------------------------
-
-local function TeamGroupList()
-	return EMA.db.groupList
-end
-
-local function IsCharacterInGroup( characterName, group )
-	local tag = EMAUtilities:Lowercase(group)
-	local DoesCharacterHaveTag = false
-	for name, tagList in pairs( EMA.db.tagList ) do
-		if characterName == name then
-			for index, tagIterated in pairs( tagList ) do
-				if tag == tagIterated then
-					DoesCharacterHaveTag = true
-				end
-			end
-		end
-	end
-	return DoesCharacterHaveTag
-end
-
-local function GetGroupListForCharacter( characterName )
-	--EMA:Print("getList", characterName)
-	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	if EMA.db.tagList[characterName] ~= nil then
-		return EMA.db.tagList[characterName]
-	end
-end
-
-local function CharacterMaxGroups()
-	--return EMA.characterTagList
-	local maxOrder = 0
-	for characterName, tagList in pairs( EMA.db.tagList ) do
-		for index, tag in pairs( tagList ) do
-			if index >= maxOrder then
-				maxOrder = index
-			end
-		end
-	end
-	return maxOrder
-end
-
-local function DisplayGroupsForCharacter( characterName )
-	EMA.characterTagList = GetGroupListForCharacter( characterName )
-	table.sort( EMA.characterTagList )
-	EMA:SettingsGroupListScrollRefresh()
-end
-
-local function CharacterAlreadyInGroup( characterName, tag )
-	local canAdd = false
-	for name, tagList in pairs( EMA.db.tagList ) do
-		if characterName == name then
-			for index, tagIterated in pairs( tagList ) do
-				if tag == tagIterated then
-					canAdd = true
-				end
-			end
-		end
-	return canAdd
-	end
-end
-
-local function AddCharacterToGroup( characterName, tag )
-	if characterName == nil or tag == nil then
-		return
-	end
-	-- We Add The GroupName To The characterName in the list!
-	for name, tagList in pairs( EMA.db.tagList ) do
-		if characterName == name then
-			local allReadyInGroup = CharacterAlreadyInGroup( characterName, tag )
-			--EMA:Print("hereWeAddTOTagList", characterName, tag, allReadyInGroup)
-			if allReadyInGroup == false then
-				table.insert(  tagList, tag )
-				table.sort ( tagList )
-			end
-		end
-	end
-end
-
-local function RemoveGroupFromCharacter( characterName, tag )
-	if characterName == nil or tag == nil then
-		return
-	end
-	-- We Remove a GroupName From the characterName in the list!
-	for name, tagList in pairs( EMA.db.tagList ) do
-		if characterName == name then
-			for index, tagIterated in pairs( tagList ) do
-				if tag == tagIterated then
-					--EMA:Print("timetoRemovetag")
-					table.remove( tagList, index )
-					table.sort( tagList )
-				end
-			end
-		end
-	end
-end
-
--- This should abeble to be removed now.
--- this can be used to add a character that you already know the name of the table. [characterTable] [GroupName/Tag]
-local function AddTag( tagList, tag )
-	table.insert( tagList, tag )
-	AddGroup( tag )
-	EMA:SettingsGroupListScrollRefresh()
-	EMAPrivate.Team.RefreshGroupList()
-end
-
---TODO ADD CLASS TO LIST
-local function CheckSystemTagsAreCorrect()
-	for characterName, characterPosition in EMAPrivate.Team.TeamList() do
-		--EMA:Print("CHeckTags", characterName)
-		local characterTagList = GetGroupListForCharacter( characterName )
-		-- Do we have a tagList for this character? if not make one!
-		if characterTagList == nil then
-			EMA.db.tagList[characterName] = {}
-		end
-		-- Make sure all characters have the "all" tag.
-		if IsCharacterInGroup ( characterName, AllTag() ) == false then
-			AddCharacterToGroup( characterName, AllTag() )
-		end
-		-- Find Class and add If Known.
-
-
-
-		-- Master or minion?
-		if EMAPrivate.Team.IsCharacterTheMaster( characterName ) == true then
-			--EMA:Print("Master", characterName, characterTagList)
-			if IsCharacterInGroup ( characterName, MasterTag() ) == false then
-				AddCharacterToGroup( characterName, MasterTag() )
-			end
-			if IsCharacterInGroup ( characterName, MinionTag() ) == true then
-				RemoveGroupFromCharacter( characterName, MinionTag() )
-			end
-		else
-			-- Make sure minions have the minion tag and not the master tag.
-			if IsCharacterInGroup ( characterName, MasterTag() ) == true then
-				RemoveGroupFromCharacter( characterName, MasterTag() )
-			end
-			if IsCharacterInGroup ( characterName, MinionTag() ) == false then
-				AddCharacterToGroup( characterName, MinionTag() )
-			end
-		end
-	end
-end
-
--- Initialise the The Group list.
-function EMA:InitializeAllTagsList()
-	-- Add system tags to the list.
-	AddGroup( AllTag() )
-	AddGroup( MasterTag() )
-	AddGroup( MinionTag() )
-	for id, class in pairs( CLASS_SORT_ORDER ) do
-		AddGroup( EMAUtilities:Lowercase(class) )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- GUI & Command Lines & Other Addons Acess.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:AddTagGUI( group )
-	local tag = EMAUtilities:Lowercase( group )
-	-- Cannot add a system tag.
-	if IsASystemGroup( tag ) == false then
-		-- Cannot add a tag that already exists.
-		if DoesGroupExist( tag ) == false then
-			-- Add tag, resort and display.
-			AddGroup( tag )
-			EMA:SettingsGroupListScrollRefresh()
-		end
-	end
-end
-
-function EMA:RemoveTagGUI()
-	local tag = GetGroupAtPosition( EMA.settingsControl.groupListHighlightRow )
-	-- Cannot remove a system tag.
-	if IsASystemGroup( tag ) == false then
-		RemoveGroup( tag )
-	end
-end
-
--- Add Group to group list from the command line.
-function EMA:AddTagCommand( info, parameters )
-	local tag = EMAUtilities:Lowercase( parameters )
-	--local characterName, tag = strsplit( " ", inputText )
-	if IsASystemGroup( tag ) == false then
-		-- Cannot add a tag that already exists.
-		if DoesGroupExist( tag ) == false then
-			AddGroup( tag )
-			EMA:SettingsGroupListScrollRefresh()
-		end
-	end
-end
-
--- Add Group to group list from the command line.
-function EMA:AddToGroupCommand( info, parameters )
-	--local inputText = EMAUtilities:Lowercase( parameters )
-	local characterName, tag = strsplit( " ", parameters )
-	EMA:Print("test", characterName, tag )
-	if characterName ~= nil or tag ~= nil then
-		if DoesGroupExist( tag ) == false then
-			EMA:SettingsGroupListScrollRefresh()
-		end
-	else
-	EMA:Print("[PH]"..L["WRONG_TEXT_INPUT_GROUP"] )
-	end
-end
-
-
--- Remove tag from character from the command line.
-function EMA:RemoveTagCommand( info, parameters )
-	local inputText = EMAUtilities:Lowercase( parameters )
-	local characterName, tag = strsplit( " ", inputText )
-
-
-end
-
-function EMA:OnMasterChanged( message, characterName )
-	CheckSystemTagsAreCorrect()
-	EMA:SettingsRefresh()
-end
-
-function EMA:OnCharacterAdded( message, characterName )
-	CheckSystemTagsAreCorrect()
-	EMA:SettingsRefresh()
-end
-
-function EMA:OnCharacterRemoved( message, characterName )
-	EMA.db.tagList[characterName] = nil
-	EMA:SettingsRefresh()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Callbacks.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsGroupListScrollRefresh()
-	FauxScrollFrame_Update(
-		EMA.settingsControl.groupList.listScrollFrame,
-		GetGroupListMaximumOrder(),
-		EMA.settingsControl.groupList.rowsToDisplay,
-		EMA.settingsControl.groupList.rowHeight
-	)
-
-	EMA.settingsControl.groupListOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.groupList.listScrollFrame )
-	for iterateDisplayRows = 1, EMA.settingsControl.groupList.rowsToDisplay do
-		-- Reset.
-		EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.groupList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
-		-- Get data.
-		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.groupListOffset
-		if dataRowNumber <= GetGroupListMaximumOrder() then
-			-- Put character name into columns.
-			local group = GetGroupAtPosition( dataRowNumber )
-			local groupName = EMAUtilities:Capitalise( group )
-			EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetText( groupName )
-			-- System tags are Yellow.
-			if IsASystemGroup( group ) == true then
-				EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
-			end
-			-- Highlight the selected row.
-			if dataRowNumber == EMA.settingsControl.groupListHighlightRow then
-				EMA.settingsControl.groupList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
-			end
-		end
-	end
-end
-
-function EMA:SettingsGroupListRowClick( rowNumber, columnNumber )
-	if EMA.settingsControl.groupListOffset + rowNumber <= GetGroupListMaximumOrder() then
-		EMA.settingsControl.groupListHighlightRow = EMA.settingsControl.groupListOffset + rowNumber
-		EMA:SettingsGroupListScrollRefresh()
-	end
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsAddClick( event )
-	StaticPopup_Show( "EMATAG_ASK_TAG_NAME" )
-end
-
-function EMA:SettingsRemoveClick( event )
-	local group = GetGroupAtPosition( EMA.settingsControl.groupListHighlightRow )
-	StaticPopup_Show( "EMATAG_CONFIRM_REMOVE_TAG", group )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	-- Current character tag list.
-	EMA.characterTagList = {}
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-	-- Initialise the all tags list.
-	EMA:InitializeAllTagsList()
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	-- Make sure all the system tags are correct.
-	CheckSystemTagsAreCorrect()
-	EMA:RegisterMessage( EMAPrivate.Team.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
-	EMA:RegisterMessage( EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_ADDED, "OnCharacterAdded" )
-	EMA:RegisterMessage( EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_REMOVED, "OnCharacterRemoved" )
-	-- Kickstart the settings team and tag list scroll frame.
-	EMA:SettingsGroupListScrollRefresh()
-	-- Click the first row in the team list table to populate the tag list table.
-	EMA:SettingsGroupListRowClick( 1, 1 )
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Commands.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:EMAOnCommandReceived( sender, commandName, ... )
-end
-
--- Functions available for other addons EMA-EE > v8
--- Group List API
-EMAApi.GroupList = GroupList
-EMAApi.GROUP_LIST_CHANGED = EMA.GROUP_LIST_CHANGED
-EMAApi.DoesGroupExist = DoesGroupExist
-EMAApi.IsASystemGroup = IsASystemGroup
-EMAApi.GetGroupListMaximumOrder = GetGroupListMaximumOrder
-EMAApi.GetGroupAtPosition = GetGroupAtPosition
-EMAApi.AddGroup = AddGroup
-EMAApi.RemoveGroup = RemoveGroup
-
---Character Group API
-EMAApi.TeamGroupList = TeamGroupList
-EMAApi.IsCharacterInGroup = IsCharacterInGroup
-EMAApi.GetGroupListForCharacter = GetGroupListForCharacter
-EMAApi.CharacterMaxGroups = CharacterMaxGroups
-EMAApi.AddCharacterToGroup = AddCharacterToGroup
-EMAApi.RemoveGroupFromCharacter = RemoveGroupFromCharacter
-EMAApi.CharacterAlreadyInGroup = CharacterAlreadyInGroup
-EMAApi.PushGroupSettings = EMA.SettingsPushSettingsClick
-
--- SystemTags API
-EMAApi.AllGroup = AllTag
-EMAApi.MasterGroup = MasterTag
-EMAApi.MinionGroup = MinionTag
-
--- Old Way, most modules need to be rewiren/udated to support the new API
--- but for now we should keep this here incase we Mass Up Somewhere -- Ebony
-EMAPrivate.Tag.MasterTag = MasterTag
-EMAPrivate.Tag.MinionTag = MinionTag
-EMAPrivate.Tag.AllTag = AllTag
-EMAPrivate.Tag.DoesCharacterHaveTag = IsCharacterInGroup
-EMAApi.DoesCharacterHaveTag = IsCharacterInGroup
-EMAApi.AllTag = AllTag
diff --git a/Core/Team.lua b/Core/Team.lua
deleted file mode 100644
index c614625..0000000
--- a/Core/Team.lua
+++ /dev/null
@@ -1,1948 +0,0 @@
--- ================================================================================ --
---				EMA EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )    --
---				Current Author: Jennifer Cally (Ebony)								--
---				Copyright 2015 - 2018 Jennifer Cally "Ebony"						--
---																					--
---				License: The MIT License (MIT)										--
---				Copyright (c) 2008-2015  Michael "Jafula" Miller					--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Team",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Load libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-
--- Constants required by EMAModule and Locale for this module.
-EMA.moduleName = "Team"
-EMA.settingsDatabaseName = "TeamProfileDB"
-EMA.chatCommand = "ema-team"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["TEAM"]
-EMA.moduleDisplayName = L["TEAM"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\TeamCore.tga"
--- order
-EMA.moduleOrder = 20
-
-
--- EMA key bindings.
-BINDING_HEADER_TEAM = L["TEAM"]
-BINDING_NAME_TEAMINVITE = L["INVITE_GROUP"]
-BINDING_NAME_TEAMDISBAND = L["DISBAND_GROUP"]
-BINDING_NAME_TEAMMASTER = L["SET_MASTER"]
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		master = "",
-        teamList = {},
-		newTeamList = {},
-	--	isboxerSync = true,
-		masterChangePromoteLeader = false,
-		inviteAcceptTeam = true,
-		inviteAcceptFriends = false,
-		inviteAcceptGuild = false,
-		inviteDeclineStrangers = false,
-		inviteConvertToRaid = true,
-		inviteSetAllAssistant = false,
-		masterChangeClickToMove = false,
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = "group",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			add = {
-				type = "input",
-				name = L["ADD"],
-				desc = L["ADD_HELP"],
-				usage = "/EMA-team add <name>",
-				get = false,
-				set = "AddMemberCommand",
-			},
-			remove = {
-				type = "input",
-				name = L["REMOVE"],
-				desc = L["REMOVE_REMOVE"],
-				usage = "/EMA-team remove <name>",
-				get = false,
-				set = "RemoveMemberCommand",
-			},
-			master = {
-				type = "input",
-				name = L["MASTER"],
-				desc = L["MASTER_HELP"],
-				usage = "/EMA-team master <name> <tag>",
-				get = false,
-				set = "CommandSetMaster",
-			},
-			iammaster = {
-				type = "input",
-				name = L["I_AM_MASTER"],
-				desc = L["I_AM_MASTER_HELP"],
-				usage = "/EMA-team iammaster <tag>",
-				get = false,
-				set = "CommandIAmMaster",
-			},
-			invite = {
-				type = "input",
-				name = L["INVITE"],
-				desc = L["INVITE_HELP"],
-				usage = "/EMA-team invite",
-				get = false,
-				set = "InviteTeamToParty",
-			},
-			disband = {
-				type = "input",
-				name = L["DISBAND"],
-				desc = L["DISBAND_HELP"],
-				usage = "/EMA-team disband",
-				get = false,
-				set = "DisbandTeamFromParty",
-			},
-			addparty = {
-				type = "input",
-				name = L["ADD_GROUPS_MEMBERS"],
-				desc = L["ADD_GROUPS_MEMBERS_HELP"],
-				usage = "/EMA-team addparty",
-				get = false,
-				set = "AddPartyMembers",
-			},
-			removeall = {
-				type = "input",
-				name = L["REMOVE_ALL_MEMBERS"],
-				desc = L["REMOVE_ALL_MEMBERS_HELP"],
-				usage = "/EMA-team removeall",
-				get = false,
-				set = "DoRemoveAllMembersFromTeam",
-			},
-			setalloffline = {
-				type = "input",
-				name = L["SET_TEAM_OFFLINE"],
-				desc = L["SET_TEAM_OFFLINE_HELP"] ,
-				usage = "/EMA-team setalloffline",
-				get = false,
-				set = "SetAllMembersOffline",
-			},
-			setallonline = {
-				type = "input",
-				name = L["SET_TEAM_ONLINE"],
-				desc = L["SET_TEAM_ONLINE_HELP"],
-				usage = "/EMA-team setallonline",
-				get = false,
-				set = "SetAllMembersOnline",
-			},
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-team push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
--- Create the character online table and ordered characters tables.
-EMA.orderedCharacters = {}
-EMA.orderedCharactersOnline = {}
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_TAG_PARTY = "EMATeamTagGroup"
--- Leave party command.
-EMA.COMMAND_LEAVE_PARTY = "EMATeamLeaveGroup"
--- Set master command.
-EMA.COMMAND_SET_MASTER = "EMATeamSetMaster"
--- Set Minion OffLine
-EMA.COMMAND_SET_OFFLINE = "EMATeamSetOffline"
-EMA.COMMAND_SET_ONLINE = "EMATeamSetOnline"
-
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--- Master changed, parameter: new master name.
-EMA.MESSAGE_TEAM_MASTER_CHANGED = "EMATeamMasterChanged"
--- Team order changed, no parameters.
-EMA.MESSAGE_TEAM_ORDER_CHANGED = "EMATeamOrderChanged"
--- Character has been added, parameter: characterName.
-EMA.MESSAGE_TEAM_CHARACTER_ADDED = "EMATeamCharacterAdded"
--- Character has been removed, parameter: characterName.
-EMA.MESSAGE_TEAM_CHARACTER_REMOVED = "EMATeamCharacterRemoved"
--- character online
-EMA.MESSAGE_CHARACTER_ONLINE = "JmbTmChrOn"
--- character offline
-EMA.MESSAGE_CHARACTER_OFFLINE = "JmbTmChrOf"
-
-
--------------------------------------------------------------------------------------------------------------
--- Constants used by module.
--------------------------------------------------------------------------------------------------------------
-
-EMA.simpleAreaList = {}
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreateTeamList()
-	-- Position and size constants.
-	local teamListButtonControlWidth = 250
-	local iconSize = 24
-	local groupListWidth = 200
-	local extaSpacing = 40
-	local rowHeight = 30
-	local rowsToDisplay = 8
-	local inviteDisbandButtonWidth = 105
-	local setMasterButtonWidth = 120
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local top = EMAHelperSettings:TopOfSettings()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local lefticon =  left + 35
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
-	local iconHight = iconSize + 10
-	local teamListWidth = headingWidth - teamListButtonControlWidth - horizontalSpacing
-	local leftOfList = left + horizontalSpacing
-	local rightOfList = teamListWidth + horizontalSpacing
-	local checkBoxWidth = (headingWidth - horizontalSpacing) / 2
-	local topOfList = top - headingHeight
-	local movingTop = top
-	-- Team list internal variables (do not change).
-	EMA.settingsControl.teamListHighlightRow = 1
-	EMA.settingsControl.teamListOffset = 1
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.labelOne = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		teamListButtonControlWidth,
-		teamListWidth / 2,
-		leftOfList,
-		L["TEAM_HEADER"]
-	)
-	EMA.settingsControl.labelTwo = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		teamListButtonControlWidth,
-
-		teamListButtonControlWidth + iconSize + groupListWidth,
-		leftOfList,
-		L["GROUPS_HEADER"]
-	)
-	-- Create a team list frame.
-	local list = {}
-	list.listFrameName = "EMATeamSettingsTeamListFrame"
-	list.parentFrame = EMA.settingsControl.widgetSettings.content
-	list.listTop = topOfList
-	list.listLeft = lefticon
-	list.listWidth = teamListWidth
-	list.rowHeight = rowHeight
-	list.rowsToDisplay = rowsToDisplay
-	list.columnsToDisplay = 3
-	list.columnInformation = {}
-	list.columnInformation[1] = {}
-	list.columnInformation[1].width = 30
-	list.columnInformation[1].alignment = "LEFT"
-	list.columnInformation[2] = {}
-	list.columnInformation[2].width = 55
-	list.columnInformation[2].alignment = "CENTER"
-	list.columnInformation[3] = {}
-	list.columnInformation[3].width = 15
-	list.columnInformation[3].alignment = "RIGHT"
-	list.scrollRefreshCallback = EMA.SettingsTeamListScrollRefresh
-	list.rowClickCallback = EMA.SettingsTeamListRowClick
-	EMA.settingsControl.teamList = list
-	EMAHelperSettings:CreateScrollList( EMA.settingsControl.teamList )
-	-- Group Frame
-	local listTwo = {}
-	listTwo.listFrameName = "EMATeamSettingsTeamListTwoFrame"
-	listTwo.parentFrame = EMA.settingsControl.widgetSettings.content
-	listTwo.listTop = topOfList
-	listTwo.listLeft = rightOfList + extaSpacing
-	listTwo.listWidth = groupListWidth
-	listTwo.rowHeight = rowHeight
-	listTwo.rowsToDisplay = rowsToDisplay
-	listTwo.columnsToDisplay = 1
-	listTwo.columnInformation = {}
-	listTwo.columnInformation[1] = {}
-	listTwo.columnInformation[1].width = 80
-	listTwo.columnInformation[1].alignment = "CENTER"
-	listTwo.scrollRefreshCallback = EMA.SettingsGroupListScrollRefresh
-	listTwo.rowClickCallback = EMA.SettingsGroupListRowClick
-	EMA.settingsControl.groupList = listTwo
-	EMAHelperSettings:CreateScrollList( EMA.settingsControl.groupList )
-	-- Position and size constants (once list height is known).
-	local bottomOfList = topOfList - list.listHeight - verticalSpacing
-	local bottomOfSection = bottomOfList -  dropdownHeight - verticalSpacing
-	--Create Icons
-	EMA.settingsControl.teamListButtonAdd = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\CharAdd.tga", --icon Image
-		left - iconSize - 11 ,
-		topOfList - verticalSpacing,
-		L[""],
-		EMA.SettingsAddClick,
-		L["BUTTON_ADD_HELP"]
-	)
-	EMA.settingsControl.teamListButtonParty = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\CharAddParty.tga", --icon Image
-		left - iconSize - 11 ,
-		topOfList - verticalSpacing - iconHight,
-		L[""],
-		EMA.SettingsAddPartyClick,
-		L["BUTTON_ADDALL_HELP"]
-	)
---[[
-	EMA.settingsControl.teamListButtonAddIsboxerList = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\Isboxer_Add.tga", --icon Image
-		left - iconSize - 11 ,
-		topOfList - verticalSpacing - iconHight * 2,
-		L[""],
-		EMA.SettingsAddIsboxerListClick,
-		L["BUTTON_ISBOXERADD_HELP"]
-	)
-]]
-	EMA.settingsControl.teamListButtonMoveUp = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\CharUp.tga", --icon Image
-		left - iconSize - 11,
-		topOfList - verticalSpacing - iconHight * 3,
-		L[""],
-		EMA.SettingsMoveUpClick,
-		L["BUTTON_UP_HELP"]
-	)
-	EMA.settingsControl.teamListButtonMoveDown = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\CharDown.tga", --icon Image
-		left - iconSize - 11,
-		topOfList - verticalSpacing - iconHight * 4,
-		L[""],
-		EMA.SettingsMoveDownClick,
-		L["BUTTON_DOWN_HELP"]
-	)
-	EMA.settingsControl.teamListButtonRemove = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\CharRemove.tga", --icon Image
-		left - iconSize - 11 ,
-		topOfList - verticalSpacing - iconHight * 5,
-		L[""],
-		EMA.SettingsRemoveClick,
-		L["BUTTON_REMOVE_HELP"]
-	)
-	EMA.settingsControl.teamListButtonSetMaster = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\CharMaster.tga", --icon Image
-		left - iconSize - 11 ,
-		topOfList - verticalSpacing - iconHight * 6,
-		L[""],
-		EMA.SettingsSetMasterClick,
-		L["BUTTON_MASTER_HELP"]
-	)
-	EMA.settingsControl.teamListButtonRemoveFromGroup = EMAHelperSettings:Icon(
-		EMA.settingsControl,
-		iconSize,
-		iconSize,
-		"Interface\\Addons\\EMA\\Media\\CharRemoveParty.tga", --icon Image
-		rightOfList + dropBoxWidth + 11 ,
-		bottomOfList ,
-		L[""],
-		EMA.SettingsRemoveGroupClick,
-		L["BUTTON_GROUP_REMOVE_HELP"]
-	)
-	-- Group Mangent
-	EMA.settingsControl.teamListDropDownList = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		dropBoxWidth,
-		rightOfList + extaSpacing, -- horizontalSpacing,
-		bottomOfList + 11,
-		L["GROUP_LIST"]
-	)
-	EMA.settingsControl.teamListDropDownList:SetList( EMA.GroupAreaList() )
-	EMA.settingsControl.teamListDropDownList:SetCallback( "OnValueChanged",  EMA.TeamListDropDownList )
---[[
-	-- IsboxerSync
-	EMA.settingsControl.teamListCheckBoxSyncIsboxer = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxWidth,
-		lefticon,
-		bottomOfList - 11,
-		L["CHECKBOX_ISBOXER_ADD"],
-		EMA.SettingsSyncIsboxerToggle,
-		L["CHECKBOX_ISBOXER_ADD_HELP"]
-	)
-]]
-	return bottomOfSection
-end
-
-local function SettingsCreateMasterControl( top )
-	-- Get positions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local checkBoxWidth = (headingWidth - horizontalSpacing) / 2
-	local column1Left = left
-	local column2Left = left + checkBoxWidth + horizontalSpacing
-	local bottomOfSection = top - headingHeight - (checkBoxHeight * 1) - (verticalSpacing * 3)
-	-- Create a heading.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MASTER_CONTROL"], top, false )
-	-- Create checkboxes.
-
-	EMA.settingsControl.masterControlCheckBoxMasterChange = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxWidth,
-		column1Left,
-		top - headingHeight,
-		L["CHECKBOX_MASTER_LEADER"],
-		EMA.SettingsMasterChangeToggle,
-		L["CHECKBOX_MASTER_LEADER_HELP"]
-	)
-	EMA.settingsControl.masterControlCheckBoxMasterChangeClickToMove = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxWidth,
-		column2Left,
-		top - headingHeight,
-		L["CHECKBOX_CTM"],
-		EMA.SettingsMasterChangeClickToMoveToggle,
-		L["CHECKBOX_CTM_HELP"]
-	)
-	return bottomOfSection
-end
-
-local function SettingsCreatePartyInvitationsControl( top )
-	-- Get positions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local checkBoxWidth = (headingWidth - horizontalSpacing) / 2
-	local column1Left = left
-	local column2Left = left + checkBoxWidth + horizontalSpacing
-	local bottomOfSection = top - headingHeight - (checkBoxHeight * 3) - (verticalSpacing * 2)
-	-- Create a heading.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PARTY_CONTROLS"], top, false )
-	-- Create checkboxes.
-	EMA.settingsControl.partyInviteControlCheckBoxConvertToRaid = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxWidth,
-		column1Left,
-		top - headingHeight,
-		L["CHECKBOX_CONVERT_RAID"],
-		EMA.SettingsinviteConvertToRaidToggle,
-		L["CHECKBOX_CONVERT_RAID_HELP"]
-	)
-	EMA.settingsControl.partyInviteControlCheckBoxSetAllAssist = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxWidth,
-		column2Left,
-		top - headingHeight,
-		L["CHECKBOX_ASSISTANT"],
-		EMA.SettingsinviteSetAllAssistToggle,
-		L["CHECKBOX_ASSISTANT_HELP"]
-	)
-	EMA.settingsControl.partyInviteControlCheckBoxAcceptMembers = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxWidth,
-		column1Left,
-		top - headingHeight - checkBoxHeight,
-		L["CHECKBOX_TEAM"],
-		EMA.SettingsAcceptInviteMembersToggle,
-		L["CHECKBOX_TEAM_HELP"]
-	)
-	EMA.settingsControl.partyInviteControlCheckBoxAcceptFriends = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxWidth,
-		column2Left,
-		top - headingHeight - checkBoxHeight,
-		L["CHECKBOX_ACCEPT_FROM_FRIENDS"],
-		EMA.SettingsAcceptInviteFriendsToggle,
-		L["CHECKBOX_ACCEPT_FROM_FRIENDS_HELP"]
-	)
-	EMA.settingsControl.partyInviteControlCheckBoxAcceptGuild = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxWidth,
-		column1Left,
-		top - headingHeight - checkBoxHeight - checkBoxHeight,
-		L["CHECKBOX_ACCEPT_FROM_GUILD"],
-		EMA.SettingsAcceptInviteGuildToggle,
-		L["CHECKBOX_ACCEPT_FROM_GUILD_HELP"]
-	)
-	EMA.settingsControl.partyInviteControlCheckBoxDeclineStrangers = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxWidth,
-		column1Left,
-		top - headingHeight  - checkBoxHeight - checkBoxHeight - checkBoxHeight,
-		L["CHECKBOX_DECLINE_STRANGERS"],
-		EMA.SettingsDeclineInviteStrangersToggle,
-		L["CHECKBOX_DECLINE_STRANGERS_HELP"]
-	)
-	return bottomOfSection
-end
-
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	-- Create the team list controls.
-	local bottomOfTeamList = SettingsCreateTeamList()
-	-- Create the master control controls.
-	local bottomOfMasterControl = SettingsCreateMasterControl( bottomOfTeamList )
-	-- Create the party invitation controls.
-	local bottomOfPartyInvitationControl = SettingsCreatePartyInvitationsControl( bottomOfMasterControl )
-	EMA.settingsControl.widgetSettings.content:SetHeight( - bottomOfPartyInvitationControl )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Popup Dialogs.
--------------------------------------------------------------------------------------------------------------
-
--- Initialize Popup Dialogs.
-local function InitializePopupDialogs()
-   -- Ask the name of the character to add as a new member.
-   StaticPopupDialogs["EMATEAM_ASK_CHARACTER_NAME"] = {
-        text = L["STATICPOPUP_ADD"],
-        button1 = ACCEPT,
-        button2 = CANCEL,
-        hasEditBox = 1,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-		OnShow = function( self )
-			self.editBox:SetText("")
-            self.button1:Disable()
-            self.editBox:SetFocus()
-        end,
-		OnAccept = function( self )
-			EMA:AddMemberGUI( self.editBox:GetText() )
-		end,
-		EditBoxOnTextChanged = function( self )
-            if not self:GetText() or self:GetText():trim() == "" then
-				self:GetParent().button1:Disable()
-            else
-                self:GetParent().button1:Enable()
-            end
-        end,
-		EditBoxOnEnterPressed = function( self )
-            if self:GetParent().button1:IsEnabled() then
-				EMA:AddMemberGUI( self:GetText() )
-            end
-            self:GetParent():Hide()
-        end,
-    }
-   -- Confirm removing characters from member list.
-   StaticPopupDialogs["EMATEAM_CONFIRM_REMOVE_CHARACTER"] = {
-        text = L["STATICPOPUP_REMOVE"],
-        button1 = ACCEPT,
-        button2 = CANCEL,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function( self )
-			EMA:RemoveMemberGUI()
-		end,
-    }
-end
-
--------------------------------------------------------------------------------------------------------------
--- Team management.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:GroupAreaList()
-	table.sort( EMA.simpleAreaList )
-	return EMA.simpleAreaList
-end
-
-local function refreshDropDownList()
-	EMAUtilities:ClearTable( EMA.simpleAreaList )
-	EMA.simpleAreaList[" "] = " "
-	for id, tag in pairs( EMAApi.GroupList() ) do
-		local groupName =  EMAUtilities:Capitalise( tag )
-		EMA.simpleAreaList[groupName] = groupName
-	end
-	table.sort( EMA.simpleAreaList )
-	EMA.settingsControl.teamListDropDownList:SetList( EMA.simpleAreaList )
-end
-
-local function TeamList()
-	--return pairs( EMA.db.teamList )
-	local teamlist = {}
-	for name, info in pairs( EMA.db.newTeamList ) do
-		for _, charInfo in pairs (info) do
-			teamlist[name] = charInfo.order
-		end
-	end
-	return pairs( teamlist )
-end
-
-
-local function FullTeamList()
-	local fullTeamList = {}
-	for name, info in pairs ( EMA.db.newTeamList ) do
-		for _, charInfo in pairs (info) do
-		table.insert(fullTeamList, { charInfo.name, charInfo.order, charInfo.class, charInfo.online } )
-		end
-	end
-	return pairs( fullTeamList )
-end
-
-local function setClass()
-	for characterName, position in pairs( EMA.db.newTeamList ) do
-	local class, classFileName, classIndex = UnitClass( Ambiguate(characterName, "none") )
-		--EMA:Print("new", class, CharacterName )
-		if class ~= nil then
-			EMA.db.characterClass[characterName] = classFileName
-		end
-	end
-end
-
-local function GetClass( characterName )
-	local class = nil
-	local color = nil
-	for teamCharacterName, info in pairs( EMA.db.newTeamList ) do
-		if characterName == teamCharacterName then
-			for _, charInfo in pairs (info) do
-			--charInfo.class
-				--EMA:Print("classDatatest",  characterName, charInfo.class )
-				if charInfo.class ~= nil or charInfo.class ~= "UNKNOWN" then
-					class = EMAUtilities:Lowercase( charInfo.class )
-					color = RAID_CLASS_COLORS[charInfo.class]
-				end
-			end
-		end
-	end
-	return class, color
-end
-
--- Get the largest order number from the team list.
-local function GetTeamListMaximumOrder()
-	local largestPosition = 0
-	for characterName, position in EMAApi.TeamList() do
-		if position > largestPosition then
-			largestPosition = position
-		end
-	end
-	return largestPosition
-end
-
-local function GetTeamListMaximumOrderOnline()
-	local totalMembersDisplayed = 0
-		for characterName, position in EMAApi.TeamList() do
-			if EMAApi.GetCharacterOnlineStatus( characterName ) == true then
-				totalMembersDisplayed = totalMembersDisplayed + 1
-			end
-		end
-	return totalMembersDisplayed
-end
-
-local function IsCharacterInTeam( name )
-	local characterName = EMAUtilities:Lowercase( name )
-	local isMember = false
-	if not isMember then
-		for fullCharacterName, position in EMAApi.TeamList() do
-			local checkFullName = EMAUtilities:Lowercase( fullCharacterName )
-			local name, realm = strsplit("-", checkFullName, 2 )
-			--EMA:Print('checking', name, 'vs', characterName, "or", checkFullName )
-			if name == characterName or checkFullName == characterName then
-				--EMA:Print('match found')
-				isMember = true
-				break
-			end
-		end
-	end
-	--EMA:Print('returning', isMember)
-	return isMember
-end
-
-
--- Get the master for this character.
-local function GetMasterName()
-	return EMA.db.master
-end
-
--- Return true if the character specified is in the master.
-local function IsCharacterTheMaster( characterName )
-	local isTheMaster = false
-	if characterName == GetMasterName() then
-		isTheMaster = true
-	end
-	return isTheMaster
-end
-
--- Set the master for EMA character; the master character must be online.
-local function SetMaster( master )
-	-- Make sure a valid string value is supplied.
-	if (master ~= nil) and (master:trim() ~= "") then
-		-- The name must be capitalised i still like this or though its not needed.
-		--local character = EMAUtilities:Capitalise( master )
-		local character = EMAUtilities:AddRealmToNameIfMissing( master )
-		-- Only allow characters in the team list to be the master.
-		if IsCharacterInTeam( character ) == true then
-			-- Set the master.
-			EMA.db.master = character
-			-- Refresh the settings.
-			EMA:SettingsRefresh()
-			-- Send a message to any listeners that the master has changed.
-			EMA:SendMessage( EMA.MESSAGE_TEAM_MASTER_CHANGED, character )
-		else
-			-- Character not in team.  Tell the team.
-			EMA:EMASendMessageToTeam( EMA.characterName, L["A_IS_NOT_IN_TEAM"]( character ), false )
-		end
-	end
-end
-
--- Add a member to the member list.
-local function AddMember( importName, class )
-	local name = nil
-	local singleName, realm = strsplit( "-" , importName, 2 )
-	local characterName = nil
-	local name = EMAUtilities:Capitalise( singleName )
-	if realm ~= nil then
-		characterName = name.."-"..realm
-	else
-		characterName = name
-	end
-	if characterName == "Target" then
-		local UnitIsPlayer = UnitIsPlayer("target")
-		if UnitIsPlayer == true then
-			local unitName = GetUnitName("target", true)
-			--EMA:Print("Target", unitName)
-			name = unitName
-		else
-			EMA:Print(L["TEAM_NO_TARGET"])
-			return
-		end
-	elseif characterName == "Mouseover"  then
-		local UnitIsPlayer = UnitIsPlayer("mouseover")
-		if UnitIsPlayer == true then
-			local unitName = GetUnitName("mouseover", true)
-			--EMA:Print("mouseover", unitName)
-			name = unitName
-		else
-			EMA:Print(L["TEAM_NO_TARGET"])
-			return
-		end
-	else
-		name = characterName
-	end
-	-- Wow names are at least two characters.
-	if name ~= nil and name:trim() ~= "" and name:len() > 1 then
-		-- If the character is not already in the list...
-		local character = EMAUtilities:AddRealmToNameIfMissing( name )
-		if EMA.db.newTeamList[character] == nil then
-			-- Get the maximum order number.
-			--Store TempData
-			local maxOrder = "0"
-			local CharacterClass = "UNKNOWN"
-			local Online = true
-			-- Real Data
-			local maxOrder = GetTeamListMaximumOrder()
-			if class ~= nil then
-				local upperClass = string.upper(class)
-				CharacterClass = upperClass
-			end
-			local _, classFileName = UnitClass( Ambiguate(character, "none") )
-			if classFileName ~= nil then
-				CharacterClass = classFileName
-			end
-			--EMA:Print("DebugAddToDB", "toon", character, "order", maxOrder, "class", CharacterClass, "online", Online )
-			EMA.db.newTeamList[character] = {}
-			table.insert( EMA.db.newTeamList[character], {name = character, order = maxOrder + 1, class = CharacterClass, online = Online } )
-			-- Send a message to any listeners that EMA character has been added.
-			EMA:SendMessage( EMA.MESSAGE_TEAM_CHARACTER_ADDED, character )
-			-- Refresh the settings.
-			EMA:SettingsRefresh()
-		end
-	end
-end
-
--- Add all party/raid members to the member list. does not worl cross rwalm todo
-function EMA:AddPartyMembers()
-	 for iteratePartyMembers = 1, GetNumGroupMembers() do
-		--EMA:Print("party/raid", numberPartyMembers, iteratePartyMembers)
-		local inRaid = IsInRaid()
-		if inRaid == true then
-			local partyMemberName, partyMemberRealm = UnitName( "raid"..iteratePartyMembers )
-			local character = EMAUtilities:AddRealmToNameIfNotNil( partyMemberName, partyMemberRealm )
-			if partyMemberName ~= nil then
-				if IsCharacterInTeam( character ) == false then
-					AddMember( character )
-				end
-			end
-		else
-			local partyMemberName, partyMemberRealm = UnitName( "party"..iteratePartyMembers )
-			local character = EMAUtilities:AddRealmToNameIfNotNil( partyMemberName, partyMemberRealm )
-			if partyMemberName ~= nil then
-				if IsCharacterInTeam( character ) == false then
-					AddMember( character )
-				end
-			end
-		end
-	end
-end
-
--- Add all isboxer team members to the member list. does not worl cross rwalm todo
---[[
-function EMA:AddIsboxerMembers()
-	if IsAddOnLoaded("Isboxer" ) == true then
-		for characterName, teamStatus in pairs( EMA.IsboxerSyncList ) do
-			if IsCharacterInTeam( characterName ) == false then
-				if teamStatus == "add" and characterName ~= EMA.characterName then
-					AddMember( characterName )
-				end
-			end
-		end
-	end
-end
-]]
--- Add a member to the member list.
-function EMA:AddMemberGUI( value )
-	AddMember( value )
-	EMA:SettingsTeamListScrollRefresh()
-end
-
--- Add member from the command line.
-function EMA:AddMemberCommand( info, parameters )
-	--local characterName = EMAUtilities:Capitalise(parameters)
-	-- EMA-EE we No-longer remove character's from a team list when isboxer set's up the team we sync!
-	if info == nil then
-		--EMA:Print("isboxerContralRemove", parameters )
-		EMA.IsboxerSyncList[characterName] = "add"
-		return
-	end
-	-- Add the character.
-	AddMember( parameters )
-end
-
--- Get the character name at a specific position.
-local function GetCharacterNameAtOrderPosition( position )
-	local characterNameAtPosition = ""
-	for characterName, characterPosition in EMAApi.TeamList() do
-		if characterPosition == position then
-			characterNameAtPosition = characterName
-			break
-		end
-	end
-	return characterNameAtPosition
-end
-
--- Get the position for a specific character.
-local function GetPositionForCharacterName( findCharacterName )
-	local positionForCharacterName = 0
-	for characterName, characterPosition in EMAApi.TeamList() do
-		if characterName == findCharacterName then
-			positionForCharacterName = characterPosition
-			break
-		end
-	end
-	return positionForCharacterName
-end
-
-local function GetPositionForCharacterNameOnline( findCharacterName )
-	local positionForCharacterName = 0
-		for index, characterName in EMAApi.TeamListOrderedOnline() do
-			if characterName == findCharacterName then
-				--EMA:Print("found", characterName, index)
-				positionForCharacterName = index
-				--break
-			end
-	end
-	return positionForCharacterName
-end
-
--- Swap character positions.
-local function TeamListSwapCharacterPositions( position1, position2 )
-	-- Get characters at positions.
-	local character1 = GetCharacterNameAtOrderPosition( position1 )
-	local character2 = GetCharacterNameAtOrderPosition( position2 )
-	for name, info in pairs (EMA.db.newTeamList) do
-		for _, charInfo in pairs (info) do
-			if name == character1 then
-				charInfo.order = position2
-			end
-			if name == character2 then
-				charInfo.order = position1
-			end
-		end
-	end
-end
-
--- Makes sure that EMA character is a team member.  Enables if previously not a member.
-local function ConfirmCharacterIsInTeam()
-	--EMA:Print("test", EMA.characterName)
-	if not IsCharacterInTeam( EMA.characterName ) then
-		-- Then add as a member.
-		AddMember( EMA.characterName )
-	end
-end
-
--- Make sure there is a master, if none, set this character.
-local function ConfirmThereIsAMaster()
-	-- Read the db option for master.  Is it set?
-	if EMA.db.master:trim() == "" then
-		-- No, set it to self.
-		SetMaster( EMA.characterName )
-	end
-	-- Is the master in the member list?
-	if not IsCharacterInTeam( EMA.db.master ) then
-		-- No, set self as master.
-		SetMaster( EMA.characterName )
-	end
-end
-
--- Remove a member from the member list.
-local function RemoveMember( importName )
-	local singleName, singleRealm = strsplit( "-" , importName, 2 )
-	local characterName = nil
-	local name = EMAUtilities:Capitalise( singleName )
-	local realm = EMAUtilities:Capitalise( singleRealm )
-	if realm ~= nil then
-		characterName = name.."-"..realm
-	else
-		characterName = name
-	end
-	-- Is character in team?
-	if IsCharacterInTeam( characterName ) == true and characterName ~= EMA.characterName then
-		-- Remove character from list.
-		local characterPosition = EMAApi.GetPositionForCharacterName( characterName )
-		-- If any character had an order greater than this character's order, then shift their order down by one.
-		for name, position in EMAApi.TeamList() do
-			if position > characterPosition then
-				for checkName, info in pairs (EMA.db.newTeamList) do
-					for _, charInfo in pairs (info) do
-						if name == checkName then
-							charInfo.order = position - 1
-						end
-					end
-				end
-			end
-		end
-		-- Send a message to any listeners that this character has been removed.
-		EMA:SendMessage( EMA.MESSAGE_TEAM_CHARACTER_REMOVED, characterName )
-		-- Make sure EMA character is a member.
-		ConfirmCharacterIsInTeam()
-		-- Make sure there is a master, if none, set this character.
-		ConfirmThereIsAMaster()
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Resets to Top of list!
-		EMA.db.newTeamList[characterName] = nil
-		EMA:SettingsTeamListRowClick( 1, 1 )
-	else
-		EMA:Print("[PH] CAN NOT REMOVE SELF")
-	end
-end
-
--- Provides a GUI for a user to confirm removing selected members from the member list.
-function EMA:RemoveMemberGUI()
-	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
-	RemoveMember( characterName )
-	EMA.settingsControl.teamListHighlightRow = 1
-	EMA:SettingsTeamListScrollRefresh()
-	EMA:SettingsGroupListScrollRefresh()
-end
-
-
--- Remove member from the command line.
-function EMA:RemoveMemberCommand( info, parameters )
-	local characterName = EMAUtilities:Capitalise(parameters)
-	-- EMA-EE we No-longer remove character's from a team list when isboxer set's up the team we sync!
-	if info == nil then
-		--EMA.IsboxerSyncList[characterName] = "remove"
-		return
-	end
-	--EMA:Print("testremove", info, parameters )
-	-- Wow names are at least two characters.
-	if characterName ~= nil and characterName:trim() ~= "" and characterName:len() > 1 then
-		-- Remove the character.
-		RemoveMember( characterName )
-	end
-end
-
-local function RemoveAllMembersFromTeam()
-	for characterName, characterPosition in pairs( EMA.db.teamList ) do
-		RemoveMember( characterName )
-	end
-end
-
--- Remove all members from the team list via command line.
-function EMA:DoRemoveAllMembersFromTeam( info, parameters )
-	RemoveAllMembersFromTeam()
-end
-
-function EMA:CommandIAmMaster( info, parameters )
-	local tag = parameters
-	local target = EMA.characterName
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, target, tag )
-	else
-		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, target, "all" )
-		SetMaster( target )
-	end
-end
-
-function EMA:CommandSetMaster( info, parameters )
-	local target, tag = strsplit( " ", parameters )
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, target, tag )
-	else
-		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, target, "all" )
-		SetMaster( target )
-	end
-end
-
-function EMA:ReceiveCommandSetMaster( target, tag )
-	if EMAPrivate.Tag.DoesCharacterHaveTag( EMA.characterName, tag ) then
-		SetMaster( target )
-	end
-end
-
--- Test Isboxer Contral EbonyTest
-
---[[
-function EMA:IsboxerSyncTeamList()
-	if EMA.db.isboxerSync == true and IsAddOnLoaded("Isboxer" ) == true then
-		for characterName, teamStatus in pairs( EMA.IsboxerSyncList ) do
-			--EMA:Print("syncList", characterName, teamStatus )
-			--if teamStatus == "remove" then
-			--	if IsCharacterInTeam( characterName ) == true and (characterName ~= EMA.characterName ) then
-			--		--EMA:Print("memberNoLongerInIsboxerTeamDelete", characterName, teamStatus )
-			--		RemoveMember( characterName )
-			--	end
-			else
-			if teamStatus == "add" and characterName ~= EMA.characterName then
-				if IsCharacterInTeam( characterName ) == false then
-					--EMA:Print("Isboxer-AddMember", characterName, teamStatus )
-					AddMember( characterName )
-				end
-			end
-		end
-	end
-end
-]]
-
--------------------------------------------------------------------------------------------------------------
--- Character online status.
--------------------------------------------------------------------------------------------------------------
-
--- Get a character's online status..
-local function GetCharacterOnlineStatus( characterName )
-	local online = nil
-	for name, info in pairs (EMA.db.newTeamList) do
-		for _, charInfo in pairs (info) do
-			if characterName == name then
-				online = charInfo.online
-			end
-		end
-	end
-	return online
-end
-
--- Set a character's online status.
-local function SetCharacterOnlineStatus( characterName, isOnline )
-	--EMA:Print("setting", characterName, "to be", isOnline )
-	for name, info in pairs (EMA.db.newTeamList) do
-		for _, charInfo in pairs (info) do
-			if characterName == name then
-				--EMA:Print("Set", characterName, isOnline, charInfo.online )
-				charInfo.online = isOnline
-			end
-		end
-	end
-end
-
-local function SetTeamStatusToOffline()
-	for characterName, characterPosition in EMAApi.TeamList() do
-		SetCharacterOnlineStatus( characterName, false )
-		EMA:SendMessage( EMA.MESSAGE_CHARACTER_OFFLINE )
-		EMA:SettingsTeamListScrollRefresh()
-	end
-end
-
-local function SetTeamOnline()
-	-- Set all characters online status to false.
-	for characterName, characterPosition in EMAApi.TeamList() do
-		SetCharacterOnlineStatus( characterName, true )
-		EMA:SendMessage( EMA.MESSAGE_CHARACTER_ONLINE )
-		EMA:SettingsTeamListScrollRefresh()
-		--EMA:SettingsGroupListScrollRefresh()
-	end
-end
-
---Set character Offline.
-local function setOffline( characterName )
-	local character = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	SetCharacterOnlineStatus( character, false )
-	EMA:SendMessage( EMA.MESSAGE_CHARACTER_OFFLINE )
-	EMA:SettingsTeamListScrollRefresh()
-	--EMA:SettingsGroupListScrollRefresh()
-end
-
---Set character OnLine.
-local function setOnline( characterName )
-	local character = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	SetCharacterOnlineStatus( character, true )
-	EMA:SendMessage( EMA.MESSAGE_CHARACTER_ONLINE )
-	EMA:SettingsTeamListScrollRefresh()
-	--EMA:SettingsGroupListScrollRefresh()
-end
-
-function EMA.ReceivesetOffline( characterName )
-	--EMA:Print("command", characterName )
-	setOffline( characterName, false )
-	EMA:SettingsRefresh()
-end
-
-function EMA.ReceivesetOnline( characterName )
-	--EMA:Print("command", characterName )
-	setOnline( characterName, false )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SetAllMembersOffline()
-	SetTeamStatusToOffline()
-end
-
-function EMA:SetAllMembersOnline()
-	SetTeamOnline()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Character team list ordering.
--------------------------------------------------------------------------------------------------------------
-
-local function SortTeamListOrdered( characterA, characterB )
-	local positionA = GetPositionForCharacterName( characterA )
-	local positionB = GetPositionForCharacterName( characterB )
-	return positionA < positionB
-end
-
--- Return all characters ordered.
-local function TeamListOrdered()
-	EMAUtilities:ClearTable( EMA.orderedCharacters )
-	for characterName, characterPosition in EMAApi.TeamList() do
-		table.insert( EMA.orderedCharacters, characterName )
-	end
-	table.sort( EMA.orderedCharacters, SortTeamListOrdered )
-	return ipairs( EMA.orderedCharacters )
-end
-
--- Return all characters ordered online.
-local function TeamListOrderedOnline()
-	EMAUtilities:ClearTable( EMA.orderedCharactersOnline )
-	for characterName, characterPosition in EMAApi.TeamList() do
-		if EMAApi.GetCharacterOnlineStatus( characterName ) == true then
-			table.insert( EMA.orderedCharactersOnline, characterName )
-		end
-	end
-	table.sort( EMA.orderedCharactersOnline, SortTeamListOrdered )
-	return ipairs( EMA.orderedCharactersOnline )
-end
--------------------------------------------------------------------------------------------------------------
--- Party.
--------------------------------------------------------------------------------------------------------------
-
--- Invite team to party.
-
-function EMA.DoTeamPartyInvite()
-	InviteUnit( EMA.inviteList[EMA.currentInviteCount] )
-	EMA.currentInviteCount = EMA.currentInviteCount + 1
-	if EMA.currentInviteCount < EMA.inviteCount then
-		--if GetTeamListMaximumOrderOnline() > 5 and EMA.db.inviteConvertToRaid == true then
-		if EMA.inviteCount > 5 and EMA.db.inviteConvertToRaid == true then
-			if EMA.db.inviteSetAllAssistant == true then
-				ConvertToRaid()
-				SetEveryoneIsAssistant(true)
-			else
-				ConvertToRaid()
-			end
-		end
-		EMA:ScheduleTimer( "DoTeamPartyInvite", 0.5 )
-	end
-end
-
-
-function EMA:InviteTeamToParty( info, tag )
-	-- Iterate each enabled member and invite them to a group.
-	if tag == nil or tag == "" then
-		tag = "all"
-	end
-	if EMAApi.DoesGroupExist(tag) == true then
-		if EMAApi.IsCharacterInGroup( EMA.characterName, tag ) == false then
-			--EMA:Print("IDONOTHAVETAG", tag)
-			for index, characterName in TeamListOrderedOnline() do
-				--EMA:Print("NextChartohavetag", tag, characterName )
-				if EMAApi.IsCharacterInGroup( characterName, tag ) then
-					--EMA:Print("i have tag", tag, characterName )
-					EMA:EMASendCommandToTeam( EMA.COMMAND_TAG_PARTY, characterName, tag )
-					break
-				end
-			end
-			return
-		else
-			EMA.inviteList = {}
-			EMA.inviteCount = 0
-			for index, characterName in TeamListOrderedOnline() do
-				if EMAApi.IsCharacterInGroup( characterName, tag ) then
-					--EMA:Print("HasTag", characterName, tag )
-					-- As long as they are not the player doing the inviting.
-					if characterName ~= EMA.characterName then
-						EMA.inviteList[EMA.inviteCount] = characterName
-						EMA.inviteCount = EMA.inviteCount + 1
-					end
-				end
-			end
-		end
-		EMA.currentInviteCount = 0
-		EMA:ScheduleTimer( "DoTeamPartyInvite", 0.5 )
-	else
-	EMA:Print (L["UNKNOWN_GROUP"]..tag )
-	end
-end
-
-
-function EMA:PARTY_INVITE_REQUEST( event, inviter, ... )
-	--EMA:Print("Inviter", inviter)
-	-- Accept this invite, initially no.
-	local acceptInvite = false
-	-- Is character not in a group?
-	if not IsInGroup( "player" ) then
-		-- Accept an invite from members?
-		if EMA.db.inviteAcceptTeam == true then
-			-- If inviter found in team list, allow the invite to be accepted.
-			if IsCharacterInTeam( inviter ) then
-			acceptInvite = true
-			end
-		end
-		-- Accept an invite from friends?
-		if EMA.db.inviteAcceptFriends == true then
-			-- Iterate each friend; searching for the inviter in the friends list.
-			for friendIndex = 1, GetNumFriends() do
-				local friendName = GetFriendInfo( friendIndex )
-				-- Inviter found in friends list, allow the invite to be accepted.
-				if inviter == friendName then
-					acceptInvite = true
-					break
-				end
-			end
-		end
-		-- Accept an invite from BNET/RealD?
-		if EMA.db.inviteAcceptFriends == true and BNFeaturesEnabledAndConnected() == true then
-			-- Iterate each friend; searching for the inviter in the friends list.
-			local _, numFriends = BNGetNumFriends()
-			for bnIndex = 1, numFriends do
-				for toonIndex = 1, BNGetNumFriendGameAccounts( bnIndex ) do
-					local _, toonName, client, realmName = BNGetFriendGameAccountInfo( bnIndex, toonIndex )
-					--EMA:Print("BNFrindsTest", toonName, client, realmName, "inviter", inviter)
-					if client == "WoW" then
-						if toonName == inviter or toonName.."-"..realmName == inviter then
-							acceptInvite = true
-							break
-						end
-					end
-				end
-			end
-		end
-		-- Accept and invite from guild members?
-		if EMA.db.inviteAcceptGuild == true then
-			if UnitIsInMyGuild( inviter ) then
-				acceptInvite = true
-			end
-		end
-	end
-	-- Hide the party invite popup?
-	local hidePopup = false
-	-- Accept the group invite if allowed.
-	if acceptInvite == true then
-		AcceptGroup()
-		hidePopup = true
-	else
-		-- Otherwise decline the invite if permitted.
-		if EMA.db.inviteDeclineStrangers == true then
-			DeclineGroup()
-			hidePopup = true
-		end
-	end
-	-- Hide the popup group invitation request if accepted or declined the invite.
-	if hidePopup == true then
-		-- Make sure the invite dialog does not decline the invitation when hidden.
-		for iteratePopups = 1, STATICPOPUP_NUMDIALOGS do
-			local dialog = _G["StaticPopup"..iteratePopups]
-			if dialog.which == "PARTY_INVITE" then
-				-- Set the inviteAccepted flag to true (even if the invite was declined, as the
-				-- flag is only set to stop the dialog from declining in its OnHide event).
-				dialog.inviteAccepted = 1
-				break
-			end
-			-- Ebony Sometimes invite is from XREALM even though Your on the same realm and have joined the party. This should hide the Popup.
-			if dialog.which == "PARTY_INVITE_XREALM" then
-				-- Set the inviteAccepted flag to true (even if the invite was declined, as the
-				-- flag is only set to stop the dialog from declining in its OnHide event).
-				dialog.inviteAccepted = 1
-				break
-			end
-		end
-		StaticPopup_Hide( "PARTY_INVITE" )
-		StaticPopup_Hide( "PARTY_INVITE_XREALM" )
-	end
-end
-
-function EMA:DisbandTeamFromParty()
-	EMA:EMASendCommandToTeam( EMA.COMMAND_LEAVE_PARTY )
-end
-
-local function LeaveTheParty()
-	if IsInGroup( "player" ) then
-		LeaveParty()
-	end
-end
-
-function EMA:OnMasterChange( message, characterName )
-	--EMA:Print("test", message, characterName)
-	local playerName = EMA.characterName
-	if EMA.db.masterChangePromoteLeader == true then
-		if IsInGroup( "player" ) and UnitIsGroupLeader( "player" ) == true and GetMasterName() ~= playerName then
-			PromoteToLeader( Ambiguate( GetMasterName(), "all" ) )
-		end
-	end
-	if EMA.db.masterChangeClickToMove == true then
-		if IsCharacterTheMaster( self.characterName ) == true then
-			ConsoleExec("Autointeract 0")
-		else
-			ConsoleExec("Autointeract 1")
-		end
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	-- Table to Store IsboxerTeamList
-	EMA.IsboxerSyncList = {}
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-	-- Make sure this character is a member, add and enable if not on the list.
-	ConfirmCharacterIsInTeam()
-	-- Make sure there is a master, if none, set this character.
-	ConfirmThereIsAMaster()
-	-- Set team members online status to not connected. we do not want to do this on start-up!
-	--SetTeamStatusToOffline()
-	SetTeamOnline()
-	-- Adds DefaultGroups to GUI
-	EMA.characterGroupList = {}
-	-- Key bindings.
-	EMATeamSecureButtonInvite = CreateFrame( "CheckButton", "EMATeamSecureButtonInvite", nil, "SecureActionButtonTemplate" )
-	EMATeamSecureButtonInvite:SetAttribute( "type", "macro" )
-	EMATeamSecureButtonInvite:SetAttribute( "macrotext", "/ema-team invite" )
-	EMATeamSecureButtonInvite:Hide()
-	EMATeamSecureButtonDisband = CreateFrame( "CheckButton", "EMATeamSecureButtonDisband", nil, "SecureActionButtonTemplate" )
-	EMATeamSecureButtonDisband:SetAttribute( "type", "macro" )
-	EMATeamSecureButtonDisband:SetAttribute( "macrotext", "/ema-team disband" )
-	EMATeamSecureButtonDisband:Hide()
-	EMATeamSecureButtonInvite = CreateFrame( "CheckButton", "EMATeamSecureButtonMaster", nil, "SecureActionButtonTemplate" )
-	EMATeamSecureButtonInvite:SetAttribute( "type", "macro" )
-	EMATeamSecureButtonInvite:SetAttribute( "macrotext", "/ema-team iammaster" )
-	EMATeamSecureButtonInvite:Hide()
---Sets The class of the char.
---	setClass()
-	-- Click the first row in the team list table to populate the tag list table.
-	--EMA:SettingsTeamListRowClick( 1, 1 )
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	EMA:RegisterEvent( "PARTY_INVITE_REQUEST" )
-	EMA:RegisterMessage( EMA.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChange" )
-	-- Kickstart the settings team list scroll frame.
-	EMA:SettingsTeamListScrollRefresh()
-	--EMA.SettingsGroupListScrollRefresh()
-	-- Click the first row in the team list table to populate the tag list table.
-	--EMA:SettingsTeamListRowClick( 1, 1 )
-	EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" )
-	-- Initialise key bindings.
-	EMA.keyBindingFrame = CreateFrame( "Frame", nil, UIParent )
-	EMA:RegisterEvent( "UPDATE_BINDINGS" )
-	EMA:UPDATE_BINDINGS()
-	-- Update DropDownList
-	refreshDropDownList()
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	-- Refresh the settings.
-	EMA:SettingsRefresh()
-	-- Make sure this character is a member, add and enable if not on the list.
-	ConfirmCharacterIsInTeam()
-	-- Make sure there is a master, if none, set this character.
-	ConfirmThereIsAMaster()
-	-- Update the settings team list.
-	EMA:SettingsTeamListScrollRefresh()
-	--EMA:SettingsGroupListScrollRefresh()
-	-- Send team order changed and team master changed messages.
-	EMA:SendMessage( EMA.MESSAGE_TEAM_ORDER_CHANGED )
-	EMA:SendMessage( EMA.MESSAGE_TEAM_MASTER_CHANGED )
-end
-
-function EMA:SettingsRefresh()
-	-- Team/Group Control
-	local test = " "
-	--EMA.settingsControl.teamListCheckBoxSyncIsboxer:SetValue( EMA.db.isboxerSync )
-
-	-- Master Control.
-	EMA.settingsControl.masterControlCheckBoxMasterChange:SetValue( EMA.db.masterChangePromoteLeader )
-	EMA.settingsControl.masterControlCheckBoxMasterChangeClickToMove:SetValue( EMA.db.masterChangeClickToMove )
-	-- Party Invitiation Control.
-	EMA.settingsControl.partyInviteControlCheckBoxAcceptMembers:SetValue( EMA.db.inviteAcceptTeam )
-	EMA.settingsControl.partyInviteControlCheckBoxAcceptFriends:SetValue( EMA.db.inviteAcceptFriends )
-	EMA.settingsControl.partyInviteControlCheckBoxAcceptGuild:SetValue( EMA.db.inviteAcceptGuild )
-	EMA.settingsControl.partyInviteControlCheckBoxDeclineStrangers:SetValue( EMA.db.inviteDeclineStrangers )
-	EMA.settingsControl.partyInviteControlCheckBoxConvertToRaid:SetValue( EMA.db.inviteConvertToRaid )
-	EMA.settingsControl.partyInviteControlCheckBoxSetAllAssist:SetValue( EMA.db.inviteSetAllAssistant )
-	-- Ensure correct state.
-	EMA.settingsControl.partyInviteControlCheckBoxSetAllAssist:SetDisabled (not EMA.db.inviteConvertToRaid )
---	EMA.settingsControl.teamListCheckBoxSyncIsboxer:SetDisabled ( not IsAddOnLoaded("Isboxer" ) )
---	EMA.settingsControl.teamListButtonAddIsboxerList:SetDisabled ( not IsAddOnLoaded("Isboxer" ) )
-	-- Update the settings team list.
-	EMA:SettingsTeamListScrollRefresh()
-	-- Check the opt out of loot settings.
-	--EMA:CheckMinionsOptOutOfLoot()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-	-- Update the settings.
-		EMA.db.newTeamList = EMAUtilities:CopyTable( settings.newTeamList )
-	--	EMA.db.isboxerSync = settings.isboxerSync
-		EMA.db.masterChangePromoteLeader = settings.masterChangePromoteLeader
-		EMA.db.inviteAcceptTeam = settings.inviteAcceptTeam
-		EMA.db.inviteAcceptFriends = settings.inviteAcceptFriends
-		EMA.db.inviteAcceptGuild = settings.inviteAcceptGuild
-		EMA.db.inviteDeclineStrangers = settings.inviteDeclineStrangers
-		EMA.db.inviteConvertToRaid = settings.inviteConvertToRaid
-		EMA.db.inviteSetAllAssistant = settings.inviteSetAllAssistant
-		EMA.db.masterChangeClickToMove = settings.masterChangeClickToMove
-		EMA.db.master = settings.master
-		SetMaster( settings.master )
-		-- Refresh the settings.
-		--EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
-function EMA:PLAYER_ENTERING_WORLD(event, ...)
-	-- trying this
-	-- Click the first row in the team list table to populate the tag list table.
-	local initialLogin, reloadingUI = ...
-	EMA:SettingsTeamListRowClick( 1, 1 )
-	if initialLogin then
-		--EMA:Print("test")
-		--EMA:IsboxerSyncTeamList()
-		--EMA:ScheduleTimer( "IsboxerSyncTeamList", 0.5 )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Callbacks.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsTeamListScrollRefresh()
-	FauxScrollFrame_Update(
-		EMA.settingsControl.teamList.listScrollFrame,
-		GetTeamListMaximumOrder(),
-		EMA.settingsControl.teamList.rowsToDisplay,
-		EMA.settingsControl.teamList.rowHeight
-	)
-	EMA.settingsControl.teamListOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.teamList.listScrollFrame )
-	for iterateDisplayRows = 1, EMA.settingsControl.teamList.rowsToDisplay do
-		-- Reset.
-		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
-		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetText( "" )
-		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
-		-- Get data.
-		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.teamListOffset
-		if dataRowNumber <= GetTeamListMaximumOrder() then
-			-- Put character name and type into columns.
-			local characterName = GetCharacterNameAtOrderPosition( dataRowNumber )
-
-		--local class = EMA.db.characterClass[characterName]
-			--EMA:Print("Test", class)
-			-- Set Class Color
-			local class, color = GetClass( characterName )
-			if color ~= nil then
-				EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( color.r, color.g, color.b, 1.0 )
-			end
-			local isMaster = false
-			local characterType = L["MINION"]
-			if IsCharacterTheMaster( characterName ) == true then
-				characterType = L["MASTER"]
-				isMaster = true
-			end
-			local displayCharacterName , displayCharacterRleam = strsplit( "-", characterName, 2 )
-
-			local isOnline = GetCharacterOnlineStatus( characterName )
-			local displayOnline = nil
-			if isOnline == false then
-				displayOnline = L["OFFLINE"]
-				EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 0, 0, 1.0 )
-			else
-				displayOnline = L["ONLINE"]
-				EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 0, 1.0, 0, 1.0 )
-			end
-
-			-- Master is a yellow colour.
-
-			if isMaster == true then
-				local icon = "Interface\\GroupFrame\\UI-Group-LeaderIcon"
-				displayCharacterName = strconcat(" |T"..icon..":20|t", L[" "]..displayCharacterName)
-			--	EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
-			end
-			local RealmLinked = EMAUtilities:CheckIsFromMyRealm( characterName )
-			-- Set Realms not linked Red
-			if RealmLinked == false then
-				displayCharacterRleam = displayCharacterRleam..L[" "]..L["NOT_LINKED"]
-				EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0, 0, 1.0 )
-			end
-
-			EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetText( displayCharacterName )
-			EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( displayCharacterRleam )
-			EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetText( displayOnline )
-			-- Highlight the selected row.
-			if dataRowNumber == EMA.settingsControl.teamListHighlightRow then
-				EMA.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
-			end
-		end
-	end
-end
-
-local function DisplayGroupsForCharacterInGroupsList( characterName )
-	--if not EMA.characterGroupList then
-		EMA.characterGroupList = EMAApi.GetGroupListForCharacter( characterName )
-		table.sort( EMA.characterGroupList )
-		EMA:SettingsGroupListScrollRefresh()
-	--end
-end
-
-local function GetGroupAtPosition( position )
-	return EMA.characterGroupList[position]
-
-end
-
-local function GetTagListMaxPosition()
-	return #EMA.characterGroupList
-end
-
-function EMA:SettingsTeamListRowClick( rowNumber, columnNumber )
-	if EMA.settingsControl.teamListOffset + rowNumber <= GetTeamListMaximumOrder() then
-		EMA.settingsControl.teamListHighlightRow = EMA.settingsControl.teamListOffset + rowNumber
-		EMA:SettingsTeamListScrollRefresh()
-		--EMA:SettingsGroupListScrollRefresh()
-		-- Group
-		EMA.settingsControl.groupListHighlightRow = 1
-		local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
-		DisplayGroupsForCharacterInGroupsList( characterName )
-		if columnNumber == 3 then
-			local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
-			local onLine = GetCharacterOnlineStatus(characterName)
-			if onLine == true and characterName ~= EMA.characterName then
-				setOffline( characterName )
-			else
-				setOnline( characterName )
-			end
-		end
-
-	end
-end
-
-function EMA:SettingsGroupListScrollRefresh()
-	FauxScrollFrame_Update(
-		EMA.settingsControl.groupList.listScrollFrame,
-		--EMAPrivate.Tag.GetTagListMaxPosition(),
-		EMAApi.CharacterMaxGroups(),
-		EMA.settingsControl.groupList.rowsToDisplay,
-		EMA.settingsControl.groupList.rowHeight
-	)
-	EMA.settingsControl.groupListOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.groupList.listScrollFrame )
-	for iterateDisplayRows = 1, EMA.settingsControl.groupList.rowsToDisplay do
-
-		EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.groupList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
-		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.groupListOffset
-		if dataRowNumber <= EMAApi.CharacterMaxGroups() then
-		--local characterName = EMAApi.GetGroupListForCharacter --EMA.CharGroupListName
-		--local group = GetGroupAtPosition(characterName,dataRowNumber)
-		local group = GetGroupAtPosition( dataRowNumber )
-		local groupName = EMAUtilities:Capitalise( group )
-		--local group = EMAApi.GetGroupAtPosition( dataRowNumber )
-			EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetText( groupName )
-			--EMA:Print("test", dataRowNumber, group, characterName )
-			local systemGroup = EMAApi.IsASystemGroup( group )
-			if systemGroup == true then
-				EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
-			end
-			if dataRowNumber == EMA.settingsControl.groupListHighlightRow then
-				EMA.settingsControl.groupList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
-			end
-		end
-	end
-
-end
-function EMA:SettingsGroupListRowClick( rowNumber, columnNumber )
-	if EMA.settingsControl.groupListOffset + rowNumber <= GetTagListMaxPosition() then
-		EMA.settingsControl.groupListHighlightRow = EMA.settingsControl.groupListOffset + rowNumber
-		EMA:SettingsGroupListScrollRefresh()
-	end
-end
-
--- For Api Update For anywhere you add a Group. ( mosty Tag.lua )
-local function RefreshGroupList()
-	EMA:SettingsGroupListScrollRefresh()
-end
-
-function EMA:TeamListDropDownList(event, value )
-	-- if nil or the blank group then don't get Name.
-	if value == " " or value == nil then
-		return
-	end
-	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
-	local groupName = EMAUtilities:Lowercase( value )
-	--EMA:Print("test", characterName, groupName )
-	-- We Have a group and characterName Lets Add it to the groupList
-	EMAApi.AddCharacterToGroup( characterName, groupName )
-	-- Reset the groupList Back to "Nothing"
-	EMA.settingsControl.teamListDropDownList:SetValue( " " )
-	-- update Lists
-	EMA:SettingsRefresh()
-	EMA:SettingsGroupListScrollRefresh()
-end
-
-function EMA.SettingsRemoveGroupClick(event, value )
-	local tag = GetGroupAtPosition( EMA.settingsControl.groupListHighlightRow )
-	local systemGroup = EMAApi.IsASystemGroup( tag )
-	local groupName = EMAUtilities:Lowercase( tag )
-	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
-	local systemGroup = EMAApi.IsASystemGroup( tag )
-	-- Remove From Tag List
-	if systemGroup == false then
-		EMAApi.RemoveGroupFromCharacter( characterName, groupName )
-	else
-		--TODO: Update
-		EMA:Print("[PH] CAN NOT REMOVE FORM THIS GROUP!")
-	end
-	-- update Lists
-	EMA:SettingsRefresh()
-	EMA:SettingsGroupListScrollRefresh()
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-	--We Needs to Update The TeamGroup List as well.
-	EMAApi.PushGroupSettings()
-end
-
-function EMA:SettingsMoveUpClick( event )
-	if EMA.settingsControl.teamListHighlightRow > 1 then
-		TeamListSwapCharacterPositions( EMA.settingsControl.teamListHighlightRow, EMA.settingsControl.teamListHighlightRow - 1 )
-		EMA.settingsControl.teamListHighlightRow = EMA.settingsControl.teamListHighlightRow - 1
-		if EMA.settingsControl.teamListHighlightRow <= EMA.settingsControl.teamListOffset then
-			EMAHelperSettings:SetFauxScrollFramePosition(
-				EMA.settingsControl.teamList.listScrollFrame,
-				EMA.settingsControl.teamListHighlightRow - 1,
-				GetTeamListMaximumOrder(),
-				EMA.settingsControl.teamList.rowHeight
-			)
-		end
-		EMA:SettingsTeamListScrollRefresh()
-		--EMA:SettingsGroupListScrollRefresh()
-		EMA:SendMessage( EMA.MESSAGE_TEAM_ORDER_CHANGED )
-	end
-end
-
-function EMA:SettingsMoveDownClick( event )
-	if EMA.settingsControl.teamListHighlightRow < GetTeamListMaximumOrder() then
-		TeamListSwapCharacterPositions( EMA.settingsControl.teamListHighlightRow, EMA.settingsControl.teamListHighlightRow + 1 )
-		EMA.settingsControl.teamListHighlightRow = EMA.settingsControl.teamListHighlightRow + 1
-		if EMA.settingsControl.teamListHighlightRow > ( EMA.settingsControl.teamListOffset + EMA.settingsControl.teamList.rowsToDisplay ) then
-			EMAHelperSettings:SetFauxScrollFramePosition(
-				EMA.settingsControl.teamList.listScrollFrame,
-				EMA.settingsControl.teamListHighlightRow + 1,
-				GetTeamListMaximumOrder(),
-				EMA.settingsControl.teamList.rowHeight
-			)
-		end
-		EMA:SettingsTeamListScrollRefresh()
-		--EMA:SettingsGroupListScrollRefresh()
-		EMA:SendMessage( EMA.MESSAGE_TEAM_ORDER_CHANGED )
-	end
-end
-
-function EMA:SettingsAddClick( event )
-	StaticPopup_Show( "EMATEAM_ASK_CHARACTER_NAME" )
-end
-
-function EMA:SettingsRemoveClick( event )
-	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
-	StaticPopup_Show( "EMATEAM_CONFIRM_REMOVE_CHARACTER", characterName )
-end
-
-function EMA.SettingsAddPartyClick( event )
-	EMA:AddPartyMembers()
-end
---[[
-function EMA:SettingsAddIsboxerListClick( event )
-	EMA:AddIsboxerMembers()
-end
-]]
-function EMA:SettingsInviteClick( event )
-	EMA:InviteTeamToParty(nil)
-end
-
-function EMA:SettingsDisbandClick( event )
-	EMA:DisbandTeamFromParty()
-end
---[[
-function EMA:SettingsSyncIsboxerToggle( event, checked)
-	EMA.db.isboxerSync = checked
-	EMA:SettingsRefresh()
-end
-]]
-function EMA:SettingsSetMasterClick( event )
-	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
-	EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, characterName, "all" )
-	SetMaster( characterName )
-	EMA:SettingsTeamListScrollRefresh()
-end
-
-function EMA:SettingsMasterChangeToggle( event, checked )
-	EMA.db.masterChangePromoteLeader = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsMasterChangeClickToMoveToggle( event, checked )
-	EMA.db.masterChangeClickToMove = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsAcceptInviteMembersToggle( event, checked )
-	EMA.db.inviteAcceptTeam = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsAcceptInviteFriendsToggle( event, checked )
-	EMA.db.inviteAcceptFriends = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsAcceptInviteGuildToggle( event, checked )
-	EMA.db.inviteAcceptGuild = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsDeclineInviteStrangersToggle( event, checked )
-	EMA.db.inviteDeclineStrangers = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsinviteConvertToRaidToggle( event, checked )
-	EMA.db.inviteConvertToRaid = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsinviteSetAllAssistToggle( event, checked )
-	EMA.db.inviteSetAllAssistant = checked
-end
-
--------------------------------------------------------------------------------------------------------------
--- Key bindings.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:UPDATE_BINDINGS()
-	if InCombatLockdown() then
-		return
-	end
-	ClearOverrideBindings( EMA.keyBindingFrame )
-	local key1, key2 = GetBindingKey( "TEAMINVITE" )
-	if key1 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonInvite" )
-	end
-	if key2 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonInvite" )
-	end
-	local key1, key2 = GetBindingKey( "TEAMDISBAND" )
-	if key1 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonDisband" )
-	end
-	if key2 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonDisband" )
-	end
-	local key1, key2 = GetBindingKey( "TEAMMASTER" )
-	if key1 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonMaster" )
-	end
-	if key2 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonMaster" )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Commands.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:EMAOnCommandReceived( sender, commandName, ... )
-	if commandName == EMA.COMMAND_LEAVE_PARTY then
-		if IsCharacterInTeam( sender ) == true then
-			LeaveTheParty()
-		end
-	end
-	if commandName == EMA.COMMAND_SET_MASTER then
-		if IsCharacterInTeam( sender ) == true then
-			EMA:ReceiveCommandSetMaster( ... )
-		end
-	end
-	--Ebony
-	if commandName == EMA.COMMAND_SET_OFFLINE then
-		if IsCharacterInTeam( sender ) == true then
-			EMA.ReceivesetOffline( ... )
-		end
-	end
-	if commandName == EMA.COMMAND_SET_ONLINE then
-		if IsCharacterInTeam( sender ) == true then
-			EMA.ReceivesetOnline( ... )
-		end
-	end
-	if commandName == EMA.COMMAND_TAG_PARTY then
-		if IsCharacterInTeam( sender ) == true then
-			EMA.TagParty( characterName, tag, ... )
-		end
-	end
-end
-
--- Functions available from EMA Team for other EMA internal objects.
-EMAPrivate.Team.MESSAGE_TEAM_MASTER_CHANGED = EMA.MESSAGE_TEAM_MASTER_CHANGED
-EMAPrivate.Team.MESSAGE_TEAM_ORDER_CHANGED = EMA.MESSAGE_TEAM_ORDER_CHANGED
-EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_ADDED = EMA.MESSAGE_TEAM_CHARACTER_ADDED
-EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_REMOVED = EMA.MESSAGE_TEAM_CHARACTER_REMOVED
-EMAPrivate.Team.TeamList = TeamList
-EMAPrivate.Team.IsCharacterInTeam = IsCharacterInTeam
-EMAPrivate.Team.IsCharacterTheMaster = IsCharacterTheMaster
-EMAPrivate.Team.GetMasterName = GetMasterName
-EMAPrivate.Team.SetTeamStatusToOffline = SetTeamStatusToOffline
-EMAPrivate.Team.GetCharacterOnlineStatus = GetCharacterOnlineStatus
-EMAPrivate.Team.SetTeamOnline = SetTeamOnline
-EMAPrivate.Team.GetCharacterNameAtOrderPosition = GetCharacterNameAtOrderPosition
-EMAPrivate.Team.GetTeamListMaximumOrder = GetTeamListMaximumOrder
-EMAPrivate.Team.RemoveAllMembersFromTeam = RemoveAllMembersFromTeam
-EMAPrivate.Team.setOffline = setOffline
-EMAPrivate.Team.setOnline = setOline
-EMAPrivate.Team.RefreshGroupList = RefreshGroupList
-
--- Functions available for other addons.
-EMAApi.MESSAGE_TEAM_MASTER_CHANGED = EMA.MESSAGE_TEAM_MASTER_CHANGED
-EMAApi.MESSAGE_TEAM_ORDER_CHANGED = EMA.MESSAGE_TEAM_ORDER_CHANGED
-EMAApi.MESSAGE_TEAM_CHARACTER_ADDED = EMA.MESSAGE_TEAM_CHARACTER_ADDED
-EMAApi.MESSAGE_TEAM_CHARACTER_REMOVED = EMA.MESSAGE_TEAM_CHARACTER_REMOVED
-EMAApi.IsCharacterInTeam = IsCharacterInTeam
-EMAApi.IsCharacterTheMaster = IsCharacterTheMaster
-EMAApi.GetMasterName = GetMasterName
-EMAApi.TeamList = TeamList
-EMAApi.FullTeamList = FullTeamList
-EMAApi.Offline = Offline
-EMAApi.TeamListOrdered = TeamListOrdered
-EMAApi.GetCharacterNameAtOrderPosition = GetCharacterNameAtOrderPosition
-EMAApi.GetPositionForCharacterName = GetPositionForCharacterName
-EMAApi.GetTeamListMaximumOrder = GetTeamListMaximumOrder
-EMAApi.GetCharacterOnlineStatus = GetCharacterOnlineStatus
-EMAApi.RemoveAllMembersFromTeam = RemoveAllMembersFromTeam
-EMAApi.MESSAGE_CHARACTER_ONLINE = EMA.MESSAGE_CHARACTER_ONLINE
-EMAApi.MESSAGE_CHARACTER_OFFLINE = EMA.MESSAGE_CHARACTER_OFFLINE
-EMAApi.setOffline = setOffline
-EMAApi.setOnline = setOnline
-EMAApi.GetTeamListMaximumOrderOnline = GetTeamListMaximumOrderOnline
-EMAApi.TeamListOrderedOnline = TeamListOrderedOnline
-EMAApi.GetPositionForCharacterNameOnline = GetPositionForCharacterNameOnline
-EMAApi.GetClass = GetClass
---EMAApi.SetClass = setClass
-EMAApi.GroupAreaList = EMA.GroupAreaList
-EMAApi.refreshDropDownList = refreshDropDownList
diff --git a/EMA.toc b/EMA.toc
deleted file mode 100644
index 5ca72f1..0000000
--- a/EMA.toc
+++ /dev/null
@@ -1,29 +0,0 @@
-## Interface: 80000
-## Title: EMA
-## Notes: Ebony's MultiBoxing Assistant
-## Author: Jennifer Cally 'Ebony'
-## Version: v8.0.1-Release(0086)
-## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, CurrProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB,  QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB
-
-#Libs
-Embeds.xml
-EbonyUtilities.lua
-
-
-#Locales
-Locales\Locales.xml
-
-#GUI
-GUI\EMAHelperSettings.lua
-
-#Core
-Core\Core.lua
-Core\Module.lua
-Core\Communications.lua
-
-Core\Team.lua
-Core\Tag.lua
-Core\Message.lua
-
-#Modules
-Modules\Modules.xml
\ No newline at end of file
diff --git a/EMA/Bindings.xml b/EMA/Bindings.xml
new file mode 100644
index 0000000..ceeeb89
--- /dev/null
+++ b/EMA/Bindings.xml
@@ -0,0 +1,95 @@
+<!--
+				EMA - ( Ebony's MultiBoxing Assistant )
+				Current Author: Jennifer Cally (Ebony)
+				License: MIT License 2018 Jennifer Cally
+
+				Some Code Used from 'Jamba' that is
+				Released under the MIT License
+				'Jamba' Copyright 2008-2015  Michael "Jafula" Miller
+-->
+<Bindings>
+	<!-- Team Bindings -->
+	<Binding name="TEAMINVITE" header="TEAM" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="TEAMDISBAND" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="TEAMMASTER" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<!-- Follow Bindings-->
+	<Binding name="FOLLOWME" header="FOLLOW" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="FOLLOWSTROBEME" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="FOLLOWSTROBEOFF" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="FOLLOWTEAIN" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<!-- ItemUse Bindings-->
+	<Binding name="ITEMUSE1" header="ITEMUSE" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE2" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE3" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE4" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE5" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE6" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="JITEMUSE7" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE8" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE9" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE10" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE11" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE12" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE13" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE14" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE15" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE16" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE17" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE18" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE19" category="EMA">
+		--[[dummy]]
+	</Binding>
+	<Binding name="ITEMUSE20" category="EMA">
+		--[[dummy]]
+	</Binding>
+</Bindings>
diff --git a/EMA/Core/Communications.lua b/EMA/Core/Communications.lua
new file mode 100644
index 0000000..cd8afe1
--- /dev/null
+++ b/EMA/Core/Communications.lua
@@ -0,0 +1,664 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "EMA" that is 								--
+--				Released under the MIT License 										--
+--				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Communications",
+	"AceComm-3.0",
+	"AceEvent-3.0",
+	"AceConsole-3.0",
+	"AceTimer-3.0",
+	"AceHook-3.0"
+)
+
+-- Get the locale for EMACommunications.
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+
+-- Get libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local AceSerializer = LibStub:GetLibrary( "AceSerializer-3.0" )
+
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+
+-- EMACommunications is not a module, but the same naming convention for these values is convenient.
+EMA.moduleName = "Communications"
+EMA.moduleDisplayName = L["COMMUNICATIONS"]
+EMA.settingsDatabaseName = "CommunicationsProfileDB"
+EMA.parentDisplayName = L["OPTIONS"]
+EMA.chatCommand = "ema-comm"
+EMA.teamModuleName = "Team"
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\CommsLogo.tga"
+-- order
+EMA.moduleOrder = 20
+
+-------------------------------------------------------------------------------------------------------------
+-- Constants
+-------------------------------------------------------------------------------------------------------------
+
+-- Communication methods.
+EMA.COMMUNICATION_WHISPER = "WHISPER"
+EMA.COMMUNICATION_GROUP = "RAID"
+EMA.COMMUNICATION_GUILD = "GUILD"
+
+-- Communication message prefix.
+EMA.MESSAGE_PREFIX = "JmbCmMsg"
+
+
+-- Communication priorities.
+EMA.COMMUNICATION_PRIORITY_BULK = "BULK"
+EMA.COMMUNICATION_PRIORITY_NORMAL = "NORMAL"
+EMA.COMMUNICATION_PRIORITY_ALERT = "ALERT"
+
+-- Communication command.
+EMA.COMMAND_PREFIX = "JmbCmCmd"
+EMA.COMMAND_SEPERATOR = "\004"
+EMA.COMMAND_ARGUMENT_SEPERATOR = "\005"
+
+-- Internal commands sent by EMA Communications.
+EMA.COMMAND_INTERNAL_SEND_SETTINGS = "JmbCmSdSet"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+
+-- Get a settings value.
+function EMA:ConfigurationGetSetting( key )
+	return EMA.db[key[#key]]
+end
+
+-- Set a settings value.
+function EMA:ConfigurationSetSetting( key, value )
+	EMA.db[key[#key]] = value
+end
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		autoSetTeamOnlineorOffline = true,
+		boostCommunication = true,
+		useGuildComms = false,
+	},
+}
+
+-- Configuration.
+local function GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		get = "ConfigurationGetSetting",
+		set = "ConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/ema-comm push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+
+-- Debug message.
+function EMA:DebugMessage( ... )
+    --EMA:Print( ... )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Character online management.
+-------------------------------------------------------------------------------------------------------------
+local function IsCharacterOnline( characterName )
+	return EMAPrivate.Team.GetCharacterOnlineStatus( characterName )
+end
+
+local function AssumeTeamAlwaysOnline()
+	return "false"
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Command management.
+-------------------------------------------------------------------------------------------------------------
+
+-- Creates a command to send.
+local function CreateCommandToSend( moduleName, commandName, ... )
+	--EMA:Print("Create", moduleName, commandName)
+	-- Start the message with the module name and a seperator.
+	local message = moduleName..EMA.COMMAND_SEPERATOR
+	-- Add the command  name and a seperator.
+	message = message..commandName..EMA.COMMAND_SEPERATOR
+	-- Add any arguments to the message (serialized and seperated).
+	local numberArguments = select( "#", ... )
+
+	for iterateArguments = 1, numberArguments do
+		local argument = select( iterateArguments, ... )
+		message = message..AceSerializer:Serialize( argument )
+		if iterateArguments < numberArguments then
+			message = message..EMA.COMMAND_ARGUMENT_SEPERATOR
+		end
+	end
+	-- Return the command to send.
+	--EMA:Print("Create", moduleName, commandName, iterateArguments)
+	return message
+end
+
+
+local function CommandAll( moduleName, commandName, ... )
+   -- EMA:DebugMessage( "Command All: ", moduleName, commandName, ... )
+	--EMA:Print( "Command All: ", moduleName, commandName, ... )
+	-- Get the message to send.
+	local message = CreateCommandToSend( moduleName, commandName, ... )
+	local channel
+	if EMA.db.useGuildComms == true then
+			EMA:SendCommMessage(
+			EMA.COMMAND_PREFIX,
+			message,
+			EMA.COMMUNICATION_GUILD,
+			nil,
+			EMA.COMMUNICATION_PRIORITY_ALERT
+			)
+		return
+	end
+	-- toon has to be in a group
+	if UnitInBattleground( "player" ) then
+		EMA:DebugMessage( "PvP_INSTANCE")
+		channel = "INSTANCE_CHAT"
+	elseif IsInGroup() then
+		EMA:DebugMessage( "Group")
+		local isInstance, instanceType = IsInInstance()
+		local name, Type, difficulty, difficultyName, maxPlayers, playerDifficulty, isDynamicInstance = GetInstanceInfo()
+		if isInstance or instanceType == "raid" or IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
+			if IsInGroup(LE_PARTY_CATEGORY_INSTANCE) then
+				channel = "INSTANCE_CHAT"
+			else
+				if IsInRaid() then
+					channel = "RAID"
+				else
+					channel = "PARTY"
+				end
+			end
+		else
+			if IsInRaid() then
+				channel = "RAID"
+			else
+				channel = "PARTY"
+			end
+		end
+	end
+	--EMA:Print( "CHANNEL", channel)
+	if channel then
+	EMA:DebugMessage("Sending command to group.", message, "channel", channel, nil)
+		--EMA:Print("Sending command to group.", message, "channel", channel, nil)
+			--EMA.COMMUNICATION_GROUP,
+			EMA:SendCommMessage(
+			EMA.COMMAND_PREFIX,
+			message,
+			channel,
+			nil,
+			EMA.COMMUNICATION_PRIORITY_ALERT
+			)
+			--EMA:Print("testChennel", EMA.COMMAND_PREFIX, channel, EMA.COMMUNICATION_PRIORITY_ALERT)
+			--return
+	end
+	--if the unit is not in the party then it unlikely did not get the party message,
+	for characterName, characterOrder in EMAPrivate.Team.TeamList() do
+		if UnitInParty( Ambiguate( characterName, "none" ) ) == false then
+			EMA:DebugMessage( "Toon not in party:", characterName)
+			if IsCharacterOnline( characterName ) == true then
+				EMA:DebugMessage("Sending command to others not in party/raid.", message, "WHISPER", characterName)
+				EMA:SendCommMessage(
+				EMA.COMMAND_PREFIX,
+				message,
+				EMA.COMMUNICATION_WHISPER,
+				characterName,
+				EMA.COMMUNICATION_PRIORITY_ALERT
+				)
+				--EMA:Print("testWis", EMA.COMMAND_PREFIX, EMA.COMMUNICATION_WHISPER, characterName , EMA.COMMUNICATION_PRIORITY_ALERT)
+			end
+		end
+	end
+end
+
+
+
+-- Should this get removed at some point and use all comms on one channel???
+-- WHISPER's don't work cross-realm but do work connected-realm so sending msg to masters would not send.
+-- TODO: Maybe remove masters???, and fall back to everyone being the master?
+-- Not really sure what to do so for now will keep with the master, and whisper them,
+-- if was to use party/raid then everyone will get the command and masters would not work.
+
+-- Send a command to the master.
+local function CommandMaster( moduleName, commandName, ... )
+    EMA:DebugMessage( "Command Master: ", moduleName, commandName, ... )
+	-- Get the message to send.
+	local message = CreateCommandToSend( moduleName, commandName, ... )
+	-- Send the message to the master.
+	local characterName = EMAPrivate.Team.GetMasterName()
+		if IsCharacterOnline( characterName ) == true then
+			EMA:DebugMessage("Sending command to others not in party/raid.", message, "WHISPER", characterName)
+				EMA:SendCommMessage(
+				EMA.COMMAND_PREFIX,
+				message,
+				EMA.COMMUNICATION_WHISPER,
+				characterName,
+				EMA.COMMUNICATION_PRIORITY_ALERT
+				)
+		end
+end
+
+-- Send a command to the master.
+local function CommandToon( moduleName, characterName, commandName, ... )
+	-- Get the message to send.
+	local message = CreateCommandToSend( moduleName, commandName, ... )
+		if IsCharacterOnline( characterName ) == true then
+			EMA:DebugMessage("Sending command to others not in party/raid.", message, "WHISPER", characterName)
+				EMA:SendCommMessage(
+				EMA.COMMAND_PREFIX,
+				message,
+				EMA.COMMUNICATION_WHISPER,
+				characterName,
+				EMA.COMMUNICATION_PRIORITY_ALERT
+				)
+		end
+end
+
+-- EbonyTest
+-- hide offline player spam Not really the best way but it works, Maybe adding tick box's to set members offline? This should now work with elvUI?
+
+local function SystemSpamFilter(frame, event, message)
+	if( event == "CHAT_MSG_SYSTEM") then
+		if message:match(string.format(ERR_CHAT_PLAYER_NOT_FOUND_S, "(.+)")) then
+			local SearchPlayerNotFound = gsub(ERR_CHAT_PLAYER_NOT_FOUND_S, "%%s", "(.+)")  -- Get from "No player named '%s' is currently playing."
+			local _, _, characterName = strfind(message, SearchPlayerNotFound)
+			if EMAApi.IsCharacterInTeam(characterName) == true then
+				--EMA:Print("player offline in team", characterName )
+				if EMA.db.autoSetTeamOnlineorOffline == true then
+					if IsCharacterOnline( characterName ) == true then
+						EMAApi.setOffline( characterName, false )
+						--EMA:Print("player offline in team", characterName )
+					end
+				end
+				return true
+			else
+				--EMA:Print("player offline Not in team")
+				return
+			end
+		end
+		if message:match(string.format(ERR_NOT_IN_RAID, "(.+)")) then
+			return true
+		end
+	end
+    return false
+end
+ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", SystemSpamFilter)
+
+
+
+-- Receive a command from another character.
+function EMA:CommandReceived( prefix, message, distribution, sender )
+    local characterName = EMAUtilities:AddRealmToNameIfMissing( sender )
+	EMA:DebugMessage( "Command received: ", prefix, message, distribution, sender )
+	--EMA:Print( "Command received: ", prefix, message, distribution, sender )
+	-- Check if the command is for EMA Communications.
+	if prefix == EMA.COMMAND_PREFIX then
+		--checks the char is in the team if not everyone can change settings and we do not want that
+		if EMAPrivate.Team.IsCharacterInTeam( sender ) == true then
+		    EMA:DebugMessage( "Sender is in team list." )
+		   --automaic setting team members online.
+			--EMA:Print("toonnonline", sender )
+				if EMAPrivate.Team.GetCharacterOnlineStatus( characterName ) == false then
+					--EMA:Print("Setting Toon online", distribution, sender, characterName )
+					EMAApi.setOnline( characterName, true)
+				end
+			-- Split the command into its components.
+			local moduleName, commandName, argumentsStringSerialized = strsplit( EMA.COMMAND_SEPERATOR, message )
+			local argumentsTable  = {}
+			-- Are there any arguments?
+			if (argumentsStringSerialized ~= nil) and (argumentsStringSerialized:trim() == "") then
+				-- No.
+				else
+					-- Deserialize the arguments.
+					local argumentsTableSerialized = { strsplit( EMA.COMMAND_ARGUMENT_SEPERATOR, argumentsStringSerialized ) }
+					for index, argumentSerialized in ipairs( argumentsTableSerialized ) do
+						local success, argument = AceSerializer:Deserialize( argumentSerialized )
+						if success == true then
+							table.insert( argumentsTable, argument )
+						else
+							error( L["A: Failed to deserialize command arguments for B from C."]( "EMA", moduleName, sender ) )
+						end
+					end
+				end
+				-- Look for internal EMA Communication commands.
+				if commandName == EMA.COMMAND_INTERNAL_SEND_SETTINGS then
+					-- Tell EMACore to handle the settings received.
+					EMAPrivate.Core.OnSettingsReceived( sender, moduleName, unpack( argumentsTable ) )
+				else
+					-- Any other command can go directly to the module that sent it.
+					EMA:DebugMessage( "Sending command on to module: ", sender, moduleName, commandName, unpack( argumentsTable ) )
+					EMAPrivate.Core.OnCommandReceived( sender, moduleName, commandName, unpack( argumentsTable ) )
+				end
+			else
+				EMA:DebugMessage( "Sender is NOT in team list." )
+			end
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA Communications API.  These methods should only be called by EMA Core.
+-------------------------------------------------------------------------------------------------------------
+
+-- Send settings to all members of the current team.
+local function SendSettings( moduleName, settings )
+	-- Send a push settings command to all.
+	--EMA:Print("test", moduleName, EMA.COMMAND_INTERNAL_SEND_SETTINGS, settings )
+	CommandAll( moduleName, EMA.COMMAND_INTERNAL_SEND_SETTINGS, settings )
+end
+
+-- Command all members of the current team.
+local function SendCommandAll( moduleName, commandName, ... )
+	-- Send the command to all.
+	CommandAll( moduleName, commandName, ... )
+end
+
+-- TODO: needs to be cleaned up at some point with other communication stuff
+
+-- Command the master.
+local function SendCommandMaster( moduleName, commandName, ... )
+	-- Send the command to the master character.
+	CommandMaster( moduleName, commandName, ... )
+end
+
+-- Command the master.
+local function SendCommandToon( moduleName, characterName, commandName, ... )
+	-- Send the command to the master character.
+	CommandToon( moduleName, characterName, commandName, ... )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA Communications Initialization.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialize the addon.
+function EMA:OnInitialize()
+	--EMA.channelPollTimer = nil
+	-- Register commands with AceComms - tell AceComms to call the CommandReceived function when a command is received.
+	EMA:RegisterComm( EMA.COMMAND_PREFIX, "CommandReceived" )
+	-- Create the settings database supplying the settings values along with defaults.
+    EMA.completeDatabase = LibStub( "AceDB-3.0" ):New( EMA.settingsDatabaseName, EMA.settings )
+	EMA.db = EMA.completeDatabase.profile
+	-- Create the settings.
+	LibStub( "AceConfig-3.0" ):RegisterOptionsTable(
+		EMA.moduleName,
+		GetConfiguration()
+	)
+	EMA:SettingsCreate()
+	EMA.settingsFrame = EMA.settingsControl.widgetSettings.frame
+	EMA:SettingsRefresh()
+	--TODO: Is this needed? as its already in a module??
+	local k = GetRealmName()
+	local realm = k:gsub( "%s+", "" )
+	self.characterRealm = realm
+	self.characterNameLessRealm = UnitName( "player" )
+	self.characterName = self.characterNameLessRealm.."-"..self.characterRealm
+	EMA.characterGUID = UnitGUID( "player" )
+	-- End of needed:
+	-- Register communications as a module.
+	EMAPrivate.Core.RegisterModule( EMA, EMA.moduleName )
+end
+
+function EMA:OnEnable()
+
+	EMA:RegisterEvent("GUILD_ROSTER_UPDATE")
+	if EMA.db.boostCommunication == true then
+		EMA:BoostCommunication()
+		-- Repeat every 5 minutes.
+		EMA:ScheduleRepeatingTimer( "BoostCommunication", 300 )
+	end
+end
+
+function EMA:BoostCommunication()
+	if EMA.db.boostCommunication == true then
+		-- 2000 seems to be safe if NOTHING ELSE is happening. let's call it 800.
+		ChatThrottleLib.MAX_CPS = 1200 --800
+		-- Guesstimate overhead for sending a message; source+dest+chattype+protocolstuff
+		ChatThrottleLib.MSG_OVERHEAD = 40
+		-- WoW's server buffer seems to be about 32KB. 8KB should be safe, but seen disconnects on _some_ servers. Using 4KB now.
+		ChatThrottleLib.BURST = 6000 --4000
+		-- Reduce output CPS to half (and don't burst) if FPS drops below this value
+		ChatThrottleLib.MIN_FPS = 10 --20
+	end
+end
+
+-- Handle the chat command.
+function EMA:EMAChatCommand( input )
+    if not input or input:trim() == "" then
+        InterfaceOptionsFrame_OpenToCategory( EMA.moduleDisplayName )
+    else
+        LibStub( "AceConfigCmd-3.0" ):HandleCommand( EMA.chatCommand, EMA.moduleName, input )
+    end
+end
+
+function EMA:OnDisable()
+end
+
+function EMA:GUILD_ROSTER_UPDATE(event, ... )
+	if EMA.db.useGuildComms == false then
+		return
+	end
+	local numGuildMembers, numOnline, numOnlineAndMobile = GetNumGuildMembers()
+	for index = 1, numGuildMembers do
+		characterName,_,_,_,class,_,_,_,online,status,classFileName,_, _,isMobile = GetGuildRosterInfo(index)
+		--EMA:Print("Name", fullName, "online", online )
+		if online == false then
+			if EMA.db.autoSetTeamOnlineorOffline == true then
+				if EMAApi.IsCharacterInTeam(characterName) == true and IsCharacterOnline( characterName ) == true then
+					EMAApi.setOffline( characterName, false )
+					--EMA:Print("player offline in team", characterName )
+				end
+			end
+		end
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsCreate()
+	EMA.settingsControl = {}
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.EMASendSettings,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+
+	)
+	local bottomOfOptions = EMA:SettingsCreateOptions( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfOptions )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, GetConfiguration() )
+end
+
+function EMA:SettingsCreateOptions( top )
+	-- Get positions and dimensions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local column1Left = left
+	local column2Left = left + 10
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["COMMUNICATIONS"]..L[" "]..L["OPTIONS"] , movingTop, false )--
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxAutoSetTeamOnlineorOffline = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["AUTO_SET_TEAM"],
+		EMA.CheckBoxAutoSetTeamOnlineorOffline
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxBoostCommunication = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["BOOST_COMMUNICATIONS"],
+		EMA.CheckBoxBoostCommunication,
+		L["BOOST_COMMUNICATIONS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxUseGuildComms = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["USE_GUILD_COMMS"],
+		EMA.CheckBoxUseGuildComms,
+		L["USE_GUILD_COMMS_INFO"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	return movingTop
+end
+
+function EMA:CheckBoxUseGuildComms( event, value )
+	EMA.db.useGuildComms = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:CheckBoxBoostCommunication( event, value )
+	EMA.db.boostCommunication = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:CheckBoxAssumeAlwaysOnline( event, value )
+	EMA.db.assumeTeamAlwaysOnline = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:CheckBoxAutoSetTeamOnlineorOffline( event, value )
+	EMA.db.autoSetTeamOnlineorOffline = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	EMA.settingsControl.checkBoxAutoSetTeamOnlineorOffline:SetValue( EMA.db.autoSetTeamOnlineorOffline )
+	EMA.settingsControl.checkBoxBoostCommunication:SetValue( EMA.db.boostCommunication )
+	EMA.settingsControl.checkBoxUseGuildComms:SetValue( EMA.db.useGuildComms )
+end
+
+-- Settings received.
+function EMA:EMASendSettings()
+	SendSettings( EMA.moduleName, EMA.db )
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.autoSetTeamOnlineorOffline = settings.autoSetTeamOnlineorOffline
+		EMA.db.boostCommunication = settings.boostCommunication
+		EMA.db.useGuildComms = settings.useGuildComms
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+-- text = message to send -- This is mosty used for sending over EMA Own Comms mosty of Whispers
+-- chatDestination = "PARTY, WHISPER, RAID, CHANNEL, etc"
+-- characterOrChannelName = character name if WHISPER or channel name if CHANNEL or nil otherwise
+-- If we clean up EMA-msg then we can remove this maybe again Eboyn TODO::::
+-- priority = one of
+--   EMA.COMMUNICATION_PRIORITY_BULK,
+--   EMA.COMMUNICATION_PRIORITY_NORMAL
+--   EMA.COMMUNICATION_PRIORITY_ALERT
+
+local function SendChatMessage( text, chatDestination, characterOrChannelName, priority )
+	-- Message small enough to send?
+	--EMA:Print("test", text, chatDestination, characterOrChannelName, priority)
+	if text:len() <= 255 then
+		--EMA:Print("test TURE!!!!! TOBIG" )
+		ChatThrottleLib:SendChatMessage( priority, EMA.MESSAGE_PREFIX, text, chatDestination, nil, characterOrChannelName, nil )
+
+
+	else
+		-- No, message is too big, split into smaller messages, taking UTF8 characters into account.
+		local bytesAvailable = string.utf8len(text1)
+		local currentPosition = 1
+		local countBytes = 1
+		local startPosition = currentPosition
+		local splitText = ""
+		-- Iterate all the utf8 characters, character by character until we reach 255 characters, then send
+		-- those off and start counting over.
+		while currentPosition <= bytesAvailable do
+			-- Count the number of bytes the character at this position takes up.
+			countBytes = countBytes + EMAutf8charbytes( text, currentPosition )
+			-- More than 255 bytes yet?
+			if countBytes <= 255 then
+				-- No, increment the position and keep counting.
+				currentPosition = currentPosition + EMAutf8charbytes( text, currentPosition )
+			else
+				-- Yes, more than 255.  Send this amount off.
+				splitText = text:sub( startPosition, currentPosition )
+				ChatThrottleLib:SendChatMessage( priority, EMA.MESSAGE_PREFIX, splitText, chatDestination, nil, characterOrChannelName, nil )
+				-- New start position and count.
+				startPosition = currentPosition + 1
+				countBytes = 1
+			end
+		end
+		-- Any more bytes left to send?
+		if startPosition < currentPosition then
+			-- Yes, send them.
+			splitText = text:sub( startPosition, currentPosition )
+			ChatThrottleLib:SendChatMessage( priority, EMA.MESSAGE_PREFIX, splitText, chatDestination, nil, characterOrChannelName, nil )
+		end
+	end
+end
+
+EMAPrivate.Communications.COMMUNICATION_PRIORITY_BULK = EMA.COMMUNICATION_PRIORITY_BULK
+EMAPrivate.Communications.COMMUNICATION_PRIORITY_NORMAL = EMA.COMMUNICATION_PRIORITY_NORMAL
+EMAPrivate.Communications.COMMUNICATION_PRIORITY_ALERT = EMA.COMMUNICATION_PRIORITY_ALERT
+EMAPrivate.Communications.SendChatMessage = SendChatMessage
+EMAPrivate.Communications.SendSettings = SendSettings
+EMAPrivate.Communications.SendCommandAll = SendCommandAll
+EMAPrivate.Communications.SendCommandMaster = SendCommandMaster
+EMAPrivate.Communications.SendCommandToon = SendCommandToon
+EMAPrivate.Communications.SendCommandMaster = SendCommandMaster
+EMAPrivate.Communications.SendCommandToon = SendCommandToon
+EMAPrivate.Communications.AssumeTeamAlwaysOnline = AssumeTeamAlwaysOnline
\ No newline at end of file
diff --git a/EMA/Core/Core.lua b/EMA/Core/Core.lua
new file mode 100644
index 0000000..bb151b4
--- /dev/null
+++ b/EMA/Core/Core.lua
@@ -0,0 +1,842 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "EMA" that is 								--
+--				Released under the MIT License 										--
+--				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- The global private table for EMA.
+EMAPrivate = {}
+EMAPrivate.Core = {}
+EMAPrivate.Communications = {}
+EMAPrivate.Message = {}
+EMAPrivate.Team = {}
+EMAPrivate.Tag = {}
+
+-- The global public API table for EMA.
+_G.EMAApi = {}
+
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"EMACore",
+	"AceConsole-3.0"
+)
+
+-- EMACore is not a module, but the same naming convention for these values is convenient.
+EMA.moduleName = "EMA-Core"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.moduleDisplayName = L["NEWS"]
+EMA.settingsDatabaseName = "CoreProfileDB"
+EMA.parentDisplayName = L["NEWS"]
+EMA.chatCommand = "ema"
+EMA.teamModuleName = "Team"
+-- Icon's
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\NewsIcon.tga"
+EMA.pofileIcon = "Interface\\Addons\\EMA\\Media\\SettingsIcon.tga"
+-- order
+EMA.moduleOrder = 1
+
+
+-- Load libraries.
+local AceGUI = LibStub("AceGUI-3.0")
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+
+
+-- Create frame for EMA Settings.
+EMAPrivate.SettingsFrame = {}
+EMAPrivate.SettingsFrame.Widget = AceGUI:Create( "EMAWindow" )
+EMAPrivate.SettingsFrame.Widget:SetTitle( "" )
+EMAPrivate.SettingsFrame.Widget:SetStatusText(L["STATUSTEXT"])
+EMAPrivate.SettingsFrame.Widget:SetWidth(900)
+EMAPrivate.SettingsFrame.Widget:SetHeight(650)
+EMAPrivate.SettingsFrame.Widget:SetLayout( "Fill" )
+EMAPrivate.SettingsFrame.WidgetTree = AceGUI:Create( "EMATreeGroup" )
+EMAPrivate.SettingsFrame.WidgetTree:SetLayout( "Fill" )
+EMAPrivate.SettingsFrame.TreeGroupStatus = { treesizable = false, groups = {} }
+EMAPrivate.SettingsFrame.WidgetTree:SetStatusTable( EMAPrivate.SettingsFrame.TreeGroupStatus )
+EMAPrivate.SettingsFrame.WidgetTree:EnableButtonTooltips( false )
+EMAPrivate.SettingsFrame.Widget:AddChild( EMAPrivate.SettingsFrame.WidgetTree )
+
+
+function EMA:OnEnable()
+	if EMA.db.showStartupMessage8000 then
+		StaticPopup_Show( "ALL_SETTINGS HAVE BEEN RESET" )
+	end
+end
+
+function EMA:OnDisable()
+end
+
+local function InitializePopupDialogs()
+	StaticPopupDialogs["ALL_SETTINGS HAVE BEEN RESET"] = {
+		text = L["ALL_SETTINGS_RESET"],
+		button1 = OKAY,
+		OnAccept = function()
+			EMA.db.showStartupMessage8000 = false
+		end,
+		showAlert = 1,
+		timeout = 0,
+		exclusive = 1,
+		hideOnEscape = 1,
+		whileDead = 1,
+	}
+end
+
+local function EMASettingsTreeSort( a, b )
+	local aText = ""
+	local bText = ""
+	local aEMAOrder = 0
+	local bEMAOrder = 0
+	if a ~= nil then
+		aText = a.text
+		aEMAOrder = a.EMAOrder
+	end
+	if b ~= nil then
+		bText = b.text
+		bEMAOrder = b.EMAOrder
+	end
+	if aText == L["EMA"] or bText == L["EMA"] then
+		if aText == L["EMA"] then
+			return true
+		end
+		if bText == L["EMA"] then
+			return false
+		end
+	end
+	if aEMAOrder == bEMAOrder then
+		return aText < bText
+	end
+	return aEMAOrder < bEMAOrder
+end
+
+local function EMATreeGroupTreeGetParent( parentName )
+	local parent
+	for index, tableInfo in ipairs( EMAPrivate.SettingsFrame.Tree.Data ) do
+		if tableInfo.value == parentName then
+			parent = tableInfo
+		end
+	end
+	return parent
+end
+
+local function EMAAddModuleToSettings( childName, parentName, moduleIcon, order, moduleFrame )
+	-- 	childName is the parentName then make the child the parent.
+	if childName == parentName then
+		local parent = EMATreeGroupTreeGetParent( parentName )
+		if parent == nil then
+			table.insert( EMAPrivate.SettingsFrame.Tree.Data, { value = childName, text = childName, EMAOrder = order, icon = moduleIcon } )
+			table.sort( EMAPrivate.SettingsFrame.Tree.Data, EMASettingsTreeSort )
+			EMAPrivate.SettingsFrame.Tree.ModuleFrames[childName] = moduleFrame
+		end
+
+	else
+	local parent = EMATreeGroupTreeGetParent( parentName )
+	if parent == nil then
+		table.insert( EMAPrivate.SettingsFrame.Tree.Data, { value = parentName, text = parentName, EMAOrder = order } )
+	end
+	local parent = EMATreeGroupTreeGetParent( parentName )
+	if parent.children == nil then
+		parent.children = {}
+	end
+		table.insert( parent.children, { value = childName, text = childName, EMAOrder = order, icon = moduleIcon } )
+		table.sort( EMAPrivate.SettingsFrame.Tree.Data, EMASettingsTreeSort )
+		table.sort( parent.children, EMASettingsTreeSort )
+		EMAPrivate.SettingsFrame.Tree.ModuleFrames[childName] = moduleFrame
+	end
+end
+
+
+
+local function EMAModuleSelected( tree, event, treeValue, selected )
+	--EMA:Print("test", tree, event, treeValue, selected)
+	local parentValue, value = strsplit( "\001", treeValue )
+	if tree == nil and event == nil then
+		-- Came from chat command.
+		value = treeValue
+	end
+	if value == nil then
+		value = parentValue
+	end
+	EMAPrivate.SettingsFrame.Widget:Show()
+	if EMAPrivate.SettingsFrame.Tree.CurrentChild ~= nil then
+		EMAPrivate.SettingsFrame.Tree.CurrentChild.frame:Hide()
+		EMAPrivate.SettingsFrame.Tree.CurrentChild = nil
+	end
+	for moduleValue, moduleFrame in pairs( EMAPrivate.SettingsFrame.Tree.ModuleFrames ) do
+		if 	moduleValue == value then
+			moduleFrame:SetParent( EMAPrivate.SettingsFrame.WidgetTree )
+			moduleFrame:SetWidth( EMAPrivate.SettingsFrame.WidgetTree.content:GetWidth() or 0 )
+			moduleFrame:SetHeight( EMAPrivate.SettingsFrame.WidgetTree.content:GetHeight() or 0 )
+			moduleFrame.frame:SetAllPoints()
+			moduleFrame.frame:Show()
+			EMAPrivate.SettingsFrame.Tree.CurrentChild = moduleFrame
+			if value == L["OPTIONS"] then
+				LibStub( "AceConfigDialog-3.0" ):Open( EMA.moduleName..L["OPTIONS"], moduleFrame )
+			end
+			return
+		end
+	end
+end
+EMAPrivate.SettingsFrame.Tree = {}
+EMAPrivate.SettingsFrame.Tree.Data = {}
+EMAPrivate.SettingsFrame.Tree.ModuleFrames = {}
+EMAPrivate.SettingsFrame.Tree.CurrentChild = nil
+EMAPrivate.SettingsFrame.Tree.Add = EMAAddModuleToSettings
+EMAPrivate.SettingsFrame.Tree.ButtonClick = EMAModuleSelected
+EMAPrivate.SettingsFrame.WidgetTree:SetTree( EMAPrivate.SettingsFrame.Tree.Data )
+EMAPrivate.SettingsFrame.WidgetTree:SetCallback( "OnClick", EMAPrivate.SettingsFrame.Tree.ButtonClick )
+EMAPrivate.SettingsFrame.Widget:Hide()
+--table.insert( UISpecialFrames, "EMASettingsWindowsFrame" )
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+	showStartupMessage8000 = true,
+	},
+}
+
+-- Configuration.
+local function GetConfiguration()
+	local configuration = {
+		name = "EMA",
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "ConfigurationGetSetting",
+		set = "ConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA push",
+				get = false,
+				set = "SendSettingsAllModules",
+				order = 4,
+				guiHidden = true,
+			},
+			resetsettingsframe = {
+				type = "input",
+				name = L["RESET_SETTINGS_FRAME"],
+				desc = L["RESET_SETTINGS_FRAME"],
+				usage = "/EMA resetsettingsframe",
+				get = false,
+				set = "ResetSettingsFrame",
+				order = 5,
+				guiHidden = true,
+			},
+		},
+	}
+	return configuration
+end
+
+-- Get a settings value.
+function EMA:ConfigurationGetSetting( key )
+	return EMA.db[key[#key]]
+end
+
+-- Set a settings value.
+function EMA:ConfigurationSetSetting( key, value )
+	EMA.db[key[#key]] = value
+end
+
+local function DebugMessage( ... )
+	EMA:Print( ... )
+end
+
+--WOW BetaBuild!
+local function isBetaBuild()
+	local _, _, _, tocversion = GetBuildInfo()
+	-- Build For BFA 8.0.1 2018
+	if tocversion >= 80000 then
+		return true
+	else
+		return  false
+	end
+end
+
+--Ema Alpha
+local function isEmaAlphaBuild()
+	local EMAVersion = GetAddOnMetadata("EMA", "version")
+	-- EMA Alpha Build
+	local Alpha = EMAVersion:find( "Alpha" )
+	if Alpha then
+		return true
+	else
+		return false
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Module management.
+-------------------------------------------------------------------------------------------------------------
+
+-- Register a EMA module.
+local function RegisterModule( moduleAddress, moduleName )
+	if EMA.registeredModulesByName == nil then
+		EMA.registeredModulesByName = {}
+	end
+	if EMA.registeredModulesByAddress == nil then
+		EMA.registeredModulesByAddress = {}
+	end
+	EMA.registeredModulesByName[moduleName] = moduleAddress
+	EMA.registeredModulesByAddress[moduleAddress] = moduleName
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings sending and receiving.
+-------------------------------------------------------------------------------------------------------------
+
+-- Send the settings for the module specified (using its address) to other EMA Team characters.
+local function SendSettings( moduleAddress, settings )
+	-- Get the name of the module.
+	local moduleName = EMA.registeredModulesByAddress[moduleAddress]
+	-- Send the settings identified by the module name.
+	EMAPrivate.Communications.SendSettings( moduleName, settings )
+end
+
+-- Settings are received, pass them to the relevant module.
+local function OnSettingsReceived( sender, moduleName, settings )
+	sender = EMAUtilities:AddRealmToNameIfMissing( sender )
+	--EMA:Print("onsettings", sender, moduleName )
+	-- Get the address of the module.
+	local moduleAddress = EMA.registeredModulesByName[moduleName]
+	-- can not receive a message from a Module not Loaded so ignore it. Better tell them its not loaded --ebony.
+	if moduleAddress == nil then
+		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
+		return
+	else
+	-- loaded? Pass the module its settings.
+		moduleAddress:EMAOnSettingsReceived( sender, settings )
+	end
+end
+
+function EMA:SendSettingsAllModules()
+	EMA:Print( "Sending settings for all modules." )
+	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
+		EMA:Print( "Sending settings for: ", moduleName )
+		moduleAddress:EMASendSettings()
+	end
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Commands sending and receiving.
+-------------------------------------------------------------------------------------------------------------
+
+-- Send a command for the module specified (using its address) to other EMA Team characters.
+local function SendCommandToTeam( moduleAddress, commandName, ... )
+	-- Get the name of the module.
+	local moduleName = EMA.registeredModulesByAddress[moduleAddress]
+	-- Send the command identified by the module name.
+	if moduleAddress == nil then
+		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
+		return
+	else
+	EMAPrivate.Communications.SendCommandAll( moduleName, commandName, ... )
+	end
+end
+
+-- Send a command for the module specified (using its address) to the master character.
+local function SendCommandToMaster( moduleAddress, commandName, ... )
+	-- Get the name of the module.
+	local moduleName = EMA.registeredModulesByAddress[moduleAddress]
+	-- Send the command identified by the module name.
+	if moduleAddress == nil then
+		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
+		return
+	else
+	EMAPrivate.Communications.SendCommandMaster( moduleName, commandName, ... )
+	end
+end
+
+local function SendCommandToToon( moduleAddress, characterName, commandName, ... )
+	-- Get the name of the module.
+	local moduleName = EMA.registeredModulesByAddress[moduleAddress]
+	-- Send the command identified by the module name.
+	if moduleAddress == nil then
+		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
+		return
+	else
+	EMAPrivate.Communications.SendCommandToon( moduleName, characterName, commandName, ... )
+	end
+end
+
+-- A command is received, pass it to the relevant module.
+local function OnCommandReceived( sender, moduleName, commandName, ... )
+	sender = EMAUtilities:AddRealmToNameIfMissing( sender )
+	-- Get the address of the module.
+	local moduleAddress = EMA.registeredModulesByName[moduleName]
+	-- Pass the module its settings.
+	if moduleAddress == nil then
+		EMA:Print(L["MODULE_NOT_LOADED"], moduleName)
+		return
+	else
+		moduleAddress:EMAOnCommandReceived( sender, commandName, ... )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA Core Profile Support.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:FireBeforeProfileChangedEvent()
+	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
+		if moduleName ~= EMA.moduleName then
+			moduleAddress:BeforeEMAProfileChanged()
+		end
+	end
+end
+
+function EMA:CanChangeProfileForModule( moduleName )
+	if (moduleName ~= EMA.moduleName) and (moduleName ~= EMA.teamModuleName) then
+		return true
+	end
+	return false
+end
+
+function EMA:FireOnProfileChangedEvent( moduleAddress )
+	moduleAddress.db = moduleAddress.completeDatabase.profile
+	moduleAddress:OnEMAProfileChanged()
+end
+
+function EMA:OnProfileChanged( event, database, newProfileKey, ... )
+	EMA:Print( "Profile changed - iterating all modules.")
+	EMA:FireBeforeProfileChangedEvent()
+	-- Do the team module before all the others.
+	local teamModuleAddress = EMA.registeredModulesByName[EMA.teamModuleName]
+	EMA:Print( "Changing profile: ", EMA.teamModuleName )
+	teamModuleAddress.completeDatabase:SetProfile( newProfileKey )
+	EMA:FireOnProfileChangedEvent( teamModuleAddress )
+	-- Do the other modules.
+	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
+		if EMA:CanChangeProfileForModule( moduleName ) == true then
+			EMA:Print( L["CHANGING_PROFILE"] , moduleName )
+			moduleAddress.completeDatabase:SetProfile( newProfileKey )
+			EMA:FireOnProfileChangedEvent( moduleAddress )
+		end
+	end
+end
+
+function EMA:OnProfileCopied( event, database, sourceProfileKey )
+	EMA:Print( "Profile copied - iterating all modules." )
+	EMA:FireBeforeProfileChangedEvent()
+	-- Do the team module before all the others.
+	local teamModuleAddress = EMA.registeredModulesByName[EMA.teamModuleName]
+	EMA:Print( L["COPYING_PROFILE"], EMA.teamModuleName )
+	teamModuleAddress.completeDatabase:CopyProfile( sourceProfileKey, true )
+	EMA:FireOnProfileChangedEvent( teamModuleAddress )
+	-- Do the other modules.
+	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
+		if EMA:CanChangeProfileForModule( moduleName ) == true then
+			EMA:Print( L["COPYING_PROFILE"], moduleName )
+			moduleAddress.completeDatabase:CopyProfile( sourceProfileKey, true )
+			EMA:FireOnProfileChangedEvent( moduleAddress )
+		end
+	end
+end
+
+function EMA:OnProfileReset( event, database )
+	EMA:Print( L["PROFILE_RESET"] )
+	EMA:FireBeforeProfileChangedEvent()
+	-- Do the team module before all the others.
+	local teamModuleAddress = EMA.registeredModulesByName[EMA.teamModuleName]
+	EMA:Print( L["RESETTING_PROFILE"], EMA.teamModuleName )
+	teamModuleAddress.completeDatabase:ResetProfile()
+	EMA:FireOnProfileChangedEvent( teamModuleAddress )
+	-- Do the other modules.
+	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
+		if EMA:CanChangeProfileForModule( moduleName ) == true then
+			EMA:Print( L["RESETTING_PROFILE"], moduleName )
+			moduleAddress.completeDatabase:ResetProfile()
+			EMA:FireOnProfileChangedEvent( moduleAddress )
+		end
+	end
+end
+
+function EMA:OnProfileDeleted( event, database, profileKey )
+	EMA:Print( L["PROFILE_DELETED"] )
+	EMA:FireBeforeProfileChangedEvent()
+	-- Do the team module before all the others.
+	local teamModuleAddress = EMA.registeredModulesByName[EMA.teamModuleName]
+	EMA:Print( L["DELETING_PROFILE"], EMA.teamModuleName )
+	teamModuleAddress.completeDatabase:DeleteProfile( profileKey, true )
+	EMA:FireOnProfileChangedEvent( teamModuleAddress )
+	-- Do the other modules.
+	for moduleName, moduleAddress in pairs( EMA.registeredModulesByName ) do
+		if EMA:CanChangeProfileForModule( moduleName ) == true then
+			EMA:Print( L["DELETING_PROFILE"], moduleName )
+			moduleAddress.completeDatabase:DeleteProfile( profileKey, true )
+			EMA:FireOnProfileChangedEvent( moduleAddress )
+		end
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA Core Initialization.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialize the addon.
+function EMA:OnInitialize()
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+	-- Tables to hold registered modules - lookups by name and by address.
+	-- By name is used for communication between clients and by address for communication between addons on the same client.
+	EMA.registeredModulesByName = {}
+	EMA.registeredModulesByAddress = {}
+	-- Create the settings database supplying the settings values along with defaults.
+   EMA.completeDatabase = LibStub( "AceDB-3.0" ):New( EMA.settingsDatabaseName, EMA.settings )
+	EMA.completeDatabase.RegisterCallback( EMA, "OnProfileChanged", "OnProfileChanged" )
+	EMA.completeDatabase.RegisterCallback( EMA, "OnProfileCopied", "OnProfileCopied" )
+	EMA.completeDatabase.RegisterCallback( EMA, "OnProfileReset", "OnProfileReset" )
+	EMA.completeDatabase.RegisterCallback( EMA, "OnProfileDeleted", "OnProfileDeleted" )
+
+	EMA.db = EMA.completeDatabase.profile
+	-- Create the settings.
+	LibStub( "AceConfig-3.0" ):RegisterOptionsTable(
+		EMA.moduleName,
+		GetConfiguration()
+	)
+	-- Create the settings frame.
+	EMA:CoreSettingsCreate()
+	EMA.settingsFrame = EMA.settingsControl.widgetSettings.frame
+	-- TODO DO WE NEED THIS ??????
+	--[[
+	-- Blizzard options frame.
+	local frame = CreateFrame( "Frame" )
+	frame.name = L["EMA"]
+	local button = CreateFrame( "Button", nil, frame, "OptionsButtonTemplate" )
+	button:SetPoint( "CENTER" )
+	button:SetText( "/EMA" )
+	button:SetScript( "OnClick", EMA.LoadEMASettings )
+	InterfaceOptions_AddCategory( frame )
+	]]
+	-- Create the settings profile support.
+	LibStub( "AceConfig-3.0" ):RegisterOptionsTable(
+		EMA.moduleName..L["OPTIONS"],
+		LibStub( "AceDBOptions-3.0" ):GetOptionsTable( EMA.completeDatabase )
+	)
+	local profileContainerWidget = AceGUI:Create( "ScrollFrame" )
+	profileContainerWidget:SetLayout( "Fill" )
+	-- We need this to make it a working Module
+	local order  = 10
+	EMAPrivate.SettingsFrame.Tree.Add( L["OPTIONS"], L["OPTIONS"], EMA.pofileIcon, order, profileContainerWidget )
+
+	-- Register the core as a module.
+	RegisterModule( EMA, EMA.moduleName )
+	-- Register the chat command.
+	EMA:RegisterChatCommand( EMA.chatCommand, "EMAChatCommand" )
+end
+
+function EMA:LoadEMAModule( moduleName )
+	local loaded, reason = LoadAddOn( moduleName )
+	if not loaded then
+		if reason ~= "DISABLED" and reason ~= "MISSING" then
+			EMA:Print(L["Failed_LOAD_MODULE"]..moduleName.."' ["..reason.."]." )
+		end
+	end
+end
+
+function EMA:CoreSettingsCreateInfo( top )
+	-- Get positions and dimensions.
+	local buttonPushAllSettingsWidth = 200
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local radioBoxHeight = EMAHelperSettings:GetRadioBoxHeight()
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local indent = horizontalSpacing * 10
+	local indentContinueLabel = horizontalSpacing * 18
+	local indentSpecial = indentContinueLabel + 9
+	local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3
+	local column1Left = left
+	local column2Left = column1Left + checkBoxThirdWidth + horizontalSpacing - 35
+	local column1LeftIndent = left + indentContinueLabel
+	local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing
+	local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	--Main Heading
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["STATUSTEXT"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.labelInformation1 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["ME"]
+	)
+	movingTop = movingTop + movingTop * 2
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["RELEASE_NOTES"]..GetAddOnMetadata("EMA", "version") , movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.labelInformation10 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT1"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation11 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT2"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation12 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT3"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation13	= EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT4"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation14 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT5"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation15 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT6"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation16 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT7"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation17 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT8"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation18 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT9"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation19 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEXT10"]
+	)
+	--movingTop = movingTop - labelContinueHeight
+	-- Useful websites Heading
+	movingTop = movingTop - labelContinueHeight * 2
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["WEBSITES"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.labelInformation30 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEMP_WEBSITE1"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation21 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["ME_TWITTER"]
+
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation22 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["D-B"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation23 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["ISB"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation24 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEMP_WEBSITE2"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation25 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["TEMP_WEBSITE3"]
+	)
+	-- Special thanks Heading
+	movingTop = movingTop - buttonHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SPECIAL_THANKS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.labelInformation20 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["THANKS1"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation21 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["THANKS2"]
+
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation22 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["THANKS3"]
+	)
+	--CopyRight heading
+	movingTop = movingTop - labelContinueHeight * 4
+	EMA.settingsControl.labelInformation40 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["COPYRIGHT"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControl.labelInformation41 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column2Left,
+		movingTop,
+		L["COPYRIGHTTWO"]
+	)
+	return movingTop
+end
+
+function EMA:CoreSettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SendSettingsAllModules,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfInfo = EMA:CoreSettingsCreateInfo( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
+end
+
+-- Send core settings.
+function EMA:EMASendSettings()
+	EMAPrivate.Communications.SendSettings( EMA.moduleName, EMA.db )
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+end
+
+-- Core settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	--Checks character is not the the character that send the settings. Now checks the character has a realm on there name to match EMA team list.
+	--characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+        -- TODO: What is this minimap icon?
+		EMA.db.showMinimapIcon = settings.showMinimapIcon
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+--[[
+function EMA:LoadEMASettings()
+	InterfaceOptionsFrameCancel_OnClick()
+	HideUIPanel( GameMenuFrame )
+	EMA:EMAChatCommand( "" )
+end
+]]
+
+-- Handle the chat command.
+function EMA:EMAChatCommand( input )
+    if not input or input:trim() == "" then
+		EMAPrivate.SettingsFrame.Widget:Show()
+		EMAPrivate.SettingsFrame.WidgetTree:SelectByValue( L["NEWS"] )
+		EMAPrivate.SettingsFrame.Tree.ButtonClick( nil, nil, EMA.moduleDisplayName, false)
+    else
+        LibStub( "AceConfigCmd-3.0" ):HandleCommand( EMA.chatCommand, EMA.moduleName, input )
+    end
+end
+
+function EMA:ResetSettingsFrame()
+	EMA:Print( L["FRAME_RESET"] )
+	EMAPrivate.SettingsFrame.Widget:SetPoint("TOPLEFT", 0, 0)
+	EMAPrivate.SettingsFrame.Widget:SetWidth(900)
+	EMAPrivate.SettingsFrame.Widget:SetHeight(650)
+	EMAPrivate.SettingsFrame.Widget:Show()
+end
+
+-- Functions available from EMA Core for other EMA internal objects.
+EMAPrivate.Core.RegisterModule = RegisterModule
+EMAPrivate.Core.SendSettings = SendSettings
+EMAPrivate.Core.OnSettingsReceived = OnSettingsReceived
+EMAPrivate.Core.SendCommandToTeam = SendCommandToTeam
+EMAPrivate.Core.SendCommandToMaster = SendCommandToMaster
+EMAPrivate.Core.SendCommandToToon = SendCommandToToon
+EMAPrivate.Core.OnCommandReceived = OnCommandReceived
+EMAPrivate.Core.isBetaBuild = isBetaBuild
+EMAPrivate.Core.isEmaAlphaBuild = isEmaAlphaBuild
diff --git a/EMA/Core/Message.lua b/EMA/Core/Message.lua
new file mode 100644
index 0000000..82bbe88
--- /dev/null
+++ b/EMA/Core/Message.lua
@@ -0,0 +1,990 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "EMA" that is 								--
+--				Released under the MIT License 										--
+--				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- THIS FILE NEED A GOOD REWIRE ONEDAY, AND A PAIN IN THE NECK TO USE.........
+
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Message",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0"
+)
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local Media = LibStub("LibSharedMedia-3.0")
+
+-- Built in Sounds
+Media:Register("sound", "EMA: RaidWarning", "Sound\\interface\\RaidWarning.ogg")
+
+
+-- Constants and Locale for this module.
+EMA.moduleName = "Message"
+EMA.settingsDatabaseName = "MessageProfileDB"
+EMA.chatCommand = "ema-message"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["OPTIONS"]
+EMA.moduleDisplayName = L["MESSAGE_DISPLAY"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\ChatIcon.tga"
+-- order
+EMA.moduleOrder = 80
+
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Message area management.
+-------------------------------------------------------------------------------------------------------------
+
+-- areas = {}
+-- areas["areaname"].type
+-- areas["areaname"].tag
+-- areas["areaname"].channelName
+-- areas["areaname"].channelPassword
+-- areas["areaname"].chatWindowName
+-- areas["areaname"].areaOnScreenName
+-- areas["areaname"].soundToPlay
+
+-- Message area types.
+EMA.AREA_TYPE_DEFAULT_CHAT = 1
+--EMA.AREA_TYPE_SPECIFIC_CHAT = 2
+EMA.AREA_TYPE_WHISPER = 3
+EMA.AREA_TYPE_PARTY = 4
+EMA.AREA_TYPE_GUILD = 5
+EMA.AREA_TYPE_GUILD_OFFICER = 6
+EMA.AREA_TYPE_RAID = 7
+EMA.AREA_TYPE_RAID_WARNING = 8
+--EMA.AREA_TYPE_CHANNEL = 9
+--EMA.AREA_TYPE_PARROT = 10
+--EMA.AREA_TYPE_MSBT = 11
+EMA.AREA_TYPE_MUTE = 12
+
+-- Message area types names and uses information.
+EMA.areaTypes = {}
+-- Default chat window.
+EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT] = {}
+EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].name = L["DEFAULT_CHAT_WINDOW"]
+EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesTag = true
+EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesChannel = false
+EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesChatWindowName = false
+EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].mustBeWired = true
+EMA.areaTypes[EMA.AREA_TYPE_DEFAULT_CHAT].usesSound = true
+-- Specific chat window.
+--[[
+EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT] = {}
+EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].name = L["Specific Chat Window"]
+EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesTag = true
+EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesChannel = false
+EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesChatWindowName = true
+EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].mustBeWired = true
+EMA.areaTypes[EMA.AREA_TYPE_SPECIFIC_CHAT].usesSound = true
+]]--
+-- Whisper.
+EMA.areaTypes[EMA.AREA_TYPE_WHISPER] = {}
+EMA.areaTypes[EMA.AREA_TYPE_WHISPER].name = L["WHISPER"]
+EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesTag = true
+EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesChannel = false
+EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesChatWindowName = false
+EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_WHISPER].mustBeWired = true
+EMA.areaTypes[EMA.AREA_TYPE_WHISPER].usesSound = true
+-- Party.
+EMA.areaTypes[EMA.AREA_TYPE_PARTY] = {}
+EMA.areaTypes[EMA.AREA_TYPE_PARTY].name = L["PARTY"]
+EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesTag = false
+EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesChannel = false
+EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesChatWindowName = false
+EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_PARTY].mustBeWired = false
+EMA.areaTypes[EMA.AREA_TYPE_PARTY].usesSound = true
+-- Guild.
+EMA.areaTypes[EMA.AREA_TYPE_GUILD] = {}
+EMA.areaTypes[EMA.AREA_TYPE_GUILD].name = L["GUILD"]
+EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesTag = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesChannel = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesChatWindowName = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD].mustBeWired = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD].usesSound = true
+-- Guild Officer.
+EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER] = {}
+EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].name = L["GUILD_OFFICER"]
+EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesTag = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesChannel = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesChatWindowName = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].mustBeWired = false
+EMA.areaTypes[EMA.AREA_TYPE_GUILD_OFFICER].usesSound = true
+-- Raid.
+EMA.areaTypes[EMA.AREA_TYPE_RAID] = {}
+EMA.areaTypes[EMA.AREA_TYPE_RAID].name = L["RAID"]
+EMA.areaTypes[EMA.AREA_TYPE_RAID].usesTag = false
+EMA.areaTypes[EMA.AREA_TYPE_RAID].usesChannel = false
+EMA.areaTypes[EMA.AREA_TYPE_RAID].usesChatWindowName = false
+EMA.areaTypes[EMA.AREA_TYPE_RAID].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_RAID].mustBeWired = false
+EMA.areaTypes[EMA.AREA_TYPE_RAID].usesSound = true
+-- Raid Warning.
+EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING] = {}
+EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].name = L["RAID_WARNING"]
+EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesTag = true
+EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesChannel = false
+EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesChatWindowName = false
+EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].mustBeWired = true
+EMA.areaTypes[EMA.AREA_TYPE_RAID_WARNING].usesSound = true
+-- Private Channel.
+--[[
+EMA.areaTypes[EMA.AREA_TYPE_CHANNEL] = {}
+EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].name = L["Channel"]
+EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesTag = false
+EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesChannel = true
+EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesChatWindowName = false
+EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].mustBeWired = false
+EMA.areaTypes[EMA.AREA_TYPE_CHANNEL].usesSound = true
+--]]
+-- Mute.
+EMA.areaTypes[EMA.AREA_TYPE_MUTE] = {}
+EMA.areaTypes[EMA.AREA_TYPE_MUTE].name = L["MUTE"]
+EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesTag = false
+EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesChannel = false
+EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesChatWindowName = false
+EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesScreen = false
+EMA.areaTypes[EMA.AREA_TYPE_MUTE].mustBeWired = false
+EMA.areaTypes[EMA.AREA_TYPE_MUTE].usesSound = false
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		["areas"] = {
+			{
+				["type"] = 1,
+				["name"] = L["DEFAULT_MESSAGE"],
+				["tag"] = EMAPrivate.Tag.MasterTag(),
+			},
+			{
+				["type"] = 8,
+				["name"] = L["DEFAULT_WARNING"],
+				["tag"] = EMAPrivate.Tag.MasterTag(),
+				["soundToPlay"] = "EMA: RaidWarning",
+			},
+			{
+				["type"] = 12,
+				["name"] = L["MUTE_POFILE"],
+			},
+		},
+	},
+}
+
+ EMA.simpleAreaList = {}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = "group",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-message push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_MESSAGE = "EMAMessageMessage"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-- Master changed, parameter: new master name.
+EMA.MESSAGE_MESSAGE_AREAS_CHANGED = "EMAMessageMessageAreasChanged"
+
+-------------------------------------------------------------------------------------------------------------
+-- Constants used by module.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	-- Update the settings area list.
+	EMA:SettingsAreaListScrollRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.areas = EMAUtilities:CopyTable( settings.areas )
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Area management.
+-------------------------------------------------------------------------------------------------------------
+
+local function MessageAreaList()
+	EMAUtilities:ClearTable( EMA.simpleAreaList )
+	for index, area in ipairs( EMA.db.areas ) do
+		EMA.simpleAreaList[area.name] = area.name
+	end
+	table.sort( EMA.simpleAreaList )
+	return EMA.simpleAreaList
+end
+
+local function GetAreaByName( areaName )
+	for index, area in ipairs( EMA.db.areas ) do
+		if area.name == areaName then
+			return area
+		end
+	end
+	return nil
+end
+
+local function GetAreaAtPosition( position )
+	return EMA.db.areas[position]
+end
+
+local function SetAreaAtPosition( position, areaInformation )
+	EMA.db.areas[position] = areaInformation
+end
+
+local function GetAreaListMaxPosition()
+	return #EMA.db.areas
+end
+
+local function DoesAreaListContainArea( name )
+	local containsArea = false
+	for index, area in ipairs( EMA.db.areas ) do
+		if area.name == name then
+			containsArea = true
+			break
+		end
+	end
+	return containsArea
+end
+
+local function AddArea( name )
+	if DoesAreaListContainArea( name ) == false then
+		-- Add a new area.
+		local newArea = {}
+		newArea.name = name
+		newArea.type = EMA.AREA_TYPE_DEFAULT_CHAT
+		table.insert( EMA.db.areas, newArea )
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		EMA:SendMessage( EMA.MESSAGE_MESSAGE_AREAS_CHANGED )
+	end
+end
+
+local function RemoveArea( name )
+	if DoesAreaListContainArea( name ) == true then
+		local areaIndex = 0
+		for index, area in ipairs( EMA.db.areas ) do
+			if area.name == name then
+				areaIndex = index
+				break
+			end
+		end
+		if areaIndex ~= 0 then
+			table.remove( EMA.db.areas, areaIndex )
+			-- Send a message to any listeners that the message areas have changed.
+			EMA:SendMessage( EMA.MESSAGE_MESSAGE_AREAS_CHANGED )
+		end
+	end
+end
+
+function EMA:AddAreaGUI( name )
+	AddArea( name )
+	EMA:SettingsAreaListScrollRefresh()
+end
+
+function EMA:RemoveAreaGUI()
+	local area = GetAreaAtPosition( EMA.settingsControl.areaListHighlightRow )
+	RemoveArea( area.name )
+	EMA.settingsControl.areaListHighlightRow = 1
+	EMA:SettingsAreaListScrollRefresh()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateAreaList()
+	-- Position and size constants.
+	local areaListButtonControlWidth = 125
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local top = EMAHelperSettings:TopOfSettings()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local areaListWidth = headingWidth
+	-- Team list internal variables (do not change).
+	EMA.settingsControl.areaListHighlightRow = 1
+	EMA.settingsControl.areaListOffset = 1
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	top = top - headingHeight
+	-- Create a heading.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MESSAGE_AREA_LIST"], top, false )
+	-- Create an area list frame.
+
+	local list = {}
+	list.listFrameName = "EMAMessageSettingsAreaListFrame"
+	list.parentFrame = EMA.settingsControl.widgetSettings.content
+	list.listTop = top - headingHeight
+	list.listLeft = left
+	list.listWidth = areaListWidth
+	list.rowHeight = 20
+	list.rowsToDisplay = 8
+	list.columnsToDisplay = 2
+	list.columnInformation = {}
+	list.columnInformation[1] = {}
+	list.columnInformation[1].width = 60
+	list.columnInformation[1].alignment = "LEFT"
+	list.columnInformation[2] = {}
+	list.columnInformation[2].width = 40
+	list.columnInformation[2].alignment = "LEFT"
+	list.scrollRefreshCallback = EMA.SettingsAreaListScrollRefresh
+	list.rowClickCallback = EMA.SettingsAreaListRowClick
+	EMA.settingsControl.areaList = list
+	EMAHelperSettings:CreateScrollList( EMA.settingsControl.areaList )
+	-- Position and size constants (once list height is known).
+	local bottomOfList = top - headingHeight - list.listHeight - verticalSpacing
+	local bottomOfSection = bottomOfList - verticalSpacing - buttonHeight - verticalSpacing
+	-- Create buttons.
+	EMA.settingsControl.areaListButtonAdd = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		areaListButtonControlWidth,
+		left,
+		bottomOfList,
+		L["ADD"],
+		EMA.SettingsAddClick,
+		L["ADD_MSG_HELP"]
+	)
+	EMA.settingsControl.areaListButtonRemove = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		areaListButtonControlWidth,
+		left + horizontalSpacing + areaListButtonControlWidth,
+		bottomOfList,
+		L["REMOVE"],
+		EMA.SettingsRemoveClick,
+		L["REMOVE_MSG_HELP"]
+	)
+
+	return bottomOfSection
+end
+
+local function SettingsCreateAreaTypes( top )
+	local areaListButtonControlWidth = 125
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - (horizontalSpacing  * 3)) / 2
+	local column1Left = left
+	local column2Left = left + halfWidth + (horizontalSpacing * 3)
+	local areaConfigurationTop = top - headingHeight
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	top = top - headingHeight
+	--Main Heading
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MESSAGE_AREA_CONFIGURATION"], top, false )
+	EMA.settingsControl.areaTypeDropdown = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		areaConfigurationTop,
+		L["MESSAGE_AREA"]
+	)
+	areaConfigurationTop = areaConfigurationTop - dropdownHeight
+	local areaList = {}
+	for areaType, areaTypeInformation in pairs( EMA.areaTypes ) do
+		areaList[areaType] = areaTypeInformation.name
+	end
+	EMA.settingsControl.areaTypeDropdown:SetList( areaList )
+	EMA.settingsControl.areaTypeDropdown:SetCallback( "OnValueChanged", EMA.UpdateAreaTypeControls )
+	EMA.settingsControl.areaEditBoxTag = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		areaConfigurationTop,
+		L["GROUP"]
+	)
+	EMA.settingsControl.areaEditBoxTag:SetCallback( "OnEnterPressed", EMA.EditBoxTagChanged )
+	areaConfigurationTop = areaConfigurationTop - dropdownHeight
+	EMA.settingsControl.areaEditBoxName = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		areaConfigurationTop,
+		L["NAME"]
+	)
+	EMA.settingsControl.areaEditBoxName:SetCallback( "OnEnterPressed", EMA.EditBoxNameChanged )
+	areaConfigurationTop = areaConfigurationTop - dropdownHeight
+	EMA.settingsControl.areaEditBoxPassword = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		areaConfigurationTop,
+		L["PASSWORD"]
+	)
+	EMA.settingsControl.areaEditBoxPassword:SetCallback( "OnEnterPressed", EMA.EditBoxPasswordChanged )
+	areaConfigurationTop = areaConfigurationTop - dropdownHeight
+	EMA.settingsControl.areaOnScreenDropdown = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		areaConfigurationTop,
+		L["AREA"]
+	)
+	EMA.settingsControl.areaOnScreenDropdown:SetCallback( "OnValueChanged", EMA.UpdateAreaOnScreenControls )
+	areaConfigurationTop = areaConfigurationTop - dropdownHeight
+	areaConfigurationTop = areaConfigurationTop - verticalSpacing - verticalSpacing
+	EMA.settingsControl.areaSoundDropdown = EMAHelperSettings:CreateMediaSound(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		areaConfigurationTop,
+		L["SOUND_TO_PLAY"]
+	)
+	EMA.settingsControl.areaSoundDropdown:SetCallback( "OnValueChanged", EMA.UpdateSoundControls )
+
+	areaConfigurationTop = areaConfigurationTop - dropdownHeight
+	areaConfigurationTop = areaConfigurationTop - verticalSpacing - verticalSpacing
+	EMA.settingsControl.areaListButtonUpdate = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		areaListButtonControlWidth,
+		column1Left,
+		areaConfigurationTop,
+		L["SAVE"],
+		EMA.SettingsUpdateClick
+	)
+	areaConfigurationTop = areaConfigurationTop - buttonHeight
+	EMA.settingsControl.areaEditBoxTag:SetDisabled( true )
+	EMA.settingsControl.areaEditBoxTag:SetText( "" )
+	EMA.settingsControl.areaEditBoxName:SetDisabled( true )
+	EMA.settingsControl.areaEditBoxName:SetText( "" )
+	EMA.settingsControl.areaEditBoxPassword:SetDisabled( true )
+	EMA.settingsControl.areaEditBoxPassword:SetText( "" )
+	EMA.settingsControl.areaOnScreenDropdown:SetDisabled( true )
+	EMA.settingsControl.areaOnScreenDropdown:SetText( "" )
+	EMA.settingsControl.areaSoundDropdown:SetDisabled( true )
+	EMA.settingsControl.areaSoundDropdown:SetText( "" )
+	local bottomOfSection = areaConfigurationTop
+	return bottomOfSection
+end
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	-- Create the area list controls.
+	local bottomOfAreaList = SettingsCreateAreaList()
+	-- Create the area type configuration controls.
+	local bottomOfAreaTypes = SettingsCreateAreaTypes( bottomOfAreaList )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfAreaTypes )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Callbacks.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsAreaListScrollRefresh()
+	FauxScrollFrame_Update(
+		EMA.settingsControl.areaList.listScrollFrame,
+		GetAreaListMaxPosition(),
+		EMA.settingsControl.areaList.rowsToDisplay,
+		EMA.settingsControl.areaList.rowHeight
+	)
+
+	EMA.settingsControl.areaListOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.areaList.listScrollFrame )
+	for iterateDisplayRows = 1, EMA.settingsControl.areaList.rowsToDisplay do
+		-- Reset.
+		EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
+		EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.areaList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
+		-- Get data.
+		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.areaListOffset
+		if dataRowNumber <= GetAreaListMaxPosition() then
+			-- Put area name and type into columns.
+			local areaInformation = GetAreaAtPosition( dataRowNumber )
+			local areaName = areaInformation.name
+			local areaType = EMA.areaTypes[areaInformation.type].name
+			EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[1].textString:SetText( areaName )
+			EMA.settingsControl.areaList.rows[iterateDisplayRows].columns[2].textString:SetText( areaType )
+			-- Highlight the selected row.
+			if dataRowNumber == EMA.settingsControl.areaListHighlightRow then
+				EMA.settingsControl.areaList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
+			end
+		end
+	end
+end
+
+function EMA:UpdateAreaTypeControls( event, areaTypeIdentifier )
+	EMA.currentlySelectedAreaTypeIdentifier = areaTypeIdentifier
+	local areaType = EMA.areaTypes[areaTypeIdentifier]
+	-- Disable all controls.
+	EMA.settingsControl.areaEditBoxTag:SetDisabled( true )
+	EMA.settingsControl.areaEditBoxName:SetDisabled( true )
+	EMA.settingsControl.areaEditBoxPassword:SetDisabled( true )
+	EMA.settingsControl.areaOnScreenDropdown:SetDisabled( true )
+	EMA.settingsControl.areaSoundDropdown:SetDisabled( true )
+	-- Enable controls if they are used.
+	if areaType.usesTag == true then
+		EMA.settingsControl.areaEditBoxTag:SetDisabled( false )
+	end
+	if areaType.usesChannel == true then
+		EMA.settingsControl.areaEditBoxName:SetDisabled( false )
+		EMA.settingsControl.areaEditBoxPassword:SetDisabled( false )
+	end
+	if areaType.usesChatWindowName == true then
+		EMA.settingsControl.areaEditBoxName:SetDisabled( false )
+	end
+	if areaType.usesScreen == true then
+		-- Nothing here anymore!
+
+	end
+	if areaType.usesSound == true then
+		EMA.settingsControl.areaSoundDropdown:SetDisabled( false )
+	end
+end
+
+local function UpdateAreaTypeInformation()
+	-- Update the area type controls to reflect the information for this selection.
+	local areaInformation = GetAreaAtPosition( EMA.settingsControl.areaListHighlightRow )
+	local areaType = EMA.areaTypes[areaInformation.type]
+	-- Set the area type control.
+	EMA.settingsControl.areaTypeDropdown:SetValue( areaInformation.type )
+	EMA:UpdateAreaTypeControls( "OnValueChanged", areaInformation.type )
+	-- Clear controls.
+	EMA.settingsControl.areaEditBoxTag:SetText( "" )
+	EMA.settingsControl.areaEditBoxName:SetText( "" )
+	EMA.settingsControl.areaEditBoxPassword:SetText( "" )
+	EMA.settingsControl.areaOnScreenDropdown:SetText( "" )
+	-- Populate controls if they are used.
+	if areaType.usesTag == true then
+		EMA.settingsControl.areaEditBoxTag:SetText( areaInformation.tag )
+		EMA.currentEditBoxTagText = areaInformation.tag
+	end
+	if areaType.usesChannel == true then
+		EMA.settingsControl.areaEditBoxName:SetText( areaInformation.channelName )
+		EMA.currentEditBoxNameText = areaInformation.channelName
+		EMA.settingsControl.areaEditBoxPassword:SetText( areaInformation.channelPassword )
+		EMA.currentEditBoxPasswordText = areaInformation.channelPassword
+	end
+	if areaType.usesChatWindowName == true then
+		EMA.settingsControl.areaEditBoxName:SetText( areaInformation.chatWindowName )
+		EMA.currentEditBoxNameText = areaInformation.chatWindowName
+	end
+	if areaType.usesScreen == true then
+		EMA.settingsControl.areaOnScreenDropdown:SetValue( areaInformation.areaOnScreenName )
+		EMA:UpdateAreaOnScreenControls( "OnValueChanged", areaInformation.areaOnScreenName )
+	end
+	if areaType.usesSound == true then
+		EMA.settingsControl.areaSoundDropdown:SetValue( areaInformation.soundToPlay )
+	end
+end
+
+function EMA:SettingsAreaListRowClick( rowNumber, columnNumber )
+	if EMA.settingsControl.areaListOffset + rowNumber <= GetAreaListMaxPosition() then
+		EMA.settingsControl.areaListHighlightRow = EMA.settingsControl.areaListOffset + rowNumber
+		UpdateAreaTypeInformation()
+		EMA:SettingsAreaListScrollRefresh()
+	end
+end
+
+function EMA:EditBoxTagChanged( event, text )
+	EMA.currentEditBoxTagText = text
+end
+
+function EMA:EditBoxNameChanged( event, text )
+	EMA.currentEditBoxNameText = text
+end
+
+function EMA:EditBoxPasswordChanged( event, text )
+	EMA.currentEditBoxPasswordText = text
+end
+
+local function SetAreaConfigurationIntoCurrentArea()
+	-- Get information from table at position.
+	local areaInformation = GetAreaAtPosition( EMA.settingsControl.areaListHighlightRow )
+	-- Update the area type for this area.
+	areaInformation.type = EMA.currentlySelectedAreaTypeIdentifier
+	-- Get the area information.
+	local areaType = EMA.areaTypes[areaInformation.type]
+	-- Update the area information according to the area type.
+	if areaType.usesTag == true then
+		areaInformation.tag = EMA.currentEditBoxTagText
+	end
+	if areaType.usesChannel == true then
+		areaInformation.channelName = EMA.currentEditBoxNameText
+		areaInformation.channelPassword = EMA.currentEditBoxPasswordText
+	end
+	if areaType.usesChatWindowName == true then
+		areaInformation.chatWindowName = EMA.currentEditBoxNameText
+	end
+	if areaType.usesScreen == true then
+		areaInformation.areaOnScreenName = EMA.currentlySelectedAreaOnScreenName
+	end
+	if areaType.usesSound == true then
+		areaInformation.soundToPlay = EMA.currentlySelectedAreaSoundToPlay
+	end
+	-- Put information back into table at position.
+	SetAreaAtPosition( EMA.settingsControl.areaListHighlightRow, areaInformation )
+	-- Refresh the settings.
+	EMA:SettingsRefresh()
+end
+
+function EMA:UpdateAreaOnScreenControls( event, areaOnScreenName )
+	EMA.currentlySelectedAreaOnScreenName = areaOnScreenName
+end
+
+function EMA:UpdateSoundControls( event, value )
+	EMA.settingsControl.areaSoundDropdown:SetValue( value )
+	EMA.currentlySelectedAreaSoundToPlay = value
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsUpdateClick( event )
+	SetAreaConfigurationIntoCurrentArea()
+end
+
+function EMA:SettingsAddClick( event )
+	StaticPopup_Show( "EMAMESSAGE_ASK_AREA_NAME" )
+end
+
+function EMA:SettingsRemoveClick( event )
+	local area = GetAreaAtPosition( EMA.settingsControl.areaListHighlightRow )
+	StaticPopup_Show( "EMAMESSAGE_CONFIRM_REMOVE_AREA", area.name )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Popup Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialize Popup Dialogs.
+local function InitializePopupDialogs()
+   StaticPopupDialogs["EMAMESSAGE_ASK_AREA_NAME"] = {
+        text = L["STATICPOPUP_ADD_MSG"],
+        button1 = ACCEPT,
+        button2 = CANCEL,
+        hasEditBox = 1,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+		OnShow = function( self )
+			self.editBox:SetText("")
+            self.button1:Disable()
+            self.editBox:SetFocus()
+        end,
+        OnAccept = function( self )
+			EMA:AddAreaGUI( self.editBox:GetText() )
+		end,
+        EditBoxOnTextChanged = function( self )
+            if not self:GetText() or self:GetText():trim() == "" then
+				self:GetParent().button1:Disable()
+            else
+                self:GetParent().button1:Enable()
+            end
+        end,
+		EditBoxOnEnterPressed = function( self )
+            if self:GetParent().button1:IsEnabled() then
+				EMA:AddAreaGUI( self:GetText() )
+            end
+            self:GetParent():Hide()
+        end,
+    }
+   StaticPopupDialogs["EMAMESSAGE_CONFIRM_REMOVE_AREA"] = {
+        text = L["REMOVE_MESSAGE_AREA"],
+        button1 = YES,
+        button2 = NO,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function( self )
+			EMA:RemoveAreaGUI()
+		end,
+    }
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	EMA.currentlySelectedAreaTypeIdentifier = EMA.AREA_TYPE_DEFAULT_CHAT
+	EMA.currentEditBoxTagText = ""
+	EMA.currentEditBoxNameText = ""
+	EMA.currentEditBoxPasswordText = ""
+	EMA.currentlySelectedAreaOnScreenName = ""
+	EMA.currentlySelectedAreaSoundToPlay = ""
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+	-- Click the area list first row, column to set the child controls.
+	EMA:SettingsAreaListRowClick( 1, 1 )
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	-- Kickstart the settings team list scroll frame.
+	EMA:SettingsAreaListScrollRefresh()
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Send messages.
+-------------------------------------------------------------------------------------------------------------
+
+local function DefaultMessageArea()
+	return L["DEFAULT_MESSAGE"]
+end
+
+local function DefaultWarningArea()
+	return L["DEFAULT_WARNING"]
+end
+
+local function DisplayMessageDefaultChat( sender, message, suppressSender )
+	local senderName = Ambiguate(sender, "none")
+	local chatTimestamp = ""
+	if (CHAT_TIMESTAMP_FORMAT) then
+		chatTimestamp = BetterDate( CHAT_TIMESTAMP_FORMAT, time() )
+	end
+	local completeMessage = chatTimestamp
+	if suppressSender == false then
+		completeMessage = completeMessage.."|Hplayer:"..sender.."|h["..senderName.."]|h"..L[": "]
+	end
+	completeMessage = completeMessage..message
+	DEFAULT_CHAT_FRAME:AddMessage( completeMessage )
+end
+
+local function DisplayMessageChatWhisper( sender, message, suppressSender )
+	-- The whisper comes across the wire and you whisper yourself...
+	-- If we clean up EMA-msg then we can remove this maybe again Eboyn TODO::::
+	EMAPrivate.Communications.SendChatMessage( message, "WHISPER", sender, EMAPrivate.Communications.COMMUNICATION_PRIORITY_ALERT )
+end
+
+local function DisplayMessageChat( sender, message, chatDestination, suppressSender )
+	local canSend = false
+	if (chatDestination == "GUILD" or chatDestination == "OFFICER") then
+		if IsInGuild() then
+			canSend = true
+		else
+			EMA:Print( L["ERROR: Not in a Guild"] )
+		end
+	end
+	if chatDestination == "PARTY" then
+		if GetNumSubgroupMembers() > 0 then
+			canSend = true
+		else
+			EMA:Print( L["ERROR: Not in a Party"] )
+		end
+	end
+	if chatDestination == "RAID" then
+		if GetNumGroupMembers() > 0 and IsInRaid() then
+			canSend = true
+		else
+			EMA:Print( L["ERROR: Not in a Raid"] )
+		end
+	end
+	if canSend == true then
+		-- If we clean up EMA-msg then we can remove this maybe again Eboyn TODO::::
+		EMAPrivate.Communications.SendChatMessage( message, chatDestination, nil, EMAPrivate.Communications.COMMUNICATION_PRIORITY_ALERT )
+	else
+		EMA:Print( message )
+	end
+end
+
+local function DisplayMessageRaidWarning( sender, message, suppressSender )
+	local completeMessage = ""
+	local senderName = Ambiguate(sender, "none")
+	if suppressSender == false then
+		completeMessage = completeMessage..senderName..L[": "]
+	end
+	completeMessage = completeMessage..message
+	RaidNotice_AddMessage( RaidWarningFrame, completeMessage, ChatTypeInfo["RAID_WARNING"] )
+end
+
+
+local function PlayMessageSound( soundToPlay )
+	PlaySoundFile( Media:Fetch( 'sound', soundToPlay ), "Ambience" )
+end
+
+local function ProcessReceivedMessage( sender, areaName, message, suppressSender, ... )
+	-- Get the area requested.
+	local area = GetAreaByName( areaName )
+	if area == nil then
+		EMA:Print( L["ERROR: Could not find area: A"]( areaName ) )
+		EMA:Print( message )
+		return
+	end
+	-- What sort of area is this?
+	local areaType = EMA.areaTypes[area.type]
+	-- Does this area type use tags?  If so, check the tag.
+	if areaType.usesTag == true then
+		if EMAPrivate.Tag.DoesCharacterHaveTag( EMA.characterName, area.tag ) == false then
+			-- Tag not on this character, bail.
+			return
+		end
+	end
+	-- Display the message.
+	if area.type == EMA.AREA_TYPE_DEFAULT_CHAT then
+		DisplayMessageDefaultChat( sender, message, suppressSender )
+	end
+	if area.type == EMA.AREA_TYPE_SPECIFIC_CHAT then
+		-- TODO
+	end
+	if area.type == EMA.AREA_TYPE_WHISPER then
+		DisplayMessageChatWhisper( sender, message, suppressSender )
+	end
+	if area.type == EMA.AREA_TYPE_PARTY then
+		DisplayMessageChat( sender, message, "PARTY", suppressSender )
+	end
+	if area.type == EMA.AREA_TYPE_GUILD then
+		DisplayMessageChat( sender, message, "GUILD", suppressSender )
+	end
+	if area.type == EMA.AREA_TYPE_GUILD_OFFICER then
+		DisplayMessageChat( sender, message, "OFFICER", suppressSender )
+	end
+	if area.type == EMA.AREA_TYPE_RAID then
+		DisplayMessageChat( sender, message, "RAID", suppressSender )
+	end
+	if area.type == EMA.AREA_TYPE_RAID_WARNING then
+		DisplayMessageRaidWarning( sender, message, suppressSender )
+	end
+	if area.type == EMA.AREA_TYPE_CHANNEL then
+		-- TODO
+	end
+--[[
+	if area.type == EMA.AREA_TYPE_PARROT then
+		DisplayMessageParrot( sender, message, area.areaOnScreenName, suppressSender )
+	end
+	if area.type == EMA.AREA_TYPE_MSBT then
+		DisplayMessageMikSBT( sender, message, area.areaOnScreenName, suppressSender )
+	end
+]]
+	if area.type == EMA.AREA_TYPE_MUTE then
+		-- Do nothing! Mute means eat the message.
+	end
+	if areaType.usesSound == true and area.soundToPlay ~= "None" then
+		PlayMessageSound(area.soundToPlay)
+	end
+end
+
+local function SendMessage( areaName, message, suppressSender, ... )
+	-- Get the area requested.
+	local area = GetAreaByName( areaName )
+	if area == nil then
+		EMA:Print( L["ERR_COULD_NOT_FIND_AREA"]( areaName ) )
+
+		EMA:Print( message )
+		return
+	end
+	-- What sort of area is this?
+	local areaType = EMA.areaTypes[area.type]
+	-- Does this area type use tags?  If so, find out if the message needs to be sent over the wire.
+	local sendToJustMe = false
+	if areaType.usesTag == true then
+		--if area.tag == EMAPrivate.Tag.JustMeTag() then
+		--	sendToJustMe = true
+		--end
+		if area.tag == EMAPrivate.Tag.MasterTag() and EMAPrivate.Team.IsCharacterTheMaster( EMA.characterName ) == true then
+			sendToJustMe = true
+		end
+	end
+	-- Send over the wire or process locally?
+	if sendToJustMe == true or areaType.mustBeWired == false then
+		ProcessReceivedMessage( EMA.characterName, areaName, message, suppressSender, ... )
+	else
+		EMA:EMASendCommandToTeam( EMA.COMMAND_MESSAGE, areaName, message, suppressSender, ... )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Commands.
+-------------------------------------------------------------------------------------------------------------
+
+-- A EMA command has been recieved.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if commandName == EMA.COMMAND_MESSAGE then
+		ProcessReceivedMessage( characterName, ... )
+	end
+end
+
+-- Functions available from EMA Message for other EMA internal objects.
+EMAPrivate.Message.SendMessage = SendMessage
+
+-- Functions available for other addons.
+EMAApi.MessageAreaList = MessageAreaList
+EMAApi.DefaultMessageArea = DefaultMessageArea
+EMAApi.DefaultWarningArea = DefaultWarningArea
+EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED = EMA.MESSAGE_MESSAGE_AREAS_CHANGED
diff --git a/EMA/Core/Module.lua b/EMA/Core/Module.lua
new file mode 100644
index 0000000..5d9303a
--- /dev/null
+++ b/EMA/Core/Module.lua
@@ -0,0 +1,148 @@
+-- ================================================================================ --
+--				EMA EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )    --
+--				Current Author: Jennifer Cally (Ebony)								--
+--				Copyright 2015 - 2018 Jennifer Cally "Ebony"						--
+--																					--
+--				License: The MIT License (MIT)										--
+--				Copyright (c) 2008-2015  Michael "Jafula" Miller					--
+--																					--
+-- ================================================================================ --
+
+local MAJOR, MINOR = "Module-1.0", 1
+local EMAModule, oldMinor = LibStub:NewLibrary( MAJOR, MINOR )
+
+if not EMAModule then
+	return
+end
+
+-- Load libraries.
+LibStub( "AceConsole-3.0" ):Embed( EMAModule )
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA Module Mixin Management.
+-------------------------------------------------------------------------------------------------------------
+
+-- A list of modules that embed this module.
+EMAModule.embeddedModules = EMAModule.embeddedModules or {}
+
+-- These methods are the embbedable methods.
+
+local mixinMethods = {
+	"EMARegisterModule", "EMAModuleInitialize",
+	"EMASendCommandToTeam", "EMASendCommandToMaster",
+	"EMASendMessageToTeam", "EMASendCommandToToon",
+	"EMASendSettings", "EMAOnSettingsReceived",
+	"EMAChatCommand",
+	"EMAConfigurationGetSetting", "EMAConfigurationSetSetting",
+}
+
+-- Embed all the embeddable methods into the target module.
+function EMAModule:Embed( targetModule )
+	for key, value in pairs( mixinMethods ) do
+		targetModule[value] = self[value]
+	end
+	LibStub( "AceConsole-3.0" ):Embed( targetModule )
+	self.embeddedModules[targetModule] = true
+	return targetModule
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA Module Registration.
+-------------------------------------------------------------------------------------------------------------
+
+-- Register a module with EMA.  EMA needs modules to be registered in order to faciliate communications.
+function EMAModule:EMARegisterModule( moduleName )
+	EMAPrivate.Core.RegisterModule( self, moduleName )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA Communications.
+-------------------------------------------------------------------------------------------------------------
+
+-- Send settings to all available EMA Team characters.
+function EMAModule:EMASendSettings()
+	EMAPrivate.Core.SendSettings( self, self.db )
+end
+
+-- Send a command to all available EMA Team characters.
+function EMAModule:EMASendCommandToTeam( commandName, ... )
+	EMAPrivate.Core.SendCommandToTeam( self, commandName, ... )
+end
+
+-- Send a command to just the master character.
+function EMAModule:EMASendCommandToMaster( commandName, ... )
+	EMAPrivate.Core.SendCommandToMaster( self, commandName, ... )
+end
+
+function EMAModule:EMASendCommandToToon( characterName, commandName, ... )
+	EMAPrivate.Core.SendCommandToToon( self, characterName, commandName, ... )
+end
+
+-- Send a message to the team.
+function EMAModule:EMASendMessageToTeam( areaName, message, suppressSender, ... )
+	EMAPrivate.Message.SendMessage( areaName, message, suppressSender, ... )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA Chat Commands.
+-------------------------------------------------------------------------------------------------------------
+
+-- Handle the chat command.
+function EMAModule:EMAChatCommand( input )
+    if not input or input:trim() == "" then
+		EMAPrivate.SettingsFrame.Widget:Show()
+		EMAPrivate.SettingsFrame.TreeGroupStatus.groups[self.parentDisplayName] = true
+		EMAPrivate.SettingsFrame.WidgetTree:SelectByPath( self.parentDisplayName, self.moduleDisplayName )
+		EMAPrivate.SettingsFrame.Tree.ButtonClick( nil, nil, self.moduleDisplayName, false)
+    else
+        LibStub( "AceConfigCmd-3.0" ):HandleCommand( self.chatCommand, self.moduleName, input )
+    end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Module initialization and settings management.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMAModule:EMAModuleInitialize( settingsFrame )
+    -- Create the settings database supplying the settings values along with defaults.
+    self.completeDatabase = LibStub( "AceDB-3.0" ):New( self.settingsDatabaseName, self.settings )
+	self.db = self.completeDatabase.profile
+	-- Create the settings.
+	LibStub( "AceConfig-3.0" ):RegisterOptionsTable( self.moduleName, self:GetConfiguration() )
+	self.settingsFrame = settingsFrame
+	-- Register the chat command for this module.
+	self:RegisterChatCommand( self.chatCommand, "EMAChatCommand" )
+	-- Remember the characters name.
+	-- If server has a space in realm name GetRealmName() will show space this will not work with blizzard API so we need to hack this to work --ebony
+	--local _, k = UnitFullName("player")
+	local k = GetRealmName()
+	local realm = k:gsub( "%s+", "")
+	self.characterRealm = realm
+	self.characterNameLessRealm = UnitName( "player" )
+	--self.characterName = UnitFullName( "player" )
+	self.characterName = self.characterNameLessRealm.."-"..self.characterRealm
+	--self.characterName = UnitFullName("player")
+	self.characterGUID = UnitGUID( "player" )
+	-- Register this module with EMA.
+	self:EMARegisterModule( self.moduleName )
+end
+
+-- Get a settings value.
+function EMAModule:EMAConfigurationGetSetting( key )
+	return self.db[key[#key]]
+end
+
+-- Set a settings value.
+function EMAModule:EMAConfigurationSetSetting( key, value )
+	self.db[key[#key]] = value
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Upgrade Library.
+-------------------------------------------------------------------------------------------------------------
+
+-- Upgrade all modules that are already using this library to use the newer version.
+for targetModule, value in pairs( EMAModule.embeddedModules ) do
+	EMAModule:Embed( targetModule )
+end
diff --git a/EMA/Core/Tag.lua b/EMA/Core/Tag.lua
new file mode 100644
index 0000000..c77fc7b
--- /dev/null
+++ b/EMA/Core/Tag.lua
@@ -0,0 +1,771 @@
+-- ================================================================================ --
+--				EMA EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )    --
+--				Current Author: Jennifer Cally (Ebony)								--
+--				Copyright 2015 - 2018 Jennifer Cally "Ebony"						--
+--																					--
+--				License: The MIT License (MIT)										--
+--				Copyright (c) 2008-2015  Michael "Jafula" Miller					--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Tag",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0"
+)
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local AceGUI = LibStub( "AceGUI-3.0" )
+
+-- Constants required by EMAModule and Locale for this module.
+EMA.moduleName = "Tag"
+EMA.settingsDatabaseName = "TagProfileDB"
+EMA.chatCommand = "ema-group"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["TEAM"]
+EMA.moduleDisplayName = L["GROUP_LIST"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\GroupIcon.tga"
+-- order
+EMA.moduleOrder = 10
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+        tagList = {},
+		groupList = {}
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = "group",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			add = {
+				type = "input",
+				name = L["ADD"],
+				desc = L["ADD_TAG_HELP"],
+				usage = "/EMA-group add <NewGroupName>",
+				get = false,
+				set = "AddTagCommand",
+			},
+			remove = {
+				type = "input",
+				name = L["REMOVE"],
+				desc = L["REMMOVE_TAG_HELP"],
+				usage = "/EMA-group remove <NewGroupName>",
+				get = false,
+				set = "RemoveTagCommand",
+			},
+			addtogroup = {
+				type = "input",
+				name = L["ADD_TO_GROUP"],
+				desc = L["ADD_TO_GROUP_HELP"],
+				usage = "/EMA-group addtogroup <characterName> <GroupName>",
+				get = false,
+				set = "AddToGroupCommand",
+			},
+			removefromgroup = {
+				type = "input",
+				name = L["REMOVE_FROM_GROUP"],
+				desc = L["REMOVE_FROM_GROUP_HELP"],
+				usage = "/EMA-group removefromgroup <characterName> <NewGroupName>",
+				get = false,
+				set = "RemovefromGroupCommand",
+			},
+			push = {
+				type = "input",
+				name = L["PUSH_ALL_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-tag push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+EMA.GROUP_LIST_CHANGED = "EMAMessageGroupListChanged"
+-------------------------------------------------------------------------------------------------------------
+-- Constants used by module.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateGroupList()
+	-- Position and size constants.
+	local top = EMAHelperSettings:TopOfSettings()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local iconSize = 30
+	local iconHight = iconSize + 10
+	local lefticon =  left + iconSize
+	local teamListWidth = headingWidth - 90
+	local topOfList = top - headingHeight
+	-- Team list internal variables (do not change).
+	EMA.settingsControl.teamListHighlightRow = 1
+	EMA.settingsControl.teamListOffset = 1
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	topOfList = topOfList - headingHeight
+	--Main Heading
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["GROUP_LIST"], top, false )
+	-- Create a team list frame.
+
+	local list = {}
+	list.listFrameName = "EMATagSettingsGroupListFrame"
+	list.parentFrame = EMA.settingsControl.widgetSettings.content
+	list.listTop = topOfList
+	list.listLeft = lefticon
+	list.listWidth = teamListWidth
+	list.rowHeight = 20
+	list.rowsToDisplay = 15
+	list.columnsToDisplay = 1
+	list.columnInformation = {}
+	list.columnInformation[1] = {}
+	list.columnInformation[1].width = 100
+	list.columnInformation[1].alignment = "LEFT"
+	list.scrollRefreshCallback = EMA.SettingsGroupListScrollRefresh
+	list.rowClickCallback = EMA.SettingsGroupListRowClick
+	EMA.settingsControl.groupList = list
+	EMAHelperSettings:CreateScrollList( EMA.settingsControl.groupList )
+	-- Position and size constants (once list height is known).
+	local bottomOfList = topOfList - list.listHeight - verticalSpacing
+
+	EMA.settingsControl.tagListButtonAdd = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\CharAddParty.tga", --icon Image
+		left - iconSize - 11,
+		topOfList - verticalSpacing ,
+		L[""],
+		EMA.SettingsAddClick,
+		L["BUTTON_TAG_ADD_HELP"]
+	)
+	EMA.settingsControl.groupListButtonRemove = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\CharRemoveParty.tga", --icon Image
+		left - iconSize - 11,
+		topOfList - verticalSpacing - iconHight,
+		L[""],
+		EMA.SettingsRemoveClick,
+		L["BUTTON_TAG_REMOVE_HELP"]
+	)
+	local bottomOfSection = bottomOfList -  buttonHeight - verticalSpacing
+
+	return bottomOfSection
+end
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	-- Create the team list controls.
+	local bottomOfGroupList = SettingsCreateGroupList()
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	-- Update the settings team list.
+	EMA:SettingsGroupListScrollRefresh()
+	--EMA:SettingsTagListScrollRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.tagList = EMAUtilities:CopyTable( settings.tagList )
+		EMA.db.groupList = EMAUtilities:CopyTable( settings.groupList )
+		EMA:InitializeAllTagsList()
+		-- New team and tag lists coming up, highlight first item in each list.
+		EMA.settingsControl.groupListHighlightRow = 1
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		EMA:SettingsGroupListRowClick( 1, 1 )
+		EMA:SendMessage( EMA.GROUP_LIST_CHANGED )
+		EMAApi.refreshDropDownList()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Popup Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialize Popup Dialogs.
+local function InitializePopupDialogs()
+   -- Ask the name of the tag to add as to the character.
+   StaticPopupDialogs["EMATAG_ASK_TAG_NAME"] = {
+        text = L["NEW_GROUP_NAME"],
+        button1 = ACCEPT,
+        button2 = CANCEL,
+        hasEditBox = 1,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+		OnShow = function( self )
+			self.editBox:SetText("")
+            self.button1:Disable()
+            self.editBox:SetFocus()
+        end,
+		OnAccept = function( self )
+			EMA:AddTagGUI( self.editBox:GetText() )
+		end,
+		EditBoxOnTextChanged = function( self )
+            if not self:GetText() or self:GetText():trim() == "" then
+				self:GetParent().button1:Disable()
+            else
+                self:GetParent().button1:Enable()
+            end
+        end,
+		EditBoxOnEnterPressed = function( self )
+            if self:GetParent().button1:IsEnabled() then
+				EMA:AddTagGUI( self:GetText() )
+            end
+            self:GetParent():Hide()
+        end,
+    }
+   -- Confirm removing characters from member list.
+   StaticPopupDialogs["EMATAG_CONFIRM_REMOVE_TAG"] = {
+        text = L["REMOVE_FROM_TAG_LIST"],
+		button1 = ACCEPT,
+        button2 = CANCEL,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function( self )
+			EMA:RemoveTagGUI()
+		end,
+    }
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Group Management.
+-------------------------------------------------------------------------------------------------------------
+
+local function AllTag()
+	return L["ALL_LOWER"]
+end
+
+local function MasterTag()
+	return L["MASTER_LOWER"]
+end
+
+local function MinionTag()
+	return L["MINION_LOWER"]
+end
+
+local function GroupList()
+	return EMA.db.groupList
+end
+
+-- Does the Group list have this tag?
+local function DoesGroupExist( group )
+	local tag = EMAUtilities:Lowercase(group)
+	local haveTag = false
+	for index, findTag in ipairs( EMA.db.groupList ) do
+		--EMA:Print("find", findTag, index )
+		if findTag == tag then
+			haveTag = true
+			break
+		end
+	end
+	return haveTag
+end
+
+local function AddGroup( group )
+	if group ~= nil then
+		if DoesGroupExist( group ) == false then
+			table.insert( EMA.db.groupList, group )
+			table.sort( EMA.db.groupList )
+			EMAApi.refreshDropDownList()
+			EMA:SendMessage( EMA.GROUP_LIST_CHANGED )
+		end
+	end
+end
+
+-- If Calling to Remove a group we should Use EMAApi.RemoveGroup( Groupname ) or RemoveGroup then using This
+local function RemoveFromGroupList( tag )
+	if DoesGroupExist( tag ) == true then
+		for index, group in pairs( EMA.db.groupList ) do
+			if group == tag then
+			table.remove( EMA.db.groupList, index )
+			table.sort( EMA.db.groupList )
+			end
+		end
+	EMA:SettingsGroupListScrollRefresh()
+	EMAApi.refreshDropDownList()
+	EMA:SendMessage( EMA.GROUP_LIST_CHANGED )
+	end
+end
+
+local function RemoveGroup( tag )
+	--  We don't Want to Tag to be part of the character Groups as it has been removed!
+	for characterName, tagList in pairs( EMA.db.tagList ) do
+		for index, tagIterated in ipairs( tagList ) do
+			if tagIterated == tag then
+				--EMA:Print("Remove tag:", tag, "from character:", characterName )
+				EMAApi.RemoveGroupFromCharacter( characterName, tag )
+			end
+		end
+	end
+	RemoveFromGroupList( tag )
+	EMA:SettingsGroupListScrollRefresh()
+	EMAPrivate.Team.RefreshGroupList()
+	EMA:SendMessage( EMA.GROUP_LIST_CHANGED )
+end
+
+-- We Do Not Want To Remove "System" Groups!
+local function IsASystemGroup( tag )
+	if tag == MasterTag() or tag == MinionTag() or tag == AllTag() then
+		return true
+	end
+	--[[
+	for id, apiClass in pairs( CLASS_SORT_ORDER ) do
+		if tag == EMAUtilities:Lowercase(apiClass) then
+			return true
+		end
+	end
+	]]
+	return false
+end
+
+local function GetGroupListMaximumOrder()
+	local largestPosition = 0
+	for groupId, tag in pairs( EMA.db.groupList ) do
+		if groupId > largestPosition then
+			largestPosition = groupId
+		end
+	end
+	return largestPosition
+end
+
+local function GetGroupAtPosition( position )
+	--EMA:Print("test", position )
+	groupAtPosition = nil
+		for groupId, groupName in pairs( EMA.db.groupList ) do
+			if groupId == position then
+				--EMA:Print("cptest",characterName, groupId, groupName)
+				groupAtPosition = groupName
+			end
+		end
+	return groupAtPosition
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Team Group Management.
+-------------------------------------------------------------------------------------------------------------
+
+local function TeamGroupList()
+	return EMA.db.groupList
+end
+
+local function IsCharacterInGroup( characterName, group )
+	local tag = EMAUtilities:Lowercase(group)
+	local DoesCharacterHaveTag = false
+	for name, tagList in pairs( EMA.db.tagList ) do
+		if characterName == name then
+			for index, tagIterated in pairs( tagList ) do
+				if tag == tagIterated then
+					DoesCharacterHaveTag = true
+				end
+			end
+		end
+	end
+	return DoesCharacterHaveTag
+end
+
+local function GetGroupListForCharacter( characterName )
+	--EMA:Print("getList", characterName)
+	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	if EMA.db.tagList[characterName] ~= nil then
+		return EMA.db.tagList[characterName]
+	end
+end
+
+local function CharacterMaxGroups()
+	--return EMA.characterTagList
+	local maxOrder = 0
+	for characterName, tagList in pairs( EMA.db.tagList ) do
+		for index, tag in pairs( tagList ) do
+			if index >= maxOrder then
+				maxOrder = index
+			end
+		end
+	end
+	return maxOrder
+end
+
+local function DisplayGroupsForCharacter( characterName )
+	EMA.characterTagList = GetGroupListForCharacter( characterName )
+	table.sort( EMA.characterTagList )
+	EMA:SettingsGroupListScrollRefresh()
+end
+
+local function CharacterAlreadyInGroup( characterName, tag )
+	local canAdd = false
+	for name, tagList in pairs( EMA.db.tagList ) do
+		if characterName == name then
+			for index, tagIterated in pairs( tagList ) do
+				if tag == tagIterated then
+					canAdd = true
+				end
+			end
+		end
+	return canAdd
+	end
+end
+
+local function AddCharacterToGroup( characterName, tag )
+	if characterName == nil or tag == nil then
+		return
+	end
+	-- We Add The GroupName To The characterName in the list!
+	for name, tagList in pairs( EMA.db.tagList ) do
+		if characterName == name then
+			local allReadyInGroup = CharacterAlreadyInGroup( characterName, tag )
+			--EMA:Print("hereWeAddTOTagList", characterName, tag, allReadyInGroup)
+			if allReadyInGroup == false then
+				table.insert(  tagList, tag )
+				table.sort ( tagList )
+			end
+		end
+	end
+end
+
+local function RemoveGroupFromCharacter( characterName, tag )
+	if characterName == nil or tag == nil then
+		return
+	end
+	-- We Remove a GroupName From the characterName in the list!
+	for name, tagList in pairs( EMA.db.tagList ) do
+		if characterName == name then
+			for index, tagIterated in pairs( tagList ) do
+				if tag == tagIterated then
+					--EMA:Print("timetoRemovetag")
+					table.remove( tagList, index )
+					table.sort( tagList )
+				end
+			end
+		end
+	end
+end
+
+-- This should abeble to be removed now.
+-- this can be used to add a character that you already know the name of the table. [characterTable] [GroupName/Tag]
+local function AddTag( tagList, tag )
+	table.insert( tagList, tag )
+	AddGroup( tag )
+	EMA:SettingsGroupListScrollRefresh()
+	EMAPrivate.Team.RefreshGroupList()
+end
+
+--TODO ADD CLASS TO LIST
+local function CheckSystemTagsAreCorrect()
+	for characterName, characterPosition in EMAPrivate.Team.TeamList() do
+		--EMA:Print("CHeckTags", characterName)
+		local characterTagList = GetGroupListForCharacter( characterName )
+		-- Do we have a tagList for this character? if not make one!
+		if characterTagList == nil then
+			EMA.db.tagList[characterName] = {}
+		end
+		-- Make sure all characters have the "all" tag.
+		if IsCharacterInGroup ( characterName, AllTag() ) == false then
+			AddCharacterToGroup( characterName, AllTag() )
+		end
+		-- Find Class and add If Known.
+
+
+
+		-- Master or minion?
+		if EMAPrivate.Team.IsCharacterTheMaster( characterName ) == true then
+			--EMA:Print("Master", characterName, characterTagList)
+			if IsCharacterInGroup ( characterName, MasterTag() ) == false then
+				AddCharacterToGroup( characterName, MasterTag() )
+			end
+			if IsCharacterInGroup ( characterName, MinionTag() ) == true then
+				RemoveGroupFromCharacter( characterName, MinionTag() )
+			end
+		else
+			-- Make sure minions have the minion tag and not the master tag.
+			if IsCharacterInGroup ( characterName, MasterTag() ) == true then
+				RemoveGroupFromCharacter( characterName, MasterTag() )
+			end
+			if IsCharacterInGroup ( characterName, MinionTag() ) == false then
+				AddCharacterToGroup( characterName, MinionTag() )
+			end
+		end
+	end
+end
+
+-- Initialise the The Group list.
+function EMA:InitializeAllTagsList()
+	-- Add system tags to the list.
+	AddGroup( AllTag() )
+	AddGroup( MasterTag() )
+	AddGroup( MinionTag() )
+	for id, class in pairs( CLASS_SORT_ORDER ) do
+		AddGroup( EMAUtilities:Lowercase(class) )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- GUI & Command Lines & Other Addons Acess.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:AddTagGUI( group )
+	local tag = EMAUtilities:Lowercase( group )
+	-- Cannot add a system tag.
+	if IsASystemGroup( tag ) == false then
+		-- Cannot add a tag that already exists.
+		if DoesGroupExist( tag ) == false then
+			-- Add tag, resort and display.
+			AddGroup( tag )
+			EMA:SettingsGroupListScrollRefresh()
+		end
+	end
+end
+
+function EMA:RemoveTagGUI()
+	local tag = GetGroupAtPosition( EMA.settingsControl.groupListHighlightRow )
+	-- Cannot remove a system tag.
+	if IsASystemGroup( tag ) == false then
+		RemoveGroup( tag )
+	end
+end
+
+-- Add Group to group list from the command line.
+function EMA:AddTagCommand( info, parameters )
+	local tag = EMAUtilities:Lowercase( parameters )
+	--local characterName, tag = strsplit( " ", inputText )
+	if IsASystemGroup( tag ) == false then
+		-- Cannot add a tag that already exists.
+		if DoesGroupExist( tag ) == false then
+			AddGroup( tag )
+			EMA:SettingsGroupListScrollRefresh()
+		end
+	end
+end
+
+-- Add Group to group list from the command line.
+function EMA:AddToGroupCommand( info, parameters )
+	--local inputText = EMAUtilities:Lowercase( parameters )
+	local characterName, tag = strsplit( " ", parameters )
+	EMA:Print("test", characterName, tag )
+	if characterName ~= nil or tag ~= nil then
+		if DoesGroupExist( tag ) == false then
+			EMA:SettingsGroupListScrollRefresh()
+		end
+	else
+	EMA:Print("[PH]"..L["WRONG_TEXT_INPUT_GROUP"] )
+	end
+end
+
+
+-- Remove tag from character from the command line.
+function EMA:RemoveTagCommand( info, parameters )
+	local inputText = EMAUtilities:Lowercase( parameters )
+	local characterName, tag = strsplit( " ", inputText )
+
+
+end
+
+function EMA:OnMasterChanged( message, characterName )
+	CheckSystemTagsAreCorrect()
+	EMA:SettingsRefresh()
+end
+
+function EMA:OnCharacterAdded( message, characterName )
+	CheckSystemTagsAreCorrect()
+	EMA:SettingsRefresh()
+end
+
+function EMA:OnCharacterRemoved( message, characterName )
+	EMA.db.tagList[characterName] = nil
+	EMA:SettingsRefresh()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Callbacks.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsGroupListScrollRefresh()
+	FauxScrollFrame_Update(
+		EMA.settingsControl.groupList.listScrollFrame,
+		GetGroupListMaximumOrder(),
+		EMA.settingsControl.groupList.rowsToDisplay,
+		EMA.settingsControl.groupList.rowHeight
+	)
+
+	EMA.settingsControl.groupListOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.groupList.listScrollFrame )
+	for iterateDisplayRows = 1, EMA.settingsControl.groupList.rowsToDisplay do
+		-- Reset.
+		EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.groupList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
+		-- Get data.
+		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.groupListOffset
+		if dataRowNumber <= GetGroupListMaximumOrder() then
+			-- Put character name into columns.
+			local group = GetGroupAtPosition( dataRowNumber )
+			local groupName = EMAUtilities:Capitalise( group )
+			EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetText( groupName )
+			-- System tags are Yellow.
+			if IsASystemGroup( group ) == true then
+				EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
+			end
+			-- Highlight the selected row.
+			if dataRowNumber == EMA.settingsControl.groupListHighlightRow then
+				EMA.settingsControl.groupList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
+			end
+		end
+	end
+end
+
+function EMA:SettingsGroupListRowClick( rowNumber, columnNumber )
+	if EMA.settingsControl.groupListOffset + rowNumber <= GetGroupListMaximumOrder() then
+		EMA.settingsControl.groupListHighlightRow = EMA.settingsControl.groupListOffset + rowNumber
+		EMA:SettingsGroupListScrollRefresh()
+	end
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsAddClick( event )
+	StaticPopup_Show( "EMATAG_ASK_TAG_NAME" )
+end
+
+function EMA:SettingsRemoveClick( event )
+	local group = GetGroupAtPosition( EMA.settingsControl.groupListHighlightRow )
+	StaticPopup_Show( "EMATAG_CONFIRM_REMOVE_TAG", group )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Current character tag list.
+	EMA.characterTagList = {}
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+	-- Initialise the all tags list.
+	EMA:InitializeAllTagsList()
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	-- Make sure all the system tags are correct.
+	CheckSystemTagsAreCorrect()
+	EMA:RegisterMessage( EMAPrivate.Team.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
+	EMA:RegisterMessage( EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_ADDED, "OnCharacterAdded" )
+	EMA:RegisterMessage( EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_REMOVED, "OnCharacterRemoved" )
+	-- Kickstart the settings team and tag list scroll frame.
+	EMA:SettingsGroupListScrollRefresh()
+	-- Click the first row in the team list table to populate the tag list table.
+	EMA:SettingsGroupListRowClick( 1, 1 )
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Commands.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:EMAOnCommandReceived( sender, commandName, ... )
+end
+
+-- Functions available for other addons EMA-EE > v8
+-- Group List API
+EMAApi.GroupList = GroupList
+EMAApi.GROUP_LIST_CHANGED = EMA.GROUP_LIST_CHANGED
+EMAApi.DoesGroupExist = DoesGroupExist
+EMAApi.IsASystemGroup = IsASystemGroup
+EMAApi.GetGroupListMaximumOrder = GetGroupListMaximumOrder
+EMAApi.GetGroupAtPosition = GetGroupAtPosition
+EMAApi.AddGroup = AddGroup
+EMAApi.RemoveGroup = RemoveGroup
+
+--Character Group API
+EMAApi.TeamGroupList = TeamGroupList
+EMAApi.IsCharacterInGroup = IsCharacterInGroup
+EMAApi.GetGroupListForCharacter = GetGroupListForCharacter
+EMAApi.CharacterMaxGroups = CharacterMaxGroups
+EMAApi.AddCharacterToGroup = AddCharacterToGroup
+EMAApi.RemoveGroupFromCharacter = RemoveGroupFromCharacter
+EMAApi.CharacterAlreadyInGroup = CharacterAlreadyInGroup
+EMAApi.PushGroupSettings = EMA.SettingsPushSettingsClick
+
+-- SystemTags API
+EMAApi.AllGroup = AllTag
+EMAApi.MasterGroup = MasterTag
+EMAApi.MinionGroup = MinionTag
+
+-- Old Way, most modules need to be rewiren/udated to support the new API
+-- but for now we should keep this here incase we Mass Up Somewhere -- Ebony
+EMAPrivate.Tag.MasterTag = MasterTag
+EMAPrivate.Tag.MinionTag = MinionTag
+EMAPrivate.Tag.AllTag = AllTag
+EMAPrivate.Tag.DoesCharacterHaveTag = IsCharacterInGroup
+EMAApi.DoesCharacterHaveTag = IsCharacterInGroup
+EMAApi.AllTag = AllTag
diff --git a/EMA/Core/Team.lua b/EMA/Core/Team.lua
new file mode 100644
index 0000000..c614625
--- /dev/null
+++ b/EMA/Core/Team.lua
@@ -0,0 +1,1948 @@
+-- ================================================================================ --
+--				EMA EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )    --
+--				Current Author: Jennifer Cally (Ebony)								--
+--				Copyright 2015 - 2018 Jennifer Cally "Ebony"						--
+--																					--
+--				License: The MIT License (MIT)										--
+--				Copyright (c) 2008-2015  Michael "Jafula" Miller					--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Team",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+
+-- Constants required by EMAModule and Locale for this module.
+EMA.moduleName = "Team"
+EMA.settingsDatabaseName = "TeamProfileDB"
+EMA.chatCommand = "ema-team"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["TEAM"]
+EMA.moduleDisplayName = L["TEAM"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\TeamCore.tga"
+-- order
+EMA.moduleOrder = 20
+
+
+-- EMA key bindings.
+BINDING_HEADER_TEAM = L["TEAM"]
+BINDING_NAME_TEAMINVITE = L["INVITE_GROUP"]
+BINDING_NAME_TEAMDISBAND = L["DISBAND_GROUP"]
+BINDING_NAME_TEAMMASTER = L["SET_MASTER"]
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		master = "",
+        teamList = {},
+		newTeamList = {},
+	--	isboxerSync = true,
+		masterChangePromoteLeader = false,
+		inviteAcceptTeam = true,
+		inviteAcceptFriends = false,
+		inviteAcceptGuild = false,
+		inviteDeclineStrangers = false,
+		inviteConvertToRaid = true,
+		inviteSetAllAssistant = false,
+		masterChangeClickToMove = false,
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = "group",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			add = {
+				type = "input",
+				name = L["ADD"],
+				desc = L["ADD_HELP"],
+				usage = "/EMA-team add <name>",
+				get = false,
+				set = "AddMemberCommand",
+			},
+			remove = {
+				type = "input",
+				name = L["REMOVE"],
+				desc = L["REMOVE_REMOVE"],
+				usage = "/EMA-team remove <name>",
+				get = false,
+				set = "RemoveMemberCommand",
+			},
+			master = {
+				type = "input",
+				name = L["MASTER"],
+				desc = L["MASTER_HELP"],
+				usage = "/EMA-team master <name> <tag>",
+				get = false,
+				set = "CommandSetMaster",
+			},
+			iammaster = {
+				type = "input",
+				name = L["I_AM_MASTER"],
+				desc = L["I_AM_MASTER_HELP"],
+				usage = "/EMA-team iammaster <tag>",
+				get = false,
+				set = "CommandIAmMaster",
+			},
+			invite = {
+				type = "input",
+				name = L["INVITE"],
+				desc = L["INVITE_HELP"],
+				usage = "/EMA-team invite",
+				get = false,
+				set = "InviteTeamToParty",
+			},
+			disband = {
+				type = "input",
+				name = L["DISBAND"],
+				desc = L["DISBAND_HELP"],
+				usage = "/EMA-team disband",
+				get = false,
+				set = "DisbandTeamFromParty",
+			},
+			addparty = {
+				type = "input",
+				name = L["ADD_GROUPS_MEMBERS"],
+				desc = L["ADD_GROUPS_MEMBERS_HELP"],
+				usage = "/EMA-team addparty",
+				get = false,
+				set = "AddPartyMembers",
+			},
+			removeall = {
+				type = "input",
+				name = L["REMOVE_ALL_MEMBERS"],
+				desc = L["REMOVE_ALL_MEMBERS_HELP"],
+				usage = "/EMA-team removeall",
+				get = false,
+				set = "DoRemoveAllMembersFromTeam",
+			},
+			setalloffline = {
+				type = "input",
+				name = L["SET_TEAM_OFFLINE"],
+				desc = L["SET_TEAM_OFFLINE_HELP"] ,
+				usage = "/EMA-team setalloffline",
+				get = false,
+				set = "SetAllMembersOffline",
+			},
+			setallonline = {
+				type = "input",
+				name = L["SET_TEAM_ONLINE"],
+				desc = L["SET_TEAM_ONLINE_HELP"],
+				usage = "/EMA-team setallonline",
+				get = false,
+				set = "SetAllMembersOnline",
+			},
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-team push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+-- Create the character online table and ordered characters tables.
+EMA.orderedCharacters = {}
+EMA.orderedCharactersOnline = {}
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_TAG_PARTY = "EMATeamTagGroup"
+-- Leave party command.
+EMA.COMMAND_LEAVE_PARTY = "EMATeamLeaveGroup"
+-- Set master command.
+EMA.COMMAND_SET_MASTER = "EMATeamSetMaster"
+-- Set Minion OffLine
+EMA.COMMAND_SET_OFFLINE = "EMATeamSetOffline"
+EMA.COMMAND_SET_ONLINE = "EMATeamSetOnline"
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-- Master changed, parameter: new master name.
+EMA.MESSAGE_TEAM_MASTER_CHANGED = "EMATeamMasterChanged"
+-- Team order changed, no parameters.
+EMA.MESSAGE_TEAM_ORDER_CHANGED = "EMATeamOrderChanged"
+-- Character has been added, parameter: characterName.
+EMA.MESSAGE_TEAM_CHARACTER_ADDED = "EMATeamCharacterAdded"
+-- Character has been removed, parameter: characterName.
+EMA.MESSAGE_TEAM_CHARACTER_REMOVED = "EMATeamCharacterRemoved"
+-- character online
+EMA.MESSAGE_CHARACTER_ONLINE = "JmbTmChrOn"
+-- character offline
+EMA.MESSAGE_CHARACTER_OFFLINE = "JmbTmChrOf"
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Constants used by module.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.simpleAreaList = {}
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateTeamList()
+	-- Position and size constants.
+	local teamListButtonControlWidth = 250
+	local iconSize = 24
+	local groupListWidth = 200
+	local extaSpacing = 40
+	local rowHeight = 30
+	local rowsToDisplay = 8
+	local inviteDisbandButtonWidth = 105
+	local setMasterButtonWidth = 120
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local top = EMAHelperSettings:TopOfSettings()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local lefticon =  left + 35
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
+	local iconHight = iconSize + 10
+	local teamListWidth = headingWidth - teamListButtonControlWidth - horizontalSpacing
+	local leftOfList = left + horizontalSpacing
+	local rightOfList = teamListWidth + horizontalSpacing
+	local checkBoxWidth = (headingWidth - horizontalSpacing) / 2
+	local topOfList = top - headingHeight
+	local movingTop = top
+	-- Team list internal variables (do not change).
+	EMA.settingsControl.teamListHighlightRow = 1
+	EMA.settingsControl.teamListOffset = 1
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.labelOne = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		teamListButtonControlWidth,
+		teamListWidth / 2,
+		leftOfList,
+		L["TEAM_HEADER"]
+	)
+	EMA.settingsControl.labelTwo = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		teamListButtonControlWidth,
+
+		teamListButtonControlWidth + iconSize + groupListWidth,
+		leftOfList,
+		L["GROUPS_HEADER"]
+	)
+	-- Create a team list frame.
+	local list = {}
+	list.listFrameName = "EMATeamSettingsTeamListFrame"
+	list.parentFrame = EMA.settingsControl.widgetSettings.content
+	list.listTop = topOfList
+	list.listLeft = lefticon
+	list.listWidth = teamListWidth
+	list.rowHeight = rowHeight
+	list.rowsToDisplay = rowsToDisplay
+	list.columnsToDisplay = 3
+	list.columnInformation = {}
+	list.columnInformation[1] = {}
+	list.columnInformation[1].width = 30
+	list.columnInformation[1].alignment = "LEFT"
+	list.columnInformation[2] = {}
+	list.columnInformation[2].width = 55
+	list.columnInformation[2].alignment = "CENTER"
+	list.columnInformation[3] = {}
+	list.columnInformation[3].width = 15
+	list.columnInformation[3].alignment = "RIGHT"
+	list.scrollRefreshCallback = EMA.SettingsTeamListScrollRefresh
+	list.rowClickCallback = EMA.SettingsTeamListRowClick
+	EMA.settingsControl.teamList = list
+	EMAHelperSettings:CreateScrollList( EMA.settingsControl.teamList )
+	-- Group Frame
+	local listTwo = {}
+	listTwo.listFrameName = "EMATeamSettingsTeamListTwoFrame"
+	listTwo.parentFrame = EMA.settingsControl.widgetSettings.content
+	listTwo.listTop = topOfList
+	listTwo.listLeft = rightOfList + extaSpacing
+	listTwo.listWidth = groupListWidth
+	listTwo.rowHeight = rowHeight
+	listTwo.rowsToDisplay = rowsToDisplay
+	listTwo.columnsToDisplay = 1
+	listTwo.columnInformation = {}
+	listTwo.columnInformation[1] = {}
+	listTwo.columnInformation[1].width = 80
+	listTwo.columnInformation[1].alignment = "CENTER"
+	listTwo.scrollRefreshCallback = EMA.SettingsGroupListScrollRefresh
+	listTwo.rowClickCallback = EMA.SettingsGroupListRowClick
+	EMA.settingsControl.groupList = listTwo
+	EMAHelperSettings:CreateScrollList( EMA.settingsControl.groupList )
+	-- Position and size constants (once list height is known).
+	local bottomOfList = topOfList - list.listHeight - verticalSpacing
+	local bottomOfSection = bottomOfList -  dropdownHeight - verticalSpacing
+	--Create Icons
+	EMA.settingsControl.teamListButtonAdd = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\CharAdd.tga", --icon Image
+		left - iconSize - 11 ,
+		topOfList - verticalSpacing,
+		L[""],
+		EMA.SettingsAddClick,
+		L["BUTTON_ADD_HELP"]
+	)
+	EMA.settingsControl.teamListButtonParty = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\CharAddParty.tga", --icon Image
+		left - iconSize - 11 ,
+		topOfList - verticalSpacing - iconHight,
+		L[""],
+		EMA.SettingsAddPartyClick,
+		L["BUTTON_ADDALL_HELP"]
+	)
+--[[
+	EMA.settingsControl.teamListButtonAddIsboxerList = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\Isboxer_Add.tga", --icon Image
+		left - iconSize - 11 ,
+		topOfList - verticalSpacing - iconHight * 2,
+		L[""],
+		EMA.SettingsAddIsboxerListClick,
+		L["BUTTON_ISBOXERADD_HELP"]
+	)
+]]
+	EMA.settingsControl.teamListButtonMoveUp = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\CharUp.tga", --icon Image
+		left - iconSize - 11,
+		topOfList - verticalSpacing - iconHight * 3,
+		L[""],
+		EMA.SettingsMoveUpClick,
+		L["BUTTON_UP_HELP"]
+	)
+	EMA.settingsControl.teamListButtonMoveDown = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\CharDown.tga", --icon Image
+		left - iconSize - 11,
+		topOfList - verticalSpacing - iconHight * 4,
+		L[""],
+		EMA.SettingsMoveDownClick,
+		L["BUTTON_DOWN_HELP"]
+	)
+	EMA.settingsControl.teamListButtonRemove = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\CharRemove.tga", --icon Image
+		left - iconSize - 11 ,
+		topOfList - verticalSpacing - iconHight * 5,
+		L[""],
+		EMA.SettingsRemoveClick,
+		L["BUTTON_REMOVE_HELP"]
+	)
+	EMA.settingsControl.teamListButtonSetMaster = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\CharMaster.tga", --icon Image
+		left - iconSize - 11 ,
+		topOfList - verticalSpacing - iconHight * 6,
+		L[""],
+		EMA.SettingsSetMasterClick,
+		L["BUTTON_MASTER_HELP"]
+	)
+	EMA.settingsControl.teamListButtonRemoveFromGroup = EMAHelperSettings:Icon(
+		EMA.settingsControl,
+		iconSize,
+		iconSize,
+		"Interface\\Addons\\EMA\\Media\\CharRemoveParty.tga", --icon Image
+		rightOfList + dropBoxWidth + 11 ,
+		bottomOfList ,
+		L[""],
+		EMA.SettingsRemoveGroupClick,
+		L["BUTTON_GROUP_REMOVE_HELP"]
+	)
+	-- Group Mangent
+	EMA.settingsControl.teamListDropDownList = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		dropBoxWidth,
+		rightOfList + extaSpacing, -- horizontalSpacing,
+		bottomOfList + 11,
+		L["GROUP_LIST"]
+	)
+	EMA.settingsControl.teamListDropDownList:SetList( EMA.GroupAreaList() )
+	EMA.settingsControl.teamListDropDownList:SetCallback( "OnValueChanged",  EMA.TeamListDropDownList )
+--[[
+	-- IsboxerSync
+	EMA.settingsControl.teamListCheckBoxSyncIsboxer = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxWidth,
+		lefticon,
+		bottomOfList - 11,
+		L["CHECKBOX_ISBOXER_ADD"],
+		EMA.SettingsSyncIsboxerToggle,
+		L["CHECKBOX_ISBOXER_ADD_HELP"]
+	)
+]]
+	return bottomOfSection
+end
+
+local function SettingsCreateMasterControl( top )
+	-- Get positions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local checkBoxWidth = (headingWidth - horizontalSpacing) / 2
+	local column1Left = left
+	local column2Left = left + checkBoxWidth + horizontalSpacing
+	local bottomOfSection = top - headingHeight - (checkBoxHeight * 1) - (verticalSpacing * 3)
+	-- Create a heading.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MASTER_CONTROL"], top, false )
+	-- Create checkboxes.
+
+	EMA.settingsControl.masterControlCheckBoxMasterChange = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxWidth,
+		column1Left,
+		top - headingHeight,
+		L["CHECKBOX_MASTER_LEADER"],
+		EMA.SettingsMasterChangeToggle,
+		L["CHECKBOX_MASTER_LEADER_HELP"]
+	)
+	EMA.settingsControl.masterControlCheckBoxMasterChangeClickToMove = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxWidth,
+		column2Left,
+		top - headingHeight,
+		L["CHECKBOX_CTM"],
+		EMA.SettingsMasterChangeClickToMoveToggle,
+		L["CHECKBOX_CTM_HELP"]
+	)
+	return bottomOfSection
+end
+
+local function SettingsCreatePartyInvitationsControl( top )
+	-- Get positions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local checkBoxWidth = (headingWidth - horizontalSpacing) / 2
+	local column1Left = left
+	local column2Left = left + checkBoxWidth + horizontalSpacing
+	local bottomOfSection = top - headingHeight - (checkBoxHeight * 3) - (verticalSpacing * 2)
+	-- Create a heading.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PARTY_CONTROLS"], top, false )
+	-- Create checkboxes.
+	EMA.settingsControl.partyInviteControlCheckBoxConvertToRaid = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxWidth,
+		column1Left,
+		top - headingHeight,
+		L["CHECKBOX_CONVERT_RAID"],
+		EMA.SettingsinviteConvertToRaidToggle,
+		L["CHECKBOX_CONVERT_RAID_HELP"]
+	)
+	EMA.settingsControl.partyInviteControlCheckBoxSetAllAssist = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxWidth,
+		column2Left,
+		top - headingHeight,
+		L["CHECKBOX_ASSISTANT"],
+		EMA.SettingsinviteSetAllAssistToggle,
+		L["CHECKBOX_ASSISTANT_HELP"]
+	)
+	EMA.settingsControl.partyInviteControlCheckBoxAcceptMembers = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxWidth,
+		column1Left,
+		top - headingHeight - checkBoxHeight,
+		L["CHECKBOX_TEAM"],
+		EMA.SettingsAcceptInviteMembersToggle,
+		L["CHECKBOX_TEAM_HELP"]
+	)
+	EMA.settingsControl.partyInviteControlCheckBoxAcceptFriends = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxWidth,
+		column2Left,
+		top - headingHeight - checkBoxHeight,
+		L["CHECKBOX_ACCEPT_FROM_FRIENDS"],
+		EMA.SettingsAcceptInviteFriendsToggle,
+		L["CHECKBOX_ACCEPT_FROM_FRIENDS_HELP"]
+	)
+	EMA.settingsControl.partyInviteControlCheckBoxAcceptGuild = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxWidth,
+		column1Left,
+		top - headingHeight - checkBoxHeight - checkBoxHeight,
+		L["CHECKBOX_ACCEPT_FROM_GUILD"],
+		EMA.SettingsAcceptInviteGuildToggle,
+		L["CHECKBOX_ACCEPT_FROM_GUILD_HELP"]
+	)
+	EMA.settingsControl.partyInviteControlCheckBoxDeclineStrangers = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxWidth,
+		column1Left,
+		top - headingHeight  - checkBoxHeight - checkBoxHeight - checkBoxHeight,
+		L["CHECKBOX_DECLINE_STRANGERS"],
+		EMA.SettingsDeclineInviteStrangersToggle,
+		L["CHECKBOX_DECLINE_STRANGERS_HELP"]
+	)
+	return bottomOfSection
+end
+
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	-- Create the team list controls.
+	local bottomOfTeamList = SettingsCreateTeamList()
+	-- Create the master control controls.
+	local bottomOfMasterControl = SettingsCreateMasterControl( bottomOfTeamList )
+	-- Create the party invitation controls.
+	local bottomOfPartyInvitationControl = SettingsCreatePartyInvitationsControl( bottomOfMasterControl )
+	EMA.settingsControl.widgetSettings.content:SetHeight( - bottomOfPartyInvitationControl )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Popup Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialize Popup Dialogs.
+local function InitializePopupDialogs()
+   -- Ask the name of the character to add as a new member.
+   StaticPopupDialogs["EMATEAM_ASK_CHARACTER_NAME"] = {
+        text = L["STATICPOPUP_ADD"],
+        button1 = ACCEPT,
+        button2 = CANCEL,
+        hasEditBox = 1,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+		OnShow = function( self )
+			self.editBox:SetText("")
+            self.button1:Disable()
+            self.editBox:SetFocus()
+        end,
+		OnAccept = function( self )
+			EMA:AddMemberGUI( self.editBox:GetText() )
+		end,
+		EditBoxOnTextChanged = function( self )
+            if not self:GetText() or self:GetText():trim() == "" then
+				self:GetParent().button1:Disable()
+            else
+                self:GetParent().button1:Enable()
+            end
+        end,
+		EditBoxOnEnterPressed = function( self )
+            if self:GetParent().button1:IsEnabled() then
+				EMA:AddMemberGUI( self:GetText() )
+            end
+            self:GetParent():Hide()
+        end,
+    }
+   -- Confirm removing characters from member list.
+   StaticPopupDialogs["EMATEAM_CONFIRM_REMOVE_CHARACTER"] = {
+        text = L["STATICPOPUP_REMOVE"],
+        button1 = ACCEPT,
+        button2 = CANCEL,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function( self )
+			EMA:RemoveMemberGUI()
+		end,
+    }
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Team management.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:GroupAreaList()
+	table.sort( EMA.simpleAreaList )
+	return EMA.simpleAreaList
+end
+
+local function refreshDropDownList()
+	EMAUtilities:ClearTable( EMA.simpleAreaList )
+	EMA.simpleAreaList[" "] = " "
+	for id, tag in pairs( EMAApi.GroupList() ) do
+		local groupName =  EMAUtilities:Capitalise( tag )
+		EMA.simpleAreaList[groupName] = groupName
+	end
+	table.sort( EMA.simpleAreaList )
+	EMA.settingsControl.teamListDropDownList:SetList( EMA.simpleAreaList )
+end
+
+local function TeamList()
+	--return pairs( EMA.db.teamList )
+	local teamlist = {}
+	for name, info in pairs( EMA.db.newTeamList ) do
+		for _, charInfo in pairs (info) do
+			teamlist[name] = charInfo.order
+		end
+	end
+	return pairs( teamlist )
+end
+
+
+local function FullTeamList()
+	local fullTeamList = {}
+	for name, info in pairs ( EMA.db.newTeamList ) do
+		for _, charInfo in pairs (info) do
+		table.insert(fullTeamList, { charInfo.name, charInfo.order, charInfo.class, charInfo.online } )
+		end
+	end
+	return pairs( fullTeamList )
+end
+
+local function setClass()
+	for characterName, position in pairs( EMA.db.newTeamList ) do
+	local class, classFileName, classIndex = UnitClass( Ambiguate(characterName, "none") )
+		--EMA:Print("new", class, CharacterName )
+		if class ~= nil then
+			EMA.db.characterClass[characterName] = classFileName
+		end
+	end
+end
+
+local function GetClass( characterName )
+	local class = nil
+	local color = nil
+	for teamCharacterName, info in pairs( EMA.db.newTeamList ) do
+		if characterName == teamCharacterName then
+			for _, charInfo in pairs (info) do
+			--charInfo.class
+				--EMA:Print("classDatatest",  characterName, charInfo.class )
+				if charInfo.class ~= nil or charInfo.class ~= "UNKNOWN" then
+					class = EMAUtilities:Lowercase( charInfo.class )
+					color = RAID_CLASS_COLORS[charInfo.class]
+				end
+			end
+		end
+	end
+	return class, color
+end
+
+-- Get the largest order number from the team list.
+local function GetTeamListMaximumOrder()
+	local largestPosition = 0
+	for characterName, position in EMAApi.TeamList() do
+		if position > largestPosition then
+			largestPosition = position
+		end
+	end
+	return largestPosition
+end
+
+local function GetTeamListMaximumOrderOnline()
+	local totalMembersDisplayed = 0
+		for characterName, position in EMAApi.TeamList() do
+			if EMAApi.GetCharacterOnlineStatus( characterName ) == true then
+				totalMembersDisplayed = totalMembersDisplayed + 1
+			end
+		end
+	return totalMembersDisplayed
+end
+
+local function IsCharacterInTeam( name )
+	local characterName = EMAUtilities:Lowercase( name )
+	local isMember = false
+	if not isMember then
+		for fullCharacterName, position in EMAApi.TeamList() do
+			local checkFullName = EMAUtilities:Lowercase( fullCharacterName )
+			local name, realm = strsplit("-", checkFullName, 2 )
+			--EMA:Print('checking', name, 'vs', characterName, "or", checkFullName )
+			if name == characterName or checkFullName == characterName then
+				--EMA:Print('match found')
+				isMember = true
+				break
+			end
+		end
+	end
+	--EMA:Print('returning', isMember)
+	return isMember
+end
+
+
+-- Get the master for this character.
+local function GetMasterName()
+	return EMA.db.master
+end
+
+-- Return true if the character specified is in the master.
+local function IsCharacterTheMaster( characterName )
+	local isTheMaster = false
+	if characterName == GetMasterName() then
+		isTheMaster = true
+	end
+	return isTheMaster
+end
+
+-- Set the master for EMA character; the master character must be online.
+local function SetMaster( master )
+	-- Make sure a valid string value is supplied.
+	if (master ~= nil) and (master:trim() ~= "") then
+		-- The name must be capitalised i still like this or though its not needed.
+		--local character = EMAUtilities:Capitalise( master )
+		local character = EMAUtilities:AddRealmToNameIfMissing( master )
+		-- Only allow characters in the team list to be the master.
+		if IsCharacterInTeam( character ) == true then
+			-- Set the master.
+			EMA.db.master = character
+			-- Refresh the settings.
+			EMA:SettingsRefresh()
+			-- Send a message to any listeners that the master has changed.
+			EMA:SendMessage( EMA.MESSAGE_TEAM_MASTER_CHANGED, character )
+		else
+			-- Character not in team.  Tell the team.
+			EMA:EMASendMessageToTeam( EMA.characterName, L["A_IS_NOT_IN_TEAM"]( character ), false )
+		end
+	end
+end
+
+-- Add a member to the member list.
+local function AddMember( importName, class )
+	local name = nil
+	local singleName, realm = strsplit( "-" , importName, 2 )
+	local characterName = nil
+	local name = EMAUtilities:Capitalise( singleName )
+	if realm ~= nil then
+		characterName = name.."-"..realm
+	else
+		characterName = name
+	end
+	if characterName == "Target" then
+		local UnitIsPlayer = UnitIsPlayer("target")
+		if UnitIsPlayer == true then
+			local unitName = GetUnitName("target", true)
+			--EMA:Print("Target", unitName)
+			name = unitName
+		else
+			EMA:Print(L["TEAM_NO_TARGET"])
+			return
+		end
+	elseif characterName == "Mouseover"  then
+		local UnitIsPlayer = UnitIsPlayer("mouseover")
+		if UnitIsPlayer == true then
+			local unitName = GetUnitName("mouseover", true)
+			--EMA:Print("mouseover", unitName)
+			name = unitName
+		else
+			EMA:Print(L["TEAM_NO_TARGET"])
+			return
+		end
+	else
+		name = characterName
+	end
+	-- Wow names are at least two characters.
+	if name ~= nil and name:trim() ~= "" and name:len() > 1 then
+		-- If the character is not already in the list...
+		local character = EMAUtilities:AddRealmToNameIfMissing( name )
+		if EMA.db.newTeamList[character] == nil then
+			-- Get the maximum order number.
+			--Store TempData
+			local maxOrder = "0"
+			local CharacterClass = "UNKNOWN"
+			local Online = true
+			-- Real Data
+			local maxOrder = GetTeamListMaximumOrder()
+			if class ~= nil then
+				local upperClass = string.upper(class)
+				CharacterClass = upperClass
+			end
+			local _, classFileName = UnitClass( Ambiguate(character, "none") )
+			if classFileName ~= nil then
+				CharacterClass = classFileName
+			end
+			--EMA:Print("DebugAddToDB", "toon", character, "order", maxOrder, "class", CharacterClass, "online", Online )
+			EMA.db.newTeamList[character] = {}
+			table.insert( EMA.db.newTeamList[character], {name = character, order = maxOrder + 1, class = CharacterClass, online = Online } )
+			-- Send a message to any listeners that EMA character has been added.
+			EMA:SendMessage( EMA.MESSAGE_TEAM_CHARACTER_ADDED, character )
+			-- Refresh the settings.
+			EMA:SettingsRefresh()
+		end
+	end
+end
+
+-- Add all party/raid members to the member list. does not worl cross rwalm todo
+function EMA:AddPartyMembers()
+	 for iteratePartyMembers = 1, GetNumGroupMembers() do
+		--EMA:Print("party/raid", numberPartyMembers, iteratePartyMembers)
+		local inRaid = IsInRaid()
+		if inRaid == true then
+			local partyMemberName, partyMemberRealm = UnitName( "raid"..iteratePartyMembers )
+			local character = EMAUtilities:AddRealmToNameIfNotNil( partyMemberName, partyMemberRealm )
+			if partyMemberName ~= nil then
+				if IsCharacterInTeam( character ) == false then
+					AddMember( character )
+				end
+			end
+		else
+			local partyMemberName, partyMemberRealm = UnitName( "party"..iteratePartyMembers )
+			local character = EMAUtilities:AddRealmToNameIfNotNil( partyMemberName, partyMemberRealm )
+			if partyMemberName ~= nil then
+				if IsCharacterInTeam( character ) == false then
+					AddMember( character )
+				end
+			end
+		end
+	end
+end
+
+-- Add all isboxer team members to the member list. does not worl cross rwalm todo
+--[[
+function EMA:AddIsboxerMembers()
+	if IsAddOnLoaded("Isboxer" ) == true then
+		for characterName, teamStatus in pairs( EMA.IsboxerSyncList ) do
+			if IsCharacterInTeam( characterName ) == false then
+				if teamStatus == "add" and characterName ~= EMA.characterName then
+					AddMember( characterName )
+				end
+			end
+		end
+	end
+end
+]]
+-- Add a member to the member list.
+function EMA:AddMemberGUI( value )
+	AddMember( value )
+	EMA:SettingsTeamListScrollRefresh()
+end
+
+-- Add member from the command line.
+function EMA:AddMemberCommand( info, parameters )
+	--local characterName = EMAUtilities:Capitalise(parameters)
+	-- EMA-EE we No-longer remove character's from a team list when isboxer set's up the team we sync!
+	if info == nil then
+		--EMA:Print("isboxerContralRemove", parameters )
+		EMA.IsboxerSyncList[characterName] = "add"
+		return
+	end
+	-- Add the character.
+	AddMember( parameters )
+end
+
+-- Get the character name at a specific position.
+local function GetCharacterNameAtOrderPosition( position )
+	local characterNameAtPosition = ""
+	for characterName, characterPosition in EMAApi.TeamList() do
+		if characterPosition == position then
+			characterNameAtPosition = characterName
+			break
+		end
+	end
+	return characterNameAtPosition
+end
+
+-- Get the position for a specific character.
+local function GetPositionForCharacterName( findCharacterName )
+	local positionForCharacterName = 0
+	for characterName, characterPosition in EMAApi.TeamList() do
+		if characterName == findCharacterName then
+			positionForCharacterName = characterPosition
+			break
+		end
+	end
+	return positionForCharacterName
+end
+
+local function GetPositionForCharacterNameOnline( findCharacterName )
+	local positionForCharacterName = 0
+		for index, characterName in EMAApi.TeamListOrderedOnline() do
+			if characterName == findCharacterName then
+				--EMA:Print("found", characterName, index)
+				positionForCharacterName = index
+				--break
+			end
+	end
+	return positionForCharacterName
+end
+
+-- Swap character positions.
+local function TeamListSwapCharacterPositions( position1, position2 )
+	-- Get characters at positions.
+	local character1 = GetCharacterNameAtOrderPosition( position1 )
+	local character2 = GetCharacterNameAtOrderPosition( position2 )
+	for name, info in pairs (EMA.db.newTeamList) do
+		for _, charInfo in pairs (info) do
+			if name == character1 then
+				charInfo.order = position2
+			end
+			if name == character2 then
+				charInfo.order = position1
+			end
+		end
+	end
+end
+
+-- Makes sure that EMA character is a team member.  Enables if previously not a member.
+local function ConfirmCharacterIsInTeam()
+	--EMA:Print("test", EMA.characterName)
+	if not IsCharacterInTeam( EMA.characterName ) then
+		-- Then add as a member.
+		AddMember( EMA.characterName )
+	end
+end
+
+-- Make sure there is a master, if none, set this character.
+local function ConfirmThereIsAMaster()
+	-- Read the db option for master.  Is it set?
+	if EMA.db.master:trim() == "" then
+		-- No, set it to self.
+		SetMaster( EMA.characterName )
+	end
+	-- Is the master in the member list?
+	if not IsCharacterInTeam( EMA.db.master ) then
+		-- No, set self as master.
+		SetMaster( EMA.characterName )
+	end
+end
+
+-- Remove a member from the member list.
+local function RemoveMember( importName )
+	local singleName, singleRealm = strsplit( "-" , importName, 2 )
+	local characterName = nil
+	local name = EMAUtilities:Capitalise( singleName )
+	local realm = EMAUtilities:Capitalise( singleRealm )
+	if realm ~= nil then
+		characterName = name.."-"..realm
+	else
+		characterName = name
+	end
+	-- Is character in team?
+	if IsCharacterInTeam( characterName ) == true and characterName ~= EMA.characterName then
+		-- Remove character from list.
+		local characterPosition = EMAApi.GetPositionForCharacterName( characterName )
+		-- If any character had an order greater than this character's order, then shift their order down by one.
+		for name, position in EMAApi.TeamList() do
+			if position > characterPosition then
+				for checkName, info in pairs (EMA.db.newTeamList) do
+					for _, charInfo in pairs (info) do
+						if name == checkName then
+							charInfo.order = position - 1
+						end
+					end
+				end
+			end
+		end
+		-- Send a message to any listeners that this character has been removed.
+		EMA:SendMessage( EMA.MESSAGE_TEAM_CHARACTER_REMOVED, characterName )
+		-- Make sure EMA character is a member.
+		ConfirmCharacterIsInTeam()
+		-- Make sure there is a master, if none, set this character.
+		ConfirmThereIsAMaster()
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Resets to Top of list!
+		EMA.db.newTeamList[characterName] = nil
+		EMA:SettingsTeamListRowClick( 1, 1 )
+	else
+		EMA:Print("[PH] CAN NOT REMOVE SELF")
+	end
+end
+
+-- Provides a GUI for a user to confirm removing selected members from the member list.
+function EMA:RemoveMemberGUI()
+	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
+	RemoveMember( characterName )
+	EMA.settingsControl.teamListHighlightRow = 1
+	EMA:SettingsTeamListScrollRefresh()
+	EMA:SettingsGroupListScrollRefresh()
+end
+
+
+-- Remove member from the command line.
+function EMA:RemoveMemberCommand( info, parameters )
+	local characterName = EMAUtilities:Capitalise(parameters)
+	-- EMA-EE we No-longer remove character's from a team list when isboxer set's up the team we sync!
+	if info == nil then
+		--EMA.IsboxerSyncList[characterName] = "remove"
+		return
+	end
+	--EMA:Print("testremove", info, parameters )
+	-- Wow names are at least two characters.
+	if characterName ~= nil and characterName:trim() ~= "" and characterName:len() > 1 then
+		-- Remove the character.
+		RemoveMember( characterName )
+	end
+end
+
+local function RemoveAllMembersFromTeam()
+	for characterName, characterPosition in pairs( EMA.db.teamList ) do
+		RemoveMember( characterName )
+	end
+end
+
+-- Remove all members from the team list via command line.
+function EMA:DoRemoveAllMembersFromTeam( info, parameters )
+	RemoveAllMembersFromTeam()
+end
+
+function EMA:CommandIAmMaster( info, parameters )
+	local tag = parameters
+	local target = EMA.characterName
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, target, tag )
+	else
+		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, target, "all" )
+		SetMaster( target )
+	end
+end
+
+function EMA:CommandSetMaster( info, parameters )
+	local target, tag = strsplit( " ", parameters )
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, target, tag )
+	else
+		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, target, "all" )
+		SetMaster( target )
+	end
+end
+
+function EMA:ReceiveCommandSetMaster( target, tag )
+	if EMAPrivate.Tag.DoesCharacterHaveTag( EMA.characterName, tag ) then
+		SetMaster( target )
+	end
+end
+
+-- Test Isboxer Contral EbonyTest
+
+--[[
+function EMA:IsboxerSyncTeamList()
+	if EMA.db.isboxerSync == true and IsAddOnLoaded("Isboxer" ) == true then
+		for characterName, teamStatus in pairs( EMA.IsboxerSyncList ) do
+			--EMA:Print("syncList", characterName, teamStatus )
+			--if teamStatus == "remove" then
+			--	if IsCharacterInTeam( characterName ) == true and (characterName ~= EMA.characterName ) then
+			--		--EMA:Print("memberNoLongerInIsboxerTeamDelete", characterName, teamStatus )
+			--		RemoveMember( characterName )
+			--	end
+			else
+			if teamStatus == "add" and characterName ~= EMA.characterName then
+				if IsCharacterInTeam( characterName ) == false then
+					--EMA:Print("Isboxer-AddMember", characterName, teamStatus )
+					AddMember( characterName )
+				end
+			end
+		end
+	end
+end
+]]
+
+-------------------------------------------------------------------------------------------------------------
+-- Character online status.
+-------------------------------------------------------------------------------------------------------------
+
+-- Get a character's online status..
+local function GetCharacterOnlineStatus( characterName )
+	local online = nil
+	for name, info in pairs (EMA.db.newTeamList) do
+		for _, charInfo in pairs (info) do
+			if characterName == name then
+				online = charInfo.online
+			end
+		end
+	end
+	return online
+end
+
+-- Set a character's online status.
+local function SetCharacterOnlineStatus( characterName, isOnline )
+	--EMA:Print("setting", characterName, "to be", isOnline )
+	for name, info in pairs (EMA.db.newTeamList) do
+		for _, charInfo in pairs (info) do
+			if characterName == name then
+				--EMA:Print("Set", characterName, isOnline, charInfo.online )
+				charInfo.online = isOnline
+			end
+		end
+	end
+end
+
+local function SetTeamStatusToOffline()
+	for characterName, characterPosition in EMAApi.TeamList() do
+		SetCharacterOnlineStatus( characterName, false )
+		EMA:SendMessage( EMA.MESSAGE_CHARACTER_OFFLINE )
+		EMA:SettingsTeamListScrollRefresh()
+	end
+end
+
+local function SetTeamOnline()
+	-- Set all characters online status to false.
+	for characterName, characterPosition in EMAApi.TeamList() do
+		SetCharacterOnlineStatus( characterName, true )
+		EMA:SendMessage( EMA.MESSAGE_CHARACTER_ONLINE )
+		EMA:SettingsTeamListScrollRefresh()
+		--EMA:SettingsGroupListScrollRefresh()
+	end
+end
+
+--Set character Offline.
+local function setOffline( characterName )
+	local character = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	SetCharacterOnlineStatus( character, false )
+	EMA:SendMessage( EMA.MESSAGE_CHARACTER_OFFLINE )
+	EMA:SettingsTeamListScrollRefresh()
+	--EMA:SettingsGroupListScrollRefresh()
+end
+
+--Set character OnLine.
+local function setOnline( characterName )
+	local character = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	SetCharacterOnlineStatus( character, true )
+	EMA:SendMessage( EMA.MESSAGE_CHARACTER_ONLINE )
+	EMA:SettingsTeamListScrollRefresh()
+	--EMA:SettingsGroupListScrollRefresh()
+end
+
+function EMA.ReceivesetOffline( characterName )
+	--EMA:Print("command", characterName )
+	setOffline( characterName, false )
+	EMA:SettingsRefresh()
+end
+
+function EMA.ReceivesetOnline( characterName )
+	--EMA:Print("command", characterName )
+	setOnline( characterName, false )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SetAllMembersOffline()
+	SetTeamStatusToOffline()
+end
+
+function EMA:SetAllMembersOnline()
+	SetTeamOnline()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Character team list ordering.
+-------------------------------------------------------------------------------------------------------------
+
+local function SortTeamListOrdered( characterA, characterB )
+	local positionA = GetPositionForCharacterName( characterA )
+	local positionB = GetPositionForCharacterName( characterB )
+	return positionA < positionB
+end
+
+-- Return all characters ordered.
+local function TeamListOrdered()
+	EMAUtilities:ClearTable( EMA.orderedCharacters )
+	for characterName, characterPosition in EMAApi.TeamList() do
+		table.insert( EMA.orderedCharacters, characterName )
+	end
+	table.sort( EMA.orderedCharacters, SortTeamListOrdered )
+	return ipairs( EMA.orderedCharacters )
+end
+
+-- Return all characters ordered online.
+local function TeamListOrderedOnline()
+	EMAUtilities:ClearTable( EMA.orderedCharactersOnline )
+	for characterName, characterPosition in EMAApi.TeamList() do
+		if EMAApi.GetCharacterOnlineStatus( characterName ) == true then
+			table.insert( EMA.orderedCharactersOnline, characterName )
+		end
+	end
+	table.sort( EMA.orderedCharactersOnline, SortTeamListOrdered )
+	return ipairs( EMA.orderedCharactersOnline )
+end
+-------------------------------------------------------------------------------------------------------------
+-- Party.
+-------------------------------------------------------------------------------------------------------------
+
+-- Invite team to party.
+
+function EMA.DoTeamPartyInvite()
+	InviteUnit( EMA.inviteList[EMA.currentInviteCount] )
+	EMA.currentInviteCount = EMA.currentInviteCount + 1
+	if EMA.currentInviteCount < EMA.inviteCount then
+		--if GetTeamListMaximumOrderOnline() > 5 and EMA.db.inviteConvertToRaid == true then
+		if EMA.inviteCount > 5 and EMA.db.inviteConvertToRaid == true then
+			if EMA.db.inviteSetAllAssistant == true then
+				ConvertToRaid()
+				SetEveryoneIsAssistant(true)
+			else
+				ConvertToRaid()
+			end
+		end
+		EMA:ScheduleTimer( "DoTeamPartyInvite", 0.5 )
+	end
+end
+
+
+function EMA:InviteTeamToParty( info, tag )
+	-- Iterate each enabled member and invite them to a group.
+	if tag == nil or tag == "" then
+		tag = "all"
+	end
+	if EMAApi.DoesGroupExist(tag) == true then
+		if EMAApi.IsCharacterInGroup( EMA.characterName, tag ) == false then
+			--EMA:Print("IDONOTHAVETAG", tag)
+			for index, characterName in TeamListOrderedOnline() do
+				--EMA:Print("NextChartohavetag", tag, characterName )
+				if EMAApi.IsCharacterInGroup( characterName, tag ) then
+					--EMA:Print("i have tag", tag, characterName )
+					EMA:EMASendCommandToTeam( EMA.COMMAND_TAG_PARTY, characterName, tag )
+					break
+				end
+			end
+			return
+		else
+			EMA.inviteList = {}
+			EMA.inviteCount = 0
+			for index, characterName in TeamListOrderedOnline() do
+				if EMAApi.IsCharacterInGroup( characterName, tag ) then
+					--EMA:Print("HasTag", characterName, tag )
+					-- As long as they are not the player doing the inviting.
+					if characterName ~= EMA.characterName then
+						EMA.inviteList[EMA.inviteCount] = characterName
+						EMA.inviteCount = EMA.inviteCount + 1
+					end
+				end
+			end
+		end
+		EMA.currentInviteCount = 0
+		EMA:ScheduleTimer( "DoTeamPartyInvite", 0.5 )
+	else
+	EMA:Print (L["UNKNOWN_GROUP"]..tag )
+	end
+end
+
+
+function EMA:PARTY_INVITE_REQUEST( event, inviter, ... )
+	--EMA:Print("Inviter", inviter)
+	-- Accept this invite, initially no.
+	local acceptInvite = false
+	-- Is character not in a group?
+	if not IsInGroup( "player" ) then
+		-- Accept an invite from members?
+		if EMA.db.inviteAcceptTeam == true then
+			-- If inviter found in team list, allow the invite to be accepted.
+			if IsCharacterInTeam( inviter ) then
+			acceptInvite = true
+			end
+		end
+		-- Accept an invite from friends?
+		if EMA.db.inviteAcceptFriends == true then
+			-- Iterate each friend; searching for the inviter in the friends list.
+			for friendIndex = 1, GetNumFriends() do
+				local friendName = GetFriendInfo( friendIndex )
+				-- Inviter found in friends list, allow the invite to be accepted.
+				if inviter == friendName then
+					acceptInvite = true
+					break
+				end
+			end
+		end
+		-- Accept an invite from BNET/RealD?
+		if EMA.db.inviteAcceptFriends == true and BNFeaturesEnabledAndConnected() == true then
+			-- Iterate each friend; searching for the inviter in the friends list.
+			local _, numFriends = BNGetNumFriends()
+			for bnIndex = 1, numFriends do
+				for toonIndex = 1, BNGetNumFriendGameAccounts( bnIndex ) do
+					local _, toonName, client, realmName = BNGetFriendGameAccountInfo( bnIndex, toonIndex )
+					--EMA:Print("BNFrindsTest", toonName, client, realmName, "inviter", inviter)
+					if client == "WoW" then
+						if toonName == inviter or toonName.."-"..realmName == inviter then
+							acceptInvite = true
+							break
+						end
+					end
+				end
+			end
+		end
+		-- Accept and invite from guild members?
+		if EMA.db.inviteAcceptGuild == true then
+			if UnitIsInMyGuild( inviter ) then
+				acceptInvite = true
+			end
+		end
+	end
+	-- Hide the party invite popup?
+	local hidePopup = false
+	-- Accept the group invite if allowed.
+	if acceptInvite == true then
+		AcceptGroup()
+		hidePopup = true
+	else
+		-- Otherwise decline the invite if permitted.
+		if EMA.db.inviteDeclineStrangers == true then
+			DeclineGroup()
+			hidePopup = true
+		end
+	end
+	-- Hide the popup group invitation request if accepted or declined the invite.
+	if hidePopup == true then
+		-- Make sure the invite dialog does not decline the invitation when hidden.
+		for iteratePopups = 1, STATICPOPUP_NUMDIALOGS do
+			local dialog = _G["StaticPopup"..iteratePopups]
+			if dialog.which == "PARTY_INVITE" then
+				-- Set the inviteAccepted flag to true (even if the invite was declined, as the
+				-- flag is only set to stop the dialog from declining in its OnHide event).
+				dialog.inviteAccepted = 1
+				break
+			end
+			-- Ebony Sometimes invite is from XREALM even though Your on the same realm and have joined the party. This should hide the Popup.
+			if dialog.which == "PARTY_INVITE_XREALM" then
+				-- Set the inviteAccepted flag to true (even if the invite was declined, as the
+				-- flag is only set to stop the dialog from declining in its OnHide event).
+				dialog.inviteAccepted = 1
+				break
+			end
+		end
+		StaticPopup_Hide( "PARTY_INVITE" )
+		StaticPopup_Hide( "PARTY_INVITE_XREALM" )
+	end
+end
+
+function EMA:DisbandTeamFromParty()
+	EMA:EMASendCommandToTeam( EMA.COMMAND_LEAVE_PARTY )
+end
+
+local function LeaveTheParty()
+	if IsInGroup( "player" ) then
+		LeaveParty()
+	end
+end
+
+function EMA:OnMasterChange( message, characterName )
+	--EMA:Print("test", message, characterName)
+	local playerName = EMA.characterName
+	if EMA.db.masterChangePromoteLeader == true then
+		if IsInGroup( "player" ) and UnitIsGroupLeader( "player" ) == true and GetMasterName() ~= playerName then
+			PromoteToLeader( Ambiguate( GetMasterName(), "all" ) )
+		end
+	end
+	if EMA.db.masterChangeClickToMove == true then
+		if IsCharacterTheMaster( self.characterName ) == true then
+			ConsoleExec("Autointeract 0")
+		else
+			ConsoleExec("Autointeract 1")
+		end
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Table to Store IsboxerTeamList
+	EMA.IsboxerSyncList = {}
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+	-- Make sure this character is a member, add and enable if not on the list.
+	ConfirmCharacterIsInTeam()
+	-- Make sure there is a master, if none, set this character.
+	ConfirmThereIsAMaster()
+	-- Set team members online status to not connected. we do not want to do this on start-up!
+	--SetTeamStatusToOffline()
+	SetTeamOnline()
+	-- Adds DefaultGroups to GUI
+	EMA.characterGroupList = {}
+	-- Key bindings.
+	EMATeamSecureButtonInvite = CreateFrame( "CheckButton", "EMATeamSecureButtonInvite", nil, "SecureActionButtonTemplate" )
+	EMATeamSecureButtonInvite:SetAttribute( "type", "macro" )
+	EMATeamSecureButtonInvite:SetAttribute( "macrotext", "/ema-team invite" )
+	EMATeamSecureButtonInvite:Hide()
+	EMATeamSecureButtonDisband = CreateFrame( "CheckButton", "EMATeamSecureButtonDisband", nil, "SecureActionButtonTemplate" )
+	EMATeamSecureButtonDisband:SetAttribute( "type", "macro" )
+	EMATeamSecureButtonDisband:SetAttribute( "macrotext", "/ema-team disband" )
+	EMATeamSecureButtonDisband:Hide()
+	EMATeamSecureButtonInvite = CreateFrame( "CheckButton", "EMATeamSecureButtonMaster", nil, "SecureActionButtonTemplate" )
+	EMATeamSecureButtonInvite:SetAttribute( "type", "macro" )
+	EMATeamSecureButtonInvite:SetAttribute( "macrotext", "/ema-team iammaster" )
+	EMATeamSecureButtonInvite:Hide()
+--Sets The class of the char.
+--	setClass()
+	-- Click the first row in the team list table to populate the tag list table.
+	--EMA:SettingsTeamListRowClick( 1, 1 )
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	EMA:RegisterEvent( "PARTY_INVITE_REQUEST" )
+	EMA:RegisterMessage( EMA.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChange" )
+	-- Kickstart the settings team list scroll frame.
+	EMA:SettingsTeamListScrollRefresh()
+	--EMA.SettingsGroupListScrollRefresh()
+	-- Click the first row in the team list table to populate the tag list table.
+	--EMA:SettingsTeamListRowClick( 1, 1 )
+	EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" )
+	-- Initialise key bindings.
+	EMA.keyBindingFrame = CreateFrame( "Frame", nil, UIParent )
+	EMA:RegisterEvent( "UPDATE_BINDINGS" )
+	EMA:UPDATE_BINDINGS()
+	-- Update DropDownList
+	refreshDropDownList()
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	-- Refresh the settings.
+	EMA:SettingsRefresh()
+	-- Make sure this character is a member, add and enable if not on the list.
+	ConfirmCharacterIsInTeam()
+	-- Make sure there is a master, if none, set this character.
+	ConfirmThereIsAMaster()
+	-- Update the settings team list.
+	EMA:SettingsTeamListScrollRefresh()
+	--EMA:SettingsGroupListScrollRefresh()
+	-- Send team order changed and team master changed messages.
+	EMA:SendMessage( EMA.MESSAGE_TEAM_ORDER_CHANGED )
+	EMA:SendMessage( EMA.MESSAGE_TEAM_MASTER_CHANGED )
+end
+
+function EMA:SettingsRefresh()
+	-- Team/Group Control
+	local test = " "
+	--EMA.settingsControl.teamListCheckBoxSyncIsboxer:SetValue( EMA.db.isboxerSync )
+
+	-- Master Control.
+	EMA.settingsControl.masterControlCheckBoxMasterChange:SetValue( EMA.db.masterChangePromoteLeader )
+	EMA.settingsControl.masterControlCheckBoxMasterChangeClickToMove:SetValue( EMA.db.masterChangeClickToMove )
+	-- Party Invitiation Control.
+	EMA.settingsControl.partyInviteControlCheckBoxAcceptMembers:SetValue( EMA.db.inviteAcceptTeam )
+	EMA.settingsControl.partyInviteControlCheckBoxAcceptFriends:SetValue( EMA.db.inviteAcceptFriends )
+	EMA.settingsControl.partyInviteControlCheckBoxAcceptGuild:SetValue( EMA.db.inviteAcceptGuild )
+	EMA.settingsControl.partyInviteControlCheckBoxDeclineStrangers:SetValue( EMA.db.inviteDeclineStrangers )
+	EMA.settingsControl.partyInviteControlCheckBoxConvertToRaid:SetValue( EMA.db.inviteConvertToRaid )
+	EMA.settingsControl.partyInviteControlCheckBoxSetAllAssist:SetValue( EMA.db.inviteSetAllAssistant )
+	-- Ensure correct state.
+	EMA.settingsControl.partyInviteControlCheckBoxSetAllAssist:SetDisabled (not EMA.db.inviteConvertToRaid )
+--	EMA.settingsControl.teamListCheckBoxSyncIsboxer:SetDisabled ( not IsAddOnLoaded("Isboxer" ) )
+--	EMA.settingsControl.teamListButtonAddIsboxerList:SetDisabled ( not IsAddOnLoaded("Isboxer" ) )
+	-- Update the settings team list.
+	EMA:SettingsTeamListScrollRefresh()
+	-- Check the opt out of loot settings.
+	--EMA:CheckMinionsOptOutOfLoot()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+	-- Update the settings.
+		EMA.db.newTeamList = EMAUtilities:CopyTable( settings.newTeamList )
+	--	EMA.db.isboxerSync = settings.isboxerSync
+		EMA.db.masterChangePromoteLeader = settings.masterChangePromoteLeader
+		EMA.db.inviteAcceptTeam = settings.inviteAcceptTeam
+		EMA.db.inviteAcceptFriends = settings.inviteAcceptFriends
+		EMA.db.inviteAcceptGuild = settings.inviteAcceptGuild
+		EMA.db.inviteDeclineStrangers = settings.inviteDeclineStrangers
+		EMA.db.inviteConvertToRaid = settings.inviteConvertToRaid
+		EMA.db.inviteSetAllAssistant = settings.inviteSetAllAssistant
+		EMA.db.masterChangeClickToMove = settings.masterChangeClickToMove
+		EMA.db.master = settings.master
+		SetMaster( settings.master )
+		-- Refresh the settings.
+		--EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+function EMA:PLAYER_ENTERING_WORLD(event, ...)
+	-- trying this
+	-- Click the first row in the team list table to populate the tag list table.
+	local initialLogin, reloadingUI = ...
+	EMA:SettingsTeamListRowClick( 1, 1 )
+	if initialLogin then
+		--EMA:Print("test")
+		--EMA:IsboxerSyncTeamList()
+		--EMA:ScheduleTimer( "IsboxerSyncTeamList", 0.5 )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Callbacks.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsTeamListScrollRefresh()
+	FauxScrollFrame_Update(
+		EMA.settingsControl.teamList.listScrollFrame,
+		GetTeamListMaximumOrder(),
+		EMA.settingsControl.teamList.rowsToDisplay,
+		EMA.settingsControl.teamList.rowHeight
+	)
+	EMA.settingsControl.teamListOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.teamList.listScrollFrame )
+	for iterateDisplayRows = 1, EMA.settingsControl.teamList.rowsToDisplay do
+		-- Reset.
+		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
+		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetText( "" )
+		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
+		-- Get data.
+		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.teamListOffset
+		if dataRowNumber <= GetTeamListMaximumOrder() then
+			-- Put character name and type into columns.
+			local characterName = GetCharacterNameAtOrderPosition( dataRowNumber )
+
+		--local class = EMA.db.characterClass[characterName]
+			--EMA:Print("Test", class)
+			-- Set Class Color
+			local class, color = GetClass( characterName )
+			if color ~= nil then
+				EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( color.r, color.g, color.b, 1.0 )
+			end
+			local isMaster = false
+			local characterType = L["MINION"]
+			if IsCharacterTheMaster( characterName ) == true then
+				characterType = L["MASTER"]
+				isMaster = true
+			end
+			local displayCharacterName , displayCharacterRleam = strsplit( "-", characterName, 2 )
+
+			local isOnline = GetCharacterOnlineStatus( characterName )
+			local displayOnline = nil
+			if isOnline == false then
+				displayOnline = L["OFFLINE"]
+				EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 0, 0, 1.0 )
+			else
+				displayOnline = L["ONLINE"]
+				EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 0, 1.0, 0, 1.0 )
+			end
+
+			-- Master is a yellow colour.
+
+			if isMaster == true then
+				local icon = "Interface\\GroupFrame\\UI-Group-LeaderIcon"
+				displayCharacterName = strconcat(" |T"..icon..":20|t", L[" "]..displayCharacterName)
+			--	EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
+			end
+			local RealmLinked = EMAUtilities:CheckIsFromMyRealm( characterName )
+			-- Set Realms not linked Red
+			if RealmLinked == false then
+				displayCharacterRleam = displayCharacterRleam..L[" "]..L["NOT_LINKED"]
+				EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0, 0, 1.0 )
+			end
+
+			EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[1].textString:SetText( displayCharacterName )
+			EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[2].textString:SetText( displayCharacterRleam )
+			EMA.settingsControl.teamList.rows[iterateDisplayRows].columns[3].textString:SetText( displayOnline )
+			-- Highlight the selected row.
+			if dataRowNumber == EMA.settingsControl.teamListHighlightRow then
+				EMA.settingsControl.teamList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
+			end
+		end
+	end
+end
+
+local function DisplayGroupsForCharacterInGroupsList( characterName )
+	--if not EMA.characterGroupList then
+		EMA.characterGroupList = EMAApi.GetGroupListForCharacter( characterName )
+		table.sort( EMA.characterGroupList )
+		EMA:SettingsGroupListScrollRefresh()
+	--end
+end
+
+local function GetGroupAtPosition( position )
+	return EMA.characterGroupList[position]
+
+end
+
+local function GetTagListMaxPosition()
+	return #EMA.characterGroupList
+end
+
+function EMA:SettingsTeamListRowClick( rowNumber, columnNumber )
+	if EMA.settingsControl.teamListOffset + rowNumber <= GetTeamListMaximumOrder() then
+		EMA.settingsControl.teamListHighlightRow = EMA.settingsControl.teamListOffset + rowNumber
+		EMA:SettingsTeamListScrollRefresh()
+		--EMA:SettingsGroupListScrollRefresh()
+		-- Group
+		EMA.settingsControl.groupListHighlightRow = 1
+		local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
+		DisplayGroupsForCharacterInGroupsList( characterName )
+		if columnNumber == 3 then
+			local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
+			local onLine = GetCharacterOnlineStatus(characterName)
+			if onLine == true and characterName ~= EMA.characterName then
+				setOffline( characterName )
+			else
+				setOnline( characterName )
+			end
+		end
+
+	end
+end
+
+function EMA:SettingsGroupListScrollRefresh()
+	FauxScrollFrame_Update(
+		EMA.settingsControl.groupList.listScrollFrame,
+		--EMAPrivate.Tag.GetTagListMaxPosition(),
+		EMAApi.CharacterMaxGroups(),
+		EMA.settingsControl.groupList.rowsToDisplay,
+		EMA.settingsControl.groupList.rowHeight
+	)
+	EMA.settingsControl.groupListOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.groupList.listScrollFrame )
+	for iterateDisplayRows = 1, EMA.settingsControl.groupList.rowsToDisplay do
+
+		EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.groupList.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
+		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.groupListOffset
+		if dataRowNumber <= EMAApi.CharacterMaxGroups() then
+		--local characterName = EMAApi.GetGroupListForCharacter --EMA.CharGroupListName
+		--local group = GetGroupAtPosition(characterName,dataRowNumber)
+		local group = GetGroupAtPosition( dataRowNumber )
+		local groupName = EMAUtilities:Capitalise( group )
+		--local group = EMAApi.GetGroupAtPosition( dataRowNumber )
+			EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetText( groupName )
+			--EMA:Print("test", dataRowNumber, group, characterName )
+			local systemGroup = EMAApi.IsASystemGroup( group )
+			if systemGroup == true then
+				EMA.settingsControl.groupList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
+			end
+			if dataRowNumber == EMA.settingsControl.groupListHighlightRow then
+				EMA.settingsControl.groupList.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
+			end
+		end
+	end
+
+end
+function EMA:SettingsGroupListRowClick( rowNumber, columnNumber )
+	if EMA.settingsControl.groupListOffset + rowNumber <= GetTagListMaxPosition() then
+		EMA.settingsControl.groupListHighlightRow = EMA.settingsControl.groupListOffset + rowNumber
+		EMA:SettingsGroupListScrollRefresh()
+	end
+end
+
+-- For Api Update For anywhere you add a Group. ( mosty Tag.lua )
+local function RefreshGroupList()
+	EMA:SettingsGroupListScrollRefresh()
+end
+
+function EMA:TeamListDropDownList(event, value )
+	-- if nil or the blank group then don't get Name.
+	if value == " " or value == nil then
+		return
+	end
+	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
+	local groupName = EMAUtilities:Lowercase( value )
+	--EMA:Print("test", characterName, groupName )
+	-- We Have a group and characterName Lets Add it to the groupList
+	EMAApi.AddCharacterToGroup( characterName, groupName )
+	-- Reset the groupList Back to "Nothing"
+	EMA.settingsControl.teamListDropDownList:SetValue( " " )
+	-- update Lists
+	EMA:SettingsRefresh()
+	EMA:SettingsGroupListScrollRefresh()
+end
+
+function EMA.SettingsRemoveGroupClick(event, value )
+	local tag = GetGroupAtPosition( EMA.settingsControl.groupListHighlightRow )
+	local systemGroup = EMAApi.IsASystemGroup( tag )
+	local groupName = EMAUtilities:Lowercase( tag )
+	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
+	local systemGroup = EMAApi.IsASystemGroup( tag )
+	-- Remove From Tag List
+	if systemGroup == false then
+		EMAApi.RemoveGroupFromCharacter( characterName, groupName )
+	else
+		--TODO: Update
+		EMA:Print("[PH] CAN NOT REMOVE FORM THIS GROUP!")
+	end
+	-- update Lists
+	EMA:SettingsRefresh()
+	EMA:SettingsGroupListScrollRefresh()
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+	--We Needs to Update The TeamGroup List as well.
+	EMAApi.PushGroupSettings()
+end
+
+function EMA:SettingsMoveUpClick( event )
+	if EMA.settingsControl.teamListHighlightRow > 1 then
+		TeamListSwapCharacterPositions( EMA.settingsControl.teamListHighlightRow, EMA.settingsControl.teamListHighlightRow - 1 )
+		EMA.settingsControl.teamListHighlightRow = EMA.settingsControl.teamListHighlightRow - 1
+		if EMA.settingsControl.teamListHighlightRow <= EMA.settingsControl.teamListOffset then
+			EMAHelperSettings:SetFauxScrollFramePosition(
+				EMA.settingsControl.teamList.listScrollFrame,
+				EMA.settingsControl.teamListHighlightRow - 1,
+				GetTeamListMaximumOrder(),
+				EMA.settingsControl.teamList.rowHeight
+			)
+		end
+		EMA:SettingsTeamListScrollRefresh()
+		--EMA:SettingsGroupListScrollRefresh()
+		EMA:SendMessage( EMA.MESSAGE_TEAM_ORDER_CHANGED )
+	end
+end
+
+function EMA:SettingsMoveDownClick( event )
+	if EMA.settingsControl.teamListHighlightRow < GetTeamListMaximumOrder() then
+		TeamListSwapCharacterPositions( EMA.settingsControl.teamListHighlightRow, EMA.settingsControl.teamListHighlightRow + 1 )
+		EMA.settingsControl.teamListHighlightRow = EMA.settingsControl.teamListHighlightRow + 1
+		if EMA.settingsControl.teamListHighlightRow > ( EMA.settingsControl.teamListOffset + EMA.settingsControl.teamList.rowsToDisplay ) then
+			EMAHelperSettings:SetFauxScrollFramePosition(
+				EMA.settingsControl.teamList.listScrollFrame,
+				EMA.settingsControl.teamListHighlightRow + 1,
+				GetTeamListMaximumOrder(),
+				EMA.settingsControl.teamList.rowHeight
+			)
+		end
+		EMA:SettingsTeamListScrollRefresh()
+		--EMA:SettingsGroupListScrollRefresh()
+		EMA:SendMessage( EMA.MESSAGE_TEAM_ORDER_CHANGED )
+	end
+end
+
+function EMA:SettingsAddClick( event )
+	StaticPopup_Show( "EMATEAM_ASK_CHARACTER_NAME" )
+end
+
+function EMA:SettingsRemoveClick( event )
+	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
+	StaticPopup_Show( "EMATEAM_CONFIRM_REMOVE_CHARACTER", characterName )
+end
+
+function EMA.SettingsAddPartyClick( event )
+	EMA:AddPartyMembers()
+end
+--[[
+function EMA:SettingsAddIsboxerListClick( event )
+	EMA:AddIsboxerMembers()
+end
+]]
+function EMA:SettingsInviteClick( event )
+	EMA:InviteTeamToParty(nil)
+end
+
+function EMA:SettingsDisbandClick( event )
+	EMA:DisbandTeamFromParty()
+end
+--[[
+function EMA:SettingsSyncIsboxerToggle( event, checked)
+	EMA.db.isboxerSync = checked
+	EMA:SettingsRefresh()
+end
+]]
+function EMA:SettingsSetMasterClick( event )
+	local characterName = GetCharacterNameAtOrderPosition( EMA.settingsControl.teamListHighlightRow )
+	EMA:EMASendCommandToTeam( EMA.COMMAND_SET_MASTER, characterName, "all" )
+	SetMaster( characterName )
+	EMA:SettingsTeamListScrollRefresh()
+end
+
+function EMA:SettingsMasterChangeToggle( event, checked )
+	EMA.db.masterChangePromoteLeader = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsMasterChangeClickToMoveToggle( event, checked )
+	EMA.db.masterChangeClickToMove = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsAcceptInviteMembersToggle( event, checked )
+	EMA.db.inviteAcceptTeam = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsAcceptInviteFriendsToggle( event, checked )
+	EMA.db.inviteAcceptFriends = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsAcceptInviteGuildToggle( event, checked )
+	EMA.db.inviteAcceptGuild = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsDeclineInviteStrangersToggle( event, checked )
+	EMA.db.inviteDeclineStrangers = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsinviteConvertToRaidToggle( event, checked )
+	EMA.db.inviteConvertToRaid = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsinviteSetAllAssistToggle( event, checked )
+	EMA.db.inviteSetAllAssistant = checked
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Key bindings.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:UPDATE_BINDINGS()
+	if InCombatLockdown() then
+		return
+	end
+	ClearOverrideBindings( EMA.keyBindingFrame )
+	local key1, key2 = GetBindingKey( "TEAMINVITE" )
+	if key1 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonInvite" )
+	end
+	if key2 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonInvite" )
+	end
+	local key1, key2 = GetBindingKey( "TEAMDISBAND" )
+	if key1 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonDisband" )
+	end
+	if key2 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonDisband" )
+	end
+	local key1, key2 = GetBindingKey( "TEAMMASTER" )
+	if key1 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMATeamSecureButtonMaster" )
+	end
+	if key2 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMATeamSecureButtonMaster" )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Commands.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:EMAOnCommandReceived( sender, commandName, ... )
+	if commandName == EMA.COMMAND_LEAVE_PARTY then
+		if IsCharacterInTeam( sender ) == true then
+			LeaveTheParty()
+		end
+	end
+	if commandName == EMA.COMMAND_SET_MASTER then
+		if IsCharacterInTeam( sender ) == true then
+			EMA:ReceiveCommandSetMaster( ... )
+		end
+	end
+	--Ebony
+	if commandName == EMA.COMMAND_SET_OFFLINE then
+		if IsCharacterInTeam( sender ) == true then
+			EMA.ReceivesetOffline( ... )
+		end
+	end
+	if commandName == EMA.COMMAND_SET_ONLINE then
+		if IsCharacterInTeam( sender ) == true then
+			EMA.ReceivesetOnline( ... )
+		end
+	end
+	if commandName == EMA.COMMAND_TAG_PARTY then
+		if IsCharacterInTeam( sender ) == true then
+			EMA.TagParty( characterName, tag, ... )
+		end
+	end
+end
+
+-- Functions available from EMA Team for other EMA internal objects.
+EMAPrivate.Team.MESSAGE_TEAM_MASTER_CHANGED = EMA.MESSAGE_TEAM_MASTER_CHANGED
+EMAPrivate.Team.MESSAGE_TEAM_ORDER_CHANGED = EMA.MESSAGE_TEAM_ORDER_CHANGED
+EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_ADDED = EMA.MESSAGE_TEAM_CHARACTER_ADDED
+EMAPrivate.Team.MESSAGE_TEAM_CHARACTER_REMOVED = EMA.MESSAGE_TEAM_CHARACTER_REMOVED
+EMAPrivate.Team.TeamList = TeamList
+EMAPrivate.Team.IsCharacterInTeam = IsCharacterInTeam
+EMAPrivate.Team.IsCharacterTheMaster = IsCharacterTheMaster
+EMAPrivate.Team.GetMasterName = GetMasterName
+EMAPrivate.Team.SetTeamStatusToOffline = SetTeamStatusToOffline
+EMAPrivate.Team.GetCharacterOnlineStatus = GetCharacterOnlineStatus
+EMAPrivate.Team.SetTeamOnline = SetTeamOnline
+EMAPrivate.Team.GetCharacterNameAtOrderPosition = GetCharacterNameAtOrderPosition
+EMAPrivate.Team.GetTeamListMaximumOrder = GetTeamListMaximumOrder
+EMAPrivate.Team.RemoveAllMembersFromTeam = RemoveAllMembersFromTeam
+EMAPrivate.Team.setOffline = setOffline
+EMAPrivate.Team.setOnline = setOline
+EMAPrivate.Team.RefreshGroupList = RefreshGroupList
+
+-- Functions available for other addons.
+EMAApi.MESSAGE_TEAM_MASTER_CHANGED = EMA.MESSAGE_TEAM_MASTER_CHANGED
+EMAApi.MESSAGE_TEAM_ORDER_CHANGED = EMA.MESSAGE_TEAM_ORDER_CHANGED
+EMAApi.MESSAGE_TEAM_CHARACTER_ADDED = EMA.MESSAGE_TEAM_CHARACTER_ADDED
+EMAApi.MESSAGE_TEAM_CHARACTER_REMOVED = EMA.MESSAGE_TEAM_CHARACTER_REMOVED
+EMAApi.IsCharacterInTeam = IsCharacterInTeam
+EMAApi.IsCharacterTheMaster = IsCharacterTheMaster
+EMAApi.GetMasterName = GetMasterName
+EMAApi.TeamList = TeamList
+EMAApi.FullTeamList = FullTeamList
+EMAApi.Offline = Offline
+EMAApi.TeamListOrdered = TeamListOrdered
+EMAApi.GetCharacterNameAtOrderPosition = GetCharacterNameAtOrderPosition
+EMAApi.GetPositionForCharacterName = GetPositionForCharacterName
+EMAApi.GetTeamListMaximumOrder = GetTeamListMaximumOrder
+EMAApi.GetCharacterOnlineStatus = GetCharacterOnlineStatus
+EMAApi.RemoveAllMembersFromTeam = RemoveAllMembersFromTeam
+EMAApi.MESSAGE_CHARACTER_ONLINE = EMA.MESSAGE_CHARACTER_ONLINE
+EMAApi.MESSAGE_CHARACTER_OFFLINE = EMA.MESSAGE_CHARACTER_OFFLINE
+EMAApi.setOffline = setOffline
+EMAApi.setOnline = setOnline
+EMAApi.GetTeamListMaximumOrderOnline = GetTeamListMaximumOrderOnline
+EMAApi.TeamListOrderedOnline = TeamListOrderedOnline
+EMAApi.GetPositionForCharacterNameOnline = GetPositionForCharacterNameOnline
+EMAApi.GetClass = GetClass
+--EMAApi.SetClass = setClass
+EMAApi.GroupAreaList = EMA.GroupAreaList
+EMAApi.refreshDropDownList = refreshDropDownList
diff --git a/EMA/EMA.toc b/EMA/EMA.toc
new file mode 100644
index 0000000..5ca72f1
--- /dev/null
+++ b/EMA/EMA.toc
@@ -0,0 +1,29 @@
+## Interface: 80000
+## Title: EMA
+## Notes: Ebony's MultiBoxing Assistant
+## Author: Jennifer Cally 'Ebony'
+## Version: v8.0.1-Release(0086)
+## SavedVariables: CoreProfileDB, CommunicationsProfileDB, TeamProfileDB, TagProfileDB, MessageProfileDB, CurrProfileDB, DisplayTeamProfileDB, FollowProfileDB, GuildProfileDB, InteractionProfileDB, ItemUseProfileDB, PurchaseProfileDB, QuestProfileDB,  QuestWatcherProfileDB, SellProfileDB, TalkProfileDB, ToonProfileDB, TradeProfileDB
+
+#Libs
+Embeds.xml
+EbonyUtilities.lua
+
+
+#Locales
+Locales\Locales.xml
+
+#GUI
+GUI\EMAHelperSettings.lua
+
+#Core
+Core\Core.lua
+Core\Module.lua
+Core\Communications.lua
+
+Core\Team.lua
+Core\Tag.lua
+Core\Message.lua
+
+#Modules
+Modules\Modules.xml
\ No newline at end of file
diff --git a/EMA/EbonyUtilities.lua b/EMA/EbonyUtilities.lua
new file mode 100644
index 0000000..8b6a09f
--- /dev/null
+++ b/EMA/EbonyUtilities.lua
@@ -0,0 +1,283 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 									--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Localization debugging.
+--GAME_LOCALE = "frFR"
+
+local MAJOR, MINOR = "EbonyUtilities-1.0", 1
+local EbonyUtilities, oldMinor = LibStub:NewLibrary( MAJOR, MINOR )
+
+if not EbonyUtilities then
+	return
+end
+
+-- Code modified from http://lua-users.org/wiki/CopyTable
+function EbonyUtilities:CopyTable(object)
+    local lookup_table = {}
+    local function _copy(object)
+        if type(object) ~= "table" then
+            return object
+        elseif lookup_table[object] then
+            return lookup_table[object]
+        end
+        local new_table = {}
+        lookup_table[object] = new_table
+        for index, value in pairs(object) do
+            new_table[_copy(index)] = _copy(value)
+        end
+        return setmetatable(new_table, getmetatable(object))
+    end
+    return _copy(object)
+end
+
+function EbonyUtilities:ClearTable( object )
+	for key in next, object do
+		if type( object[key] ) == "table" then
+			EbonyUtilities:ClearTable( object[key] )
+		end
+		object[key] = nil
+	end
+end
+
+function EbonyUtilities:Lowercase( name )
+	if name ~= nil then
+		return string.utf8lower( name )
+	end
+end
+
+function EbonyUtilities:AddRealmToNameIfMissing( name )
+	if name == nil then
+		return
+	end
+	Name = name:gsub("^%l", string.upper )
+	fullName = Name:gsub( "%s+", "")
+	local matchDash = fullName:find( "-" )
+	if not matchDash then
+		local k = GetRealmName()
+		local realm = k:gsub( "%s+", "")
+		fullName = fullName.."-"..realm
+		end
+	return fullName
+end
+
+-- Capitalise the name.
+function EbonyUtilities:Capitalise( name )
+    if name ~= nil then
+		return string.utf8upper( string.utf8sub( name, 1, 1 ) )..string.utf8lower( string.utf8sub( name, 2 ) )
+	end
+end
+
+function EbonyUtilities:AddRealmToNameIfNotNil( name, realm )
+	local fullName = name
+	if realm ~= nil and realm:trim() ~= "" then
+		fullName = name.."-"..realm
+	end
+	return fullName
+end
+
+-- Money constants.
+EbonyUtilities.COLOUR_COPPER = "eda55f"
+EbonyUtilities.COLOUR_SILVER = "c7c7cf"
+EbonyUtilities.COLOUR_GOLD = "ffd700"
+EbonyUtilities.COPPER_PER_SILVER = 100;
+EbonyUtilities.SILVER_PER_GOLD = 100;
+EbonyUtilities.COPPER_PER_GOLD = EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD;
+
+-- value - the amount of money to display formatted.
+-- Creates a money string from the value passed; don't pass negative values!
+function EbonyUtilities:FormatMoneyString( value )
+	local gold = floor( value / ( EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) );
+	local silver = floor( ( value - ( gold * EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) ) / EbonyUtilities.COPPER_PER_SILVER );
+	local copper = mod( value, EbonyUtilities.COPPER_PER_SILVER );
+	local goldFormat = format( "|cff%s%d|r", EbonyUtilities.COLOUR_GOLD, gold )
+	local silverFormat = format( "|cff%s%02d|r", EbonyUtilities.COLOUR_SILVER, silver )
+	local copperFormat = format( "|cff%s%02d|r", EbonyUtilities.COLOUR_COPPER, copper )
+	if gold <=0 then
+		goldFormat = ""
+		if silver <= 0 then
+			silverFormat = ""
+		end
+	end
+	return strtrim(goldFormat.." "..silverFormat.." "..copperFormat)
+end
+
+-- itemLink - the item link to extract an item id from.
+-- Gets an item id from an item link.  Returns nil, if an item id could not be found.
+function EbonyUtilities:GetItemIdFromItemLink( itemLink )
+	if itemLink == nil then
+		return
+	end
+	local itemIdFound = nil
+	local itemStringStart, itemStringEnd, itemString = itemLink:find( "^|c%x+|H(.+)|h%[.*%]" )
+	if itemStringStart then
+		local matchStart, matchEnd, itemId = itemString:find( "(item:%d+)" )
+		if matchStart then
+			itemIdFound = itemId
+		end
+	end
+	return itemIdFound
+end
+
+-- itemLink1 - the first item link to compare.
+-- itemLink2 - the second item link to compare.
+-- Compares two itemlinks to see if they both refer to the same item.  Return true if they do, false if they don't.
+function EbonyUtilities:DoItemLinksContainTheSameItem( itemLink1, itemLink2 )
+	local theSame = false
+	local itemId1 = EbonyUtilities:GetItemIdFromItemLink( itemLink1 )
+	local itemId2 = EbonyUtilities:GetItemIdFromItemLink( itemLink2 )
+	if itemId1 ~= nil and itemId2 ~= nil then
+		if itemId1 == itemId2 then
+			theSame = true
+		end
+	end
+	return theSame
+end
+
+-- state - string value containing "on" or "off".
+-- onCommand - string that is equivalent to true, like "on".
+-- offCommand - string that is equivalent to false, like "off".
+-- Returns true for "on"; false for "off"; nil for invalid.
+function EbonyUtilities:GetOnOrOffFromCommand( state, onCommand, offCommand )
+	local setToOn = nil
+	state = state:lower():trim()
+	if state == onCommand then
+		setToOn = true
+	end
+	if state == offCommand then
+		setToOn = false
+	end
+	return setToOn
+end
+
+-- Check for a buff.
+function EbonyUtilities:DoesThisCharacterHaveBuff( buffName )
+	local hasBuff = false
+	local iterateBuffs = 1
+	local buff = UnitBuff( "player", iterateBuffs )
+	while buff ~= nil do
+		if buff == buffName then
+			hasBuff = true
+			break
+		end
+		iterateBuffs = iterateBuffs + 1
+		buff = UnitBuff( "player", iterateBuffs )
+	end
+	return hasBuff
+end
+
+function EbonyUtilities:FixValueToRange( value, minValue, maxValue )
+	if value < minValue then
+		value = minValue
+	end
+	if value > maxValue then
+		value = maxValue
+	end
+	return value
+end
+
+
+function EbonyUtilities:CheckIsFromMyRealm( name )
+	--print("test", name)
+	local sameRealm = false
+	if name ~= nil then
+		local player, realm = strsplit( "-", name, 2 )
+		local myRealm = string.gsub(GetRealmName(), "%s+", "")
+		if realm == myRealm then
+			--print("Real SameRealm")
+			sameRealm = true
+		else
+			local connectedServers = GetAutoCompleteRealms()
+			if connectedServers then --Check if realm matches any realm in our connection
+				for i = 1, #connectedServers do
+	 				if realm == connectedServers[i] then
+						--print("connectedRealm")
+						sameRealm = true
+					end
+				end
+			else
+				--print("NotFromARealm")
+				sameRealm = false
+			end
+		end
+	end
+	return sameRealm
+end
+
+function EbonyUtilities:InTagList( tag )
+	local isInTagList = false
+	if JambaApi.DoesGroupExist(  tag ) then
+		isInTagList = true
+	end
+	return isInTagList
+end
+
+function EbonyUtilities:TooltipScaner(item)
+	local text = nil
+	local text2 = nil
+		if item ~= nil then
+			local tooltipName = "AJMScanner"
+			local tooltipScanner = CreateFrame("GameTooltip", tooltipName, nil, "GameTooltipTemplate")
+			tooltipScanner:SetOwner(UIParent, "ANCHOR_NONE")
+			tooltipScanner:SetHyperlink(item)
+			local tooltipText = _G[tooltipName.."TextLeft2"]:GetText()
+			local tooltipTextTwo = _G[tooltipName.."TextLeft3"]:GetText()
+				--print("test",  tooltipTextTwo)
+				text = tooltipText
+				text2 = tooltipTextTwo
+			--print("test9", text, text2)
+			tooltipScanner:Hide()
+		end
+	return text, text2
+end
+
+
+function EbonyUtilities:ToolTipBagScaner(item, bag, slot)
+	--print("test", item, bag, slot )
+	if item ~= nil or bag ~= nil or slot ~= nil then
+		local boe = nil
+		local ilvl = nil
+		local tooltipName = "AJMBagScanner"
+		local tooltipbagScanner = CreateFrame("GameTooltip", tooltipName , nil, "GameTooltipTemplate")
+			tooltipbagScanner:SetOwner(UIParent, "ANCHOR_NONE")
+			tooltipbagScanner:SetBagItem(bag, slot)
+			tooltipbagScanner:Show()
+		for i = 1,6 do
+			local t = _G[tooltipName.."TextLeft"..i]:GetText()
+			--print("test", t)
+			if (t == ITEM_SOULBOUND) then
+				boe = ITEM_SOULBOUND
+			end
+		end
+	    tooltipbagScanner:Hide()
+		return boe
+	end
+end
+
+-- GetPetOwner
+function EbonyUtilities:getPetOwner( petName )
+	--print(petName)
+	if petName ~= nil then
+		local tooltipName = "AJMPetScanner"
+		local tooltipPetScanner = CreateFrame("GameTooltip", tooltipName, nil, "GameTooltipTemplate")
+		tooltipPetScanner:ClearLines()
+		tooltipPetScanner:SetOwner(WorldFrame, "ANCHOR_NONE")
+		tooltipPetScanner:SetUnit( petName )
+		local ownerName = _G[tooltipName.."TextLeft2"]:GetText() -- This is the line with <[Player]'s Pet>
+		if not ownerName then
+			 return nil
+		end
+		local owner, _ = string.split("'",ownerName)
+		tooltipPetScanner:Hide()
+		return owner -- This is the pet's owner
+	--	print(owner)
+	end
+end
diff --git a/EMA/Embeds.xml b/EMA/Embeds.xml
new file mode 100644
index 0000000..c0f1efa
--- /dev/null
+++ b/EMA/Embeds.xml
@@ -0,0 +1,40 @@
+<!--
+				EMA - ( Ebony's MultiBoxing Assistant )
+				Current Author: Jennifer Cally (Ebony)
+				License: MIT License 2018 Jennifer Cally
+
+				Some Code Used from 'Jamba' that is
+				Released under the MIT License
+				'Jamba' Copyright 2008-2015  Michael "Jafula" Miller
+-->
+
+<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd" xmlns="http://www.blizzard.com/wow/ui/">
+	<Script file="Libs\LibStub\LibStub.lua" />
+	<Include file="Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml" />
+	<Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml" />
+	<Include file="Libs\AceGUI-3.0\AceGUI-3.0.xml" />
+	<Include file="Libs\AceConfig-3.0\AceConfig-3.0.xml" />
+	<Include file="Libs\AceConsole-3.0\AceConsole-3.0.xml" />
+	<Include file="Libs\AceDB-3.0\AceDB-3.0.xml" />
+	<Include file="Libs\AceDBOptions-3.0\AceDBOptions-3.0.xml" />
+	<Include file="Libs\AceEvent-3.0\AceEvent-3.0.xml" />
+	<Include file="Libs\AceLocale-3.0\AceLocale-3.0.xml" />
+	<Include file="Libs\AceTimer-3.0\AceTimer-3.0.xml" />
+	<Include file="Libs\AceComm-3.0\AceComm-3.0.xml" />
+	<Include file="Libs\AceHook-3.0\AceHook-3.0.xml" />
+	<Include file="Libs\AceSerializer-3.0\AceSerializer-3.0.xml" />
+	<Include file="Libs\LibSharedMedia-3.0\lib.xml" />
+	<Include file="Libs\AceGUI-3.0-SharedMediaWidgets\widget.xml" />
+	<Include file="Libs\LibBagUtils-1.0\LibBagUtils-1.0.xml" />
+	<Include file="Libs\LibItemUpgradeInfo-1.0\LibItemUpgradeInfo-1.0.xml" />
+	<Script file="Libs\LibAuras\LibAuras.lua" />
+	<Script file="Libs\EMALibActionButton-1.0.lua" />
+	<Script file="Libs\LibButtonGlow-1.0\LibButtonGlow-1.0.lua" />
+	<Script file="Libs\UTF8\utf8data.lua" />
+	<Script file="Libs\UTF8\utf8.lua" />
+	<Script file="GUI\AceGUIContainer-EMAWindow.lua" />
+	<Script file="GUI\AceGUIContainer-EMATreeGroup.lua" />
+	<Script file="GUI\AceGUIWidget-EMANormalLabel.lua" />
+	<Script file="GUI\AceGUIWidget-EMAContinueLabel.lua" />
+	<Script file="GUI\AceGUIWidget-EMAKeybinding.lua" />
+</Ui>
diff --git a/EMA/GUI/AceGUIContainer-EMATreeGroup.lua b/EMA/GUI/AceGUIContainer-EMATreeGroup.lua
new file mode 100644
index 0000000..1930da5
--- /dev/null
+++ b/EMA/GUI/AceGUIContainer-EMATreeGroup.lua
@@ -0,0 +1,748 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+
+--[[
+File modified from AceGUI TreeGroup container.  Used under Ace3 modified BSD licence.
+
+Version 2 Support for the new Jamba EE 8.0 Build
+
+
+]]--
+
+--[[-----------------------------------------------------------------------------
+TreeGroup Container
+Container that uses a tree control to switch between groups.
+-------------------------------------------------------------------------------]]
+local Type, Version = "EMATreeGroup", 1
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+local WoW80 = select(4, GetBuildInfo()) >= 80000
+-- Lua APIs
+local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
+local math_min, math_max, floor = math.min, math.max, floor
+local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: GameTooltip, FONT_COLOR_CODE_CLOSE
+
+-- Recycling functions
+local new, del
+do
+	local pool = setmetatable({},{__mode='k'})
+	function new()
+		local t = next(pool)
+		if t then
+			pool[t] = nil
+			return t
+		else
+			return {}
+		end
+	end
+	function del(t)
+		for k in pairs(t) do
+			t[k] = nil
+		end
+		pool[t] = true
+	end
+end
+
+local DEFAULT_TREE_WIDTH = 200
+local DEFAULT_TREE_SIZABLE = true
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+local function GetButtonUniqueValue(line)
+	local parent = line.parent
+	if parent and parent.value then
+		return GetButtonUniqueValue(parent).."\001"..line.value
+	else
+		return line.value
+	end
+end
+
+local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
+	local self = button.obj
+	local toggle = button.toggle
+	local frame = self.frame
+	local text = treeline.text or ""
+	local icon = treeline.icon
+	local iconCoords = treeline.iconCoords
+	local level = treeline.level
+	local value = treeline.value
+	local uniquevalue = treeline.uniquevalue
+	local disabled = treeline.disabled
+
+	button.treeline = treeline
+	button.value = value
+	button.uniquevalue = uniquevalue
+	if selected then
+		button:LockHighlight()
+		button.selected = true
+	else
+		button:UnlockHighlight()
+		button.selected = false
+	end
+	local normalTexture = button:GetNormalTexture()
+	local line = button.line
+	button.level = level
+	if ( level == 1 ) then
+		button:SetNormalFontObject("GameFontNormal")
+		button:SetHighlightFontObject("GameFontHighlight")
+		button.text:SetPoint("LEFT", (icon and 35 or 0) + 8, -4)
+	else
+		button:SetNormalFontObject("GameFontHighlightSmall")
+		button:SetHighlightFontObject("GameFontHighlightSmall")
+		button.text:SetPoint("LEFT", (icon and 35 or 0) + 12 * level, -4)
+	end
+
+	if disabled then
+		button:EnableMouse(false)
+		button.text:SetText("|cff808080"..text..FONT_COLOR_CODE_CLOSE)
+	else
+		button.text:SetText(text)
+		button:EnableMouse(true)
+	end
+
+	if icon then
+		button.icon:SetTexture(icon)
+		if ( level == 1 ) then
+			button.icon:SetPoint("LEFT", 4 * level, (level == 1) and 0 or 1)
+		else
+			button.icon:SetPoint("LEFT", 8 * level, (level == 1) and 0 or 1)
+		end
+	else
+		button.icon:SetTexture(nil)
+	end
+
+	if iconCoords then
+		button.icon:SetTexCoord(unpack(iconCoords))
+	else
+		button.icon:SetTexCoord(0, 1, 0, 1)
+	end
+
+	if canExpand then
+		if not isExpanded then
+			toggle:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-UP")
+			toggle:SetPushedTexture("Interface\\Buttons\\UI-PlusButton-DOWN")
+		else
+			toggle:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-UP")
+			toggle:SetPushedTexture("Interface\\Buttons\\UI-MinusButton-DOWN")
+		end
+		toggle:Show()
+	else
+		toggle:Hide()
+	end
+
+end
+
+local function ShouldDisplayLevel(tree)
+	local result = false
+	for k, v in ipairs(tree) do
+		if v.children == nil and v.visible ~= false then
+			result = true
+		elseif v.children then
+			result = result or ShouldDisplayLevel(v.children)
+		end
+		if result then return result end
+	end
+	return false
+end
+
+local function addLine(self, v, tree, level, parent)
+	local line = new()
+	line.value = v.value
+	line.text = v.text
+	line.icon = v.icon
+	line.iconCoords = v.iconCoords
+	line.disabled = v.disabled
+	line.tree = tree
+	line.level = level
+	line.parent = parent
+	line.visible = v.visible
+	line.uniquevalue = GetButtonUniqueValue(line)
+	if v.children then
+		line.hasChildren = true
+	else
+		line.hasChildren = nil
+	end
+	self.lines[#self.lines+1] = line
+	return line
+end
+
+--fire an update after one frame to catch the treeframes height
+local function FirstFrameUpdate(frame)
+	local self = frame.obj
+	frame:SetScript("OnUpdate", nil)
+	--self:RefreshTree()
+	self:RefreshTree(nil, true)
+end
+
+local function BuildUniqueValue(...)
+	local n = select('#', ...)
+	if n == 1 then
+		return ...
+	else
+		return (...).."\001"..BuildUniqueValue(select(2,...))
+	end
+end
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Expand_OnClick(frame)
+	local button = frame.button
+	local self = button.obj
+	local status = (self.status or self.localstatus).groups
+	status[button.uniquevalue] = not status[button.uniquevalue]
+	self:RefreshTree()
+end
+
+local function Button_OnClick(frame)
+	local self = frame.obj
+	self:Fire("OnClick", frame.uniquevalue, frame.selected)
+	if not frame.selected then
+		self:SetSelected(frame.uniquevalue)
+		frame.selected = true
+		frame:LockHighlight()
+		self:RefreshTree()
+	end
+	AceGUI:ClearFocus()
+end
+
+local function Button_OnDoubleClick(button)
+	local self = button.obj
+	local status = self.status or self.localstatus
+	local status = (self.status or self.localstatus).groups
+	status[button.uniquevalue] = not status[button.uniquevalue]
+	self:RefreshTree()
+end
+
+local function Button_OnEnter(frame)
+	local self = frame.obj
+	self:Fire("OnButtonEnter", frame.uniquevalue, frame)
+
+	if self.enabletooltips then
+		GameTooltip:SetOwner(frame, "ANCHOR_NONE")
+		GameTooltip:SetPoint("LEFT",frame,"RIGHT")
+		GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
+
+		GameTooltip:Show()
+	end
+end
+
+local function Button_OnLeave(frame)
+	local self = frame.obj
+	self:Fire("OnButtonLeave", frame.uniquevalue, frame)
+
+	if self.enabletooltips then
+		GameTooltip:Hide()
+	end
+end
+
+local function OnScrollValueChanged(frame, value)
+	if frame.obj.noupdate then return end
+	local self = frame.obj
+	local status = self.status or self.localstatus
+	status.scrollvalue = floor(value + 0.5)
+	self:RefreshTree()
+	AceGUI:ClearFocus()
+end
+
+local function Tree_OnSizeChanged(frame)
+	frame.obj:RefreshTree()
+end
+
+local function Tree_OnMouseWheel(frame, delta)
+	local self = frame.obj
+	if self.showscroll then
+		local scrollbar = self.scrollbar
+		local min, max = scrollbar:GetMinMaxValues()
+		local value = scrollbar:GetValue()
+		local newvalue = math_min(max,math_max(min,value - delta))
+		if value ~= newvalue then
+			scrollbar:SetValue(newvalue)
+		end
+	end
+end
+
+local function Dragger_OnLeave(frame)
+	frame:SetBackdropColor(1, 1, 1, 0)
+end
+
+local function Dragger_OnEnter(frame)
+	frame:SetBackdropColor(1, 1, 1, 0.8)
+end
+
+local function Dragger_OnMouseDown(frame)
+	local treeframe = frame:GetParent()
+	treeframe:StartSizing("RIGHT")
+end
+
+local function Dragger_OnMouseUp(frame)
+	local treeframe = frame:GetParent()
+	local self = treeframe.obj
+	local frame = treeframe:GetParent()
+	treeframe:StopMovingOrSizing()
+	--treeframe:SetScript("OnUpdate", nil)
+	treeframe:SetUserPlaced(false)
+	--Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize
+	treeframe:SetHeight(0)
+	treeframe:SetPoint("TOPLEFT", frame, "TOPLEFT",0,0)
+	treeframe:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT",0,0)
+	local status = self.status or self.localstatus
+	status.treewidth = treeframe:GetWidth()
+
+	treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth())
+	-- recalculate the content width
+	treeframe.obj:OnWidthSet(status.fullwidth)
+	-- update the layout of the content
+	treeframe.obj:DoLayout()
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
+		self:EnableButtonTooltips(true)
+		self.frame:SetScript("OnUpdate", FirstFrameUpdate)
+	end,
+
+	["OnRelease"] = function(self)
+		self.status = nil
+		self.tree = nil
+		self.frame:SetScript("OnUpdate", nil)
+		for k, v in pairs(self.localstatus) do
+			if k == "groups" then
+				for k2 in pairs(v) do
+					v[k2] = nil
+				end
+			else
+				self.localstatus[k] = nil
+			end
+		end
+		self.localstatus.scrollvalue = 0
+		self.localstatus.treewidth = DEFAULT_TREE_WIDTH
+		self.localstatus.treesizable = DEFAULT_TREE_SIZABLE
+	end,
+
+	["EnableButtonTooltips"] = function(self, enable)
+		self.enabletooltips = enable
+	end,
+
+	["CreateButton"] = function(self)
+		local num = AceGUI:GetNextWidgetNum("TreeGroupButton")
+		local button = CreateFrame("Button", ("AceGUI30TreeButton%d"):format(num), self.treeframe, "OptionsListButtonTemplate")
+		button.obj = self
+
+		local icon = button:CreateTexture(nil, "OVERLAY")
+		icon:SetWidth(35)
+		icon:SetHeight(35)
+		button.icon = icon
+
+		button:SetScript("OnClick",Button_OnClick)
+		button:SetScript("OnDoubleClick", Button_OnDoubleClick)
+		button:SetScript("OnEnter",Button_OnEnter)
+		button:SetScript("OnLeave",Button_OnLeave)
+
+		button.toggle.button = button
+		button.toggle:SetScript("OnClick",Expand_OnClick)
+
+		button.text:SetHeight(14) -- Prevents text wrapping
+
+		return button
+	end,
+
+	["SetStatusTable"] = function(self, status)
+		assert(type(status) == "table")
+		self.status = status
+		if not status.groups then
+			status.groups = {}
+		end
+		if not status.scrollvalue then
+			status.scrollvalue = 0
+		end
+		if not status.treewidth then
+			status.treewidth = DEFAULT_TREE_WIDTH
+		end
+		if status.treesizable == nil then
+			status.treesizable = DEFAULT_TREE_SIZABLE
+		end
+		self:SetTreeWidth(status.treewidth,status.treesizable)
+		self:RefreshTree()
+	end,
+
+	--sets the tree to be displayed
+	["SetTree"] = function(self, tree, filter)
+		self.filter = filter
+		if tree then
+			assert(type(tree) == "table")
+		end
+		self.tree = tree
+		self:RefreshTree()
+	end,
+
+	["BuildLevel"] = function(self, tree, level, parent)
+		local groups = (self.status or self.localstatus).groups
+		local hasChildren = self.hasChildren
+
+		for i, v in ipairs(tree) do
+			if v.children then
+				if not self.filter or ShouldDisplayLevel(v.children) then
+					local line = addLine(self, v, tree, level, parent)
+					if groups[line.uniquevalue] then
+						self:BuildLevel(v.children, level+1, line)
+					end
+				end
+			elseif v.visible ~= false or not self.filter then
+				addLine(self, v, tree, level, parent)
+			end
+		end
+	end,
+
+--	["RefreshTree"] = function(self,scrollToSelection)
+	["RefreshTree"] = function(self,scrollToSelection,fromOnUpdate)
+		local buttons = self.buttons
+		local lines = self.lines
+
+		for i, v in ipairs(buttons) do
+			v:Hide()
+		end
+		while lines[1] do
+			local t = tremove(lines)
+			for k in pairs(t) do
+				t[k] = nil
+			end
+			del(t)
+		end
+
+		if not self.tree then return end
+		--Build the list of visible entries from the tree and status tables
+		local status = self.status or self.localstatus
+		local groupstatus = status.groups
+		local tree = self.tree
+
+		local treeframe = self.treeframe
+
+		status.scrollToSelection = status.scrollToSelection or scrollToSelection	-- needs to be cached in case the control hasn't been drawn yet (code bails out below)
+
+		self:BuildLevel(tree, 1)
+
+		local numlines = #lines
+
+		--local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
+		local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 36 ) / 36 ))
+		if maxlines <= 0 then return end
+
+		-- workaround for lag spikes on WoW 8.0
+		if WoW80 and self.frame:GetParent() == UIParent and not fromOnUpdate then
+			self.frame:SetScript("OnUpdate", FirstFrameUpdate)
+			return
+		end
+
+		local first, last
+
+		scrollToSelection = status.scrollToSelection
+		status.scrollToSelection = nil
+
+		if numlines <= maxlines then
+			--the whole tree fits in the frame
+			status.scrollvalue = 0
+			self:ShowScroll(false)
+			first, last = 1, numlines
+		else
+			self:ShowScroll(true)
+			--scrolling will be needed
+			self.noupdate = true
+			self.scrollbar:SetMinMaxValues(0, numlines - maxlines)
+			--check if we are scrolled down too far
+			if numlines - status.scrollvalue < maxlines then
+				status.scrollvalue = numlines - maxlines
+			end
+			self.noupdate = nil
+			first, last = status.scrollvalue+1, status.scrollvalue + maxlines
+			--show selection?
+			if scrollToSelection and status.selected then
+				local show
+				for i,line in ipairs(lines) do	-- find the line number
+					if line.uniquevalue==status.selected then
+						show=i
+					end
+				end
+				if not show then
+					-- selection was deleted or something?
+				elseif show>=first and show<=last then
+					-- all good
+				else
+					-- scrolling needed!
+					if show<first then
+						status.scrollvalue = show-1
+					else
+						status.scrollvalue = show-maxlines
+					end
+					first, last = status.scrollvalue+1, status.scrollvalue + maxlines
+				end
+			end
+			if self.scrollbar:GetValue() ~= status.scrollvalue then
+				self.scrollbar:SetValue(status.scrollvalue)
+			end
+		end
+
+		local buttonnum = 1
+		for i = first, last do
+			local line = lines[i]
+			local button = buttons[buttonnum]
+			if not button then
+				button = self:CreateButton()
+
+				buttons[buttonnum] = button
+				button:SetParent(treeframe)
+				button:SetFrameLevel(treeframe:GetFrameLevel()+1)
+				button:ClearAllPoints()
+				if buttonnum == 1 then
+					if self.showscroll then
+						button:SetPoint("TOPRIGHT", -22, -15)
+						button:SetPoint("TOPLEFT", 0, -15)
+					else
+						button:SetPoint("TOPRIGHT", 0, -15)
+						button:SetPoint("TOPLEFT", 0, -15)
+					end
+				else
+					button:SetPoint("TOPRIGHT", buttons[buttonnum-1], "BOTTOMRIGHT",0, -20 )-- 8
+					button:SetPoint("TOPLEFT", buttons[buttonnum-1], "BOTTOMLEFT",0, -20 )
+				end
+			end
+
+			UpdateButton(button, line, status.selected == line.uniquevalue, line.hasChildren, groupstatus[line.uniquevalue] )
+			button:Show()
+			buttonnum = buttonnum + 1
+		end
+
+	end,
+
+	["SetSelected"] = function(self, value)
+		local status = self.status or self.localstatus
+		if status.selected ~= value then
+			status.selected = value
+			self:Fire("OnGroupSelected", value)
+		end
+	end,
+
+	["Select"] = function(self, uniquevalue, ...)
+		self.filter = false
+		local status = self.status or self.localstatus
+		local groups = status.groups
+		local path = {...}
+		for i = 1, #path do
+			groups[tconcat(path, "\001", 1, i)] = true
+		end
+		status.selected = uniquevalue
+		self:RefreshTree(true)
+		self:Fire("OnGroupSelected", uniquevalue)
+	end,
+
+	["SelectByPath"] = function(self, ...)
+		self:Select(BuildUniqueValue(...), ...)
+	end,
+
+	["SelectByValue"] = function(self, uniquevalue)
+		self:Select(uniquevalue, ("\001"):split(uniquevalue))
+	end,
+
+	["ShowScroll"] = function(self, show)
+		self.showscroll = show
+		if show then
+			self.scrollbar:Show()
+			if self.buttons[1] then
+				self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",-22,-10)
+			end
+		else
+			self.scrollbar:Hide()
+			if self.buttons[1] then
+				self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",0,-10)
+			end
+		end
+	end,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		local treeframe = self.treeframe
+		local status = self.status or self.localstatus
+		status.fullwidth = width
+
+		local contentwidth = width - status.treewidth - 20
+		if contentwidth < 0 then
+			contentwidth = 0
+		end
+		content:SetWidth(contentwidth)
+		content.width = contentwidth
+
+		local maxtreewidth = math_min(400, width - 50)
+
+		if maxtreewidth > 100 and status.treewidth > maxtreewidth then
+			self:SetTreeWidth(maxtreewidth, status.treesizable)
+		end
+		treeframe:SetMaxResize(maxtreewidth, 1600)
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		local contentheight = height - 30
+		if contentheight < 0 then
+			contentheight = 0
+		end
+		content:SetHeight(contentheight)
+		content.height = contentheight
+	end,
+
+	["SetTreeWidth"] = function(self, treewidth, resizable)
+		if not resizable then
+			if type(treewidth) == 'number' then
+				resizable = false
+			elseif type(treewidth) == 'boolean' then
+				resizable = treewidth
+				treewidth = DEFAULT_TREE_WIDTH
+			else
+				resizable = false
+				treewidth = DEFAULT_TREE_WIDTH
+			end
+		end
+		self.treeframe:SetWidth(treewidth)
+		self.dragger:EnableMouse(resizable)
+
+		local status = self.status or self.localstatus
+		status.treewidth = treewidth
+		status.treesizable = resizable
+
+		-- recalculate the content width
+		if status.fullwidth then
+			self:OnWidthSet(status.fullwidth)
+		end
+	end,
+
+	["GetTreeWidth"] = function(self)
+		local status = self.status or self.localstatus
+		return status.treewidth or DEFAULT_TREE_WIDTH
+	end,
+
+	["LayoutFinished"] = function(self, width, height)
+		if self.noAutoHeight then return end
+		self:SetHeight((height or 0) + 20)
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local PaneBackdrop  = {
+	--bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+	tile = true, tileSize = 16, edgeSize = 16,
+	insets = { left = 3, right = 3, top = 5, bottom = 3 }
+}
+
+local DraggerBackdrop  = {
+	bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
+	edgeFile = nil,
+	tile = true, tileSize = 16, edgeSize = 0,
+	insets = { left = 3, right = 3, top = 7, bottom = 7 }
+}
+
+local function Constructor()
+	local num = AceGUI:GetNextWidgetNum(Type)
+	local frame = CreateFrame("Frame", nil, UIParent)
+
+	local treeframe = CreateFrame("Frame", nil, frame)
+	treeframe:SetPoint("TOPLEFT")
+	treeframe:SetPoint("BOTTOM")
+	treeframe:SetWidth(DEFAULT_TREE_WIDTH)
+	treeframe:EnableMouseWheel(true)
+	treeframe:SetBackdrop(PaneBackdrop)
+	treeframe:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
+	treeframe:SetBackdropBorderColor(0.4, 0.4, 0.4)
+	treeframe:SetResizable(true)
+	treeframe:SetMinResize(100, 1)
+	treeframe:SetMaxResize(400, 1600)
+	treeframe:SetScript("OnUpdate", FirstFrameUpdate)
+	treeframe:SetScript("OnSizeChanged", Tree_OnSizeChanged)
+	treeframe:SetScript("OnMouseWheel", Tree_OnMouseWheel)
+
+	local dragger = CreateFrame("Frame", nil, treeframe)
+	dragger:SetWidth(8)
+	dragger:SetPoint("BOTTOM", treeframe, "BOTTOM")
+	dragger:SetPoint("BOTTOM", treeframe, "BOTTOM")
+	dragger:SetBackdrop(DraggerBackdrop)
+	dragger:SetBackdropColor(1, 1, 1, 0)
+	dragger:SetScript("OnEnter", Dragger_OnEnter)
+	dragger:SetScript("OnLeave", Dragger_OnLeave)
+	dragger:SetScript("OnMouseDown", Dragger_OnMouseDown)
+	dragger:SetScript("OnMouseUp", Dragger_OnMouseUp)
+
+	local scrollbar = CreateFrame("Slider", ("AceConfigDialogTreeGroup%dScrollBar"):format(num), treeframe, "UIPanelScrollBarTemplate")
+	scrollbar:SetScript("OnValueChanged", nil)
+	scrollbar:SetPoint("TOPRIGHT", -10, -26)
+	scrollbar:SetPoint("BOTTOMRIGHT", -10, 26)
+	scrollbar:SetMinMaxValues(0,0)
+	scrollbar:SetValueStep(1)
+	scrollbar:SetValue(0)
+	scrollbar:SetWidth(16)
+	scrollbar:SetScript("OnValueChanged", OnScrollValueChanged)
+
+	local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
+	scrollbg:SetAllPoints(scrollbar)
+	scrollbg:SetColorTexture(0,0,0,0.4)
+
+	local border = CreateFrame("Frame",nil,frame)
+	border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
+	border:SetPoint("BOTTOMRIGHT")
+	border:SetBackdrop(PaneBackdrop)
+	border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
+	border:SetBackdropBorderColor(0.4, 0.4, 0.4)
+
+	--Container Support
+	local content = CreateFrame("Frame", nil, border)
+	content:SetPoint("TOPLEFT", 10, -10)
+	content:SetPoint("BOTTOMRIGHT", -10, 10)
+
+	local widget = {
+		frame        = frame,
+		lines        = {},
+		levels       = {},
+		buttons      = {},
+		hasChildren  = {},
+		localstatus  = { groups = {}, scrollvalue = 0 },
+		filter       = false,
+		treeframe    = treeframe,
+		dragger      = dragger,
+		scrollbar    = scrollbar,
+		border       = border,
+		content      = content,
+		type         = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	treeframe.obj, dragger.obj, scrollbar.obj = widget, widget, widget
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/GUI/AceGUIContainer-EMAWindow.lua b/EMA/GUI/AceGUIContainer-EMAWindow.lua
new file mode 100644
index 0000000..2043a98
--- /dev/null
+++ b/EMA/GUI/AceGUIContainer-EMAWindow.lua
@@ -0,0 +1,348 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+
+--[[
+ver 2 Update for new GUI!
+
+
+File modified from AceGUI Window container.  Used under Ace3 modified BSD licence.
+
+Was updated by Ebony.
+
+Added logo Support. Changed Size of frame to suppot newer dispalys
+
+EMA changes
+Really the olny thing changed is to lower the setframestata for InitializePopupDialogs.
+
+]]--
+
+--[[-----------------------------------------------------------------------------
+Frame Container
+-------------------------------------------------------------------------------]]
+local Type, Version = "EMAWindow", 1
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs, assert, type = pairs, assert, type
+local wipe = table.wipe
+
+-- WoW APIs
+local PlaySound = PlaySound
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: CLOSE
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Button_OnClick(frame)
+	--7.3 PlaySound Update.
+	PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
+	frame.obj:Hide()
+end
+
+local function Frame_OnClose(frame)
+	frame.obj:Fire("OnClose")
+end
+
+local function Frame_OnMouseDown(frame)
+	AceGUI:ClearFocus()
+end
+
+local function Title_OnMouseDown(frame)
+	frame:GetParent():StartMoving()
+	AceGUI:ClearFocus()
+end
+
+local function MoverSizer_OnMouseUp(mover)
+	local frame = mover:GetParent()
+	frame:StopMovingOrSizing()
+	local self = frame.obj
+	local status = self.status or self.localstatus
+	status.width = frame:GetWidth()
+	status.height = frame:GetHeight()
+	status.top = frame:GetTop()
+	status.left = frame:GetLeft()
+end
+
+local function SizerSE_OnMouseDown(frame)
+	frame:GetParent():StartSizing("BOTTOMRIGHT")
+	AceGUI:ClearFocus()
+end
+
+local function SizerS_OnMouseDown(frame)
+	frame:GetParent():StartSizing("BOTTOM")
+	AceGUI:ClearFocus()
+end
+
+local function SizerE_OnMouseDown(frame)
+	frame:GetParent():StartSizing("RIGHT")
+	AceGUI:ClearFocus()
+end
+
+local function StatusBar_OnEnter(frame)
+	frame.obj:Fire("OnEnterStatusBar")
+end
+
+local function StatusBar_OnLeave(frame)
+	frame.obj:Fire("OnLeaveStatusBar")
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self.frame:SetParent(UIParent)
+		self.frame:SetFrameStrata("HIGH")
+		self:SetTitle()
+		self:SetStatusText()
+		self:ApplyStatus()
+		self:Show()
+        self:EnableResize(true)
+	end,
+
+	["OnRelease"] = function(self)
+		self.status = nil
+		wipe(self.localstatus)
+	end,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		local contentwidth = width - 34
+		if contentwidth < 0 then
+			contentwidth = 0
+		end
+		content:SetWidth(contentwidth)
+		content.width = contentwidth
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		local contentheight = height - 57
+		if contentheight < 0 then
+			contentheight = 0
+		end
+		content:SetHeight(contentheight)
+		content.height = contentheight
+	end,
+	--Text Is the Width of the Logo!
+	["SetTitle"] = function(self, title)
+		self.titletext:SetText(title)
+		self.titlebg:SetWidth((self.titletext:GetWidth() or 0) + 300)
+	end,
+
+	["SetStatusText"] = function(self, text)
+		self.statustext:SetText(text)
+	end,
+
+	["Hide"] = function(self)
+		self.frame:Hide()
+	end,
+
+	["Show"] = function(self)
+		self.frame:Show()
+	end,
+
+	["EnableResize"] = function(self, state)
+		local func = state and "Show" or "Hide"
+		self.sizer_se[func](self.sizer_se)
+		self.sizer_s[func](self.sizer_s)
+		self.sizer_e[func](self.sizer_e)
+	end,
+
+	-- called to set an external table to store status in
+	["SetStatusTable"] = function(self, status)
+		assert(type(status) == "table")
+		self.status = status
+		self:ApplyStatus()
+	end,
+
+	["ApplyStatus"] = function(self)
+		local status = self.status or self.localstatus
+		local frame = self.frame
+		self:SetWidth(status.width or 700)
+		self:SetHeight(status.height or 500)
+		frame:ClearAllPoints()
+		if status.top and status.left then
+			frame:SetPoint("TOP", UIParent, "BOTTOM", 0, status.top)
+			frame:SetPoint("LEFT", UIParent, "LEFT", status.left, 0)
+		else
+			frame:SetPoint("CENTER")
+		end
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local FrameBackdrop = {
+	bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+	edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
+	tile = true, tileSize = 32, edgeSize = 32,
+	insets = { left = 8, right = 8, top = 8, bottom = 8 }
+}
+
+local PaneBackdrop  = {
+	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+	tile = true, tileSize = 16, edgeSize = 16,
+	insets = { left = 3, right = 3, top = 5, bottom = 3 }
+}
+
+local function Constructor()
+	local frame = CreateFrame("Frame", nil, UIParent)
+	frame:Hide()
+
+	frame:EnableMouse(true)
+	frame:SetMovable(true)
+	frame:SetResizable(true)
+	--frame:SetFrameStrata("FULLSCREEN_DIALOG")
+	frame:SetFrameStrata("HIGH")
+	frame:SetBackdrop(FrameBackdrop)
+	frame:SetBackdropColor(0, 0, 0, 1)
+	frame:SetMinResize(400, 200)
+	frame:SetToplevel(true)
+	frame:SetScript("OnHide", Frame_OnClose)
+	frame:SetScript("OnMouseDown", Frame_OnMouseDown)
+
+	local closebutton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate")
+	closebutton:SetScript("OnClick", Button_OnClick)
+	closebutton:SetPoint("BOTTOMRIGHT", -27, 17)
+	closebutton:SetHeight(20)
+	closebutton:SetWidth(100)
+	closebutton:SetText(CLOSE)
+
+	local statusbg = CreateFrame("Button", nil, frame)
+	statusbg:SetPoint("BOTTOMLEFT", 15, 15)
+	statusbg:SetPoint("BOTTOMRIGHT", -132, 15)
+	statusbg:SetHeight(24)
+	statusbg:SetBackdrop(PaneBackdrop)
+	statusbg:SetBackdropColor(0.1,0.1,0.1)
+	statusbg:SetBackdropBorderColor(0.4,0.4,0.4)
+	statusbg:SetScript("OnEnter", StatusBar_OnEnter)
+	statusbg:SetScript("OnLeave", StatusBar_OnLeave)
+
+	local statustext = statusbg:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+	statustext:SetPoint("TOPLEFT", 7, -2)
+	statustext:SetPoint("BOTTOMRIGHT", -7, 2)
+	statustext:SetHeight(20)
+	statustext:SetJustifyH("LEFT")
+	statustext:SetText("")
+
+	--Hacky hacky to set a logo then text -- temp logo ChangeMe
+	local titlebg = frame:CreateTexture(nil, "OVERLAY")
+	--titlebg:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
+
+	titlebg:SetTexture("Interface\\Addons\\EMA\\Media\\HeaderLogo.tga")
+	titlebg:SetTexCoord(0, 0.99, 0, 0.99)
+	--titlebg:SetTexCoord(0.10, 0.10, 0.10, 0.10)
+	titlebg:SetPoint("TOP", 0, 50)
+	titlebg:SetWidth(300)
+	titlebg:SetHeight(100)
+
+	local title = CreateFrame("Frame", nil, frame)
+	title:EnableMouse(true)
+	title:SetScript("OnMouseDown", Title_OnMouseDown)
+	title:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
+	title:SetAllPoints(titlebg)
+
+	local titletext = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+	titletext:SetPoint("TOP", titlebg, "TOP", -100, -14)
+
+--This was a frame we don't need with a logo!
+--[[
+	local titlebg_l = frame:CreateTexture(nil, "OVERLAY")
+	titlebg_l:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
+	titlebg_l:SetTexCoord(0.21, 0.31, 0, 0.63)
+	titlebg_l:SetPoint("RIGHT", titlebg, "LEFT")
+	titlebg_l:SetWidth(30)
+	titlebg_l:SetHeight(40)
+
+	local titlebg_r = frame:CreateTexture(nil, "OVERLAY")
+	titlebg_r:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
+	titlebg_r:SetTexCoord(0.67, 0.77, 0, 0.63)
+	titlebg_r:SetPoint("LEFT", titlebg, "RIGHT")
+	titlebg_r:SetWidth(30)
+	titlebg_r:SetHeight(40)
+]]
+
+	local sizer_se = CreateFrame("Frame", nil, frame)
+	sizer_se:SetPoint("BOTTOMRIGHT")
+	sizer_se:SetWidth(25)
+	sizer_se:SetHeight(25)
+	sizer_se:EnableMouse()
+	sizer_se:SetScript("OnMouseDown",SizerSE_OnMouseDown)
+	sizer_se:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
+
+	local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
+	line1:SetWidth(14)
+	line1:SetHeight(14)
+	line1:SetPoint("BOTTOMRIGHT", -8, 8)
+	line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
+	local x = 0.1 * 14/17
+	line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
+
+	local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
+	line2:SetWidth(8)
+	line2:SetHeight(8)
+	line2:SetPoint("BOTTOMRIGHT", -8, 8)
+	line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
+	local x = 0.1 * 8/17
+	line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
+
+	local sizer_s = CreateFrame("Frame", nil, frame)
+	sizer_s:SetPoint("BOTTOMRIGHT", -25, 0)
+	sizer_s:SetPoint("BOTTOMLEFT")
+	sizer_s:SetHeight(25)
+	sizer_s:EnableMouse(true)
+	sizer_s:SetScript("OnMouseDown", SizerS_OnMouseDown)
+	sizer_s:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
+
+	local sizer_e = CreateFrame("Frame", nil, frame)
+	sizer_e:SetPoint("BOTTOMRIGHT", 0, 25)
+	sizer_e:SetPoint("TOPRIGHT")
+	sizer_e:SetWidth(25)
+	sizer_e:EnableMouse(true)
+	sizer_e:SetScript("OnMouseDown", SizerE_OnMouseDown)
+	sizer_e:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
+
+	--Container Support
+	local content = CreateFrame("Frame", nil, frame)
+	content:SetPoint("TOPLEFT", 17, -50)
+	content:SetPoint("BOTTOMRIGHT", -17, 40)
+
+	local widget = {
+		localstatus = {},
+		titletext   = titletext,
+		statustext  = statustext,
+		titlebg     = titlebg,
+		sizer_se    = sizer_se,
+		sizer_s     = sizer_s,
+		sizer_e     = sizer_e,
+		content     = content,
+		frame       = frame,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	closebutton.obj, statusbg.obj = widget, widget
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/GUI/AceGUIWidget-EMAContinueLabel.lua b/EMA/GUI/AceGUIWidget-EMAContinueLabel.lua
new file mode 100644
index 0000000..d5b70e2
--- /dev/null
+++ b/EMA/GUI/AceGUIWidget-EMAContinueLabel.lua
@@ -0,0 +1,158 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+--[[
+File modified from AceGUI Label widget.  Used under Ace3 modified BSD licence.
+]]--
+
+local AceGUI = LibStub("AceGUI-3.0")
+
+--------------------------
+-- Jamba Continue Label
+--------------------------
+do
+	local Type = "EMAContinueLabel"
+	local Version = 1
+
+	local function OnAcquire(self)
+		self:SetText("")
+		self:SetImage(nil)
+		self:SetColor()
+	end
+
+	local function OnRelease(self)
+		self.frame:ClearAllPoints()
+		self.frame:Hide()
+	end
+
+	local function UpdateImageAnchor(self)
+		local width = self.frame.width or self.frame:GetWidth() or 0
+		local image = self.image
+		local label = self.label
+		local frame = self.frame
+		local height
+
+		label:ClearAllPoints()
+		image:ClearAllPoints()
+
+		if self.imageshown then
+			local imagewidth = image:GetWidth()
+			if (width - imagewidth) < 200 or (label:GetText() or "") == "" then
+				--image goes on top centered when less than 200 width for the text, or if there is no text
+				image:SetPoint("TOP",frame,"TOP",0,0)
+				label:SetPoint("TOP",image,"BOTTOM",0,0)
+				label:SetPoint("LEFT",frame,"LEFT",0,0)
+				label:SetWidth(width)
+				height = image:GetHeight() + label:GetHeight()
+			else
+				--image on the left
+				image:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
+				label:SetPoint("TOPLEFT",image,"TOPRIGHT",0,0)
+				label:SetWidth(width - imagewidth)
+				height = math.max(image:GetHeight(), label:GetHeight())
+			end
+		else
+			--no image shown
+			label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
+			label:SetWidth(width)
+			height = self.label:GetHeight()
+		end
+
+		self.resizing = true
+		self.frame:SetHeight(height)
+		self.frame.height = height
+		self.resizing = nil
+	end
+
+	local function SetText(self, text)
+		self.label:SetText(text or "")
+		UpdateImageAnchor(self)
+	end
+
+	local function SetDisabled(self,disabled)
+		if disabled then
+			self.label:SetTextColor(0.5,0.5,0.5)
+		else
+			self.label:SetTextColor(1,1,1)
+		end
+	end
+
+	local function SetColor(self, r, g, b)
+		if not (r and g and b) then
+			r, g, b = 1, 1, 1
+		end
+		self.label:SetVertexColor(r, g, b)
+	end
+
+	local function OnWidthSet(self, width)
+		if self.resizing then return end
+		UpdateImageAnchor(self)
+	end
+
+	local function SetImage(self, path, ...)
+		local image = self.image
+		image:SetTexture(path)
+
+		if image:GetTexture() then
+			self.imageshown = true
+			local n = select('#', ...)
+			if n == 4 or n == 8 then
+				image:SetTexCoord(...)
+			end
+		else
+			self.imageshown = nil
+		end
+		UpdateImageAnchor(self)
+	end
+
+	local function SetImageSize(self, width, height)
+		self.image:SetWidth(width)
+		self.image:SetHeight(height)
+		UpdateImageAnchor(self)
+	end
+
+	local function Constructor()
+		local frame = CreateFrame("Frame",nil,UIParent)
+		local self = {}
+		self.type = Type
+
+		self.OnRelease = OnRelease
+		self.OnAcquire = OnAcquire
+		self.SetText = SetText
+		self.SetDisabled = SetDisabled
+		self.SetColor = SetColor
+		self.frame = frame
+		self.OnWidthSet = OnWidthSet
+		self.SetImage = SetImage
+		self.SetImageSize = SetImageSize
+		frame.obj = self
+
+		frame:SetHeight(14)
+		frame:SetWidth(200)
+		local label = frame:CreateFontString(nil,"BACKGROUND","GameFontHighlight")
+		label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
+		label:SetWidth(200)
+		label:SetHeight(14)
+		label:SetJustifyH("LEFT")
+		label:SetJustifyV("MIDDLE")
+		self.label = label
+
+		local image = frame:CreateTexture(nil,"BACKGROUND")
+		self.image = image
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(Type,Constructor,Version)
+end
+
diff --git a/EMA/GUI/AceGUIWidget-EMAKeybinding.lua b/EMA/GUI/AceGUIWidget-EMAKeybinding.lua
new file mode 100644
index 0000000..8abe366
--- /dev/null
+++ b/EMA/GUI/AceGUIWidget-EMAKeybinding.lua
@@ -0,0 +1,231 @@
+--[[-----------------------------------------------------------------------------
+Keybinding Widget
+Set Keybindings in the Config UI.
+-------------------------------------------------------------------------------]]
+local Type, Version = "EMAKeybinding", 22
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs = pairs
+
+-- WoW APIs
+local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: NOT_BOUND
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+
+local function Control_OnEnter(frame)
+	frame.obj:Fire("OnEnter")
+end
+
+local function Control_OnLeave(frame)
+	frame.obj:Fire("OnLeave")
+end
+
+local function Keybinding_OnClick(frame, button)
+	if button == "LeftButton" or button == "RightButton" then
+		local self = frame.obj
+		if self.waitingForKey then
+			frame:EnableKeyboard(false)
+			self.msgframe:Hide()
+			frame:UnlockHighlight()
+			self.waitingForKey = nil
+		else
+			frame:EnableKeyboard(true)
+			self.msgframe:Show()
+			frame:LockHighlight()
+			self.waitingForKey = true
+		end
+	end
+	AceGUI:ClearFocus()
+end
+
+local ignoreKeys = {
+	["BUTTON1"] = true, ["BUTTON2"] = true,
+	["UNKNOWN"] = true,
+	["LSHIFT"] = true, ["LCTRL"] = true, ["LALT"] = true,
+	["RSHIFT"] = true, ["RCTRL"] = true, ["RALT"] = true,
+}
+local function Keybinding_OnKeyDown(frame, key)
+	local self = frame.obj
+	if self.waitingForKey then
+		local keyPressed = key
+		if keyPressed == "ESCAPE" then
+			keyPressed = ""
+		else
+			if ignoreKeys[keyPressed] then return end
+			if IsShiftKeyDown() then
+				keyPressed = "SHIFT-"..keyPressed
+			end
+			if IsControlKeyDown() then
+				keyPressed = "CTRL-"..keyPressed
+			end
+			if IsAltKeyDown() then
+				keyPressed = "ALT-"..keyPressed
+			end
+		end
+
+		frame:EnableKeyboard(false)
+		self.msgframe:Hide()
+		frame:UnlockHighlight()
+		self.waitingForKey = nil
+
+		if not self.disabled then
+			self:SetKey(keyPressed)
+			self:Fire("OnKeyChanged", keyPressed)
+		end
+	end
+end
+
+local function Keybinding_OnMouseDown(frame, button)
+	if button == "LeftButton" or button == "RightButton" then
+		return
+	elseif button == "MiddleButton" then
+		button = "BUTTON3"
+	elseif button == "Button4" then
+		button = "BUTTON4"
+	elseif button == "Button5" then
+		button = "BUTTON5"
+	end
+	Keybinding_OnKeyDown(frame, button)
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetWidth(200)
+		self:SetLabel("")
+		self:SetKey("")
+		self.waitingForKey = nil
+		self.msgframe:Hide()
+		self:SetDisabled(false)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["SetDisabled"] = function(self, disabled)
+		self.disabled = disabled
+		if disabled then
+			self.button:Disable()
+			self.label:SetTextColor(0.5,0.5,0.5)
+		else
+			self.button:Enable()
+			self.label:SetTextColor(1,1,1)
+		end
+	end,
+
+	["SetKey"] = function(self, key)
+		if (key or "") == "" then
+			self.button:SetText(NOT_BOUND)
+			self.button:SetNormalFontObject("GameFontNormal")
+		else
+			self.button:SetText(key)
+			self.button:SetNormalFontObject("GameFontHighlight")
+		end
+	end,
+
+	["GetKey"] = function(self)
+		local key = self.button:GetText()
+		if key == NOT_BOUND then
+			key = nil
+		end
+		return key
+	end,
+
+	["SetLabel"] = function(self, label)
+		self.label:SetText(label or "")
+		if (label or "") == "" then
+			self.alignoffset = nil
+			self:SetHeight(24)
+		else
+			self.alignoffset = 30
+			self:SetHeight(44)
+		end
+	end,
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+
+local ControlBackdrop  = {
+	bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
+	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+	tile = true, tileSize = 16, edgeSize = 16,
+	insets = { left = 3, right = 3, top = 3, bottom = 3 }
+}
+
+local function keybindingMsgFixWidth(frame)
+	frame:SetWidth(frame.msg:GetWidth() + 10)
+	frame:SetScript("OnUpdate", nil)
+end
+
+local function Constructor()
+	local name = "AceGUI30KeybindingButton" .. AceGUI:GetNextWidgetNum(Type)
+
+	local frame = CreateFrame("Frame", nil, UIParent)
+	local button = CreateFrame("Button", name, frame, "UIPanelButtonTemplate")
+
+	button:EnableMouse(true)
+	button:RegisterForClicks("AnyDown")
+	button:SetScript("OnEnter", Control_OnEnter)
+	button:SetScript("OnLeave", Control_OnLeave)
+	button:SetScript("OnClick", Keybinding_OnClick)
+	button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
+	button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
+	button:EnableKeyboard(false)
+	button:SetPoint("BOTTOMLEFT")
+	button:SetPoint("BOTTOMRIGHT")
+	button:SetHeight(24)
+
+	local text = button:GetFontString()
+	text:SetPoint("LEFT", 7, 0)
+	text:SetPoint("RIGHT", -7, 0)
+
+	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
+	label:SetPoint("TOPLEFT")
+	label:SetPoint("TOPRIGHT")
+	label:SetJustifyH("CENTER")
+	label:SetHeight(18)
+
+	local msgframe = CreateFrame("Frame", nil, UIParent)
+	msgframe:SetHeight(30)
+	msgframe:SetBackdrop(ControlBackdrop)
+	msgframe:SetBackdropColor(0,0,0)
+	msgframe:SetFrameStrata("FULLSCREEN_DIALOG")
+	msgframe:SetFrameLevel(1000)
+
+	local msg = msgframe:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+	msg:SetText("Press a key to bind, ESC to clear the binding or click the button again to cancel.")
+	msgframe.msg = msg
+	msg:SetPoint("TOPLEFT", 5, -5)
+	msgframe:SetScript("OnUpdate", keybindingMsgFixWidth)
+	msgframe:SetPoint("BOTTOM", button, "TOP")
+	msgframe:Hide()
+
+	local widget = {
+		button      = button,
+		label       = label,
+		msgframe    = msgframe,
+		frame       = frame,
+		alignoffset = 30,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	button.obj = widget
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/GUI/AceGUIWidget-EMANormalLabel.lua b/EMA/GUI/AceGUIWidget-EMANormalLabel.lua
new file mode 100644
index 0000000..ca01c67
--- /dev/null
+++ b/EMA/GUI/AceGUIWidget-EMANormalLabel.lua
@@ -0,0 +1,158 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+--[[
+File modified from AceGUI Label widget.  Used under Ace3 modified BSD licence.
+]]--
+
+local AceGUI = LibStub("AceGUI-3.0")
+
+--------------------------
+-- Jamba Normal Label
+--------------------------
+do
+	local Type = "EMANormalLabel"
+	local Version = 1
+
+	local function OnAcquire(self)
+		self:SetText("")
+		self:SetImage(nil)
+		self:SetColor()
+	end
+
+	local function OnRelease(self)
+		self.frame:ClearAllPoints()
+		self.frame:Hide()
+	end
+
+	local function UpdateImageAnchor(self)
+		local width = self.frame.width or self.frame:GetWidth() or 0
+		local image = self.image
+		local label = self.label
+		local frame = self.frame
+		local height
+
+		label:ClearAllPoints()
+		image:ClearAllPoints()
+
+		if self.imageshown then
+			local imagewidth = image:GetWidth()
+			if (width - imagewidth) < 200 or (label:GetText() or "") == "" then
+				--image goes on top centered when less than 200 width for the text, or if there is no text
+				image:SetPoint("TOP",frame,"TOP",0,0)
+				label:SetPoint("TOP",image,"BOTTOM",0,0)
+				label:SetPoint("LEFT",frame,"LEFT",0,0)
+				label:SetWidth(width)
+				height = image:GetHeight() + label:GetHeight()
+			else
+				--image on the left
+				image:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
+				label:SetPoint("TOPLEFT",image,"TOPRIGHT",0,0)
+				label:SetWidth(width - imagewidth)
+				height = math.max(image:GetHeight(), label:GetHeight())
+			end
+		else
+			--no image shown
+			label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
+			label:SetWidth(width)
+			height = self.label:GetHeight()
+		end
+
+		self.resizing = true
+		self.frame:SetHeight(height)
+		self.frame.height = height
+		self.resizing = nil
+	end
+
+	local function SetText(self, text)
+		self.label:SetText(text or "")
+		UpdateImageAnchor(self)
+	end
+
+	local function SetDisabled(self,disabled)
+		if disabled then
+			self.label:SetTextColor(0.5,0.5,0.5)
+		else
+			self.label:SetTextColor(1,1,1)
+		end
+	end
+
+	local function SetColor(self, r, g, b)
+		if not (r and g and b) then
+			r, g, b = 1, 1, 1
+		end
+		self.label:SetVertexColor(r, g, b)
+	end
+
+	local function OnWidthSet(self, width)
+		if self.resizing then return end
+		UpdateImageAnchor(self)
+	end
+
+	local function SetImage(self, path, ...)
+		local image = self.image
+		image:SetTexture(path)
+
+		if image:GetTexture() then
+			self.imageshown = true
+			local n = select('#', ...)
+			if n == 4 or n == 8 then
+				image:SetTexCoord(...)
+			end
+		else
+			self.imageshown = nil
+		end
+		UpdateImageAnchor(self)
+	end
+
+	local function SetImageSize(self, width, height)
+		self.image:SetWidth(width)
+		self.image:SetHeight(height)
+		UpdateImageAnchor(self)
+	end
+
+	local function Constructor()
+		local frame = CreateFrame("Frame",nil,UIParent)
+		local self = {}
+		self.type = Type
+
+		self.OnRelease = OnRelease
+		self.OnAcquire = OnAcquire
+		self.SetText = SetText
+		self.SetDisabled = SetDisabled
+		self.SetColor = SetColor
+		self.frame = frame
+		self.OnWidthSet = OnWidthSet
+		self.SetImage = SetImage
+		self.SetImageSize = SetImageSize
+		frame.obj = self
+
+		frame:SetHeight(24)
+		frame:SetWidth(200)
+		local label = frame:CreateFontString(nil,"BACKGROUND","GameFontHighlight")
+		label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
+		label:SetWidth(200)
+		label:SetHeight(24)
+		label:SetJustifyH("LEFT")
+		label:SetJustifyV("MIDDLE")
+		self.label = label
+
+		local image = frame:CreateTexture(nil,"BACKGROUND")
+		self.image = image
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(Type,Constructor,Version)
+end
+
diff --git a/EMA/GUI/EMAHelperSettings.lua b/EMA/GUI/EMAHelperSettings.lua
new file mode 100644
index 0000000..1e08cbb
--- /dev/null
+++ b/EMA/GUI/EMAHelperSettings.lua
@@ -0,0 +1,668 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+local MAJOR, MINOR = "EMAHelperSettings-1.0", 2
+local EMAHelperSettings, oldMinor = LibStub:NewLibrary( MAJOR, MINOR )
+
+if not EMAHelperSettings then
+	return
+end
+
+-- Locale.
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+
+-- Get the ACE GUI Library.
+local AceGUI = LibStub( "AceGUI-3.0" )
+
+-- Register a manual layout function which does nothing, each child manually sets its size and position.
+AceGUI:RegisterLayout( "EMAManual", function(content, children) end )
+
+
+AceGUI:RegisterLayout("EMAFill",
+	function(content, children)
+		if children[1] then
+			local offset = 12
+			local height = content:GetHeight() - offset
+			local width = content:GetWidth()
+			children[1]:SetWidth(width)
+			children[1]:SetHeight(height)
+			children[1]:SetPoint( "TOPLEFT", 0, -offset )
+			children[1]:ClearAllPoints()
+			children[1].frame:Show()
+
+		end
+	end)
+
+
+	-- A single control fills the whole content area
+AceGUI:RegisterLayout("EMAFillAce3Fix",
+	function(content, children)
+		if children[1] then
+			children[1].frame:Hide()
+			local offset = 0
+			local height = content:GetHeight()
+			local width = content:GetWidth()
+			children[1]:SetWidth(width)
+			children[1]:SetHeight(height)
+			children[1]:SetPoint("TOPLEFT", content)
+			children[1]:ClearAllPoints()
+			children[1].frame:Show()
+
+		end
+	end)
+
+-------------------------------------------------------------------------------------------------------------
+-- Spacing.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetHorizontalSpacing()
+	return 2
+end
+
+function EMAHelperSettings:GetVerticalSpacing()
+	return 2
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Frame.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateSettings( settingsControl, displayName, parentDisplayName, pushSettingsCallback, moduleIcon, order )
+	if moduleIcon == nil then
+		moduleIcon = "Interface\\Icons\\Temp"
+	end
+
+	if order == nil then
+		order = 1000
+	end
+
+	local containerWidgetSettings = AceGUI:Create( "SimpleGroup" )
+	containerWidgetSettings:SetLayout( "Fill" )
+
+	local widgetSettings = AceGUI:Create( "ScrollFrame" )
+	widgetSettings:SetLayout( "EMAFill" )
+
+	containerWidgetSettings:AddChild( widgetSettings )
+
+	local button = AceGUI:Create( "Button" )
+	if displayName == "News" then
+		button:SetText( L["PUSH_ALL_SETTINGS"] )
+	else
+		button:SetText( L["PUSH_SETTINGS"] )
+	end
+
+	containerWidgetSettings:AddChild( button )
+	button:SetWidth( 200 )
+	button:SetPoint( "TOPLEFT", containerWidgetSettings.frame, "TOPRIGHT", -200, 40 )
+	button:SetCallback( "OnClick", pushSettingsCallback )
+	settingsControl.widgetPushSettingsButton = button
+
+	settingsControl.widgetSettingsHelp = widgetSettingsHelp
+	settingsControl.containerWidgetSettings = containerWidgetSettings
+	settingsControl.widgetSettings = widgetSettings
+	EMAPrivate.SettingsFrame.Tree.Add( displayName, parentDisplayName, moduleIcon, order, settingsControl.containerWidgetSettings )
+end
+
+function EMAHelperSettings:TopOfSettings()
+	return 0
+end
+
+function EMAHelperSettings:LeftOfSettings()
+	return 0
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Help.  Removed We need to keep this here incase some module needs CreateHelp
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateHelp( settingsControl, help, configuration )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Heading.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:HeadingWidth( hasScrollBar )
+	local width = 600
+	if hasScrollBar == true then
+		return width
+	else
+		return width + 20
+	end
+end
+
+function EMAHelperSettings:HeadingHeight()
+	-- Defined as 18 in the AceGUI Heading Widget (added 2 more pixels for spacing purposes).
+	return 20
+end
+
+function EMAHelperSettings:CreateHeading( settingsControl, text, top, hasScrollBar )
+	-- Create a heading
+	local heading = AceGUI:Create( "Heading" )
+	heading:SetText( text )
+	settingsControl.widgetSettings:AddChild( heading )
+	heading:SetWidth( self:HeadingWidth( hasScrollBar ) )
+	heading:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", 0, top )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Frame backdrop.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateBackdrop()
+	local frameBackdrop  = {
+		bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+		tile = true, tileSize = 16, edgeSize = 16,
+		insets = { left = 3, right = 3, top = 5, bottom = 3 }
+	}
+	return frameBackdrop
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- ToolTip.
+-------------------------------------------------------------------------------------------------------------
+
+
+local function onControlEnter(widget, event, value)
+	GameTooltip:ClearLines()
+	GameTooltip:SetOwner(widget.frame, "ANCHOR_TOP")
+	GameTooltip:AddLine(widget.text and widget.text:GetText() or widget.label:GetText())
+	GameTooltip:AddLine(widget:GetUserData("tooltip"), 1, 1, 1, 1)
+	GameTooltip:Show()
+end
+
+local function onControlLeave() GameTooltip:Hide() end
+
+-------------------------------------------------------------------------------------------------------------
+-- Button.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetButtonHeight()
+	-- Defined as 24 in the AceGUI Button Widget .
+	return 24
+end
+
+function EMAHelperSettings:CreateButton( settingsControl, width, left, top, text, buttonCallback, toolTip )
+	local button = AceGUI:Create( "Button" )
+	button:SetText( text )
+	settingsControl.widgetSettings:AddChild( button )
+	button:SetWidth( width )
+	button:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	button:SetCallback( "OnClick", buttonCallback )
+	--button:SetUserData("key", "keyword") -- needed/??
+	button:SetUserData("tooltip", toolTip)
+	button:SetCallback("OnEnter", onControlEnter)
+	button:SetCallback("OnLeave", onControlLeave)
+	return button
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Icon.
+-------------------------------------------------------------------------------------------------------------
+
+
+function EMAHelperSettings:Icon( settingsControl, sizeW, sizeH, image, left, top, text, buttonCallback, toolTip )
+	local icon = AceGUI:Create( "Icon" )
+	icon:SetLabel( text )
+	icon:SetImage ( image )
+	icon:SetImageSize( sizeW, sizeH )
+	settingsControl.widgetSettings:AddChild( icon )
+	icon:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	icon:SetCallback( "OnClick", buttonCallback )
+	icon:SetUserData("tooltip", toolTip)
+	icon:SetCallback("OnEnter", onControlEnter)
+	icon:SetCallback("OnLeave", onControlLeave)
+	return icon
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- CheckBox.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetCheckBoxHeight()
+	-- Defined as 24 in the AceGUI CheckBox Widget.
+	return 24
+end
+
+function EMAHelperSettings:GetRadioBoxHeight()
+	-- Defined as 16 in the AceGUI CheckBox Widget (added 4 pixels for spacing).
+	return 20
+end
+
+function EMAHelperSettings:CreateCheckBox( settingsControl, width, left, top, text, checkBoxCallback, toolTip )
+	local button = AceGUI:Create( "CheckBox" )
+	button:SetLabel( text )
+	settingsControl.widgetSettings:AddChild( button )
+	button:SetWidth( width )
+	button:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	button:SetCallback( "OnValueChanged", checkBoxCallback )
+	button:SetUserData("tooltip", toolTip)
+	button:SetCallback("OnEnter", onControlEnter)
+	button:SetCallback("OnLeave", onControlLeave)
+	return button
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EditBox.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetEditBoxHeight()
+	-- Defined as 44 (with label) in the AceGUI EditBox Widget.
+	return 44
+end
+
+function EMAHelperSettings:CreateEditBox( settingsControl, width, left, top, text, toolTip )
+	local editBox = AceGUI:Create( "EditBox" )
+	editBox:SetLabel( text )
+	settingsControl.widgetSettings:AddChild( editBox )
+	editBox:SetWidth( width )
+	editBox:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	editBox:SetUserData("tooltip", toolTip)
+	editBox:SetCallback("OnEnter", onControlEnter)
+	editBox:SetCallback("OnLeave", onControlLeave)
+	return editBox
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Multi EditBox.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateMultiEditBox( settingsControl, width, left, top, text, lines, toolTip )
+	local editBox = AceGUI:Create( "MultiLineEditBox" )
+	editBox:SetLabel( text )
+	settingsControl.widgetSettings:AddChild( editBox )
+	editBox:SetWidth( width )
+	editBox:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	editBox:SetNumLines( lines )
+	editBox:SetUserData("tooltip", toolTip)
+	editBox:SetCallback("OnEnter", onControlEnter)
+	editBox:SetCallback("OnLeave", onControlLeave)
+	return editBox
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Keybinding.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetKeyBindingHeight()
+	-- Defined as 44 (with label) in the AceGUI Keybinding Widget.
+	return 44
+end
+
+function EMAHelperSettings:CreateKeyBinding( settingsControl, width, left, top, text )
+	local keyBinding = AceGUI:Create( "EMAKeybinding" )
+	keyBinding:SetLabel( text )
+	settingsControl.widgetSettings:AddChild( keyBinding )
+	keyBinding:SetWidth( width )
+	keyBinding:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	return keyBinding
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Dropdown.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetDropdownHeight()
+	-- Defined as 44 (with label) in the AceGUI Dropdown Widget.
+	return 44
+end
+
+function EMAHelperSettings:CreateDropdown( settingsControl, width, left, top, text )
+	local dropdown = AceGUI:Create( "Dropdown" )
+	dropdown:ClearAllPoints()
+	dropdown:SetLabel( text )
+	settingsControl.widgetSettings:AddChild( dropdown )
+	dropdown:SetWidth( width )
+	dropdown:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	return dropdown
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Icon.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetIconHeight()
+	return 32
+end
+
+
+function EMAHelperSettings:CreateIcon( settingsControl, width, left, top, iconName )
+	--print("testGUI", text, icon, iconSize )
+	local icon = AceGUI:Create( "Label" )
+	icon:SetImage( iconName )
+	icon:SetImageSize( 32, 32 )
+	settingsControl.widgetSettings:AddChild( icon )
+	icon:SetWidth( width )
+	icon:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	return icon
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Label.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetLabelHeight()
+	-- Defined as 24 in the AceGUI EMA NormalLabel Widget.
+	return 24
+end
+
+function EMAHelperSettings:CreateLabel( settingsControl, width, left, top, text )
+	local label = AceGUI:Create( "EMANormalLabel" )
+	label:SetText( text )
+	settingsControl.widgetSettings:AddChild( label )
+	label:SetWidth( width )
+	label:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	return label
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Label continue.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetContinueLabelHeight()
+	-- Defined as 14 in the AceGUI EMA ContinueLabel Widget.
+	return 14
+end
+
+function EMAHelperSettings:CreateContinueLabel( settingsControl, width, left, top, text )
+	local label = AceGUI:Create( "EMAContinueLabel" )
+	label:SetText( text )
+	settingsControl.widgetSettings:AddChild( label )
+	label:SetWidth( width )
+	label:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	return label
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Slider.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetSliderHeight()
+	return 45
+end
+
+function EMAHelperSettings:CreateSlider( settingsControl, width, left, top, text )
+	local slider = AceGUI:Create( "Slider" )
+	slider:SetLabel( text )
+	settingsControl.widgetSettings:AddChild( slider )
+	slider:SetWidth( width )
+	slider:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	slider:SetSliderValues( 0, 100, 1 )
+	slider:SetValue( 0 )
+	return slider
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Colour pickers.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetColourPickerHeight()
+	return 25
+end
+
+function EMAHelperSettings:CreateColourPicker( settingsControl, width, left, top, text )
+	local picker = AceGUI:Create( "ColorPicker" )
+	picker:SetLabel( text )
+	settingsControl.widgetSettings:AddChild( picker )
+	picker:SetWidth( width )
+	picker:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	return picker
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Media.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:GetMediaHeight()
+	return 45
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Media Status Bar.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateMediaStatus( settingsControl, width, left, top, text )
+	local media = AceGUI:Create( "LSM30_Statusbar" )
+	media:SetLabel( text )
+	media:SetWidth( width )
+	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	media:SetList()
+	settingsControl.widgetSettings:AddChild( media )
+	return media
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Media Border.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateMediaBorder( settingsControl, width, left, top, text )
+	local media = AceGUI:Create( "LSM30_Border" )
+	media:SetLabel( text )
+	media:SetWidth( width )
+	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	media:SetList()
+	settingsControl.widgetSettings:AddChild( media )
+	return media
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Media Background.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateMediaBackground( settingsControl, width, left, top, text )
+	local media = AceGUI:Create( "LSM30_Background" )
+	media:SetLabel( text )
+	media:SetWidth( width )
+	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	media:SetList()
+	settingsControl.widgetSettings:AddChild( media )
+	return media
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Media Font.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateMediaFont( settingsControl, width, left, top, text )
+	local media = AceGUI:Create( "LSM30_Font" )
+	media:SetLabel( text )
+	media:SetWidth( width )
+	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
+	media:SetList()
+	settingsControl.widgetSettings:AddChild( media )
+	return media
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Media Sound.
+-------------------------------------------------------------------------------------------------------------
+
+function EMAHelperSettings:CreateMediaSound( settingsControl, width, left, top, text )
+	local media = AceGUI:Create( "LSM30_Sound" )
+	media:SetLabel( text )
+	media:SetWidth( width )
+	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content , "TOPLEFT", left, top )
+	media:SetList()
+	settingsControl.widgetSettings:AddChild( media )
+	return media
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- FauxScrollFrame.
+-------------------------------------------------------------------------------------------------------------
+
+--
+-- List Structure
+--
+-- Required to be passed into the function.
+--
+-- list.listFrameName - String (name of list frame)
+-- list.parentFrame - Frame (parent frame for the list)
+-- list.listTop - Number (top location in parent frame)
+-- list.listLeft - Number (left location in parent frame)
+-- list.listWidth - Number (width of list)
+-- list.rowHeight - Number (height of row)
+-- list.rowsToDisplay - Number (number of rows to display)
+-- list.columnsToDisplay - Number (number of columns to display)
+-- list.columnInformation - Table (table of columns information)
+-- list.columnInformation[x]- Table (table of column information)
+-- list.columnInformation[x].width - Number[0,100] (percentage of width to use for this column)
+-- list.columnInformation[x].alignment - String (column text alignment string: "LEFT", "CENTER" or "RIGHT")
+-- list.scrollRefreshCallback - Function (called when the list is scrolled, no parameters)
+-- list.rowClickCallback - Function (called when a column in a row is clicked, parameters: self, rowNumber, columnNumber)
+--
+-- Created by the function.
+--
+-- list.listFrame - Frame (list frame holder)
+-- list.listScrollFrame - Frame (list frame holder)
+-- list.listHeight - Number (height of list - decided by number of display rows * height of each row)
+-- list.rows - Table
+-- list.rows[x] - Frame (row frame)
+-- list.rows[x].highlight - Texture (row frame texture for highlight)
+-- list.rows[x].columns - Table
+-- list.rows[x].columns[y] - Frame (column frame)
+-- list.rows[x].columns[y].rowNumber - Number (the row number of this row)
+-- list.rows[x].columns[y].columnNumber - Number (the column number of this column)
+-- list.rows[x].columns[y].textString - FontString (where text for column goes)
+--
+
+function EMAHelperSettings:CreateScrollList( list )
+	-- Position and size constants.
+	local columnSpacing = 6
+	local widthOfScrollBar = 16
+	local rowVerticalSpacing = 3
+	local rowWidth = list.listWidth - ( columnSpacing * 2 ) - widthOfScrollBar
+	list.listHeight = list.rowsToDisplay * list.rowHeight + ( rowVerticalSpacing * 2 )
+	-- Create the holder frame.
+	list.listFrame = CreateFrame(
+		"Frame",
+		list.listFrameName,
+		list.parentFrame
+	)
+	list.listFrame:SetBackdrop( self:CreateBackdrop() )
+	list.listFrame:SetBackdropColor( 0.1, 0.1, 0.1, 0.5 )
+	list.listFrame:SetBackdropBorderColor( 0.4, 0.4, 0.4 )
+	list.listFrame:SetPoint( "TOPLEFT", list.parentFrame, "TOPLEFT", list.listLeft, list.listTop )
+	list.listFrame:SetWidth( list.listWidth )
+	list.listFrame:SetHeight( list.listHeight )
+	-- Create the scroll frame.
+	list.listScrollFrame = CreateFrame(
+		"ScrollFrame",
+		list.listFrame:GetName().."ScrollFrame",
+		list.listFrame,
+		"FauxScrollFrameTemplate"
+	)
+	list.listScrollFrame:SetPoint( "TOPLEFT", list.listFrame, "TOPLEFT", 0, -4 )
+	list.listScrollFrame:SetPoint( "BOTTOMRIGHT", list.listFrame, "BOTTOMRIGHT", -26, 3 )
+	list.listScrollFrame:SetScript( "OnVerticalScroll",
+		function( self, offset )
+			FauxScrollFrame_OnVerticalScroll(
+				self,
+				offset,
+				list.rowHeight,
+				list.scrollRefreshCallback )
+		end
+	)
+	-- Create frames for scroll table rows and columns.
+	list.rows = {}
+	for iterateDisplayRows = 1, list.rowsToDisplay do
+		local displayRow = CreateFrame(
+			"Frame",
+			list.listFrame:GetName().."Row"..iterateDisplayRows,
+			list.listFrame
+		)
+		displayRow:SetWidth( rowWidth )
+		displayRow:SetHeight( list.rowHeight )
+		displayRow:SetPoint(
+			"TOPLEFT",
+			list.listFrame,
+			"TOPLEFT",
+			columnSpacing,
+			( -1 * rowVerticalSpacing ) - ( list.rowHeight * ( iterateDisplayRows - 1 ) )
+		)
+		displayRow.highlight = displayRow:CreateTexture( nil, "OVERLAY" )
+		displayRow.highlight:SetAllPoints( displayRow )
+		list.rows[iterateDisplayRows] = displayRow
+		displayRow.columns = {}
+		local columnPosition = 0
+		for iterateDisplayColumns = 1, list.columnsToDisplay do
+			local displayColumn = CreateFrame(
+				"Button",
+				displayRow:GetName().."Column"..iterateDisplayColumns,
+				displayRow,
+				"SecureActionButtonTemplate"
+			)
+			if InCombatLockdown() == true then
+				return
+			end
+
+			displayColumn.rowNumber = iterateDisplayRows
+			displayColumn.columnNumber = iterateDisplayColumns
+			displayColumn.textString = displayRow:CreateFontString(
+				displayColumn:GetName().."Text",
+				"OVERLAY",
+				"GameFontHighlight"
+			)
+			local columnWidth = ( list.columnInformation[iterateDisplayColumns].width / 100 ) *
+				( rowWidth - ( columnSpacing * ( list.columnsToDisplay - 1 ) ) )
+			displayColumn:SetPoint( "TOPLEFT", displayRow, "TOPLEFT", columnPosition, 0 )
+			displayColumn:SetWidth( columnWidth )
+			displayColumn:SetHeight( list.rowHeight )
+			if InCombatLockdown() == false then
+				displayColumn:EnableMouse( true )
+				displayColumn:RegisterForClicks( "AnyUp" )
+			end
+			displayColumn:SetScript( "PostClick",
+				function( self, button )
+					if button == "LeftButton" then
+						list.rowClickCallback( self, displayColumn.rowNumber, displayColumn.columnNumber )
+					end
+					if button == "RightButton" then
+						if list.rowRightClickCallback ~= nil then
+							list.rowRightClickCallback( displayColumn.rowNumber, displayColumn.columnNumber )
+						end
+					end
+				end
+			)
+			displayColumn:SetScript("OnEnter",
+				function(self)
+					if list.rowMouseOverCallBack_OnEnter ~= nil then
+						list.rowMouseOverCallBack_OnEnter( displayColumn.rowNumber, displayColumn.columnNumber )
+					end
+				end
+			)
+			displayColumn:SetScript("OnLeave",
+				function(self)
+					if list.rowMouseOverCallBack_OnLeave ~= nil then
+						list.rowMouseOverCallBack_OnLeave( displayColumn.rowNumber, displayColumn.columnNumber )
+					end
+				end
+			)
+			displayColumn.textString:SetJustifyH( list.columnInformation[iterateDisplayColumns].alignment )
+			displayColumn.textString:SetAllPoints( displayColumn )
+			displayRow.columns[iterateDisplayColumns] = displayColumn
+			columnPosition = columnPosition + columnWidth + columnSpacing
+		end
+	end
+end
+
+function EMAHelperSettings:SetFauxScrollFramePosition( scrollFrame, position, maxPosition, rowHeight )
+	FauxScrollFrame_SetOffset( scrollFrame, position )
+	local scrollBar = getglobal( scrollFrame:GetName().."ScrollBar" )
+	if scrollBar ~= nil then
+		local minScroll, maxScroll = scrollBar:GetMinMaxValues()
+		scrollBar:SetValue( minScroll + ( ( maxScroll - minScroll + (2 * rowHeight) ) * position / maxPosition ) )
+	end
+end
diff --git a/EMA/LICENSE b/EMA/LICENSE
new file mode 100644
index 0000000..83bb460
--- /dev/null
+++ b/EMA/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2008-2015  Michael "Jafula" Miller
+Copyright (c) 2015-2018  Jennifer Cally
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/EMA/Libs/AceAddon-3.0/AceAddon-3.0.lua b/EMA/Libs/AceAddon-3.0/AceAddon-3.0.lua
new file mode 100644
index 0000000..a7f7279
--- /dev/null
+++ b/EMA/Libs/AceAddon-3.0/AceAddon-3.0.lua
@@ -0,0 +1,674 @@
+--- **AceAddon-3.0** provides a template for creating addon objects.
+-- It'll provide you with a set of callback functions that allow you to simplify the loading
+-- process of your addon.\\
+-- Callbacks provided are:\\
+-- * **OnInitialize**, which is called directly after the addon is fully loaded.
+-- * **OnEnable** which gets called during the PLAYER_LOGIN event, when most of the data provided by the game is already present.
+-- * **OnDisable**, which is only called when your addon is manually being disabled.
+-- @usage
+-- -- A small (but complete) addon, that doesn't do anything,
+-- -- but shows usage of the callbacks.
+-- local MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
+--
+-- function MyAddon:OnInitialize()
+--   -- do init tasks here, like loading the Saved Variables,
+--   -- or setting up slash commands.
+-- end
+--
+-- function MyAddon:OnEnable()
+--   -- Do more initialization here, that really enables the use of your addon.
+--   -- Register Events, Hook functions, Create Frames, Get information from
+--   -- the game that wasn't available in OnInitialize
+-- end
+--
+-- function MyAddon:OnDisable()
+--   -- Unhook, Unregister Events, Hide frames that you created.
+--   -- You would probably only use an OnDisable if you want to
+--   -- build a "standby" mode, or be able to toggle modules on/off.
+-- end
+-- @class file
+-- @name AceAddon-3.0.lua
+-- @release $Id: AceAddon-3.0.lua 1084 2013-04-27 20:14:11Z nevcairiel $
+
+local MAJOR, MINOR = "AceAddon-3.0", 12
+local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceAddon then return end -- No Upgrade needed.
+
+AceAddon.frame = AceAddon.frame or CreateFrame("Frame", "AceAddon30Frame") -- Our very own frame
+AceAddon.addons = AceAddon.addons or {} -- addons in general
+AceAddon.statuses = AceAddon.statuses or {} -- statuses of addon.
+AceAddon.initializequeue = AceAddon.initializequeue or {} -- addons that are new and not initialized
+AceAddon.enablequeue = AceAddon.enablequeue or {} -- addons that are initialized and waiting to be enabled
+AceAddon.embeds = AceAddon.embeds or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end }) -- contains a list of libraries embedded in an addon
+
+-- Lua APIs
+local tinsert, tconcat, tremove = table.insert, table.concat, table.remove
+local fmt, tostring = string.format, tostring
+local select, pairs, next, type, unpack = select, pairs, next, type, unpack
+local loadstring, assert, error = loadstring, assert, error
+local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: LibStub, IsLoggedIn, geterrorhandler
+
+--[[
+	 xpcall safecall implementation
+]]
+local xpcall = xpcall
+
+local function errorhandler(err)
+	return geterrorhandler()(err)
+end
+
+local function CreateDispatcher(argCount)
+	local code = [[
+		local xpcall, eh = ...
+		local method, ARGS
+		local function call() return method(ARGS) end
+
+		local function dispatch(func, ...)
+			 method = func
+			 if not method then return end
+			 ARGS = ...
+			 return xpcall(call, eh)
+		end
+
+		return dispatch
+	]]
+
+	local ARGS = {}
+	for i = 1, argCount do ARGS[i] = "arg"..i end
+	code = code:gsub("ARGS", tconcat(ARGS, ", "))
+	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
+end
+
+local Dispatchers = setmetatable({}, {__index=function(self, argCount)
+	local dispatcher = CreateDispatcher(argCount)
+	rawset(self, argCount, dispatcher)
+	return dispatcher
+end})
+Dispatchers[0] = function(func)
+	return xpcall(func, errorhandler)
+end
+
+local function safecall(func, ...)
+	-- we check to see if the func is passed is actually a function here and don't error when it isn't
+	-- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not
+	-- present execution should continue without hinderance
+	if type(func) == "function" then
+		return Dispatchers[select('#', ...)](func, ...)
+	end
+end
+
+-- local functions that will be implemented further down
+local Enable, Disable, EnableModule, DisableModule, Embed, NewModule, GetModule, GetName, SetDefaultModuleState, SetDefaultModuleLibraries, SetEnabledState, SetDefaultModulePrototype
+
+-- used in the addon metatable
+local function addontostring( self ) return self.name end
+
+-- Check if the addon is queued for initialization
+local function queuedForInitialization(addon)
+	for i = 1, #AceAddon.initializequeue do
+		if AceAddon.initializequeue[i] == addon then
+			return true
+		end
+	end
+	return false
+end
+
+--- Create a new AceAddon-3.0 addon.
+-- Any libraries you specified will be embeded, and the addon will be scheduled for
+-- its OnInitialize and OnEnable callbacks.
+-- The final addon object, with all libraries embeded, will be returned.
+-- @paramsig [object ,]name[, lib, ...]
+-- @param object Table to use as a base for the addon (optional)
+-- @param name Name of the addon object to create
+-- @param lib List of libraries to embed into the addon
+-- @usage
+-- -- Create a simple addon object
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceEvent-3.0")
+--
+-- -- Create a Addon object based on the table of a frame
+-- local MyFrame = CreateFrame("Frame")
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon(MyFrame, "MyAddon", "AceEvent-3.0")
+function AceAddon:NewAddon(objectorname, ...)
+	local object,name
+	local i=1
+	if type(objectorname)=="table" then
+		object=objectorname
+		name=...
+		i=2
+	else
+		name=objectorname
+	end
+	if type(name)~="string" then
+		error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2)
+	end
+	if self.addons[name] then
+		error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon '%s' already exists."):format(name), 2)
+	end
+
+	object = object or {}
+	object.name = name
+
+	local addonmeta = {}
+	local oldmeta = getmetatable(object)
+	if oldmeta then
+		for k, v in pairs(oldmeta) do addonmeta[k] = v end
+	end
+	addonmeta.__tostring = addontostring
+
+	setmetatable( object, addonmeta )
+	self.addons[name] = object
+	object.modules = {}
+	object.orderedModules = {}
+	object.defaultModuleLibraries = {}
+	Embed( object ) -- embed NewModule, GetModule methods
+	self:EmbedLibraries(object, select(i,...))
+
+	-- add to queue of addons to be initialized upon ADDON_LOADED
+	tinsert(self.initializequeue, object)
+	return object
+end
+
+
+--- Get the addon object by its name from the internal AceAddon registry.
+-- Throws an error if the addon object cannot be found (except if silent is set).
+-- @param name unique name of the addon object
+-- @param silent if true, the addon is optional, silently return nil if its not found
+-- @usage
+-- -- Get the Addon
+-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
+function AceAddon:GetAddon(name, silent)
+	if not silent and not self.addons[name] then
+		error(("Usage: GetAddon(name): 'name' - Cannot find an AceAddon '%s'."):format(tostring(name)), 2)
+	end
+	return self.addons[name]
+end
+
+-- - Embed a list of libraries into the specified addon.
+-- This function will try to embed all of the listed libraries into the addon
+-- and error if a single one fails.
+--
+-- **Note:** This function is for internal use by :NewAddon/:NewModule
+-- @paramsig addon, [lib, ...]
+-- @param addon addon object to embed the libs in
+-- @param lib List of libraries to embed into the addon
+function AceAddon:EmbedLibraries(addon, ...)
+	for i=1,select("#", ... ) do
+		local libname = select(i, ...)
+		self:EmbedLibrary(addon, libname, false, 4)
+	end
+end
+
+-- - Embed a library into the addon object.
+-- This function will check if the specified library is registered with LibStub
+-- and if it has a :Embed function to call. It'll error if any of those conditions
+-- fails.
+--
+-- **Note:** This function is for internal use by :EmbedLibraries
+-- @paramsig addon, libname[, silent[, offset]]
+-- @param addon addon object to embed the library in
+-- @param libname name of the library to embed
+-- @param silent marks an embed to fail silently if the library doesn't exist (optional)
+-- @param offset will push the error messages back to said offset, defaults to 2 (optional)
+function AceAddon:EmbedLibrary(addon, libname, silent, offset)
+	local lib = LibStub:GetLibrary(libname, true)
+	if not lib and not silent then
+		error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of %q."):format(tostring(libname)), offset or 2)
+	elseif lib and type(lib.Embed) == "function" then
+		lib:Embed(addon)
+		tinsert(self.embeds[addon], libname)
+		return true
+	elseif lib then
+		error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Library '%s' is not Embed capable"):format(libname), offset or 2)
+	end
+end
+
+--- Return the specified module from an addon object.
+-- Throws an error if the addon object cannot be found (except if silent is set)
+-- @name //addon//:GetModule
+-- @paramsig name[, silent]
+-- @param name unique name of the module
+-- @param silent if true, the module is optional, silently return nil if its not found (optional)
+-- @usage
+-- -- Get the Addon
+-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
+-- -- Get the Module
+-- MyModule = MyAddon:GetModule("MyModule")
+function GetModule(self, name, silent)
+	if not self.modules[name] and not silent then
+		error(("Usage: GetModule(name, silent): 'name' - Cannot find module '%s'."):format(tostring(name)), 2)
+	end
+	return self.modules[name]
+end
+
+local function IsModuleTrue(self) return true end
+
+--- Create a new module for the addon.
+-- The new module can have its own embeded libraries and/or use a module prototype to be mixed into the module.\\
+-- A module has the same functionality as a real addon, it can have modules of its own, and has the same API as
+-- an addon object.
+-- @name //addon//:NewModule
+-- @paramsig name[, prototype|lib[, lib, ...]]
+-- @param name unique name of the module
+-- @param prototype object to derive this module from, methods and values from this table will be mixed into the module (optional)
+-- @param lib List of libraries to embed into the addon
+-- @usage
+-- -- Create a module with some embeded libraries
+-- MyModule = MyAddon:NewModule("MyModule", "AceEvent-3.0", "AceHook-3.0")
+--
+-- -- Create a module with a prototype
+-- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
+-- MyModule = MyAddon:NewModule("MyModule", prototype, "AceEvent-3.0", "AceHook-3.0")
+function NewModule(self, name, prototype, ...)
+	if type(name) ~= "string" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) end
+	if type(prototype) ~= "string" and type(prototype) ~= "table" and type(prototype) ~= "nil" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'prototype' - table (prototype), string (lib) or nil expected got '%s'."):format(type(prototype)), 2) end
+
+	if self.modules[name] then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - Module '%s' already exists."):format(name), 2) end
+
+	-- modules are basically addons. We treat them as such. They will be added to the initializequeue properly as well.
+	-- NewModule can only be called after the parent addon is present thus the modules will be initialized after their parent is.
+	local module = AceAddon:NewAddon(fmt("%s_%s", self.name or tostring(self), name))
+
+	module.IsModule = IsModuleTrue
+	module:SetEnabledState(self.defaultModuleState)
+	module.moduleName = name
+
+	if type(prototype) == "string" then
+		AceAddon:EmbedLibraries(module, prototype, ...)
+	else
+		AceAddon:EmbedLibraries(module, ...)
+	end
+	AceAddon:EmbedLibraries(module, unpack(self.defaultModuleLibraries))
+
+	if not prototype or type(prototype) == "string" then
+		prototype = self.defaultModulePrototype or nil
+	end
+
+	if type(prototype) == "table" then
+		local mt = getmetatable(module)
+		mt.__index = prototype
+		setmetatable(module, mt)  -- More of a Base class type feel.
+	end
+
+	safecall(self.OnModuleCreated, self, module) -- Was in Ace2 and I think it could be a cool thing to have handy.
+	self.modules[name] = module
+	tinsert(self.orderedModules, module)
+
+	return module
+end
+
+--- Returns the real name of the addon or module, without any prefix.
+-- @name //addon//:GetName
+-- @paramsig
+-- @usage
+-- print(MyAddon:GetName())
+-- -- prints "MyAddon"
+function GetName(self)
+	return self.moduleName or self.name
+end
+
+--- Enables the Addon, if possible, return true or false depending on success.
+-- This internally calls AceAddon:EnableAddon(), thus dispatching a OnEnable callback
+-- and enabling all modules of the addon (unless explicitly disabled).\\
+-- :Enable() also sets the internal `enableState` variable to true
+-- @name //addon//:Enable
+-- @paramsig
+-- @usage
+-- -- Enable MyModule
+-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
+-- MyModule = MyAddon:GetModule("MyModule")
+-- MyModule:Enable()
+function Enable(self)
+	self:SetEnabledState(true)
+
+	-- nevcairiel 2013-04-27: don't enable an addon/module if its queued for init still
+	-- it'll be enabled after the init process
+	if not queuedForInitialization(self) then
+		return AceAddon:EnableAddon(self)
+	end
+end
+
+--- Disables the Addon, if possible, return true or false depending on success.
+-- This internally calls AceAddon:DisableAddon(), thus dispatching a OnDisable callback
+-- and disabling all modules of the addon.\\
+-- :Disable() also sets the internal `enableState` variable to false
+-- @name //addon//:Disable
+-- @paramsig
+-- @usage
+-- -- Disable MyAddon
+-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
+-- MyAddon:Disable()
+function Disable(self)
+	self:SetEnabledState(false)
+	return AceAddon:DisableAddon(self)
+end
+
+--- Enables the Module, if possible, return true or false depending on success.
+-- Short-hand function that retrieves the module via `:GetModule` and calls `:Enable` on the module object.
+-- @name //addon//:EnableModule
+-- @paramsig name
+-- @usage
+-- -- Enable MyModule using :GetModule
+-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
+-- MyModule = MyAddon:GetModule("MyModule")
+-- MyModule:Enable()
+--
+-- -- Enable MyModule using the short-hand
+-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
+-- MyAddon:EnableModule("MyModule")
+function EnableModule(self, name)
+	local module = self:GetModule( name )
+	return module:Enable()
+end
+
+--- Disables the Module, if possible, return true or false depending on success.
+-- Short-hand function that retrieves the module via `:GetModule` and calls `:Disable` on the module object.
+-- @name //addon//:DisableModule
+-- @paramsig name
+-- @usage
+-- -- Disable MyModule using :GetModule
+-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
+-- MyModule = MyAddon:GetModule("MyModule")
+-- MyModule:Disable()
+--
+-- -- Disable MyModule using the short-hand
+-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
+-- MyAddon:DisableModule("MyModule")
+function DisableModule(self, name)
+	local module = self:GetModule( name )
+	return module:Disable()
+end
+
+--- Set the default libraries to be mixed into all modules created by this object.
+-- Note that you can only change the default module libraries before any module is created.
+-- @name //addon//:SetDefaultModuleLibraries
+-- @paramsig lib[, lib, ...]
+-- @param lib List of libraries to embed into the addon
+-- @usage
+-- -- Create the addon object
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
+-- -- Configure default libraries for modules (all modules need AceEvent-3.0)
+-- MyAddon:SetDefaultModuleLibraries("AceEvent-3.0")
+-- -- Create a module
+-- MyModule = MyAddon:NewModule("MyModule")
+function SetDefaultModuleLibraries(self, ...)
+	if next(self.modules) then
+		error("Usage: SetDefaultModuleLibraries(...): cannot change the module defaults after a module has been registered.", 2)
+	end
+	self.defaultModuleLibraries = {...}
+end
+
+--- Set the default state in which new modules are being created.
+-- Note that you can only change the default state before any module is created.
+-- @name //addon//:SetDefaultModuleState
+-- @paramsig state
+-- @param state Default state for new modules, true for enabled, false for disabled
+-- @usage
+-- -- Create the addon object
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
+-- -- Set the default state to "disabled"
+-- MyAddon:SetDefaultModuleState(false)
+-- -- Create a module and explicilty enable it
+-- MyModule = MyAddon:NewModule("MyModule")
+-- MyModule:Enable()
+function SetDefaultModuleState(self, state)
+	if next(self.modules) then
+		error("Usage: SetDefaultModuleState(state): cannot change the module defaults after a module has been registered.", 2)
+	end
+	self.defaultModuleState = state
+end
+
+--- Set the default prototype to use for new modules on creation.
+-- Note that you can only change the default prototype before any module is created.
+-- @name //addon//:SetDefaultModulePrototype
+-- @paramsig prototype
+-- @param prototype Default prototype for the new modules (table)
+-- @usage
+-- -- Define a prototype
+-- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
+-- -- Set the default prototype
+-- MyAddon:SetDefaultModulePrototype(prototype)
+-- -- Create a module and explicitly Enable it
+-- MyModule = MyAddon:NewModule("MyModule")
+-- MyModule:Enable()
+-- -- should print "OnEnable called!" now
+-- @see NewModule
+function SetDefaultModulePrototype(self, prototype)
+	if next(self.modules) then
+		error("Usage: SetDefaultModulePrototype(prototype): cannot change the module defaults after a module has been registered.", 2)
+	end
+	if type(prototype) ~= "table" then
+		error(("Usage: SetDefaultModulePrototype(prototype): 'prototype' - table expected got '%s'."):format(type(prototype)), 2)
+	end
+	self.defaultModulePrototype = prototype
+end
+
+--- Set the state of an addon or module
+-- This should only be called before any enabling actually happend, e.g. in/before OnInitialize.
+-- @name //addon//:SetEnabledState
+-- @paramsig state
+-- @param state the state of an addon or module  (enabled=true, disabled=false)
+function SetEnabledState(self, state)
+	self.enabledState = state
+end
+
+
+--- Return an iterator of all modules associated to the addon.
+-- @name //addon//:IterateModules
+-- @paramsig
+-- @usage
+-- -- Enable all modules
+-- for name, module in MyAddon:IterateModules() do
+--    module:Enable()
+-- end
+local function IterateModules(self) return pairs(self.modules) end
+
+-- Returns an iterator of all embeds in the addon
+-- @name //addon//:IterateEmbeds
+-- @paramsig
+local function IterateEmbeds(self) return pairs(AceAddon.embeds[self]) end
+
+--- Query the enabledState of an addon.
+-- @name //addon//:IsEnabled
+-- @paramsig
+-- @usage
+-- if MyAddon:IsEnabled() then
+--     MyAddon:Disable()
+-- end
+local function IsEnabled(self) return self.enabledState end
+local mixins = {
+	NewModule = NewModule,
+	GetModule = GetModule,
+	Enable = Enable,
+	Disable = Disable,
+	EnableModule = EnableModule,
+	DisableModule = DisableModule,
+	IsEnabled = IsEnabled,
+	SetDefaultModuleLibraries = SetDefaultModuleLibraries,
+	SetDefaultModuleState = SetDefaultModuleState,
+	SetDefaultModulePrototype = SetDefaultModulePrototype,
+	SetEnabledState = SetEnabledState,
+	IterateModules = IterateModules,
+	IterateEmbeds = IterateEmbeds,
+	GetName = GetName,
+}
+local function IsModule(self) return false end
+local pmixins = {
+	defaultModuleState = true,
+	enabledState = true,
+	IsModule = IsModule,
+}
+-- Embed( target )
+-- target (object) - target object to embed aceaddon in
+--
+-- this is a local function specifically since it's meant to be only called internally
+function Embed(target, skipPMixins)
+	for k, v in pairs(mixins) do
+		target[k] = v
+	end
+	if not skipPMixins then
+		for k, v in pairs(pmixins) do
+			target[k] = target[k] or v
+		end
+	end
+end
+
+
+-- - Initialize the addon after creation.
+-- This function is only used internally during the ADDON_LOADED event
+-- It will call the **OnInitialize** function on the addon object (if present),
+-- and the **OnEmbedInitialize** function on all embeded libraries.
+--
+-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
+-- @param addon addon object to intialize
+function AceAddon:InitializeAddon(addon)
+	safecall(addon.OnInitialize, addon)
+
+	local embeds = self.embeds[addon]
+	for i = 1, #embeds do
+		local lib = LibStub:GetLibrary(embeds[i], true)
+		if lib then safecall(lib.OnEmbedInitialize, lib, addon) end
+	end
+
+	-- we don't call InitializeAddon on modules specifically, this is handled
+	-- from the event handler and only done _once_
+end
+
+-- - Enable the addon after creation.
+-- Note: This function is only used internally during the PLAYER_LOGIN event, or during ADDON_LOADED,
+-- if IsLoggedIn() already returns true at that point, e.g. for LoD Addons.
+-- It will call the **OnEnable** function on the addon object (if present),
+-- and the **OnEmbedEnable** function on all embeded libraries.\\
+-- This function does not toggle the enable state of the addon itself, and will return early if the addon is disabled.
+--
+-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
+-- Use :Enable on the addon itself instead.
+-- @param addon addon object to enable
+function AceAddon:EnableAddon(addon)
+	if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
+	if self.statuses[addon.name] or not addon.enabledState then return false end
+
+	-- set the statuses first, before calling the OnEnable. this allows for Disabling of the addon in OnEnable.
+	self.statuses[addon.name] = true
+
+	safecall(addon.OnEnable, addon)
+
+	-- make sure we're still enabled before continueing
+	if self.statuses[addon.name] then
+		local embeds = self.embeds[addon]
+		for i = 1, #embeds do
+			local lib = LibStub:GetLibrary(embeds[i], true)
+			if lib then safecall(lib.OnEmbedEnable, lib, addon) end
+		end
+
+		-- enable possible modules.
+		local modules = addon.orderedModules
+		for i = 1, #modules do
+			self:EnableAddon(modules[i])
+		end
+	end
+	return self.statuses[addon.name] -- return true if we're disabled
+end
+
+-- - Disable the addon
+-- Note: This function is only used internally.
+-- It will call the **OnDisable** function on the addon object (if present),
+-- and the **OnEmbedDisable** function on all embeded libraries.\\
+-- This function does not toggle the enable state of the addon itself, and will return early if the addon is still enabled.
+--
+-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
+-- Use :Disable on the addon itself instead.
+-- @param addon addon object to enable
+function AceAddon:DisableAddon(addon)
+	if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
+	if not self.statuses[addon.name] then return false end
+
+	-- set statuses first before calling OnDisable, this allows for aborting the disable in OnDisable.
+	self.statuses[addon.name] = false
+
+	safecall( addon.OnDisable, addon )
+
+	-- make sure we're still disabling...
+	if not self.statuses[addon.name] then
+		local embeds = self.embeds[addon]
+		for i = 1, #embeds do
+			local lib = LibStub:GetLibrary(embeds[i], true)
+			if lib then safecall(lib.OnEmbedDisable, lib, addon) end
+		end
+		-- disable possible modules.
+		local modules = addon.orderedModules
+		for i = 1, #modules do
+			self:DisableAddon(modules[i])
+		end
+	end
+
+	return not self.statuses[addon.name] -- return true if we're disabled
+end
+
+--- Get an iterator over all registered addons.
+-- @usage
+-- -- Print a list of all installed AceAddon's
+-- for name, addon in AceAddon:IterateAddons() do
+--   print("Addon: " .. name)
+-- end
+function AceAddon:IterateAddons() return pairs(self.addons) end
+
+--- Get an iterator over the internal status registry.
+-- @usage
+-- -- Print a list of all enabled addons
+-- for name, status in AceAddon:IterateAddonStatus() do
+--   if status then
+--     print("EnabledAddon: " .. name)
+--   end
+-- end
+function AceAddon:IterateAddonStatus() return pairs(self.statuses) end
+
+-- Following Iterators are deprecated, and their addon specific versions should be used
+-- e.g. addon:IterateEmbeds() instead of :IterateEmbedsOnAddon(addon)
+function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end
+function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end
+
+-- Event Handling
+local function onEvent(this, event, arg1)
+	-- 2011-08-17 nevcairiel - ignore the load event of Blizzard_DebugTools, so a potential startup error isn't swallowed up
+	if (event == "ADDON_LOADED"  and arg1 ~= "Blizzard_DebugTools") or event == "PLAYER_LOGIN" then
+		-- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration
+		while(#AceAddon.initializequeue > 0) do
+			local addon = tremove(AceAddon.initializequeue, 1)
+			-- this might be an issue with recursion - TODO: validate
+			if event == "ADDON_LOADED" then addon.baseName = arg1 end
+			AceAddon:InitializeAddon(addon)
+			tinsert(AceAddon.enablequeue, addon)
+		end
+
+		if IsLoggedIn() then
+			while(#AceAddon.enablequeue > 0) do
+				local addon = tremove(AceAddon.enablequeue, 1)
+				AceAddon:EnableAddon(addon)
+			end
+		end
+	end
+end
+
+AceAddon.frame:RegisterEvent("ADDON_LOADED")
+AceAddon.frame:RegisterEvent("PLAYER_LOGIN")
+AceAddon.frame:SetScript("OnEvent", onEvent)
+
+-- upgrade embeded
+for name, addon in pairs(AceAddon.addons) do
+	Embed(addon, true)
+end
+
+-- 2010-10-27 nevcairiel - add new "orderedModules" table
+if oldminor and oldminor < 10 then
+	for name, addon in pairs(AceAddon.addons) do
+		addon.orderedModules = {}
+		for module_name, module in pairs(addon.modules) do
+			tinsert(addon.orderedModules, module)
+		end
+	end
+end
diff --git a/EMA/Libs/AceAddon-3.0/AceAddon-3.0.xml b/EMA/Libs/AceAddon-3.0/AceAddon-3.0.xml
new file mode 100644
index 0000000..dcf24c7
--- /dev/null
+++ b/EMA/Libs/AceAddon-3.0/AceAddon-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceAddon-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceBucket-3.0/AceBucket-3.0.lua b/EMA/Libs/AceBucket-3.0/AceBucket-3.0.lua
new file mode 100644
index 0000000..d5e1065
--- /dev/null
+++ b/EMA/Libs/AceBucket-3.0/AceBucket-3.0.lua
@@ -0,0 +1,293 @@
+--- A bucket to catch events in. **AceBucket-3.0** provides throttling of events that fire in bursts and
+-- your addon only needs to know about the full burst.
+--
+-- This Bucket implementation works as follows:\\
+--   Initially, no schedule is running, and its waiting for the first event to happen.\\
+--   The first event will start the bucket, and get the scheduler running, which will collect all
+--   events in the given interval. When that interval is reached, the bucket is pushed to the
+--   callback and a new schedule is started. When a bucket is empty after its interval, the scheduler is
+--   stopped, and the bucket is only listening for the next event to happen, basically back in its initial state.
+--
+-- In addition, the buckets collect information about the "arg1" argument of the events that fire, and pass those as a
+-- table to your callback. This functionality was mostly designed for the UNIT_* events.\\
+-- The table will have the different values of "arg1" as keys, and the number of occurances as their value, e.g.\\
+--   { ["player"] = 2, ["target"] = 1, ["party1"] = 1 }
+--
+-- **AceBucket-3.0** can be embeded into your addon, either explicitly by calling AceBucket:Embed(MyAddon) or by
+-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
+-- and can be accessed directly, without having to explicitly call AceBucket itself.\\
+-- It is recommended to embed AceBucket, otherwise you'll have to specify a custom `self` on all calls you
+-- make into AceBucket.
+-- @usage
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("BucketExample", "AceBucket-3.0")
+--
+-- function MyAddon:OnEnable()
+--   -- Register a bucket that listens to all the HP related events,
+--   -- and fires once per second
+--   self:RegisterBucketEvent({"UNIT_HEALTH", "UNIT_MAXHEALTH"}, 1, "UpdateHealth")
+-- end
+--
+-- function MyAddon:UpdateHealth(units)
+--   if units.player then
+--     print("Your HP changed!")
+--   end
+-- end
+-- @class file
+-- @name AceBucket-3.0.lua
+-- @release $Id: AceBucket-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $
+
+local MAJOR, MINOR = "AceBucket-3.0", 3
+local AceBucket, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceBucket then return end -- No Upgrade needed
+
+AceBucket.buckets = AceBucket.buckets or {}
+AceBucket.embeds = AceBucket.embeds or {}
+
+-- the libraries will be lazyly bound later, to avoid errors due to loading order issues
+local AceEvent, AceTimer
+
+-- Lua APIs
+local tconcat = table.concat
+local type, next, pairs, select = type, next, pairs, select
+local tonumber, tostring, rawset = tonumber, tostring, rawset
+local assert, loadstring, error = assert, loadstring, error
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: LibStub, geterrorhandler
+
+local bucketCache = setmetatable({}, {__mode='k'})
+
+--[[
+	 xpcall safecall implementation
+]]
+local xpcall = xpcall
+
+local function errorhandler(err)
+	return geterrorhandler()(err)
+end
+
+local function CreateDispatcher(argCount)
+	local code = [[
+		local xpcall, eh = ...
+		local method, ARGS
+		local function call() return method(ARGS) end
+
+		local function dispatch(func, ...)
+			 method = func
+			 if not method then return end
+			 ARGS = ...
+			 return xpcall(call, eh)
+		end
+
+		return dispatch
+	]]
+
+	local ARGS = {}
+	for i = 1, argCount do ARGS[i] = "arg"..i end
+	code = code:gsub("ARGS", tconcat(ARGS, ", "))
+	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
+end
+
+local Dispatchers = setmetatable({}, {__index=function(self, argCount)
+	local dispatcher = CreateDispatcher(argCount)
+	rawset(self, argCount, dispatcher)
+	return dispatcher
+end})
+Dispatchers[0] = function(func)
+	return xpcall(func, errorhandler)
+end
+
+local function safecall(func, ...)
+	return Dispatchers[select('#', ...)](func, ...)
+end
+
+-- FireBucket ( bucket )
+--
+-- send the bucket to the callback function and schedule the next FireBucket in interval seconds
+local function FireBucket(bucket)
+	local received = bucket.received
+
+	-- we dont want to fire empty buckets
+	if next(received) then
+		local callback = bucket.callback
+		if type(callback) == "string" then
+			safecall(bucket.object[callback], bucket.object, received)
+		else
+			safecall(callback, received)
+		end
+
+		for k in pairs(received) do
+			received[k] = nil
+		end
+
+		-- if the bucket was not empty, schedule another FireBucket in interval seconds
+		bucket.timer = AceTimer.ScheduleTimer(bucket, FireBucket, bucket.interval, bucket)
+	else -- if it was empty, clear the timer and wait for the next event
+		bucket.timer = nil
+	end
+end
+
+-- BucketHandler ( event, arg1 )
+--
+-- callback func for AceEvent
+-- stores arg1 in the received table, and schedules the bucket if necessary
+local function BucketHandler(self, event, arg1)
+	if arg1 == nil then
+		arg1 = "nil"
+	end
+
+	self.received[arg1] = (self.received[arg1] or 0) + 1
+
+	-- if we are not scheduled yet, start a timer on the interval for our bucket to be cleared
+	if not self.timer then
+		self.timer = AceTimer.ScheduleTimer(self, FireBucket, self.interval, self)
+	end
+end
+
+-- RegisterBucket( event, interval, callback, isMessage )
+--
+-- event(string or table) - the event, or a table with the events, that this bucket listens to
+-- interval(int) - time between bucket fireings
+-- callback(func or string) - function pointer, or method name of the object, that gets called when the bucket is cleared
+-- isMessage(boolean) - register AceEvent Messages instead of game events
+local function RegisterBucket(self, event, interval, callback, isMessage)
+	-- try to fetch the librarys
+	if not AceEvent or not AceTimer then
+		AceEvent = LibStub:GetLibrary("AceEvent-3.0", true)
+		AceTimer = LibStub:GetLibrary("AceTimer-3.0", true)
+		if not AceEvent or not AceTimer then
+			error(MAJOR .. " requires AceEvent-3.0 and AceTimer-3.0", 3)
+		end
+	end
+
+	if type(event) ~= "string" and type(event) ~= "table" then error("Usage: RegisterBucket(event, interval, callback): 'event' - string or table expected.", 3) end
+	if not callback then
+		if type(event) == "string" then
+			callback = event
+		else
+			error("Usage: RegisterBucket(event, interval, callback): cannot omit callback when event is not a string.", 3)
+		end
+	end
+	if not tonumber(interval) then error("Usage: RegisterBucket(event, interval, callback): 'interval' - number expected.", 3) end
+	if type(callback) ~= "string" and type(callback) ~= "function" then error("Usage: RegisterBucket(event, interval, callback): 'callback' - string or function or nil expected.", 3) end
+	if type(callback) == "string" and type(self[callback]) ~= "function" then error("Usage: RegisterBucket(event, interval, callback): 'callback' - method not found on target object.", 3) end
+
+	local bucket = next(bucketCache)
+	if bucket then
+		bucketCache[bucket] = nil
+	else
+		bucket = { handler = BucketHandler, received = {} }
+	end
+	bucket.object, bucket.callback, bucket.interval = self, callback, tonumber(interval)
+
+	local regFunc = isMessage and AceEvent.RegisterMessage or AceEvent.RegisterEvent
+
+	if type(event) == "table" then
+		for _,e in pairs(event) do
+			regFunc(bucket, e, "handler")
+		end
+	else
+		regFunc(bucket, event, "handler")
+	end
+
+	local handle = tostring(bucket)
+	AceBucket.buckets[handle] = bucket
+
+	return handle
+end
+
+--- Register a Bucket for an event (or a set of events)
+-- @param event The event to listen for, or a table of events.
+-- @param interval The Bucket interval (burst interval)
+-- @param callback The callback function, either as a function reference, or a string pointing to a method of the addon object.
+-- @return The handle of the bucket (for unregistering)
+-- @usage
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceBucket-3.0")
+-- MyAddon:RegisterBucketEvent("BAG_UPDATE", 0.2, "UpdateBags")
+--
+-- function MyAddon:UpdateBags()
+--   -- do stuff
+-- end
+function AceBucket:RegisterBucketEvent(event, interval, callback)
+	return RegisterBucket(self, event, interval, callback, false)
+end
+
+--- Register a Bucket for an AceEvent-3.0 addon message (or a set of messages)
+-- @param message The message to listen for, or a table of messages.
+-- @param interval The Bucket interval (burst interval)
+-- @param callback The callback function, either as a function reference, or a string pointing to a method of the addon object.
+-- @return The handle of the bucket (for unregistering)
+-- @usage
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceBucket-3.0")
+-- MyAddon:RegisterBucketEvent("SomeAddon_InformationMessage", 0.2, "ProcessData")
+--
+-- function MyAddon:ProcessData()
+--   -- do stuff
+-- end
+function AceBucket:RegisterBucketMessage(message, interval, callback)
+	return RegisterBucket(self, message, interval, callback, true)
+end
+
+--- Unregister any events and messages from the bucket and clear any remaining data.
+-- @param handle The handle of the bucket as returned by RegisterBucket*
+function AceBucket:UnregisterBucket(handle)
+	local bucket = AceBucket.buckets[handle]
+	if bucket then
+		AceEvent.UnregisterAllEvents(bucket)
+		AceEvent.UnregisterAllMessages(bucket)
+
+		-- clear any remaining data in the bucket
+		for k in pairs(bucket.received) do
+			bucket.received[k] = nil
+		end
+
+		if bucket.timer then
+			AceTimer.CancelTimer(bucket, bucket.timer)
+			bucket.timer = nil
+		end
+
+		AceBucket.buckets[handle] = nil
+		-- store our bucket in the cache
+		bucketCache[bucket] = true
+	end
+end
+
+--- Unregister all buckets of the current addon object (or custom "self").
+function AceBucket:UnregisterAllBuckets()
+	-- hmm can we do this more efficient? (it is not done often so shouldn't matter much)
+	for handle, bucket in pairs(AceBucket.buckets) do
+		if bucket.object == self then
+			AceBucket.UnregisterBucket(self, handle)
+		end
+	end
+end
+
+
+
+-- embedding and embed handling
+local mixins = {
+	"RegisterBucketEvent",
+	"RegisterBucketMessage",
+	"UnregisterBucket",
+	"UnregisterAllBuckets",
+}
+
+-- Embeds AceBucket into the target object making the functions from the mixins list available on target:..
+-- @param target target object to embed AceBucket in
+function AceBucket:Embed( target )
+	for _, v in pairs( mixins ) do
+		target[v] = self[v]
+	end
+	self.embeds[target] = true
+	return target
+end
+
+function AceBucket:OnEmbedDisable( target )
+	target:UnregisterAllBuckets()
+end
+
+for addon in pairs(AceBucket.embeds) do
+	AceBucket:Embed(addon)
+end
diff --git a/EMA/Libs/AceBucket-3.0/AceBucket-3.0.xml b/EMA/Libs/AceBucket-3.0/AceBucket-3.0.xml
new file mode 100644
index 0000000..06ab712
--- /dev/null
+++ b/EMA/Libs/AceBucket-3.0/AceBucket-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceBucket-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceComm-3.0/AceComm-3.0.lua b/EMA/Libs/AceComm-3.0/AceComm-3.0.lua
new file mode 100644
index 0000000..9a38979
--- /dev/null
+++ b/EMA/Libs/AceComm-3.0/AceComm-3.0.lua
@@ -0,0 +1,305 @@
+--- **AceComm-3.0** allows you to send messages of unlimited length over the addon comm channels.
+-- It'll automatically split the messages into multiple parts and rebuild them on the receiving end.\\
+-- **ChatThrottleLib** is of course being used to avoid being disconnected by the server.
+--
+-- **AceComm-3.0** can be embeded into your addon, either explicitly by calling AceComm:Embed(MyAddon) or by
+-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
+-- and can be accessed directly, without having to explicitly call AceComm itself.\\
+-- It is recommended to embed AceComm, otherwise you'll have to specify a custom `self` on all calls you
+-- make into AceComm.
+-- @class file
+-- @name AceComm-3.0
+-- @release $Id: AceComm-3.0.lua 1174 2018-05-14 17:29:49Z h.leppkes@gmail.com $
+
+--[[ AceComm-3.0
+
+TODO: Time out old data rotting around from dead senders? Not a HUGE deal since the number of possible sender names is somewhat limited.
+
+]]
+
+local CallbackHandler = LibStub("CallbackHandler-1.0")
+local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")
+
+local MAJOR, MINOR = "AceComm-3.0", 12
+local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceComm then return end
+
+-- Lua APIs
+local type, next, pairs, tostring = type, next, pairs, tostring
+local strsub, strfind = string.sub, string.find
+local match = string.match
+local tinsert, tconcat = table.insert, table.concat
+local error, assert = error, assert
+
+-- WoW APIs
+local Ambiguate = Ambiguate
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: LibStub, DEFAULT_CHAT_FRAME, geterrorhandler, RegisterAddonMessagePrefix
+
+AceComm.embeds = AceComm.embeds or {}
+
+-- for my sanity and yours, let's give the message type bytes some names
+local MSG_MULTI_FIRST = "\001"
+local MSG_MULTI_NEXT  = "\002"
+local MSG_MULTI_LAST  = "\003"
+local MSG_ESCAPE = "\004"
+
+-- remove old structures (pre WoW 4.0)
+AceComm.multipart_origprefixes = nil
+AceComm.multipart_reassemblers = nil
+
+-- the multipart message spool: indexed by a combination of sender+distribution+
+AceComm.multipart_spool = AceComm.multipart_spool or {}
+
+--- Register for Addon Traffic on a specified prefix
+-- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent), max 16 characters
+-- @param method Callback to call on message reception: Function reference, or method name (string) to call on self. Defaults to "OnCommReceived"
+function AceComm:RegisterComm(prefix, method)
+	if method == nil then
+		method = "OnCommReceived"
+	end
+
+	if #prefix > 16 then -- TODO: 15?
+		error("AceComm:RegisterComm(prefix,method): prefix length is limited to 16 characters")
+	end
+	if C_ChatInfo then
+		C_ChatInfo.RegisterAddonMessagePrefix(prefix)
+	else
+		RegisterAddonMessagePrefix(prefix)
+	end
+
+	return AceComm._RegisterComm(self, prefix, method)	-- created by CallbackHandler
+end
+
+local warnedPrefix=false
+
+--- Send a message over the Addon Channel
+-- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent)
+-- @param text Data to send, nils (\000) not allowed. Any length.
+-- @param distribution Addon channel, e.g. "RAID", "GUILD", etc; see SendAddonMessage API
+-- @param target Destination for some distributions; see SendAddonMessage API
+-- @param prio OPTIONAL: ChatThrottleLib priority, "BULK", "NORMAL" or "ALERT". Defaults to "NORMAL".
+-- @param callbackFn OPTIONAL: callback function to be called as each chunk is sent. receives 3 args: the user supplied arg (see next), the number of bytes sent so far, and the number of bytes total to send.
+-- @param callbackArg: OPTIONAL: first arg to the callback function. nil will be passed if not specified.
+function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callbackFn, callbackArg)
+	prio = prio or "NORMAL"	-- pasta's reference implementation had different prio for singlepart and multipart, but that's a very bad idea since that can easily lead to out-of-sequence delivery!
+	if not( type(prefix)=="string" and
+			type(text)=="string" and
+			type(distribution)=="string" and
+			(target==nil or type(target)=="string" or type(target)=="number") and
+			(prio=="BULK" or prio=="NORMAL" or prio=="ALERT")
+		) then
+		error('Usage: SendCommMessage(addon, "prefix", "text", "distribution"[, "target"[, "prio"[, callbackFn, callbackarg]]])', 2)
+	end
+
+	local textlen = #text
+	local maxtextlen = 255  -- Yes, the max is 255 even if the dev post said 256. I tested. Char 256+ get silently truncated. /Mikk, 20110327
+	local queueName = prefix..distribution..(target or "")
+
+	local ctlCallback = nil
+	if callbackFn then
+		ctlCallback = function(sent)
+			return callbackFn(callbackArg, sent, textlen)
+		end
+	end
+
+	local forceMultipart
+	if match(text, "^[\001-\009]") then -- 4.1+: see if the first character is a control character
+		-- we need to escape the first character with a \004
+		if textlen+1 > maxtextlen then	-- would we go over the size limit?
+			forceMultipart = true	-- just make it multipart, no escape problems then
+		else
+			text = "\004" .. text
+		end
+	end
+
+	if not forceMultipart and textlen <= maxtextlen then
+		-- fits all in one message
+		CTL:SendAddonMessage(prio, prefix, text, distribution, target, queueName, ctlCallback, textlen)
+	else
+		maxtextlen = maxtextlen - 1	-- 1 extra byte for part indicator in prefix(4.0)/start of message(4.1)
+
+		-- first part
+		local chunk = strsub(text, 1, maxtextlen)
+		CTL:SendAddonMessage(prio, prefix, MSG_MULTI_FIRST..chunk, distribution, target, queueName, ctlCallback, maxtextlen)
+
+		-- continuation
+		local pos = 1+maxtextlen
+
+		while pos+maxtextlen <= textlen do
+			chunk = strsub(text, pos, pos+maxtextlen-1)
+			CTL:SendAddonMessage(prio, prefix, MSG_MULTI_NEXT..chunk, distribution, target, queueName, ctlCallback, pos+maxtextlen-1)
+			pos = pos + maxtextlen
+		end
+
+		-- final part
+		chunk = strsub(text, pos)
+		CTL:SendAddonMessage(prio, prefix, MSG_MULTI_LAST..chunk, distribution, target, queueName, ctlCallback, textlen)
+	end
+end
+
+
+----------------------------------------
+-- Message receiving
+----------------------------------------
+
+do
+	local compost = setmetatable({}, {__mode = "k"})
+	local function new()
+		local t = next(compost)
+		if t then
+			compost[t]=nil
+			for i=#t,3,-1 do	-- faster than pairs loop. don't even nil out 1/2 since they'll be overwritten
+				t[i]=nil
+			end
+			return t
+		end
+
+		return {}
+	end
+
+	local function lostdatawarning(prefix,sender,where)
+		DEFAULT_CHAT_FRAME:AddMessage(MAJOR..": Warning: lost network data regarding '"..tostring(prefix).."' from '"..tostring(sender).."' (in "..where..")")
+	end
+
+	function AceComm:OnReceiveMultipartFirst(prefix, message, distribution, sender)
+		local key = prefix.."\t"..distribution.."\t"..sender	-- a unique stream is defined by the prefix + distribution + sender
+		local spool = AceComm.multipart_spool
+
+		--[[
+		if spool[key] then
+			lostdatawarning(prefix,sender,"First")
+			-- continue and overwrite
+		end
+		--]]
+
+		spool[key] = message  -- plain string for now
+	end
+
+	function AceComm:OnReceiveMultipartNext(prefix, message, distribution, sender)
+		local key = prefix.."\t"..distribution.."\t"..sender	-- a unique stream is defined by the prefix + distribution + sender
+		local spool = AceComm.multipart_spool
+		local olddata = spool[key]
+
+		if not olddata then
+			--lostdatawarning(prefix,sender,"Next")
+			return
+		end
+
+		if type(olddata)~="table" then
+			-- ... but what we have is not a table. So make it one. (Pull a composted one if available)
+			local t = new()
+			t[1] = olddata    -- add old data as first string
+			t[2] = message    -- and new message as second string
+			spool[key] = t    -- and put the table in the spool instead of the old string
+		else
+			tinsert(olddata, message)
+		end
+	end
+
+	function AceComm:OnReceiveMultipartLast(prefix, message, distribution, sender)
+		local key = prefix.."\t"..distribution.."\t"..sender	-- a unique stream is defined by the prefix + distribution + sender
+		local spool = AceComm.multipart_spool
+		local olddata = spool[key]
+
+		if not olddata then
+			--lostdatawarning(prefix,sender,"End")
+			return
+		end
+
+		spool[key] = nil
+
+		if type(olddata) == "table" then
+			-- if we've received a "next", the spooled data will be a table for rapid & garbage-free tconcat
+			tinsert(olddata, message)
+			AceComm.callbacks:Fire(prefix, tconcat(olddata, ""), distribution, sender)
+			compost[olddata] = true
+		else
+			-- if we've only received a "first", the spooled data will still only be a string
+			AceComm.callbacks:Fire(prefix, olddata..message, distribution, sender)
+		end
+	end
+end
+
+
+
+
+
+
+----------------------------------------
+-- Embed CallbackHandler
+----------------------------------------
+
+if not AceComm.callbacks then
+	AceComm.callbacks = CallbackHandler:New(AceComm,
+						"_RegisterComm",
+						"UnregisterComm",
+						"UnregisterAllComm")
+end
+
+AceComm.callbacks.OnUsed = nil
+AceComm.callbacks.OnUnused = nil
+
+local function OnEvent(self, event, prefix, message, distribution, sender)
+	if event == "CHAT_MSG_ADDON" then
+		sender = Ambiguate(sender, "none")
+		local control, rest = match(message, "^([\001-\009])(.*)")
+		if control then
+			if control==MSG_MULTI_FIRST then
+				AceComm:OnReceiveMultipartFirst(prefix, rest, distribution, sender)
+			elseif control==MSG_MULTI_NEXT then
+				AceComm:OnReceiveMultipartNext(prefix, rest, distribution, sender)
+			elseif control==MSG_MULTI_LAST then
+				AceComm:OnReceiveMultipartLast(prefix, rest, distribution, sender)
+			elseif control==MSG_ESCAPE then
+				AceComm.callbacks:Fire(prefix, rest, distribution, sender)
+			else
+				-- unknown control character, ignore SILENTLY (dont warn unnecessarily about future extensions!)
+			end
+		else
+			-- single part: fire it off immediately and let CallbackHandler decide if it's registered or not
+			AceComm.callbacks:Fire(prefix, message, distribution, sender)
+		end
+	else
+		assert(false, "Received "..tostring(event).." event?!")
+	end
+end
+
+AceComm.frame = AceComm.frame or CreateFrame("Frame", "AceComm30Frame")
+AceComm.frame:SetScript("OnEvent", OnEvent)
+AceComm.frame:UnregisterAllEvents()
+AceComm.frame:RegisterEvent("CHAT_MSG_ADDON")
+
+
+----------------------------------------
+-- Base library stuff
+----------------------------------------
+
+local mixins = {
+	"RegisterComm",
+	"UnregisterComm",
+	"UnregisterAllComm",
+	"SendCommMessage",
+}
+
+-- Embeds AceComm-3.0 into the target object making the functions from the mixins list available on target:..
+-- @param target target object to embed AceComm-3.0 in
+function AceComm:Embed(target)
+	for k, v in pairs(mixins) do
+		target[v] = self[v]
+	end
+	self.embeds[target] = true
+	return target
+end
+
+function AceComm:OnEmbedDisable(target)
+	target:UnregisterAllComm()
+end
+
+-- Update embeds
+for target, v in pairs(AceComm.embeds) do
+	AceComm:Embed(target)
+end
diff --git a/EMA/Libs/AceComm-3.0/AceComm-3.0.xml b/EMA/Libs/AceComm-3.0/AceComm-3.0.xml
new file mode 100644
index 0000000..24fb43b
--- /dev/null
+++ b/EMA/Libs/AceComm-3.0/AceComm-3.0.xml
@@ -0,0 +1,5 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="ChatThrottleLib.lua"/>
+	<Script file="AceComm-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceComm-3.0/ChatThrottleLib.lua b/EMA/Libs/AceComm-3.0/ChatThrottleLib.lua
new file mode 100644
index 0000000..01088f6
--- /dev/null
+++ b/EMA/Libs/AceComm-3.0/ChatThrottleLib.lua
@@ -0,0 +1,534 @@
+--
+-- ChatThrottleLib by Mikk
+--
+-- Manages AddOn chat output to keep player from getting kicked off.
+--
+-- ChatThrottleLib:SendChatMessage/:SendAddonMessage functions that accept
+-- a Priority ("BULK", "NORMAL", "ALERT") as well as prefix for SendChatMessage.
+--
+-- Priorities get an equal share of available bandwidth when fully loaded.
+-- Communication channels are separated on extension+chattype+destination and
+-- get round-robinned. (Destination only matters for whispers and channels,
+-- obviously)
+--
+-- Will install hooks for SendChatMessage and SendAddonMessage to measure
+-- bandwidth bypassing the library and use less bandwidth itself.
+--
+--
+-- Fully embeddable library. Just copy this file into your addon directory,
+-- add it to the .toc, and it's done.
+--
+-- Can run as a standalone addon also, but, really, just embed it! :-)
+--
+-- LICENSE: ChatThrottleLib is released into the Public Domain
+--
+
+local CTL_VERSION = 24
+
+local _G = _G
+
+if _G.ChatThrottleLib then
+	if _G.ChatThrottleLib.version >= CTL_VERSION then
+		-- There's already a newer (or same) version loaded. Buh-bye.
+		return
+	elseif not _G.ChatThrottleLib.securelyHooked then
+		print("ChatThrottleLib: Warning: There's an ANCIENT ChatThrottleLib.lua (pre-wow 2.0, <v16) in an addon somewhere. Get the addon updated or copy in a newer ChatThrottleLib.lua (>=v16) in it!")
+		-- ATTEMPT to unhook; this'll behave badly if someone else has hooked...
+		-- ... and if someone has securehooked, they can kiss that goodbye too... >.<
+		_G.SendChatMessage = _G.ChatThrottleLib.ORIG_SendChatMessage
+		if _G.ChatThrottleLib.ORIG_SendAddonMessage then
+			_G.SendAddonMessage = _G.ChatThrottleLib.ORIG_SendAddonMessage
+		end
+	end
+	_G.ChatThrottleLib.ORIG_SendChatMessage = nil
+	_G.ChatThrottleLib.ORIG_SendAddonMessage = nil
+end
+
+if not _G.ChatThrottleLib then
+	_G.ChatThrottleLib = {}
+end
+
+ChatThrottleLib = _G.ChatThrottleLib  -- in case some addon does "local ChatThrottleLib" above us and we're copypasted (AceComm-2, sigh)
+local ChatThrottleLib = _G.ChatThrottleLib
+
+ChatThrottleLib.version = CTL_VERSION
+
+
+
+------------------ TWEAKABLES -----------------
+
+ChatThrottleLib.MAX_CPS = 800			  -- 2000 seems to be safe if NOTHING ELSE is happening. let's call it 800.
+ChatThrottleLib.MSG_OVERHEAD = 40		-- Guesstimate overhead for sending a message; source+dest+chattype+protocolstuff
+
+ChatThrottleLib.BURST = 4000				-- WoW's server buffer seems to be about 32KB. 8KB should be safe, but seen disconnects on _some_ servers. Using 4KB now.
+
+ChatThrottleLib.MIN_FPS = 20				-- Reduce output CPS to half (and don't burst) if FPS drops below this value
+
+
+local setmetatable = setmetatable
+local table_remove = table.remove
+local tostring = tostring
+local GetTime = GetTime
+local math_min = math.min
+local math_max = math.max
+local next = next
+local strlen = string.len
+local GetFramerate = GetFramerate
+local strlower = string.lower
+local unpack,type,pairs,wipe = unpack,type,pairs,wipe
+local UnitInRaid,UnitInParty = UnitInRaid,UnitInParty
+
+
+-----------------------------------------------------------------------
+-- Double-linked ring implementation
+
+local Ring = {}
+local RingMeta = { __index = Ring }
+
+function Ring:New()
+	local ret = {}
+	setmetatable(ret, RingMeta)
+	return ret
+end
+
+function Ring:Add(obj)	-- Append at the "far end" of the ring (aka just before the current position)
+	if self.pos then
+		obj.prev = self.pos.prev
+		obj.prev.next = obj
+		obj.next = self.pos
+		obj.next.prev = obj
+	else
+		obj.next = obj
+		obj.prev = obj
+		self.pos = obj
+	end
+end
+
+function Ring:Remove(obj)
+	obj.next.prev = obj.prev
+	obj.prev.next = obj.next
+	if self.pos == obj then
+		self.pos = obj.next
+		if self.pos == obj then
+			self.pos = nil
+		end
+	end
+end
+
+
+
+-----------------------------------------------------------------------
+-- Recycling bin for pipes
+-- A pipe is a plain integer-indexed queue of messages
+-- Pipes normally live in Rings of pipes  (3 rings total, one per priority)
+
+ChatThrottleLib.PipeBin = nil -- pre-v19, drastically different
+local PipeBin = setmetatable({}, {__mode="k"})
+
+local function DelPipe(pipe)
+	PipeBin[pipe] = true
+end
+
+local function NewPipe()
+	local pipe = next(PipeBin)
+	if pipe then
+		wipe(pipe)
+		PipeBin[pipe] = nil
+		return pipe
+	end
+	return {}
+end
+
+
+
+
+-----------------------------------------------------------------------
+-- Recycling bin for messages
+
+ChatThrottleLib.MsgBin = nil -- pre-v19, drastically different
+local MsgBin = setmetatable({}, {__mode="k"})
+
+local function DelMsg(msg)
+	msg[1] = nil
+	-- there's more parameters, but they're very repetetive so the string pool doesn't suffer really, and it's faster to just not delete them.
+	MsgBin[msg] = true
+end
+
+local function NewMsg()
+	local msg = next(MsgBin)
+	if msg then
+		MsgBin[msg] = nil
+		return msg
+	end
+	return {}
+end
+
+
+-----------------------------------------------------------------------
+-- ChatThrottleLib:Init
+-- Initialize queues, set up frame for OnUpdate, etc
+
+
+function ChatThrottleLib:Init()
+
+	-- Set up queues
+	if not self.Prio then
+		self.Prio = {}
+		self.Prio["ALERT"] = { ByName = {}, Ring = Ring:New(), avail = 0 }
+		self.Prio["NORMAL"] = { ByName = {}, Ring = Ring:New(), avail = 0 }
+		self.Prio["BULK"] = { ByName = {}, Ring = Ring:New(), avail = 0 }
+	end
+
+	-- v4: total send counters per priority
+	for _, Prio in pairs(self.Prio) do
+		Prio.nTotalSent = Prio.nTotalSent or 0
+	end
+
+	if not self.avail then
+		self.avail = 0 -- v5
+	end
+	if not self.nTotalSent then
+		self.nTotalSent = 0 -- v5
+	end
+
+
+	-- Set up a frame to get OnUpdate events
+	if not self.Frame then
+		self.Frame = CreateFrame("Frame")
+		self.Frame:Hide()
+	end
+	self.Frame:SetScript("OnUpdate", self.OnUpdate)
+	self.Frame:SetScript("OnEvent", self.OnEvent)	-- v11: Monitor P_E_W so we can throttle hard for a few seconds
+	self.Frame:RegisterEvent("PLAYER_ENTERING_WORLD")
+	self.OnUpdateDelay = 0
+	self.LastAvailUpdate = GetTime()
+	self.HardThrottlingBeginTime = GetTime()	-- v11: Throttle hard for a few seconds after startup
+
+	-- Hook SendChatMessage and SendAddonMessage so we can measure unpiped traffic and avoid overloads (v7)
+	if not self.securelyHooked then
+		-- Use secure hooks as of v16. Old regular hook support yanked out in v21.
+		self.securelyHooked = true
+		--SendChatMessage
+		hooksecurefunc("SendChatMessage", function(...)
+			return ChatThrottleLib.Hook_SendChatMessage(...)
+		end)
+		--SendAddonMessage
+		if _G.C_ChatInfo then
+			hooksecurefunc(_G.C_ChatInfo, "SendAddonMessage", function(...)
+				return ChatThrottleLib.Hook_SendAddonMessage(...)
+			end)
+		else
+			hooksecurefunc("SendAddonMessage", function(...)
+				return ChatThrottleLib.Hook_SendAddonMessage(...)
+			end)
+		end
+	end
+	self.nBypass = 0
+end
+
+
+-----------------------------------------------------------------------
+-- ChatThrottleLib.Hook_SendChatMessage / .Hook_SendAddonMessage
+
+local bMyTraffic = false
+
+function ChatThrottleLib.Hook_SendChatMessage(text, chattype, language, destination, ...)
+	if bMyTraffic then
+		return
+	end
+	local self = ChatThrottleLib
+	local size = strlen(tostring(text or "")) + strlen(tostring(destination or "")) + self.MSG_OVERHEAD
+	self.avail = self.avail - size
+	self.nBypass = self.nBypass + size	-- just a statistic
+end
+function ChatThrottleLib.Hook_SendAddonMessage(prefix, text, chattype, destination, ...)
+	if bMyTraffic then
+		return
+	end
+	local self = ChatThrottleLib
+	local size = tostring(text or ""):len() + tostring(prefix or ""):len();
+	size = size + tostring(destination or ""):len() + self.MSG_OVERHEAD
+	self.avail = self.avail - size
+	self.nBypass = self.nBypass + size	-- just a statistic
+end
+
+
+
+-----------------------------------------------------------------------
+-- ChatThrottleLib:UpdateAvail
+-- Update self.avail with how much bandwidth is currently available
+
+function ChatThrottleLib:UpdateAvail()
+	local now = GetTime()
+	local MAX_CPS = self.MAX_CPS;
+	local newavail = MAX_CPS * (now - self.LastAvailUpdate)
+	local avail = self.avail
+
+	if now - self.HardThrottlingBeginTime < 5 then
+		-- First 5 seconds after startup/zoning: VERY hard clamping to avoid irritating the server rate limiter, it seems very cranky then
+		avail = math_min(avail + (newavail*0.1), MAX_CPS*0.5)
+		self.bChoking = true
+	elseif GetFramerate() < self.MIN_FPS then		-- GetFrameRate call takes ~0.002 secs
+		avail = math_min(MAX_CPS, avail + newavail*0.5)
+		self.bChoking = true		-- just a statistic
+	else
+		avail = math_min(self.BURST, avail + newavail)
+		self.bChoking = false
+	end
+
+	avail = math_max(avail, 0-(MAX_CPS*2))	-- Can go negative when someone is eating bandwidth past the lib. but we refuse to stay silent for more than 2 seconds; if they can do it, we can.
+
+	self.avail = avail
+	self.LastAvailUpdate = now
+
+	return avail
+end
+
+
+-----------------------------------------------------------------------
+-- Despooling logic
+-- Reminder:
+-- - We have 3 Priorities, each containing a "Ring" construct ...
+-- - ... made up of N "Pipe"s (1 for each destination/pipename)
+-- - and each pipe contains messages
+
+function ChatThrottleLib:Despool(Prio)
+	local ring = Prio.Ring
+	while ring.pos and Prio.avail > ring.pos[1].nSize do
+		local msg = table_remove(ring.pos, 1)
+		if not ring.pos[1] then  -- did we remove last msg in this pipe?
+			local pipe = Prio.Ring.pos
+			Prio.Ring:Remove(pipe)
+			Prio.ByName[pipe.name] = nil
+			DelPipe(pipe)
+		else
+			Prio.Ring.pos = Prio.Ring.pos.next
+		end
+		local didSend=false
+		local lowerDest = strlower(msg[3] or "")
+		if lowerDest == "raid" and not UnitInRaid("player") then
+			-- do nothing
+		elseif lowerDest == "party" and not UnitInParty("player") then
+			-- do nothing
+		else
+			Prio.avail = Prio.avail - msg.nSize
+			bMyTraffic = true
+			msg.f(unpack(msg, 1, msg.n))
+			bMyTraffic = false
+			Prio.nTotalSent = Prio.nTotalSent + msg.nSize
+			DelMsg(msg)
+			didSend = true
+		end
+		-- notify caller of delivery (even if we didn't send it)
+		if msg.callbackFn then
+			msg.callbackFn (msg.callbackArg, didSend)
+		end
+		-- USER CALLBACK MAY ERROR
+	end
+end
+
+
+function ChatThrottleLib.OnEvent(this,event)
+	-- v11: We know that the rate limiter is touchy after login. Assume that it's touchy after zoning, too.
+	local self = ChatThrottleLib
+	if event == "PLAYER_ENTERING_WORLD" then
+		self.HardThrottlingBeginTime = GetTime()	-- Throttle hard for a few seconds after zoning
+		self.avail = 0
+	end
+end
+
+
+function ChatThrottleLib.OnUpdate(this,delay)
+	local self = ChatThrottleLib
+
+	self.OnUpdateDelay = self.OnUpdateDelay + delay
+	if self.OnUpdateDelay < 0.08 then
+		return
+	end
+	self.OnUpdateDelay = 0
+
+	self:UpdateAvail()
+
+	if self.avail < 0  then
+		return -- argh. some bastard is spewing stuff past the lib. just bail early to save cpu.
+	end
+
+	-- See how many of our priorities have queued messages (we only have 3, don't worry about the loop)
+	local n = 0
+	for prioname,Prio in pairs(self.Prio) do
+		if Prio.Ring.pos or Prio.avail < 0 then
+			n = n + 1
+		end
+	end
+
+	-- Anything queued still?
+	if n<1 then
+		-- Nope. Move spillover bandwidth to global availability gauge and clear self.bQueueing
+		for prioname, Prio in pairs(self.Prio) do
+			self.avail = self.avail + Prio.avail
+			Prio.avail = 0
+		end
+		self.bQueueing = false
+		self.Frame:Hide()
+		return
+	end
+
+	-- There's stuff queued. Hand out available bandwidth to priorities as needed and despool their queues
+	local avail = self.avail/n
+	self.avail = 0
+
+	for prioname, Prio in pairs(self.Prio) do
+		if Prio.Ring.pos or Prio.avail < 0 then
+			Prio.avail = Prio.avail + avail
+			if Prio.Ring.pos and Prio.avail > Prio.Ring.pos[1].nSize then
+				self:Despool(Prio)
+				-- Note: We might not get here if the user-supplied callback function errors out! Take care!
+			end
+		end
+	end
+
+end
+
+
+
+
+-----------------------------------------------------------------------
+-- Spooling logic
+
+function ChatThrottleLib:Enqueue(prioname, pipename, msg)
+	local Prio = self.Prio[prioname]
+	local pipe = Prio.ByName[pipename]
+	if not pipe then
+		self.Frame:Show()
+		pipe = NewPipe()
+		pipe.name = pipename
+		Prio.ByName[pipename] = pipe
+		Prio.Ring:Add(pipe)
+	end
+
+	pipe[#pipe + 1] = msg
+
+	self.bQueueing = true
+end
+
+function ChatThrottleLib:SendChatMessage(prio, prefix,   text, chattype, language, destination, queueName, callbackFn, callbackArg)
+	if not self or not prio or not prefix or not text or not self.Prio[prio] then
+		error('Usage: ChatThrottleLib:SendChatMessage("{BULK||NORMAL||ALERT}", "prefix", "text"[, "chattype"[, "language"[, "destination"]]]', 2)
+	end
+	if callbackFn and type(callbackFn)~="function" then
+		error('ChatThrottleLib:ChatMessage(): callbackFn: expected function, got '..type(callbackFn), 2)
+	end
+
+	local nSize = text:len()
+
+	if nSize>255 then
+		error("ChatThrottleLib:SendChatMessage(): message length cannot exceed 255 bytes", 2)
+	end
+
+	nSize = nSize + self.MSG_OVERHEAD
+
+	-- Check if there's room in the global available bandwidth gauge to send directly
+	if not self.bQueueing and nSize < self:UpdateAvail() then
+		self.avail = self.avail - nSize
+		bMyTraffic = true
+		_G.SendChatMessage(text, chattype, language, destination)
+		bMyTraffic = false
+		self.Prio[prio].nTotalSent = self.Prio[prio].nTotalSent + nSize
+		if callbackFn then
+			callbackFn (callbackArg, true)
+		end
+		-- USER CALLBACK MAY ERROR
+		return
+	end
+
+	-- Message needs to be queued
+	local msg = NewMsg()
+	msg.f = _G.SendChatMessage
+	msg[1] = text
+	msg[2] = chattype or "SAY"
+	msg[3] = language
+	msg[4] = destination
+	msg.n = 4
+	msg.nSize = nSize
+	msg.callbackFn = callbackFn
+	msg.callbackArg = callbackArg
+
+	self:Enqueue(prio, queueName or (prefix..(chattype or "SAY")..(destination or "")), msg)
+end
+
+
+function ChatThrottleLib:SendAddonMessage(prio, prefix, text, chattype, target, queueName, callbackFn, callbackArg)
+	if not self or not prio or not prefix or not text or not chattype or not self.Prio[prio] then
+		error('Usage: ChatThrottleLib:SendAddonMessage("{BULK||NORMAL||ALERT}", "prefix", "text", "chattype"[, "target"])', 2)
+	end
+	if callbackFn and type(callbackFn)~="function" then
+		error('ChatThrottleLib:SendAddonMessage(): callbackFn: expected function, got '..type(callbackFn), 2)
+	end
+
+	local nSize = text:len();
+
+	if C_ChatInfo or RegisterAddonMessagePrefix then
+		if nSize>255 then
+			error("ChatThrottleLib:SendAddonMessage(): message length cannot exceed 255 bytes", 2)
+		end
+	else
+		nSize = nSize + prefix:len() + 1
+		if nSize>255 then
+			error("ChatThrottleLib:SendAddonMessage(): prefix + message length cannot exceed 254 bytes", 2)
+		end
+	end
+
+	nSize = nSize + self.MSG_OVERHEAD;
+
+	-- Check if there's room in the global available bandwidth gauge to send directly
+	if not self.bQueueing and nSize < self:UpdateAvail() then
+		self.avail = self.avail - nSize
+		bMyTraffic = true
+		if _G.C_ChatInfo then
+			_G.C_ChatInfo.SendAddonMessage(prefix, text, chattype, target)
+		else
+			_G.SendAddonMessage(prefix, text, chattype, target)
+		end
+		bMyTraffic = false
+		self.Prio[prio].nTotalSent = self.Prio[prio].nTotalSent + nSize
+		if callbackFn then
+			callbackFn (callbackArg, true)
+		end
+		-- USER CALLBACK MAY ERROR
+		return
+	end
+
+	-- Message needs to be queued
+	local msg = NewMsg()
+	msg.f = _G.C_ChatInfo and _G.C_ChatInfo.SendAddonMessage or _G.SendAddonMessage
+	msg[1] = prefix
+	msg[2] = text
+	msg[3] = chattype
+	msg[4] = target
+	msg.n = (target~=nil) and 4 or 3;
+	msg.nSize = nSize
+	msg.callbackFn = callbackFn
+	msg.callbackArg = callbackArg
+
+	self:Enqueue(prio, queueName or (prefix..chattype..(target or "")), msg)
+end
+
+
+
+
+-----------------------------------------------------------------------
+-- Get the ball rolling!
+
+ChatThrottleLib:Init()
+
+--[[ WoWBench debugging snippet
+if(WOWB_VER) then
+	local function SayTimer()
+		print("SAY: "..GetTime().." "..arg1)
+	end
+	ChatThrottleLib.Frame:SetScript("OnEvent", SayTimer)
+	ChatThrottleLib.Frame:RegisterEvent("CHAT_MSG_SAY")
+end
+]]
+
+
diff --git a/EMA/Libs/AceConfig-3.0/AceConfig-3.0.lua b/EMA/Libs/AceConfig-3.0/AceConfig-3.0.lua
new file mode 100644
index 0000000..a99ddf7
--- /dev/null
+++ b/EMA/Libs/AceConfig-3.0/AceConfig-3.0.lua
@@ -0,0 +1,58 @@
+--- AceConfig-3.0 wrapper library.
+-- Provides an API to register an options table with the config registry,
+-- as well as associate it with a slash command.
+-- @class file
+-- @name AceConfig-3.0
+-- @release $Id: AceConfig-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
+
+--[[
+AceConfig-3.0
+
+Very light wrapper library that combines all the AceConfig subcomponents into one more easily used whole.
+
+]]
+
+local cfgreg = LibStub("AceConfigRegistry-3.0")
+local cfgcmd = LibStub("AceConfigCmd-3.0")
+
+local MAJOR, MINOR = "AceConfig-3.0", 3
+local AceConfig = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceConfig then return end
+
+--TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true)
+--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true)
+
+-- Lua APIs
+local pcall, error, type, pairs = pcall, error, type, pairs
+
+-- -------------------------------------------------------------------
+-- :RegisterOptionsTable(appName, options, slashcmd, persist)
+--
+-- - appName - (string) application name
+-- - options - table or function ref, see AceConfigRegistry
+-- - slashcmd - slash command (string) or table with commands, or nil to NOT create a slash command
+
+--- Register a option table with the AceConfig registry.
+-- You can supply a slash command (or a table of slash commands) to register with AceConfigCmd directly.
+-- @paramsig appName, options [, slashcmd]
+-- @param appName The application name for the config table.
+-- @param options The option table (or a function to generate one on demand).  http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/
+-- @param slashcmd A slash command to register for the option table, or a table of slash commands.
+-- @usage
+-- local AceConfig = LibStub("AceConfig-3.0")
+-- AceConfig:RegisterOptionsTable("MyAddon", myOptions, {"/myslash", "/my"})
+function AceConfig:RegisterOptionsTable(appName, options, slashcmd)
+	local ok,msg = pcall(cfgreg.RegisterOptionsTable, self, appName, options)
+	if not ok then error(msg, 2) end
+
+	if slashcmd then
+		if type(slashcmd) == "table" then
+			for _,cmd in pairs(slashcmd) do
+				cfgcmd:CreateChatCommand(cmd, appName)
+			end
+		else
+			cfgcmd:CreateChatCommand(slashcmd, appName)
+		end
+	end
+end
diff --git a/EMA/Libs/AceConfig-3.0/AceConfig-3.0.xml b/EMA/Libs/AceConfig-3.0/AceConfig-3.0.xml
new file mode 100644
index 0000000..a3569b7
--- /dev/null
+++ b/EMA/Libs/AceConfig-3.0/AceConfig-3.0.xml
@@ -0,0 +1,8 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Include file="AceConfigRegistry-3.0\AceConfigRegistry-3.0.xml"/>
+	<Include file="AceConfigCmd-3.0\AceConfigCmd-3.0.xml"/>
+	<Include file="AceConfigDialog-3.0\AceConfigDialog-3.0.xml"/>
+	<!--<Include file="AceConfigDropdown-3.0\AceConfigDropdown-3.0.xml"/>-->
+	<Script file="AceConfig-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua b/EMA/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
new file mode 100644
index 0000000..33f9fe1
--- /dev/null
+++ b/EMA/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
@@ -0,0 +1,794 @@
+--- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
+-- @class file
+-- @name AceConfigCmd-3.0
+-- @release $Id: AceConfigCmd-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
+
+--[[
+AceConfigCmd-3.0
+
+Handles commandline optionstable access
+
+REQUIRES: AceConsole-3.0 for command registration (loaded on demand)
+
+]]
+
+-- TODO: plugin args
+
+local cfgreg = LibStub("AceConfigRegistry-3.0")
+
+local MAJOR, MINOR = "AceConfigCmd-3.0", 14
+local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceConfigCmd then return end
+
+AceConfigCmd.commands = AceConfigCmd.commands or {}
+local commands = AceConfigCmd.commands
+
+local AceConsole -- LoD
+local AceConsoleName = "AceConsole-3.0"
+
+-- Lua APIs
+local strsub, strsplit, strlower, strmatch, strtrim = string.sub, string.split, string.lower, string.match, string.trim
+local format, tonumber, tostring = string.format, tonumber, tostring
+local tsort, tinsert = table.sort, table.insert
+local select, pairs, next, type = select, pairs, next, type
+local error, assert = error, assert
+
+-- WoW APIs
+local _G = _G
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: LibStub, SELECTED_CHAT_FRAME, DEFAULT_CHAT_FRAME
+
+
+local L = setmetatable({}, {	-- TODO: replace with proper locale
+	__index = function(self,k) return k end
+})
+
+
+
+local function print(msg)
+	(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(msg)
+end
+
+-- constants used by getparam() calls below
+
+local handlertypes = {["table"]=true}
+local handlermsg = "expected a table"
+
+local functypes = {["function"]=true, ["string"]=true}
+local funcmsg = "expected function or member name"
+
+
+-- pickfirstset() - picks the first non-nil value and returns it
+
+local function pickfirstset(...)
+	for i=1,select("#",...) do
+		if select(i,...)~=nil then
+			return select(i,...)
+		end
+	end
+end
+
+
+-- err() - produce real error() regarding malformed options tables etc
+
+local function err(info,inputpos,msg )
+	local cmdstr=" "..strsub(info.input, 1, inputpos-1)
+	error(MAJOR..": /" ..info[0] ..cmdstr ..": "..(msg or "malformed options table"), 2)
+end
+
+
+-- usererr() - produce chatframe message regarding bad slash syntax etc
+
+local function usererr(info,inputpos,msg )
+	local cmdstr=strsub(info.input, 1, inputpos-1);
+	print("/" ..info[0] .. " "..cmdstr ..": "..(msg or "malformed options table"))
+end
+
+
+-- callmethod() - call a given named method (e.g. "get", "set") with given arguments
+
+local function callmethod(info, inputpos, tab, methodtype, ...)
+	local method = info[methodtype]
+	if not method then
+		err(info, inputpos, "'"..methodtype.."': not set")
+	end
+
+	info.arg = tab.arg
+	info.option = tab
+	info.type = tab.type
+
+	if type(method)=="function" then
+		return method(info, ...)
+	elseif type(method)=="string" then
+		if type(info.handler[method])~="function" then
+			err(info, inputpos, "'"..methodtype.."': '"..method.."' is not a member function of "..tostring(info.handler))
+		end
+		return info.handler[method](info.handler, info, ...)
+	else
+		assert(false)	-- type should have already been checked on read
+	end
+end
+
+-- callfunction() - call a given named function (e.g. "name", "desc") with given arguments
+
+local function callfunction(info, tab, methodtype, ...)
+	local method = tab[methodtype]
+
+	info.arg = tab.arg
+	info.option = tab
+	info.type = tab.type
+
+	if type(method)=="function" then
+		return method(info, ...)
+	else
+		assert(false) -- type should have already been checked on read
+	end
+end
+
+-- do_final() - do the final step (set/execute) along with validation and confirmation
+
+local function do_final(info, inputpos, tab, methodtype, ...)
+	if info.validate then
+		local res = callmethod(info,inputpos,tab,"validate",...)
+		if type(res)=="string" then
+			usererr(info, inputpos, "'"..strsub(info.input, inputpos).."' - "..res)
+			return
+		end
+	end
+	-- console ignores .confirm
+
+	callmethod(info,inputpos,tab,methodtype, ...)
+end
+
+
+-- getparam() - used by handle() to retreive and store "handler", "get", "set", etc
+
+local function getparam(info, inputpos, tab, depth, paramname, types, errormsg)
+	local old,oldat = info[paramname], info[paramname.."_at"]
+	local val=tab[paramname]
+	if val~=nil then
+		if val==false then
+			val=nil
+		elseif not types[type(val)] then
+			err(info, inputpos, "'" .. paramname.. "' - "..errormsg)
+		end
+		info[paramname] = val
+		info[paramname.."_at"] = depth
+	end
+	return old,oldat
+end
+
+
+-- iterateargs(tab) - custom iterator that iterates both t.args and t.plugins.*
+local dummytable={}
+
+local function iterateargs(tab)
+	if not tab.plugins then
+		return pairs(tab.args)
+	end
+
+	local argtabkey,argtab=next(tab.plugins)
+	local v
+
+	return function(_, k)
+		while argtab do
+			k,v = next(argtab, k)
+			if k then return k,v end
+			if argtab==tab.args then
+				argtab=nil
+			else
+				argtabkey,argtab = next(tab.plugins, argtabkey)
+				if not argtabkey then
+					argtab=tab.args
+				end
+			end
+		end
+	end
+end
+
+local function checkhidden(info, inputpos, tab)
+	if tab.cmdHidden~=nil then
+		return tab.cmdHidden
+	end
+	local hidden = tab.hidden
+	if type(hidden) == "function" or type(hidden) == "string" then
+		info.hidden = hidden
+		hidden = callmethod(info, inputpos, tab, 'hidden')
+		info.hidden = nil
+	end
+	return hidden
+end
+
+local function showhelp(info, inputpos, tab, depth, noHead)
+	if not noHead then
+		print("|cff33ff99"..info.appName.."|r: Arguments to |cffffff78/"..info[0].."|r "..strsub(info.input,1,inputpos-1)..":")
+	end
+
+	local sortTbl = {}	-- [1..n]=name
+	local refTbl = {}   -- [name]=tableref
+
+	for k,v in iterateargs(tab) do
+		if not refTbl[k] then	-- a plugin overriding something in .args
+			tinsert(sortTbl, k)
+			refTbl[k] = v
+		end
+	end
+
+	tsort(sortTbl, function(one, two)
+		local o1 = refTbl[one].order or 100
+		local o2 = refTbl[two].order or 100
+		if type(o1) == "function" or type(o1) == "string" then
+			info.order = o1
+			info[#info+1] = one
+			o1 = callmethod(info, inputpos, refTbl[one], "order")
+			info[#info] = nil
+			info.order = nil
+		end
+		if type(o2) == "function" or type(o1) == "string" then
+			info.order = o2
+			info[#info+1] = two
+			o2 = callmethod(info, inputpos, refTbl[two], "order")
+			info[#info] = nil
+			info.order = nil
+		end
+		if o1<0 and o2<0 then return o1<o2 end
+		if o2<0 then return true end
+		if o1<0 then return false end
+		if o1==o2 then return tostring(one)<tostring(two) end   -- compare names
+		return o1<o2
+	end)
+
+	for i = 1, #sortTbl do
+		local k = sortTbl[i]
+		local v = refTbl[k]
+		if not checkhidden(info, inputpos, v) then
+			if v.type ~= "description" and v.type ~= "header" then
+				-- recursively show all inline groups
+				local name, desc = v.name, v.desc
+				if type(name) == "function" then
+					name = callfunction(info, v, 'name')
+				end
+				if type(desc) == "function" then
+					desc = callfunction(info, v, 'desc')
+				end
+				if v.type == "group" and pickfirstset(v.cmdInline, v.inline, false) then
+					print("  "..(desc or name)..":")
+					local oldhandler,oldhandler_at = getparam(info, inputpos, v, depth, "handler", handlertypes, handlermsg)
+					showhelp(info, inputpos, v, depth, true)
+					info.handler,info.handler_at = oldhandler,oldhandler_at
+				else
+					local key = k:gsub(" ", "_")
+					print("  |cffffff78"..key.."|r - "..(desc or name or ""))
+				end
+			end
+		end
+	end
+end
+
+
+local function keybindingValidateFunc(text)
+	if text == nil or text == "NONE" then
+		return nil
+	end
+	text = text:upper()
+	local shift, ctrl, alt
+	local modifier
+	while true do
+		if text == "-" then
+			break
+		end
+		modifier, text = strsplit('-', text, 2)
+		if text then
+			if modifier ~= "SHIFT" and modifier ~= "CTRL" and modifier ~= "ALT" then
+				return false
+			end
+			if modifier == "SHIFT" then
+				if shift then
+					return false
+				end
+				shift = true
+			end
+			if modifier == "CTRL" then
+				if ctrl then
+					return false
+				end
+				ctrl = true
+			end
+			if modifier == "ALT" then
+				if alt then
+					return false
+				end
+				alt = true
+			end
+		else
+			text = modifier
+			break
+		end
+	end
+	if text == "" then
+		return false
+	end
+	if not text:find("^F%d+$") and text ~= "CAPSLOCK" and text:len() ~= 1 and (text:byte() < 128 or text:len() > 4) and not _G["KEY_" .. text] then
+		return false
+	end
+	local s = text
+	if shift then
+		s = "SHIFT-" .. s
+	end
+	if ctrl then
+		s = "CTRL-" .. s
+	end
+	if alt then
+		s = "ALT-" .. s
+	end
+	return s
+end
+
+-- handle() - selfrecursing function that processes input->optiontable
+-- - depth - starts at 0
+-- - retfalse - return false rather than produce error if a match is not found (used by inlined groups)
+
+local function handle(info, inputpos, tab, depth, retfalse)
+
+	if not(type(tab)=="table" and type(tab.type)=="string") then err(info,inputpos) end
+
+	-------------------------------------------------------------------
+	-- Grab hold of handler,set,get,func,etc if set (and remember old ones)
+	-- Note that we do NOT validate if method names are correct at this stage,
+	-- the handler may change before they're actually used!
+
+	local oldhandler,oldhandler_at = getparam(info,inputpos,tab,depth,"handler",handlertypes,handlermsg)
+	local oldset,oldset_at = getparam(info,inputpos,tab,depth,"set",functypes,funcmsg)
+	local oldget,oldget_at = getparam(info,inputpos,tab,depth,"get",functypes,funcmsg)
+	local oldfunc,oldfunc_at = getparam(info,inputpos,tab,depth,"func",functypes,funcmsg)
+	local oldvalidate,oldvalidate_at = getparam(info,inputpos,tab,depth,"validate",functypes,funcmsg)
+	--local oldconfirm,oldconfirm_at = getparam(info,inputpos,tab,depth,"confirm",functypes,funcmsg)
+
+	-------------------------------------------------------------------
+	-- Act according to .type of this table
+
+	if tab.type=="group" then
+		------------ group --------------------------------------------
+
+		if type(tab.args)~="table" then err(info, inputpos) end
+		if tab.plugins and type(tab.plugins)~="table" then err(info,inputpos) end
+
+		-- grab next arg from input
+		local _,nextpos,arg = (info.input):find(" *([^ ]+) *", inputpos)
+		if not arg then
+			showhelp(info, inputpos, tab, depth)
+			return
+		end
+		nextpos=nextpos+1
+
+		-- loop .args and try to find a key with a matching name
+		for k,v in iterateargs(tab) do
+			if not(type(k)=="string" and type(v)=="table" and type(v.type)=="string") then err(info,inputpos, "options table child '"..tostring(k).."' is malformed") end
+
+			-- is this child an inline group? if so, traverse into it
+			if v.type=="group" and pickfirstset(v.cmdInline, v.inline, false) then
+				info[depth+1] = k
+				if handle(info, inputpos, v, depth+1, true)==false then
+					info[depth+1] = nil
+					-- wasn't found in there, but that's ok, we just keep looking down here
+				else
+					return	-- done, name was found in inline group
+				end
+			-- matching name and not a inline group
+			elseif strlower(arg)==strlower(k:gsub(" ", "_")) then
+				info[depth+1] = k
+				return handle(info,nextpos,v,depth+1)
+			end
+		end
+
+		-- no match
+		if retfalse then
+			-- restore old infotable members and return false to indicate failure
+			info.handler,info.handler_at = oldhandler,oldhandler_at
+			info.set,info.set_at = oldset,oldset_at
+			info.get,info.get_at = oldget,oldget_at
+			info.func,info.func_at = oldfunc,oldfunc_at
+			info.validate,info.validate_at = oldvalidate,oldvalidate_at
+			--info.confirm,info.confirm_at = oldconfirm,oldconfirm_at
+			return false
+		end
+
+		-- couldn't find the command, display error
+		usererr(info, inputpos, "'"..arg.."' - " .. L["unknown argument"])
+		return
+	end
+
+	local str = strsub(info.input,inputpos);
+
+	if tab.type=="execute" then
+		------------ execute --------------------------------------------
+		do_final(info, inputpos, tab, "func")
+
+
+
+	elseif tab.type=="input" then
+		------------ input --------------------------------------------
+
+		local res = true
+		if tab.pattern then
+			if not(type(tab.pattern)=="string") then err(info, inputpos, "'pattern' - expected a string") end
+			if not strmatch(str, tab.pattern) then
+				usererr(info, inputpos, "'"..str.."' - " .. L["invalid input"])
+				return
+			end
+		end
+
+		do_final(info, inputpos, tab, "set", str)
+
+
+
+	elseif tab.type=="toggle" then
+		------------ toggle --------------------------------------------
+		local b
+		local str = strtrim(strlower(str))
+		if str=="" then
+			b = callmethod(info, inputpos, tab, "get")
+
+			if tab.tristate then
+				--cycle in true, nil, false order
+				if b then
+					b = nil
+				elseif b == nil then
+					b = false
+				else
+					b = true
+				end
+			else
+				b = not b
+			end
+
+		elseif str==L["on"] then
+			b = true
+		elseif str==L["off"] then
+			b = false
+		elseif tab.tristate and str==L["default"] then
+			b = nil
+		else
+			if tab.tristate then
+				usererr(info, inputpos, format(L["'%s' - expected 'on', 'off' or 'default', or no argument to toggle."], str))
+			else
+				usererr(info, inputpos, format(L["'%s' - expected 'on' or 'off', or no argument to toggle."], str))
+			end
+			return
+		end
+
+		do_final(info, inputpos, tab, "set", b)
+
+
+	elseif tab.type=="range" then
+		------------ range --------------------------------------------
+		local val = tonumber(str)
+		if not val then
+			usererr(info, inputpos, "'"..str.."' - "..L["expected number"])
+			return
+		end
+		if type(info.step)=="number" then
+			val = val- (val % info.step)
+		end
+		if type(info.min)=="number" and val<info.min then
+			usererr(info, inputpos, val.." - "..format(L["must be equal to or higher than %s"], tostring(info.min)) )
+			return
+		end
+		if type(info.max)=="number" and val>info.max then
+			usererr(info, inputpos, val.." - "..format(L["must be equal to or lower than %s"], tostring(info.max)) )
+			return
+		end
+
+		do_final(info, inputpos, tab, "set", val)
+
+
+	elseif tab.type=="select" then
+		------------ select ------------------------------------
+		local str = strtrim(strlower(str))
+
+		local values = tab.values
+		if type(values) == "function" or type(values) == "string" then
+			info.values = values
+			values = callmethod(info, inputpos, tab, "values")
+			info.values = nil
+		end
+
+		if str == "" then
+			local b = callmethod(info, inputpos, tab, "get")
+			local fmt = "|cffffff78- [%s]|r %s"
+			local fmt_sel = "|cffffff78- [%s]|r %s |cffff0000*|r"
+			print(L["Options for |cffffff78"..info[#info].."|r:"])
+			for k, v in pairs(values) do
+				if b == k then
+					print(fmt_sel:format(k, v))
+				else
+					print(fmt:format(k, v))
+				end
+			end
+			return
+		end
+
+		local ok
+		for k,v in pairs(values) do
+			if strlower(k)==str then
+				str = k	-- overwrite with key (in case of case mismatches)
+				ok = true
+				break
+			end
+		end
+		if not ok then
+			usererr(info, inputpos, "'"..str.."' - "..L["unknown selection"])
+			return
+		end
+
+		do_final(info, inputpos, tab, "set", str)
+
+	elseif tab.type=="multiselect" then
+		------------ multiselect -------------------------------------------
+		local str = strtrim(strlower(str))
+
+		local values = tab.values
+		if type(values) == "function" or type(values) == "string" then
+			info.values = values
+			values = callmethod(info, inputpos, tab, "values")
+			info.values = nil
+		end
+
+		if str == "" then
+			local fmt = "|cffffff78- [%s]|r %s"
+			local fmt_sel = "|cffffff78- [%s]|r %s |cffff0000*|r"
+			print(L["Options for |cffffff78"..info[#info].."|r (multiple possible):"])
+			for k, v in pairs(values) do
+				if callmethod(info, inputpos, tab, "get", k) then
+					print(fmt_sel:format(k, v))
+				else
+					print(fmt:format(k, v))
+				end
+			end
+			return
+		end
+
+		--build a table of the selections, checking that they exist
+		--parse for =on =off =default in the process
+		--table will be key = true for options that should toggle, key = [on|off|default] for options to be set
+		local sels = {}
+		for v in str:gmatch("[^ ]+") do
+			--parse option=on etc
+			local opt, val = v:match('(.+)=(.+)')
+			--get option if toggling
+			if not opt then
+				opt = v
+			end
+
+			--check that the opt is valid
+			local ok
+			for k,v in pairs(values) do
+				if strlower(k)==opt then
+					opt = k	-- overwrite with key (in case of case mismatches)
+					ok = true
+					break
+				end
+			end
+
+			if not ok then
+				usererr(info, inputpos, "'"..opt.."' - "..L["unknown selection"])
+				return
+			end
+
+			--check that if val was supplied it is valid
+			if val then
+				if val == L["on"] or val == L["off"] or (tab.tristate and val == L["default"]) then
+					--val is valid insert it
+					sels[opt] = val
+				else
+					if tab.tristate then
+						usererr(info, inputpos, format(L["'%s' '%s' - expected 'on', 'off' or 'default', or no argument to toggle."], v, val))
+					else
+						usererr(info, inputpos, format(L["'%s' '%s' - expected 'on' or 'off', or no argument to toggle."], v, val))
+					end
+					return
+				end
+			else
+				-- no val supplied, toggle
+				sels[opt] = true
+			end
+		end
+
+		for opt, val in pairs(sels) do
+			local newval
+
+			if (val == true) then
+				--toggle the option
+				local b = callmethod(info, inputpos, tab, "get", opt)
+
+				if tab.tristate then
+					--cycle in true, nil, false order
+					if b then
+						b = nil
+					elseif b == nil then
+						b = false
+					else
+						b = true
+					end
+				else
+					b = not b
+				end
+				newval = b
+			else
+				--set the option as specified
+				if val==L["on"] then
+					newval = true
+				elseif val==L["off"] then
+					newval = false
+				elseif val==L["default"] then
+					newval = nil
+				end
+			end
+
+			do_final(info, inputpos, tab, "set", opt, newval)
+		end
+
+
+	elseif tab.type=="color" then
+		------------ color --------------------------------------------
+		local str = strtrim(strlower(str))
+		if str == "" then
+			--TODO: Show current value
+			return
+		end
+
+		local r, g, b, a
+
+		local hasAlpha = tab.hasAlpha
+		if type(hasAlpha) == "function" or type(hasAlpha) == "string" then
+			info.hasAlpha = hasAlpha
+			hasAlpha = callmethod(info, inputpos, tab, 'hasAlpha')
+			info.hasAlpha = nil
+		end
+
+		if hasAlpha then
+			if str:len() == 8 and str:find("^%x*$")  then
+				--parse a hex string
+				r,g,b,a = tonumber(str:sub(1, 2), 16) / 255, tonumber(str:sub(3, 4), 16) / 255, tonumber(str:sub(5, 6), 16) / 255, tonumber(str:sub(7, 8), 16) / 255
+			else
+				--parse seperate values
+				r,g,b,a = str:match("^([%d%.]+) ([%d%.]+) ([%d%.]+) ([%d%.]+)$")
+				r,g,b,a = tonumber(r), tonumber(g), tonumber(b), tonumber(a)
+			end
+			if not (r and g and b and a) then
+				usererr(info, inputpos, format(L["'%s' - expected 'RRGGBBAA' or 'r g b a'."], str))
+				return
+			end
+
+			if r >= 0.0 and r <= 1.0 and g >= 0.0 and g <= 1.0 and b >= 0.0 and b <= 1.0 and a >= 0.0 and a <= 1.0 then
+				--values are valid
+			elseif r >= 0 and r <= 255 and g >= 0 and g <= 255 and b >= 0 and b <= 255 and a >= 0 and a <= 255 then
+				--values are valid 0..255, convert to 0..1
+				r = r / 255
+				g = g / 255
+				b = b / 255
+				a = a / 255
+			else
+				--values are invalid
+				usererr(info, inputpos, format(L["'%s' - values must all be either in the range 0..1 or 0..255."], str))
+			end
+		else
+			a = 1.0
+			if str:len() == 6 and str:find("^%x*$") then
+				--parse a hex string
+				r,g,b = tonumber(str:sub(1, 2), 16) / 255, tonumber(str:sub(3, 4), 16) / 255, tonumber(str:sub(5, 6), 16) / 255
+			else
+				--parse seperate values
+				r,g,b = str:match("^([%d%.]+) ([%d%.]+) ([%d%.]+)$")
+				r,g,b = tonumber(r), tonumber(g), tonumber(b)
+			end
+			if not (r and g and b) then
+				usererr(info, inputpos, format(L["'%s' - expected 'RRGGBB' or 'r g b'."], str))
+				return
+			end
+			if r >= 0.0 and r <= 1.0 and g >= 0.0 and g <= 1.0 and b >= 0.0 and b <= 1.0 then
+				--values are valid
+			elseif r >= 0 and r <= 255 and g >= 0 and g <= 255 and b >= 0 and b <= 255 then
+				--values are valid 0..255, convert to 0..1
+				r = r / 255
+				g = g / 255
+				b = b / 255
+			else
+				--values are invalid
+				usererr(info, inputpos, format(L["'%s' - values must all be either in the range 0-1 or 0-255."], str))
+			end
+		end
+
+		do_final(info, inputpos, tab, "set", r,g,b,a)
+
+	elseif tab.type=="keybinding" then
+		------------ keybinding --------------------------------------------
+		local str = strtrim(strlower(str))
+		if str == "" then
+			--TODO: Show current value
+			return
+		end
+		local value = keybindingValidateFunc(str:upper())
+		if value == false then
+			usererr(info, inputpos, format(L["'%s' - Invalid Keybinding."], str))
+			return
+		end
+
+		do_final(info, inputpos, tab, "set", value)
+
+	elseif tab.type=="description" then
+		------------ description --------------------
+		-- ignore description, GUI config only
+	else
+		err(info, inputpos, "unknown options table item type '"..tostring(tab.type).."'")
+	end
+end
+
+--- Handle the chat command.
+-- This is usually called from a chat command handler to parse the command input as operations on an aceoptions table.\\
+-- AceConfigCmd uses this function internally when a slash command is registered with `:CreateChatCommand`
+-- @param slashcmd The slash command WITHOUT leading slash (only used for error output)
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+-- @param input The commandline input (as given by the WoW handler, i.e. without the command itself)
+-- @usage
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceConsole-3.0")
+-- -- Use AceConsole-3.0 to register a Chat Command
+-- MyAddon:RegisterChatCommand("mychat", "ChatCommand")
+--
+-- -- Show the GUI if no input is supplied, otherwise handle the chat input.
+-- function MyAddon:ChatCommand(input)
+--   -- Assuming "MyOptions" is the appName of a valid options table
+--   if not input or input:trim() == "" then
+--     LibStub("AceConfigDialog-3.0"):Open("MyOptions")
+--   else
+--     LibStub("AceConfigCmd-3.0").HandleCommand(MyAddon, "mychat", "MyOptions", input)
+--   end
+-- end
+function AceConfigCmd:HandleCommand(slashcmd, appName, input)
+
+	local optgetter = cfgreg:GetOptionsTable(appName)
+	if not optgetter then
+		error([[Usage: HandleCommand("slashcmd", "appName", "input"): 'appName' - no options table "]]..tostring(appName)..[[" has been registered]], 2)
+	end
+	local options = assert( optgetter("cmd", MAJOR) )
+
+	local info = {   -- Don't try to recycle this, it gets handed off to callbacks and whatnot
+		[0] = slashcmd,
+		appName = appName,
+		options = options,
+		input = input,
+		self = self,
+		handler = self,
+		uiType = "cmd",
+		uiName = MAJOR,
+	}
+
+	handle(info, 1, options, 0)  -- (info, inputpos, table, depth)
+end
+
+--- Utility function to create a slash command handler.
+-- Also registers tab completion with AceTab
+-- @param slashcmd The slash command WITHOUT leading slash (only used for error output)
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+function AceConfigCmd:CreateChatCommand(slashcmd, appName)
+	if not AceConsole then
+		AceConsole = LibStub(AceConsoleName)
+	end
+	if AceConsole.RegisterChatCommand(self, slashcmd, function(input)
+				AceConfigCmd.HandleCommand(self, slashcmd, appName, input)	-- upgradable
+		end,
+	true) then -- succesfully registered so lets get the command -> app table in
+		commands[slashcmd] = appName
+	end
+end
+
+--- Utility function that returns the options table that belongs to a slashcommand.
+-- Designed to be used for the AceTab interface.
+-- @param slashcmd The slash command WITHOUT leading slash (only used for error output)
+-- @return The options table associated with the slash command (or nil if the slash command was not registered)
+function AceConfigCmd:GetChatCommandOptions(slashcmd)
+	return commands[slashcmd]
+end
diff --git a/EMA/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml b/EMA/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml
new file mode 100644
index 0000000..9e157b5
--- /dev/null
+++ b/EMA/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceConfigCmd-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua b/EMA/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
new file mode 100644
index 0000000..66416e8
--- /dev/null
+++ b/EMA/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
@@ -0,0 +1,1983 @@
+--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
+-- @class file
+-- @name AceConfigDialog-3.0
+-- @release $Id: AceConfigDialog-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $
+
+local LibStub = LibStub
+local gui = LibStub("AceGUI-3.0")
+local reg = LibStub("AceConfigRegistry-3.0")
+
+local MAJOR, MINOR = "AceConfigDialog-3.0", 66
+local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceConfigDialog then return end
+
+AceConfigDialog.OpenFrames = AceConfigDialog.OpenFrames or {}
+AceConfigDialog.Status = AceConfigDialog.Status or {}
+AceConfigDialog.frame = AceConfigDialog.frame or CreateFrame("Frame")
+
+AceConfigDialog.frame.apps = AceConfigDialog.frame.apps or {}
+AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {}
+AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {}
+
+-- Lua APIs
+local tconcat, tinsert, tsort, tremove, tsort = table.concat, table.insert, table.sort, table.remove, table.sort
+local strmatch, format = string.match, string.format
+local assert, loadstring, error = assert, loadstring, error
+local pairs, next, select, type, unpack, wipe, ipairs = pairs, next, select, type, unpack, wipe, ipairs
+local rawset, tostring, tonumber = rawset, tostring, tonumber
+local math_min, math_max, math_floor = math.min, math.max, math.floor
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: NORMAL_FONT_COLOR, GameTooltip, StaticPopupDialogs, ACCEPT, CANCEL, StaticPopup_Show
+-- GLOBALS: PlaySound, GameFontHighlight, GameFontHighlightSmall, GameFontHighlightLarge
+-- GLOBALS: CloseSpecialWindows, InterfaceOptions_AddCategory, geterrorhandler
+
+local emptyTbl = {}
+
+--[[
+	 xpcall safecall implementation
+]]
+local xpcall = xpcall
+
+local function errorhandler(err)
+	return geterrorhandler()(err)
+end
+
+local function CreateDispatcher(argCount)
+	local code = [[
+		local xpcall, eh = ...
+		local method, ARGS
+		local function call() return method(ARGS) end
+
+		local function dispatch(func, ...)
+			 method = func
+			 if not method then return end
+			 ARGS = ...
+			 return xpcall(call, eh)
+		end
+
+		return dispatch
+	]]
+
+	local ARGS = {}
+	for i = 1, argCount do ARGS[i] = "arg"..i end
+	code = code:gsub("ARGS", tconcat(ARGS, ", "))
+	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
+end
+
+local Dispatchers = setmetatable({}, {__index=function(self, argCount)
+	local dispatcher = CreateDispatcher(argCount)
+	rawset(self, argCount, dispatcher)
+	return dispatcher
+end})
+Dispatchers[0] = function(func)
+	return xpcall(func, errorhandler)
+end
+
+local function safecall(func, ...)
+	return Dispatchers[select("#", ...)](func, ...)
+end
+
+local width_multiplier = 170
+
+--[[
+Group Types
+  Tree 	- All Descendant Groups will all become nodes on the tree, direct child options will appear above the tree
+  		- Descendant Groups with inline=true and thier children will not become nodes
+
+  Tab	- Direct Child Groups will become tabs, direct child options will appear above the tab control
+  		- Grandchild groups will default to inline unless specified otherwise
+
+  Select- Same as Tab but with entries in a dropdown rather than tabs
+
+
+  Inline Groups
+  	- Will not become nodes of a select group, they will be effectivly part of thier parent group seperated by a border
+  	- If declared on a direct child of a root node of a select group, they will appear above the group container control
+  	- When a group is displayed inline, all descendants will also be inline members of the group
+
+]]
+
+-- Recycling functions
+local new, del, copy
+--newcount, delcount,createdcount,cached = 0,0,0
+do
+	local pool = setmetatable({},{__mode="k"})
+	function new()
+		--newcount = newcount + 1
+		local t = next(pool)
+		if t then
+			pool[t] = nil
+			return t
+		else
+			--createdcount = createdcount + 1
+			return {}
+		end
+	end
+	function copy(t)
+		local c = new()
+		for k, v in pairs(t) do
+			c[k] = v
+		end
+		return c
+	end
+	function del(t)
+		--delcount = delcount + 1
+		wipe(t)
+		pool[t] = true
+	end
+--	function cached()
+--		local n = 0
+--		for k in pairs(pool) do
+--			n = n + 1
+--		end
+--		return n
+--	end
+end
+
+-- picks the first non-nil value and returns it
+local function pickfirstset(...)
+  for i=1,select("#",...) do
+    if select(i,...)~=nil then
+      return select(i,...)
+    end
+  end
+end
+
+--gets an option from a given group, checking plugins
+local function GetSubOption(group, key)
+	if group.plugins then
+		for plugin, t in pairs(group.plugins) do
+			if t[key] then
+				return t[key]
+			end
+		end
+	end
+
+	return group.args[key]
+end
+
+--Option member type definitions, used to decide how to access it
+
+--Is the member Inherited from parent options
+local isInherited = {
+	set = true,
+	get = true,
+	func = true,
+	confirm = true,
+	validate = true,
+	disabled = true,
+	hidden = true
+}
+
+--Does a string type mean a literal value, instead of the default of a method of the handler
+local stringIsLiteral = {
+	name = true,
+	desc = true,
+	icon = true,
+	usage = true,
+	width = true,
+	image = true,
+	fontSize = true,
+}
+
+--Is Never a function or method
+local allIsLiteral = {
+	type = true,
+	descStyle = true,
+	imageWidth = true,
+	imageHeight = true,
+}
+
+--gets the value for a member that could be a function
+--function refs are called with an info arg
+--every other type is returned
+local function GetOptionsMemberValue(membername, option, options, path, appName, ...)
+	--get definition for the member
+	local inherits = isInherited[membername]
+
+
+	--get the member of the option, traversing the tree if it can be inherited
+	local member
+
+	if inherits then
+		local group = options
+		if group[membername] ~= nil then
+			member = group[membername]
+		end
+		for i = 1, #path do
+			group = GetSubOption(group, path[i])
+			if group[membername] ~= nil then
+				member = group[membername]
+			end
+		end
+	else
+		member = option[membername]
+	end
+
+	--check if we need to call a functon, or if we have a literal value
+	if ( not allIsLiteral[membername] ) and ( type(member) == "function" or ((not stringIsLiteral[membername]) and type(member) == "string") ) then
+		--We have a function to call
+		local info = new()
+		--traverse the options table, picking up the handler and filling the info with the path
+		local handler
+		local group = options
+		handler = group.handler or handler
+
+		for i = 1, #path do
+			group = GetSubOption(group, path[i])
+			info[i] = path[i]
+			handler = group.handler or handler
+		end
+
+		info.options = options
+		info.appName = appName
+		info[0] = appName
+		info.arg = option.arg
+		info.handler = handler
+		info.option = option
+		info.type = option.type
+		info.uiType = "dialog"
+		info.uiName = MAJOR
+
+		local a, b, c ,d
+		--using 4 returns for the get of a color type, increase if a type needs more
+		if type(member) == "function" then
+			--Call the function
+			a,b,c,d = member(info, ...)
+		else
+			--Call the method
+			if handler and handler[member] then
+				a,b,c,d = handler[member](handler, info, ...)
+			else
+				error(format("Method %s doesn't exist in handler for type %s", member, membername))
+			end
+		end
+		del(info)
+		return a,b,c,d
+	else
+		--The value isnt a function to call, return it
+		return member
+	end
+end
+
+--[[calls an options function that could be inherited, method name or function ref
+local function CallOptionsFunction(funcname ,option, options, path, appName, ...)
+	local info = new()
+
+	local func
+	local group = options
+	local handler
+
+	--build the info table containing the path
+	-- pick up functions while traversing the tree
+	if group[funcname] ~= nil then
+		func = group[funcname]
+	end
+	handler = group.handler or handler
+
+	for i, v in ipairs(path) do
+		group = GetSubOption(group, v)
+		info[i] = v
+		if group[funcname] ~= nil then
+			func =  group[funcname]
+		end
+		handler = group.handler or handler
+	end
+
+	info.options = options
+	info[0] = appName
+	info.arg = option.arg
+
+	local a, b, c ,d
+	if type(func) == "string" then
+		if handler and handler[func] then
+			a,b,c,d = handler[func](handler, info, ...)
+		else
+			error(string.format("Method %s doesn't exist in handler for type func", func))
+		end
+	elseif type(func) == "function" then
+		a,b,c,d = func(info, ...)
+	end
+	del(info)
+	return a,b,c,d
+end
+--]]
+
+--tables to hold orders and names for options being sorted, will be created with new()
+--prevents needing to call functions repeatedly while sorting
+local tempOrders
+local tempNames
+
+local function compareOptions(a,b)
+	if not a then
+		return true
+	end
+	if not b then
+		return false
+	end
+	local OrderA, OrderB = tempOrders[a] or 100, tempOrders[b] or 100
+	if OrderA == OrderB then
+		local NameA = (type(tempNames[a]) == "string") and tempNames[a] or ""
+		local NameB = (type(tempNames[b]) == "string") and tempNames[b] or ""
+		return NameA:upper() < NameB:upper()
+	end
+	if OrderA < 0 then
+		if OrderB > 0 then
+			return false
+		end
+	else
+		if OrderB < 0 then
+			return true
+		end
+	end
+	return OrderA < OrderB
+end
+
+
+
+--builds 2 tables out of an options group
+-- keySort, sorted keys
+-- opts, combined options from .plugins and args
+local function BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
+	tempOrders = new()
+	tempNames = new()
+
+	if group.plugins then
+		for plugin, t in pairs(group.plugins) do
+			for k, v in pairs(t) do
+				if not opts[k] then
+					tinsert(keySort, k)
+					opts[k] = v
+
+					path[#path+1] = k
+					tempOrders[k] = GetOptionsMemberValue("order", v, options, path, appName)
+					tempNames[k] = GetOptionsMemberValue("name", v, options, path, appName)
+					path[#path] = nil
+				end
+			end
+		end
+	end
+
+	for k, v in pairs(group.args) do
+		if not opts[k] then
+			tinsert(keySort, k)
+			opts[k] = v
+
+			path[#path+1] = k
+			tempOrders[k] = GetOptionsMemberValue("order", v, options, path, appName)
+			tempNames[k] = GetOptionsMemberValue("name", v, options, path, appName)
+			path[#path] = nil
+		end
+	end
+
+	tsort(keySort, compareOptions)
+
+	del(tempOrders)
+	del(tempNames)
+end
+
+local function DelTree(tree)
+	if tree.children then
+		local childs = tree.children
+		for i = 1, #childs do
+			DelTree(childs[i])
+			del(childs[i])
+		end
+		del(childs)
+	end
+end
+
+local function CleanUserData(widget, event)
+
+	local user = widget:GetUserDataTable()
+
+	if user.path then
+		del(user.path)
+	end
+
+	if widget.type == "TreeGroup" then
+		local tree = user.tree
+		widget:SetTree(nil)
+		if tree then
+			for i = 1, #tree do
+				DelTree(tree[i])
+				del(tree[i])
+			end
+			del(tree)
+		end
+	end
+
+	if widget.type == "TabGroup" then
+		widget:SetTabs(nil)
+		if user.tablist then
+			del(user.tablist)
+		end
+	end
+
+	if widget.type == "DropdownGroup" then
+		widget:SetGroupList(nil)
+		if user.grouplist then
+			del(user.grouplist)
+		end
+		if user.orderlist then
+			del(user.orderlist)
+		end
+	end
+end
+
+-- - Gets a status table for the given appname and options path.
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+-- @param path The path to the options (a table with all group keys)
+-- @return
+function AceConfigDialog:GetStatusTable(appName, path)
+	local status = self.Status
+
+	if not status[appName] then
+		status[appName] = {}
+		status[appName].status = {}
+		status[appName].children = {}
+	end
+
+	status = status[appName]
+
+	if path then
+		for i = 1, #path do
+			local v = path[i]
+			if not status.children[v] then
+				status.children[v] = {}
+				status.children[v].status = {}
+				status.children[v].children = {}
+			end
+			status = status.children[v]
+		end
+	end
+
+	return status.status
+end
+
+--- Selects the specified path in the options window.
+-- The path specified has to match the keys of the groups in the table.
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+-- @param ... The path to the key that should be selected
+function AceConfigDialog:SelectGroup(appName, ...)
+	local path = new()
+
+
+	local app = reg:GetOptionsTable(appName)
+	if not app then
+		error(("%s isn't registed with AceConfigRegistry, unable to open config"):format(appName), 2)
+	end
+	local options = app("dialog", MAJOR)
+	local group = options
+	local status = self:GetStatusTable(appName, path)
+	if not status.groups then
+		status.groups = {}
+	end
+	status = status.groups
+	local treevalue
+	local treestatus
+
+	for n = 1, select("#",...) do
+		local key = select(n, ...)
+
+		if group.childGroups == "tab" or group.childGroups == "select" then
+			--if this is a tab or select group, select the group
+			status.selected = key
+			--children of this group are no longer extra levels of a tree
+			treevalue = nil
+		else
+			--tree group by default
+			if treevalue then
+				--this is an extra level of a tree group, build a uniquevalue for it
+				treevalue = treevalue.."\001"..key
+			else
+				--this is the top level of a tree group, the uniquevalue is the same as the key
+				treevalue = key
+				if not status.groups then
+					status.groups = {}
+				end
+				--save this trees status table for any extra levels or groups
+				treestatus = status
+			end
+			--make sure that the tree entry is open, and select it.
+			--the selected group will be overwritten if a child is the final target but still needs to be open
+			treestatus.selected = treevalue
+			treestatus.groups[treevalue] = true
+
+		end
+
+		--move to the next group in the path
+		group = GetSubOption(group, key)
+		if not group then
+			break
+		end
+		tinsert(path, key)
+		status = self:GetStatusTable(appName, path)
+		if not status.groups then
+			status.groups = {}
+		end
+		status = status.groups
+	end
+
+	del(path)
+	reg:NotifyChange(appName)
+end
+
+local function OptionOnMouseOver(widget, event)
+	--show a tooltip/set the status bar to the desc text
+	local user = widget:GetUserDataTable()
+	local opt = user.option
+	local options = user.options
+	local path = user.path
+	local appName = user.appName
+
+	GameTooltip:SetOwner(widget.frame, "ANCHOR_TOPRIGHT")
+	local name = GetOptionsMemberValue("name", opt, options, path, appName)
+	local desc = GetOptionsMemberValue("desc", opt, options, path, appName)
+	local usage = GetOptionsMemberValue("usage", opt, options, path, appName)
+	local descStyle = opt.descStyle
+
+	if descStyle and descStyle ~= "tooltip" then return end
+
+	GameTooltip:SetText(name, 1, .82, 0, true)
+
+	if opt.type == "multiselect" then
+		GameTooltip:AddLine(user.text, 0.5, 0.5, 0.8, true)
+	end
+	if type(desc) == "string" then
+		GameTooltip:AddLine(desc, 1, 1, 1, true)
+	end
+	if type(usage) == "string" then
+		GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true)
+	end
+
+	GameTooltip:Show()
+end
+
+local function OptionOnMouseLeave(widget, event)
+	GameTooltip:Hide()
+end
+
+local function GetFuncName(option)
+	local type = option.type
+	if type == "execute" then
+		return "func"
+	else
+		return "set"
+	end
+end
+local function confirmPopup(appName, rootframe, basepath, info, message, func, ...)
+	if not StaticPopupDialogs["ACECONFIGDIALOG30_CONFIRM_DIALOG"] then
+		StaticPopupDialogs["ACECONFIGDIALOG30_CONFIRM_DIALOG"] = {}
+	end
+	local t = StaticPopupDialogs["ACECONFIGDIALOG30_CONFIRM_DIALOG"]
+	for k in pairs(t) do
+		t[k] = nil
+	end
+	t.text = message
+	t.button1 = ACCEPT
+	t.button2 = CANCEL
+	t.preferredIndex = STATICPOPUP_NUMDIALOGS
+	local dialog, oldstrata
+	t.OnAccept = function()
+		safecall(func, unpack(t))
+		if dialog and oldstrata then
+			dialog:SetFrameStrata(oldstrata)
+		end
+		AceConfigDialog:Open(appName, rootframe, unpack(basepath or emptyTbl))
+		del(info)
+	end
+	t.OnCancel = function()
+		if dialog and oldstrata then
+			dialog:SetFrameStrata(oldstrata)
+		end
+		AceConfigDialog:Open(appName, rootframe, unpack(basepath or emptyTbl))
+		del(info)
+	end
+	for i = 1, select("#", ...) do
+		t[i] = select(i, ...) or false
+	end
+	t.timeout = 0
+	t.whileDead = 1
+	t.hideOnEscape = 1
+
+	dialog = StaticPopup_Show("ACECONFIGDIALOG30_CONFIRM_DIALOG")
+	if dialog then
+		oldstrata = dialog:GetFrameStrata()
+		dialog:SetFrameStrata("TOOLTIP")
+	end
+end
+
+local function validationErrorPopup(message)
+	if not StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] then
+		StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] = {}
+	end
+	local t = StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"]
+	t.text = message
+	t.button1 = OKAY
+	t.preferredIndex = STATICPOPUP_NUMDIALOGS
+	local dialog, oldstrata
+	t.OnAccept = function()
+		if dialog and oldstrata then
+			dialog:SetFrameStrata(oldstrata)
+		end
+	end
+	t.timeout = 0
+	t.whileDead = 1
+	t.hideOnEscape = 1
+
+	dialog = StaticPopup_Show("ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG")
+	if dialog then
+		oldstrata = dialog:GetFrameStrata()
+		dialog:SetFrameStrata("TOOLTIP")
+	end
+end
+
+local function ActivateControl(widget, event, ...)
+	--This function will call the set / execute handler for the widget
+	--widget:GetUserDataTable() contains the needed info
+	local user = widget:GetUserDataTable()
+	local option = user.option
+	local options = user.options
+	local path = user.path
+	local info = new()
+
+	local func
+	local group = options
+	local funcname = GetFuncName(option)
+	local handler
+	local confirm
+	local validate
+	--build the info table containing the path
+	-- pick up functions while traversing the tree
+	if group[funcname] ~= nil then
+		func =  group[funcname]
+	end
+	handler = group.handler or handler
+	confirm = group.confirm
+	validate = group.validate
+	for i = 1, #path do
+		local v = path[i]
+		group = GetSubOption(group, v)
+		info[i] = v
+		if group[funcname] ~= nil then
+			func =  group[funcname]
+		end
+		handler = group.handler or handler
+		if group.confirm ~= nil then
+			confirm = group.confirm
+		end
+		if group.validate ~= nil then
+			validate = group.validate
+		end
+	end
+
+	info.options = options
+	info.appName = user.appName
+	info.arg = option.arg
+	info.handler = handler
+	info.option = option
+	info.type = option.type
+	info.uiType = "dialog"
+	info.uiName = MAJOR
+
+	local name
+	if type(option.name) == "function" then
+		name = option.name(info)
+	elseif type(option.name) == "string" then
+		name = option.name
+	else
+		name = ""
+	end
+	local usage = option.usage
+	local pattern = option.pattern
+
+	local validated = true
+
+	if option.type == "input" then
+		if type(pattern)=="string" then
+			if not strmatch(..., pattern) then
+				validated = false
+			end
+		end
+	end
+
+	local success
+	if validated and option.type ~= "execute" then
+		if type(validate) == "string" then
+			if handler and handler[validate] then
+				success, validated = safecall(handler[validate], handler, info, ...)
+				if not success then validated = false end
+			else
+				error(format("Method %s doesn't exist in handler for type execute", validate))
+			end
+		elseif type(validate) == "function" then
+			success, validated = safecall(validate, info, ...)
+			if not success then validated = false end
+		end
+	end
+
+	local rootframe = user.rootframe
+	if not validated or type(validated) == "string" then
+		if not validated then
+			if usage then
+				validated = name..": "..usage
+			else
+				if pattern then
+					validated = name..": Expected "..pattern
+				else
+					validated = name..": Invalid Value"
+				end
+			end
+		end
+
+		-- show validate message
+		if rootframe.SetStatusText then
+			rootframe:SetStatusText(validated)
+		else
+			validationErrorPopup(validated)
+		end
+		PlaySound(882) -- SOUNDKIT.IG_PLAYER_INVITE_DECLINE || _DECLINE is actually missing from the table
+		del(info)
+		return true
+	else
+
+		local confirmText = option.confirmText
+		--call confirm func/method
+		if type(confirm) == "string" then
+			if handler and handler[confirm] then
+				success, confirm = safecall(handler[confirm], handler, info, ...)
+				if success and type(confirm) == "string" then
+					confirmText = confirm
+					confirm = true
+				elseif not success then
+					confirm = false
+				end
+			else
+				error(format("Method %s doesn't exist in handler for type confirm", confirm))
+			end
+		elseif type(confirm) == "function" then
+			success, confirm = safecall(confirm, info, ...)
+			if success and type(confirm) == "string" then
+				confirmText = confirm
+				confirm = true
+			elseif not success then
+				confirm = false
+			end
+		end
+
+		--confirm if needed
+		if type(confirm) == "boolean" then
+			if confirm then
+				if not confirmText then
+					local name, desc = option.name, option.desc
+					if type(name) == "function" then
+						name = name(info)
+					end
+					if type(desc) == "function" then
+						desc = desc(info)
+					end
+					confirmText = name
+					if desc then
+						confirmText = confirmText.." - "..desc
+					end
+				end
+
+				local iscustom = user.rootframe:GetUserData("iscustom")
+				local rootframe
+
+				if iscustom then
+					rootframe = user.rootframe
+				end
+				local basepath = user.rootframe:GetUserData("basepath")
+				if type(func) == "string" then
+					if handler and handler[func] then
+						confirmPopup(user.appName, rootframe, basepath, info, confirmText, handler[func], handler, info, ...)
+					else
+						error(format("Method %s doesn't exist in handler for type func", func))
+					end
+				elseif type(func) == "function" then
+					confirmPopup(user.appName, rootframe, basepath, info, confirmText, func, info, ...)
+				end
+				--func will be called and info deleted when the confirm dialog is responded to
+				return
+			end
+		end
+
+		--call the function
+		if type(func) == "string" then
+			if handler and handler[func] then
+				safecall(handler[func],handler, info, ...)
+			else
+				error(format("Method %s doesn't exist in handler for type func", func))
+			end
+		elseif type(func) == "function" then
+			safecall(func,info, ...)
+		end
+
+
+
+		local iscustom = user.rootframe:GetUserData("iscustom")
+		local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
+		--full refresh of the frame, some controls dont cause this on all events
+		if option.type == "color" then
+			if event == "OnValueConfirmed" then
+
+				if iscustom then
+					AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
+				else
+					AceConfigDialog:Open(user.appName, unpack(basepath))
+				end
+			end
+		elseif option.type == "range" then
+			if event == "OnMouseUp" then
+				if iscustom then
+					AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
+				else
+					AceConfigDialog:Open(user.appName, unpack(basepath))
+				end
+			end
+		--multiselects don't cause a refresh on 'OnValueChanged' only 'OnClosed'
+		elseif option.type == "multiselect" then
+			user.valuechanged = true
+		else
+			if iscustom then
+				AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
+			else
+				AceConfigDialog:Open(user.appName, unpack(basepath))
+			end
+		end
+
+	end
+	del(info)
+end
+
+local function ActivateSlider(widget, event, value)
+	local option = widget:GetUserData("option")
+	local min, max, step = option.min or (not option.softMin and 0 or nil), option.max or (not option.softMax and 100 or nil), option.step
+	if min then
+		if step then
+			value = math_floor((value - min) / step + 0.5) * step + min
+		end
+		value = math_max(value, min)
+	end
+	if max then
+		value = math_min(value, max)
+	end
+	ActivateControl(widget,event,value)
+end
+
+--called from a checkbox that is part of an internally created multiselect group
+--this type is safe to refresh on activation of one control
+local function ActivateMultiControl(widget, event, ...)
+	ActivateControl(widget, event, widget:GetUserData("value"), ...)
+	local user = widget:GetUserDataTable()
+	local iscustom = user.rootframe:GetUserData("iscustom")
+	local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
+	if iscustom then
+		AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
+	else
+		AceConfigDialog:Open(user.appName, unpack(basepath))
+	end
+end
+
+local function MultiControlOnClosed(widget, event, ...)
+	local user = widget:GetUserDataTable()
+	if user.valuechanged then
+		local iscustom = user.rootframe:GetUserData("iscustom")
+		local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
+		if iscustom then
+			AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
+		else
+			AceConfigDialog:Open(user.appName, unpack(basepath))
+		end
+	end
+end
+
+local function FrameOnClose(widget, event)
+	local appName = widget:GetUserData("appName")
+	AceConfigDialog.OpenFrames[appName] = nil
+	gui:Release(widget)
+end
+
+local function CheckOptionHidden(option, options, path, appName)
+	--check for a specific boolean option
+	local hidden = pickfirstset(option.dialogHidden,option.guiHidden)
+	if hidden ~= nil then
+		return hidden
+	end
+
+	return GetOptionsMemberValue("hidden", option, options, path, appName)
+end
+
+local function CheckOptionDisabled(option, options, path, appName)
+	--check for a specific boolean option
+	local disabled = pickfirstset(option.dialogDisabled,option.guiDisabled)
+	if disabled ~= nil then
+		return disabled
+	end
+
+	return GetOptionsMemberValue("disabled", option, options, path, appName)
+end
+--[[
+local function BuildTabs(group, options, path, appName)
+	local tabs = new()
+	local text = new()
+	local keySort = new()
+	local opts = new()
+
+	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
+
+	for i = 1, #keySort do
+		local k = keySort[i]
+		local v = opts[k]
+		if v.type == "group" then
+			path[#path+1] = k
+			local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
+			local hidden = CheckOptionHidden(v, options, path, appName)
+			if not inline and not hidden then
+				tinsert(tabs, k)
+				text[k] = GetOptionsMemberValue("name", v, options, path, appName)
+			end
+			path[#path] = nil
+		end
+	end
+
+	del(keySort)
+	del(opts)
+
+	return tabs, text
+end
+]]
+local function BuildSelect(group, options, path, appName)
+	local groups = new()
+	local order = new()
+	local keySort = new()
+	local opts = new()
+
+	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
+
+	for i = 1, #keySort do
+		local k = keySort[i]
+		local v = opts[k]
+		if v.type == "group" then
+			path[#path+1] = k
+			local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
+			local hidden = CheckOptionHidden(v, options, path, appName)
+			if not inline and not hidden then
+				groups[k] = GetOptionsMemberValue("name", v, options, path, appName)
+				tinsert(order, k)
+			end
+			path[#path] = nil
+		end
+	end
+
+	del(opts)
+	del(keySort)
+
+	return groups, order
+end
+
+local function BuildSubGroups(group, tree, options, path, appName)
+	local keySort = new()
+	local opts = new()
+
+	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
+
+	for i = 1, #keySort do
+		local k = keySort[i]
+		local v = opts[k]
+		if v.type == "group" then
+			path[#path+1] = k
+			local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
+			local hidden = CheckOptionHidden(v, options, path, appName)
+			if not inline and not hidden then
+				local entry = new()
+				entry.value = k
+				entry.text = GetOptionsMemberValue("name", v, options, path, appName)
+				entry.icon = GetOptionsMemberValue("icon", v, options, path, appName)
+				entry.iconCoords = GetOptionsMemberValue("iconCoords", v, options, path, appName)
+				entry.disabled = CheckOptionDisabled(v, options, path, appName)
+				if not tree.children then tree.children = new() end
+				tinsert(tree.children,entry)
+				if (v.childGroups or "tree") == "tree" then
+					BuildSubGroups(v,entry, options, path, appName)
+				end
+			end
+			path[#path] = nil
+		end
+	end
+
+	del(keySort)
+	del(opts)
+end
+
+local function BuildGroups(group, options, path, appName, recurse)
+	local tree = new()
+	local keySort = new()
+	local opts = new()
+
+	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
+
+	for i = 1, #keySort do
+		local k = keySort[i]
+		local v = opts[k]
+		if v.type == "group" then
+			path[#path+1] = k
+			local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
+			local hidden = CheckOptionHidden(v, options, path, appName)
+			if not inline and not hidden then
+				local entry = new()
+				entry.value = k
+				entry.text = GetOptionsMemberValue("name", v, options, path, appName)
+				entry.icon = GetOptionsMemberValue("icon", v, options, path, appName)
+				entry.iconCoords = GetOptionsMemberValue("iconCoords", v, options, path, appName)
+				entry.disabled = CheckOptionDisabled(v, options, path, appName)
+				tinsert(tree,entry)
+				if recurse and (v.childGroups or "tree") == "tree" then
+					BuildSubGroups(v,entry, options, path, appName)
+				end
+			end
+			path[#path] = nil
+		end
+	end
+	del(keySort)
+	del(opts)
+	return tree
+end
+
+local function InjectInfo(control, options, option, path, rootframe, appName)
+	local user = control:GetUserDataTable()
+	for i = 1, #path do
+		user[i] = path[i]
+	end
+	user.rootframe = rootframe
+	user.option = option
+	user.options = options
+	user.path = copy(path)
+	user.appName = appName
+	control:SetCallback("OnRelease", CleanUserData)
+	control:SetCallback("OnLeave", OptionOnMouseLeave)
+	control:SetCallback("OnEnter", OptionOnMouseOver)
+end
+
+
+--[[
+	options - root of the options table being fed
+	container - widget that controls will be placed in
+	rootframe - Frame object the options are in
+	path - table with the keys to get to the group being fed
+--]]
+
+local function FeedOptions(appName, options,container,rootframe,path,group,inline)
+	local keySort = new()
+	local opts = new()
+
+	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
+
+	for i = 1, #keySort do
+		local k = keySort[i]
+		local v = opts[k]
+		tinsert(path, k)
+		local hidden = CheckOptionHidden(v, options, path, appName)
+		local name = GetOptionsMemberValue("name", v, options, path, appName)
+		if not hidden then
+			if v.type == "group" then
+				if inline or pickfirstset(v.dialogInline,v.guiInline,v.inline, false) then
+					--Inline group
+					local GroupContainer
+					if name and name ~= "" then
+						GroupContainer = gui:Create("InlineGroup")
+						GroupContainer:SetTitle(name or "")
+					else
+						GroupContainer = gui:Create("SimpleGroup")
+					end
+
+					GroupContainer.width = "fill"
+					GroupContainer:SetLayout("flow")
+					container:AddChild(GroupContainer)
+					FeedOptions(appName,options,GroupContainer,rootframe,path,v,true)
+				end
+			else
+				--Control to feed
+				local control
+
+				local name = GetOptionsMemberValue("name", v, options, path, appName)
+
+				if v.type == "execute" then
+
+					local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
+					local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
+
+					if type(image) == "string" or type(image) == "number" then
+						control = gui:Create("Icon")
+						if not width then
+							width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
+						end
+						if not height then
+							height = GetOptionsMemberValue("imageHeight",v, options, path, appName)
+						end
+						if type(imageCoords) == "table" then
+							control:SetImage(image, unpack(imageCoords))
+						else
+							control:SetImage(image)
+						end
+						if type(width) ~= "number" then
+							width = 32
+						end
+						if type(height) ~= "number" then
+							height = 32
+						end
+						control:SetImageSize(width, height)
+						control:SetLabel(name)
+					else
+						control = gui:Create("Button")
+						control:SetText(name)
+					end
+					control:SetCallback("OnClick",ActivateControl)
+
+				elseif v.type == "input" then
+					local controlType = v.dialogControl or v.control or (v.multiline and "MultiLineEditBox") or "EditBox"
+					control = gui:Create(controlType)
+					if not control then
+						geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType)))
+						control = gui:Create(v.multiline and "MultiLineEditBox" or "EditBox")
+					end
+
+					if v.multiline and control.SetNumLines then
+						control:SetNumLines(tonumber(v.multiline) or 4)
+					end
+					control:SetLabel(name)
+					control:SetCallback("OnEnterPressed",ActivateControl)
+					local text = GetOptionsMemberValue("get",v, options, path, appName)
+					if type(text) ~= "string" then
+						text = ""
+					end
+					control:SetText(text)
+
+				elseif v.type == "toggle" then
+					control = gui:Create("CheckBox")
+					control:SetLabel(name)
+					control:SetTriState(v.tristate)
+					local value = GetOptionsMemberValue("get",v, options, path, appName)
+					control:SetValue(value)
+					control:SetCallback("OnValueChanged",ActivateControl)
+
+					if v.descStyle == "inline" then
+						local desc = GetOptionsMemberValue("desc", v, options, path, appName)
+						control:SetDescription(desc)
+					end
+
+					local image = GetOptionsMemberValue("image", v, options, path, appName)
+					local imageCoords = GetOptionsMemberValue("imageCoords", v, options, path, appName)
+
+					if type(image) == "string" or type(image) == "number" then
+						if type(imageCoords) == "table" then
+							control:SetImage(image, unpack(imageCoords))
+						else
+							control:SetImage(image)
+						end
+					end
+				elseif v.type == "range" then
+					control = gui:Create("Slider")
+					control:SetLabel(name)
+					control:SetSliderValues(v.softMin or v.min or 0, v.softMax or v.max or 100, v.bigStep or v.step or 0)
+					control:SetIsPercent(v.isPercent)
+					local value = GetOptionsMemberValue("get",v, options, path, appName)
+					if type(value) ~= "number" then
+						value = 0
+					end
+					control:SetValue(value)
+					control:SetCallback("OnValueChanged",ActivateSlider)
+					control:SetCallback("OnMouseUp",ActivateSlider)
+
+				elseif v.type == "select" then
+					local values = GetOptionsMemberValue("values", v, options, path, appName)
+					if v.style == "radio" then
+						local disabled = CheckOptionDisabled(v, options, path, appName)
+						local width = GetOptionsMemberValue("width",v,options,path,appName)
+						control = gui:Create("InlineGroup")
+						control:SetLayout("Flow")
+						control:SetTitle(name)
+						control.width = "fill"
+
+						control:PauseLayout()
+						local optionValue = GetOptionsMemberValue("get",v, options, path, appName)
+						local t = {}
+						for value, text in pairs(values) do
+							t[#t+1]=value
+						end
+						tsort(t)
+						for k, value in ipairs(t) do
+							local text = values[value]
+							local radio = gui:Create("CheckBox")
+							radio:SetLabel(text)
+							radio:SetUserData("value", value)
+							radio:SetUserData("text", text)
+							radio:SetDisabled(disabled)
+							radio:SetType("radio")
+							radio:SetValue(optionValue == value)
+							radio:SetCallback("OnValueChanged", ActivateMultiControl)
+							InjectInfo(radio, options, v, path, rootframe, appName)
+							control:AddChild(radio)
+							if width == "double" then
+								radio:SetWidth(width_multiplier * 2)
+							elseif width == "half" then
+								radio:SetWidth(width_multiplier / 2)
+							elseif (type(width) == "number") then
+								radio:SetWidth(width_multiplier * width)
+							elseif width == "full" then
+								radio.width = "fill"
+							else
+								radio:SetWidth(width_multiplier)
+							end
+						end
+						control:ResumeLayout()
+						control:DoLayout()
+					else
+						local controlType = v.dialogControl or v.control or "Dropdown"
+						control = gui:Create(controlType)
+						if not control then
+							geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType)))
+							control = gui:Create("Dropdown")
+						end
+						local itemType = v.itemControl
+						if itemType and not gui:GetWidgetVersion(itemType) then
+							geterrorhandler()(("Invalid Custom Item Type - %s"):format(tostring(itemType)))
+							itemType = nil
+						end
+						control:SetLabel(name)
+						control:SetList(values, nil, itemType)
+						local value = GetOptionsMemberValue("get",v, options, path, appName)
+						if not values[value] then
+							value = nil
+						end
+						control:SetValue(value)
+						control:SetCallback("OnValueChanged", ActivateControl)
+					end
+
+				elseif v.type == "multiselect" then
+					local values = GetOptionsMemberValue("values", v, options, path, appName)
+					local disabled = CheckOptionDisabled(v, options, path, appName)
+
+					local controlType = v.dialogControl or v.control
+
+					local valuesort = new()
+					if values then
+						for value, text in pairs(values) do
+							tinsert(valuesort, value)
+						end
+					end
+					tsort(valuesort)
+
+					if controlType then
+						control = gui:Create(controlType)
+						if not control then
+							geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType)))
+						end
+					end
+					if control then
+						control:SetMultiselect(true)
+						control:SetLabel(name)
+						control:SetList(values)
+						control:SetDisabled(disabled)
+						control:SetCallback("OnValueChanged",ActivateControl)
+						control:SetCallback("OnClosed", MultiControlOnClosed)
+						local width = GetOptionsMemberValue("width",v,options,path,appName)
+						if width == "double" then
+							control:SetWidth(width_multiplier * 2)
+						elseif width == "half" then
+							control:SetWidth(width_multiplier / 2)
+						elseif (type(width) == "number") then
+							control:SetWidth(width_multiplier * width)
+						elseif width == "full" then
+							control.width = "fill"
+						else
+							control:SetWidth(width_multiplier)
+						end
+						--check:SetTriState(v.tristate)
+						for i = 1, #valuesort do
+							local key = valuesort[i]
+							local value = GetOptionsMemberValue("get",v, options, path, appName, key)
+							control:SetItemValue(key,value)
+						end
+					else
+						control = gui:Create("InlineGroup")
+						control:SetLayout("Flow")
+						control:SetTitle(name)
+						control.width = "fill"
+
+						control:PauseLayout()
+						local width = GetOptionsMemberValue("width",v,options,path,appName)
+						for i = 1, #valuesort do
+							local value = valuesort[i]
+							local text = values[value]
+							local check = gui:Create("CheckBox")
+							check:SetLabel(text)
+							check:SetUserData("value", value)
+							check:SetUserData("text", text)
+							check:SetDisabled(disabled)
+							check:SetTriState(v.tristate)
+							check:SetValue(GetOptionsMemberValue("get",v, options, path, appName, value))
+							check:SetCallback("OnValueChanged",ActivateMultiControl)
+							InjectInfo(check, options, v, path, rootframe, appName)
+							control:AddChild(check)
+							if width == "double" then
+								check:SetWidth(width_multiplier * 2)
+							elseif width == "half" then
+								check:SetWidth(width_multiplier / 2)
+							elseif (type(width) == "number") then
+								control:SetWidth(width_multiplier * width)
+							elseif width == "full" then
+								check.width = "fill"
+							else
+								check:SetWidth(width_multiplier)
+							end
+						end
+						control:ResumeLayout()
+						control:DoLayout()
+
+
+					end
+
+					del(valuesort)
+
+				elseif v.type == "color" then
+					control = gui:Create("ColorPicker")
+					control:SetLabel(name)
+					control:SetHasAlpha(GetOptionsMemberValue("hasAlpha",v, options, path, appName))
+					control:SetColor(GetOptionsMemberValue("get",v, options, path, appName))
+					control:SetCallback("OnValueChanged",ActivateControl)
+					control:SetCallback("OnValueConfirmed",ActivateControl)
+
+				elseif v.type == "keybinding" then
+					control = gui:Create("Keybinding")
+					control:SetLabel(name)
+					control:SetKey(GetOptionsMemberValue("get",v, options, path, appName))
+					control:SetCallback("OnKeyChanged",ActivateControl)
+
+				elseif v.type == "header" then
+					control = gui:Create("Heading")
+					control:SetText(name)
+					control.width = "fill"
+
+				elseif v.type == "description" then
+					control = gui:Create("Label")
+					control:SetText(name)
+
+					local fontSize = GetOptionsMemberValue("fontSize",v, options, path, appName)
+					if fontSize == "medium" then
+						control:SetFontObject(GameFontHighlight)
+					elseif fontSize == "large" then
+						control:SetFontObject(GameFontHighlightLarge)
+					else -- small or invalid
+						control:SetFontObject(GameFontHighlightSmall)
+					end
+
+					local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
+					local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
+
+					if type(image) == "string" or type(image) == "number" then
+						if not width then
+							width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
+						end
+						if not height then
+							height = GetOptionsMemberValue("imageHeight",v, options, path, appName)
+						end
+						if type(imageCoords) == "table" then
+							control:SetImage(image, unpack(imageCoords))
+						else
+							control:SetImage(image)
+						end
+						if type(width) ~= "number" then
+							width = 32
+						end
+						if type(height) ~= "number" then
+							height = 32
+						end
+						control:SetImageSize(width, height)
+					end
+					local width = GetOptionsMemberValue("width",v,options,path,appName)
+					control.width = not width and "fill"
+				end
+
+				--Common Init
+				if control then
+					if control.width ~= "fill" then
+						local width = GetOptionsMemberValue("width",v,options,path,appName)
+						if width == "double" then
+							control:SetWidth(width_multiplier * 2)
+						elseif width == "half" then
+							control:SetWidth(width_multiplier / 2)
+						elseif (type(width) == "number") then
+							control:SetWidth(width_multiplier * width)
+						elseif width == "full" then
+							control.width = "fill"
+						else
+							control:SetWidth(width_multiplier)
+						end
+					end
+					if control.SetDisabled then
+						local disabled = CheckOptionDisabled(v, options, path, appName)
+						control:SetDisabled(disabled)
+					end
+
+					InjectInfo(control, options, v, path, rootframe, appName)
+					container:AddChild(control)
+				end
+
+			end
+		end
+		tremove(path)
+	end
+	container:ResumeLayout()
+	container:DoLayout()
+	del(keySort)
+	del(opts)
+end
+
+local function BuildPath(path, ...)
+	for i = 1, select("#",...)  do
+		tinsert(path, (select(i,...)))
+	end
+end
+
+
+local function TreeOnButtonEnter(widget, event, uniquevalue, button)
+	local user = widget:GetUserDataTable()
+	if not user then return end
+	local options = user.options
+	local option = user.option
+	local path = user.path
+	local appName = user.appName
+
+	local feedpath = new()
+	for i = 1, #path do
+		feedpath[i] = path[i]
+	end
+
+	BuildPath(feedpath, ("\001"):split(uniquevalue))
+	local group = options
+	for i = 1, #feedpath do
+		if not group then return end
+		group = GetSubOption(group, feedpath[i])
+	end
+
+	local name = GetOptionsMemberValue("name", group, options, feedpath, appName)
+	local desc = GetOptionsMemberValue("desc", group, options, feedpath, appName)
+
+	GameTooltip:SetOwner(button, "ANCHOR_NONE")
+	if widget.type == "TabGroup" then
+		GameTooltip:SetPoint("BOTTOM",button,"TOP")
+	else
+		GameTooltip:SetPoint("LEFT",button,"RIGHT")
+	end
+
+	GameTooltip:SetText(name, 1, .82, 0, true)
+
+	if type(desc) == "string" then
+		GameTooltip:AddLine(desc, 1, 1, 1, true)
+	end
+
+	GameTooltip:Show()
+end
+
+local function TreeOnButtonLeave(widget, event, value, button)
+	GameTooltip:Hide()
+end
+
+
+local function GroupExists(appName, options, path, uniquevalue)
+	if not uniquevalue then return false end
+
+	local feedpath = new()
+	local temppath = new()
+	for i = 1, #path do
+		feedpath[i] = path[i]
+	end
+
+	BuildPath(feedpath, ("\001"):split(uniquevalue))
+
+	local group = options
+	for i = 1, #feedpath do
+		local v = feedpath[i]
+		temppath[i] = v
+		group = GetSubOption(group, v)
+
+		if not group or group.type ~= "group" or CheckOptionHidden(group, options, temppath, appName) then
+			del(feedpath)
+			del(temppath)
+			return false
+		end
+	end
+	del(feedpath)
+	del(temppath)
+	return true
+end
+
+local function GroupSelected(widget, event, uniquevalue)
+
+	local user = widget:GetUserDataTable()
+
+	local options = user.options
+	local option = user.option
+	local path = user.path
+	local rootframe = user.rootframe
+
+	local feedpath = new()
+	for i = 1, #path do
+		feedpath[i] = path[i]
+	end
+
+	BuildPath(feedpath, ("\001"):split(uniquevalue))
+	local group = options
+	for i = 1, #feedpath do
+		group = GetSubOption(group, feedpath[i])
+	end
+	widget:ReleaseChildren()
+	AceConfigDialog:FeedGroup(user.appName,options,widget,rootframe,feedpath)
+
+	del(feedpath)
+end
+
+
+
+--[[
+-- INTERNAL --
+This function will feed one group, and any inline child groups into the given container
+Select Groups will only have the selection control (tree, tabs, dropdown) fed in
+and have a group selected, this event will trigger the feeding of child groups
+
+Rules:
+	If the group is Inline, FeedOptions
+	If the group has no child groups, FeedOptions
+
+	If the group is a tab or select group, FeedOptions then add the Group Control
+	If the group is a tree group FeedOptions then
+		its parent isnt a tree group:  then add the tree control containing this and all child tree groups
+		if its parent is a tree group, its already a node on a tree
+--]]
+
+function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isRoot)
+	local group = options
+	--follow the path to get to the curent group
+	local inline
+	local grouptype, parenttype = options.childGroups, "none"
+
+
+	for i = 1, #path do
+		local v = path[i]
+		group = GetSubOption(group, v)
+		inline = inline or pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
+		parenttype = grouptype
+		grouptype = group.childGroups
+	end
+
+	if not parenttype then
+		parenttype = "tree"
+	end
+
+	--check if the group has child groups
+	local hasChildGroups
+	for k, v in pairs(group.args) do
+		if v.type == "group" and not pickfirstset(v.dialogInline,v.guiInline,v.inline, false) and not CheckOptionHidden(v, options, path, appName) then
+			hasChildGroups = true
+		end
+	end
+	if group.plugins then
+		for plugin, t in pairs(group.plugins) do
+			for k, v in pairs(t) do
+				if v.type == "group" and not pickfirstset(v.dialogInline,v.guiInline,v.inline, false) and not CheckOptionHidden(v, options, path, appName) then
+					hasChildGroups = true
+				end
+			end
+		end
+	end
+
+	container:SetLayout("flow")
+	local scroll
+
+	--Add a scrollframe if we are not going to add a group control, this is the inverse of the conditions for that later on
+	if (not (hasChildGroups and not inline)) or (grouptype ~= "tab" and grouptype ~= "select" and (parenttype == "tree" and not isRoot)) then
+		if container.type ~= "InlineGroup" and container.type ~= "SimpleGroup" then
+			scroll = gui:Create("ScrollFrame")
+			scroll:SetLayout("flow")
+			scroll.width = "fill"
+			scroll.height = "fill"
+			container:SetLayout("fill")
+			container:AddChild(scroll)
+			container = scroll
+		end
+	end
+
+	FeedOptions(appName,options,container,rootframe,path,group,nil)
+
+	if scroll then
+		container:PerformLayout()
+		local status = self:GetStatusTable(appName, path)
+		if not status.scroll then
+			status.scroll = {}
+		end
+		scroll:SetStatusTable(status.scroll)
+	end
+
+	if hasChildGroups and not inline then
+		local name = GetOptionsMemberValue("name", group, options, path, appName)
+		if grouptype == "tab" then
+
+			local tab = gui:Create("TabGroup")
+			InjectInfo(tab, options, group, path, rootframe, appName)
+			tab:SetCallback("OnGroupSelected", GroupSelected)
+			tab:SetCallback("OnTabEnter", TreeOnButtonEnter)
+			tab:SetCallback("OnTabLeave", TreeOnButtonLeave)
+
+			local status = AceConfigDialog:GetStatusTable(appName, path)
+			if not status.groups then
+				status.groups = {}
+			end
+			tab:SetStatusTable(status.groups)
+			tab.width = "fill"
+			tab.height = "fill"
+
+			local tabs = BuildGroups(group, options, path, appName)
+			tab:SetTabs(tabs)
+			tab:SetUserData("tablist", tabs)
+
+			for i = 1, #tabs do
+				local entry = tabs[i]
+				if not entry.disabled then
+					tab:SelectTab((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or entry.value)
+					break
+				end
+			end
+
+			container:AddChild(tab)
+
+		elseif grouptype == "select" then
+
+			local select = gui:Create("DropdownGroup")
+			select:SetTitle(name)
+			InjectInfo(select, options, group, path, rootframe, appName)
+			select:SetCallback("OnGroupSelected", GroupSelected)
+			local status = AceConfigDialog:GetStatusTable(appName, path)
+			if not status.groups then
+				status.groups = {}
+			end
+			select:SetStatusTable(status.groups)
+			local grouplist, orderlist = BuildSelect(group, options, path, appName)
+			select:SetGroupList(grouplist, orderlist)
+			select:SetUserData("grouplist", grouplist)
+			select:SetUserData("orderlist", orderlist)
+
+			local firstgroup = orderlist[1]
+			if firstgroup then
+				select:SetGroup((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or firstgroup)
+			end
+
+			select.width = "fill"
+			select.height = "fill"
+
+			container:AddChild(select)
+
+		--assume tree group by default
+		--if parenttype is tree then this group is already a node on that tree
+		elseif (parenttype ~= "tree") or isRoot then
+			local tree = gui:Create("TreeGroup")
+			InjectInfo(tree, options, group, path, rootframe, appName)
+			tree:EnableButtonTooltips(false)
+
+			tree.width = "fill"
+			tree.height = "fill"
+
+			tree:SetCallback("OnGroupSelected", GroupSelected)
+			tree:SetCallback("OnButtonEnter", TreeOnButtonEnter)
+			tree:SetCallback("OnButtonLeave", TreeOnButtonLeave)
+
+			local status = AceConfigDialog:GetStatusTable(appName, path)
+			if not status.groups then
+				status.groups = {}
+			end
+			local treedefinition = BuildGroups(group, options, path, appName, true)
+			tree:SetStatusTable(status.groups)
+
+			tree:SetTree(treedefinition)
+			tree:SetUserData("tree",treedefinition)
+
+			for i = 1, #treedefinition do
+				local entry = treedefinition[i]
+				if not entry.disabled then
+					tree:SelectByValue((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or entry.value)
+					break
+				end
+			end
+
+			container:AddChild(tree)
+		end
+	end
+end
+
+local old_CloseSpecialWindows
+
+
+local function RefreshOnUpdate(this)
+	for appName in pairs(this.closing) do
+		if AceConfigDialog.OpenFrames[appName] then
+			AceConfigDialog.OpenFrames[appName]:Hide()
+		end
+		if AceConfigDialog.BlizOptions and AceConfigDialog.BlizOptions[appName] then
+			for key, widget in pairs(AceConfigDialog.BlizOptions[appName]) do
+				if not widget:IsVisible() then
+					widget:ReleaseChildren()
+				end
+			end
+		end
+		this.closing[appName] = nil
+	end
+
+	if this.closeAll then
+		for k, v in pairs(AceConfigDialog.OpenFrames) do
+			if not this.closeAllOverride[k] then
+				v:Hide()
+			end
+		end
+		this.closeAll = nil
+		wipe(this.closeAllOverride)
+	end
+
+	for appName in pairs(this.apps) do
+		if AceConfigDialog.OpenFrames[appName] then
+			local user = AceConfigDialog.OpenFrames[appName]:GetUserDataTable()
+			AceConfigDialog:Open(appName, unpack(user.basepath or emptyTbl))
+		end
+		if AceConfigDialog.BlizOptions and AceConfigDialog.BlizOptions[appName] then
+			for key, widget in pairs(AceConfigDialog.BlizOptions[appName]) do
+				local user = widget:GetUserDataTable()
+				if widget:IsVisible() then
+					AceConfigDialog:Open(widget:GetUserData("appName"), widget, unpack(user.basepath or emptyTbl))
+				end
+			end
+		end
+		this.apps[appName] = nil
+	end
+	this:SetScript("OnUpdate", nil)
+end
+
+-- Upgrade the OnUpdate script as well, if needed.
+if AceConfigDialog.frame:GetScript("OnUpdate") then
+	AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
+end
+
+--- Close all open options windows
+function AceConfigDialog:CloseAll()
+	AceConfigDialog.frame.closeAll = true
+	AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
+	if next(self.OpenFrames) then
+		return true
+	end
+end
+
+--- Close a specific options window.
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+function AceConfigDialog:Close(appName)
+	if self.OpenFrames[appName] then
+		AceConfigDialog.frame.closing[appName] = true
+		AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
+		return true
+	end
+end
+
+-- Internal -- Called by AceConfigRegistry
+function AceConfigDialog:ConfigTableChanged(event, appName)
+	AceConfigDialog.frame.apps[appName] = true
+	AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
+end
+
+reg.RegisterCallback(AceConfigDialog, "ConfigTableChange", "ConfigTableChanged")
+
+--- Sets the default size of the options window for a specific application.
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+-- @param width The default width
+-- @param height The default height
+function AceConfigDialog:SetDefaultSize(appName, width, height)
+	local status = AceConfigDialog:GetStatusTable(appName)
+	if type(width) == "number" and type(height) == "number" then
+		status.width = width
+		status.height = height
+	end
+end
+
+--- Open an option window at the specified path (if any).
+-- This function can optionally feed the group into a pre-created container
+-- instead of creating a new container frame.
+-- @paramsig appName [, container][, ...]
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+-- @param container An optional container frame to feed the options into
+-- @param ... The path to open after creating the options window (see `:SelectGroup` for details)
+function AceConfigDialog:Open(appName, container, ...)
+	if not old_CloseSpecialWindows then
+		old_CloseSpecialWindows = CloseSpecialWindows
+		CloseSpecialWindows = function()
+			local found = old_CloseSpecialWindows()
+			return self:CloseAll() or found
+		end
+	end
+	local app = reg:GetOptionsTable(appName)
+	if not app then
+		error(("%s isn't registed with AceConfigRegistry, unable to open config"):format(appName), 2)
+	end
+	local options = app("dialog", MAJOR)
+
+	local f
+
+	local path = new()
+	local name = GetOptionsMemberValue("name", options, options, path, appName)
+
+	--If an optional path is specified add it to the path table before feeding the options
+	--as container is optional as well it may contain the first element of the path
+	if type(container) == "string" then
+		tinsert(path, container)
+		container = nil
+	end
+	for n = 1, select("#",...) do
+		tinsert(path, (select(n, ...)))
+	end
+
+	local option = options
+	if type(container) == "table" and container.type == "BlizOptionsGroup" and #path > 0 then
+		for i = 1, #path do
+			option = options.args[path[i]]
+		end
+		name = format("%s - %s", name, GetOptionsMemberValue("name", option, options, path, appName))
+	end
+
+	--if a container is given feed into that
+	if container then
+		f = container
+		f:ReleaseChildren()
+		f:SetUserData("appName", appName)
+		f:SetUserData("iscustom", true)
+		if #path > 0 then
+			f:SetUserData("basepath", copy(path))
+		end
+		local status = AceConfigDialog:GetStatusTable(appName)
+		if not status.width then
+			status.width =  700
+		end
+		if not status.height then
+			status.height = 500
+		end
+		if f.SetStatusTable then
+			f:SetStatusTable(status)
+		end
+		if f.SetTitle then
+			f:SetTitle(name or "")
+		end
+	else
+		if not self.OpenFrames[appName] then
+			f = gui:Create("Frame")
+			self.OpenFrames[appName] = f
+		else
+			f = self.OpenFrames[appName]
+		end
+		f:ReleaseChildren()
+		f:SetCallback("OnClose", FrameOnClose)
+		f:SetUserData("appName", appName)
+		if #path > 0 then
+			f:SetUserData("basepath", copy(path))
+		end
+		f:SetTitle(name or "")
+		local status = AceConfigDialog:GetStatusTable(appName)
+		f:SetStatusTable(status)
+	end
+
+	self:FeedGroup(appName,options,f,f,path,true)
+	if f.Show then
+		f:Show()
+	end
+	del(path)
+
+	if AceConfigDialog.frame.closeAll then
+		-- close all is set, but thats not good, since we're just opening here, so force it
+		AceConfigDialog.frame.closeAllOverride[appName] = true
+	end
+end
+
+-- convert pre-39 BlizOptions structure to the new format
+if oldminor and oldminor < 39 and AceConfigDialog.BlizOptions then
+	local old = AceConfigDialog.BlizOptions
+	local new = {}
+	for key, widget in pairs(old) do
+		local appName = widget:GetUserData("appName")
+		if not new[appName] then new[appName] = {} end
+		new[appName][key] = widget
+	end
+	AceConfigDialog.BlizOptions = new
+else
+	AceConfigDialog.BlizOptions = AceConfigDialog.BlizOptions or {}
+end
+
+local function FeedToBlizPanel(widget, event)
+	local path = widget:GetUserData("path")
+	AceConfigDialog:Open(widget:GetUserData("appName"), widget, unpack(path or emptyTbl))
+end
+
+local function ClearBlizPanel(widget, event)
+	local appName = widget:GetUserData("appName")
+	AceConfigDialog.frame.closing[appName] = true
+	AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
+end
+
+--- Add an option table into the Blizzard Interface Options panel.
+-- You can optionally supply a descriptive name to use and a parent frame to use,
+-- as well as a path in the options table.\\
+-- If no name is specified, the appName will be used instead.
+--
+-- If you specify a proper `parent` (by name), the interface options will generate a
+-- tree layout. Note that only one level of children is supported, so the parent always
+-- has to be a head-level note.
+--
+-- This function returns a reference to the container frame registered with the Interface
+-- Options. You can use this reference to open the options with the API function
+-- `InterfaceOptionsFrame_OpenToCategory`.
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+-- @param name A descriptive name to display in the options tree (defaults to appName)
+-- @param parent The parent to use in the interface options tree.
+-- @param ... The path in the options table to feed into the interface options panel.
+-- @return The reference to the frame registered into the Interface Options.
+function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
+	local BlizOptions = AceConfigDialog.BlizOptions
+
+	local key = appName
+	for n = 1, select("#", ...) do
+		key = key.."\001"..select(n, ...)
+	end
+
+	if not BlizOptions[appName] then
+		BlizOptions[appName] = {}
+	end
+
+	if not BlizOptions[appName][key] then
+		local group = gui:Create("BlizOptionsGroup")
+		BlizOptions[appName][key] = group
+		group:SetName(name or appName, parent)
+
+		group:SetTitle(name or appName)
+		group:SetUserData("appName", appName)
+		if select("#", ...) > 0 then
+			local path = {}
+			for n = 1, select("#",...) do
+				tinsert(path, (select(n, ...)))
+			end
+			group:SetUserData("path", path)
+		end
+		group:SetCallback("OnShow", FeedToBlizPanel)
+		group:SetCallback("OnHide", ClearBlizPanel)
+		InterfaceOptions_AddCategory(group.frame)
+		return group.frame
+	else
+		error(("%s has already been added to the Blizzard Options Window with the given path"):format(appName), 2)
+	end
+end
diff --git a/EMA/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml b/EMA/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml
new file mode 100644
index 0000000..8e1e606
--- /dev/null
+++ b/EMA/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceConfigDialog-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua b/EMA/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
new file mode 100644
index 0000000..f8ac3f9
--- /dev/null
+++ b/EMA/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
@@ -0,0 +1,350 @@
+--- AceConfigRegistry-3.0 handles central registration of options tables in use by addons and modules.\\
+-- Options tables can be registered as raw tables, OR as function refs that return a table.\\
+-- Such functions receive three arguments: "uiType", "uiName", "appName". \\
+-- * Valid **uiTypes**: "cmd", "dropdown", "dialog". This is verified by the library at call time. \\
+-- * The **uiName** field is expected to contain the full name of the calling addon, including version, e.g. "FooBar-1.0". This is verified by the library at call time.\\
+-- * The **appName** field is the options table name as given at registration time \\
+--
+-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
+-- @class file
+-- @name AceConfigRegistry-3.0
+-- @release $Id: AceConfigRegistry-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $
+local CallbackHandler = LibStub("CallbackHandler-1.0")
+
+local MAJOR, MINOR = "AceConfigRegistry-3.0", 18
+local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceConfigRegistry then return end
+
+AceConfigRegistry.tables = AceConfigRegistry.tables or {}
+
+if not AceConfigRegistry.callbacks then
+	AceConfigRegistry.callbacks = CallbackHandler:New(AceConfigRegistry)
+end
+
+-- Lua APIs
+local tinsert, tconcat = table.insert, table.concat
+local strfind, strmatch = string.find, string.match
+local type, tostring, select, pairs = type, tostring, select, pairs
+local error, assert = error, assert
+
+-----------------------------------------------------------------------
+-- Validating options table consistency:
+
+
+AceConfigRegistry.validated = {
+	-- list of options table names ran through :ValidateOptionsTable automatically.
+	-- CLEARED ON PURPOSE, since newer versions may have newer validators
+	cmd = {},
+	dropdown = {},
+	dialog = {},
+}
+
+
+
+local function err(msg, errlvl, ...)
+	local t = {}
+	for i=select("#",...),1,-1 do
+		tinsert(t, (select(i, ...)))
+	end
+	error(MAJOR..":ValidateOptionsTable(): "..tconcat(t,".")..msg, errlvl+2)
+end
+
+
+local isstring={["string"]=true, _="string"}
+local isstringfunc={["string"]=true,["function"]=true, _="string or funcref"}
+local istable={["table"]=true,   _="table"}
+local ismethodtable={["table"]=true,["string"]=true,["function"]=true,   _="methodname, funcref or table"}
+local optstring={["nil"]=true,["string"]=true, _="string"}
+local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"}
+local optstringnumberfunc={["nil"]=true,["string"]=true,["number"]=true,["function"]=true, _="string, number or funcref"}
+local optnumber={["nil"]=true,["number"]=true, _="number"}
+local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"}
+local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true},  _="methodname, funcref or false"}
+local optmethodnumber={["nil"]=true,["string"]=true,["function"]=true,["number"]=true,  _="methodname, funcref or number"}
+local optmethodtable={["nil"]=true,["string"]=true,["function"]=true,["table"]=true,  _="methodname, funcref or table"}
+local optmethodbool={["nil"]=true,["string"]=true,["function"]=true,["boolean"]=true,  _="methodname, funcref or boolean"}
+local opttable={["nil"]=true,["table"]=true,  _="table"}
+local optbool={["nil"]=true,["boolean"]=true,  _="boolean"}
+local optboolnumber={["nil"]=true,["boolean"]=true,["number"]=true,  _="boolean or number"}
+local optstringnumber={["nil"]=true,["string"]=true,["number"]=true, _="string or number"}
+
+local basekeys={
+	type=isstring,
+	name=isstringfunc,
+	desc=optstringfunc,
+	descStyle=optstring,
+	order=optmethodnumber,
+	validate=optmethodfalse,
+	confirm=optmethodbool,
+	confirmText=optstring,
+	disabled=optmethodbool,
+	hidden=optmethodbool,
+		guiHidden=optmethodbool,
+		dialogHidden=optmethodbool,
+		dropdownHidden=optmethodbool,
+	cmdHidden=optmethodbool,
+	icon=optstringnumberfunc,
+	iconCoords=optmethodtable,
+	handler=opttable,
+	get=optmethodfalse,
+	set=optmethodfalse,
+	func=optmethodfalse,
+	arg={["*"]=true},
+	width=optstringnumber,
+}
+
+local typedkeys={
+	header={},
+	description={
+		image=optstringnumberfunc,
+		imageCoords=optmethodtable,
+		imageHeight=optnumber,
+		imageWidth=optnumber,
+		fontSize=optstringfunc,
+	},
+	group={
+		args=istable,
+		plugins=opttable,
+		inline=optbool,
+			cmdInline=optbool,
+			guiInline=optbool,
+			dropdownInline=optbool,
+			dialogInline=optbool,
+		childGroups=optstring,
+	},
+	execute={
+		image=optstringnumberfunc,
+		imageCoords=optmethodtable,
+		imageHeight=optnumber,
+		imageWidth=optnumber,
+	},
+	input={
+		pattern=optstring,
+		usage=optstring,
+		control=optstring,
+		dialogControl=optstring,
+		dropdownControl=optstring,
+		multiline=optboolnumber,
+	},
+	toggle={
+		tristate=optbool,
+		image=optstringnumberfunc,
+		imageCoords=optmethodtable,
+	},
+	tristate={
+	},
+	range={
+		min=optnumber,
+		softMin=optnumber,
+		max=optnumber,
+		softMax=optnumber,
+		step=optnumber,
+		bigStep=optnumber,
+		isPercent=optbool,
+	},
+	select={
+		values=ismethodtable,
+		style={
+			["nil"]=true,
+			["string"]={dropdown=true,radio=true},
+			_="string: 'dropdown' or 'radio'"
+		},
+		control=optstring,
+		dialogControl=optstring,
+		dropdownControl=optstring,
+		itemControl=optstring,
+	},
+	multiselect={
+		values=ismethodtable,
+		style=optstring,
+		tristate=optbool,
+		control=optstring,
+		dialogControl=optstring,
+		dropdownControl=optstring,
+	},
+	color={
+		hasAlpha=optmethodbool,
+	},
+	keybinding={
+		-- TODO
+	},
+}
+
+local function validateKey(k,errlvl,...)
+	errlvl=(errlvl or 0)+1
+	if type(k)~="string" then
+		err("["..tostring(k).."] - key is not a string", errlvl,...)
+	end
+	if strfind(k, "[%c\127]") then
+		err("["..tostring(k).."] - key name contained control characters", errlvl,...)
+	end
+end
+
+local function validateVal(v, oktypes, errlvl,...)
+	errlvl=(errlvl or 0)+1
+	local isok=oktypes[type(v)] or oktypes["*"]
+
+	if not isok then
+		err(": expected a "..oktypes._..", got '"..tostring(v).."'", errlvl,...)
+	end
+	if type(isok)=="table" then		-- isok was a table containing specific values to be tested for!
+		if not isok[v] then
+			err(": did not expect "..type(v).." value '"..tostring(v).."'", errlvl,...)
+		end
+	end
+end
+
+local function validate(options,errlvl,...)
+	errlvl=(errlvl or 0)+1
+	-- basic consistency
+	if type(options)~="table" then
+		err(": expected a table, got a "..type(options), errlvl,...)
+	end
+	if type(options.type)~="string" then
+		err(".type: expected a string, got a "..type(options.type), errlvl,...)
+	end
+
+	-- get type and 'typedkeys' member
+	local tk = typedkeys[options.type]
+	if not tk then
+		err(".type: unknown type '"..options.type.."'", errlvl,...)
+	end
+
+	-- make sure that all options[] are known parameters
+	for k,v in pairs(options) do
+		if not (tk[k] or basekeys[k]) then
+			err(": unknown parameter", errlvl,tostring(k),...)
+		end
+	end
+
+	-- verify that required params are there, and that everything is the right type
+	for k,oktypes in pairs(basekeys) do
+		validateVal(options[k], oktypes, errlvl,k,...)
+	end
+	for k,oktypes in pairs(tk) do
+		validateVal(options[k], oktypes, errlvl,k,...)
+	end
+
+	-- extra logic for groups
+	if options.type=="group" then
+		for k,v in pairs(options.args) do
+			validateKey(k,errlvl,"args",...)
+			validate(v, errlvl,k,"args",...)
+		end
+		if options.plugins then
+			for plugname,plugin in pairs(options.plugins) do
+				if type(plugin)~="table" then
+					err(": expected a table, got '"..tostring(plugin).."'", errlvl,tostring(plugname),"plugins",...)
+				end
+				for k,v in pairs(plugin) do
+					validateKey(k,errlvl,tostring(plugname),"plugins",...)
+					validate(v, errlvl,k,tostring(plugname),"plugins",...)
+				end
+			end
+		end
+	end
+end
+
+
+--- Validates basic structure and integrity of an options table \\
+-- Does NOT verify that get/set etc actually exist, since they can be defined at any depth
+-- @param options The table to be validated
+-- @param name The name of the table to be validated (shown in any error message)
+-- @param errlvl (optional number) error level offset, default 0 (=errors point to the function calling :ValidateOptionsTable)
+function AceConfigRegistry:ValidateOptionsTable(options,name,errlvl)
+	errlvl=(errlvl or 0)+1
+	name = name or "Optionstable"
+	if not options.name then
+		options.name=name	-- bit of a hack, the root level doesn't really need a .name :-/
+	end
+	validate(options,errlvl,name)
+end
+
+--- Fires a "ConfigTableChange" callback for those listening in on it, allowing config GUIs to refresh.
+-- You should call this function if your options table changed from any outside event, like a game event
+-- or a timer.
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+function AceConfigRegistry:NotifyChange(appName)
+	if not AceConfigRegistry.tables[appName] then return end
+	AceConfigRegistry.callbacks:Fire("ConfigTableChange", appName)
+end
+
+-- -------------------------------------------------------------------
+-- Registering and retreiving options tables:
+
+
+-- validateGetterArgs: helper function for :GetOptionsTable (or, rather, the getter functions returned by it)
+
+local function validateGetterArgs(uiType, uiName, errlvl)
+	errlvl=(errlvl or 0)+2
+	if uiType~="cmd" and uiType~="dropdown" and uiType~="dialog" then
+		error(MAJOR..": Requesting options table: 'uiType' - invalid configuration UI type, expected 'cmd', 'dropdown' or 'dialog'", errlvl)
+	end
+	if not strmatch(uiName, "[A-Za-z]%-[0-9]") then	-- Expecting e.g. "MyLib-1.2"
+		error(MAJOR..": Requesting options table: 'uiName' - badly formatted or missing version number. Expected e.g. 'MyLib-1.2'", errlvl)
+	end
+end
+
+--- Register an options table with the config registry.
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+-- @param options The options table, OR a function reference that generates it on demand. \\
+-- See the top of the page for info on arguments passed to such functions.
+-- @param skipValidation Skip options table validation (primarily useful for extremely huge options, with a noticeable slowdown)
+function AceConfigRegistry:RegisterOptionsTable(appName, options, skipValidation)
+	if type(options)=="table" then
+		if options.type~="group" then	-- quick sanity checker
+			error(MAJOR..": RegisterOptionsTable(appName, options): 'options' - missing type='group' member in root group", 2)
+		end
+		AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
+			errlvl=(errlvl or 0)+1
+			validateGetterArgs(uiType, uiName, errlvl)
+			if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
+				AceConfigRegistry:ValidateOptionsTable(options, appName, errlvl)	-- upgradable
+				AceConfigRegistry.validated[uiType][appName] = true
+			end
+			return options
+		end
+	elseif type(options)=="function" then
+		AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
+			errlvl=(errlvl or 0)+1
+			validateGetterArgs(uiType, uiName, errlvl)
+			local tab = assert(options(uiType, uiName, appName))
+			if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
+				AceConfigRegistry:ValidateOptionsTable(tab, appName, errlvl)	-- upgradable
+				AceConfigRegistry.validated[uiType][appName] = true
+			end
+			return tab
+		end
+	else
+		error(MAJOR..": RegisterOptionsTable(appName, options): 'options' - expected table or function reference", 2)
+	end
+end
+
+--- Returns an iterator of ["appName"]=funcref pairs
+function AceConfigRegistry:IterateOptionsTables()
+	return pairs(AceConfigRegistry.tables)
+end
+
+
+
+
+--- Query the registry for a specific options table.
+-- If only appName is given, a function is returned which you
+-- can call with (uiType,uiName) to get the table.\\
+-- If uiType&uiName are given, the table is returned.
+-- @param appName The application name as given to `:RegisterOptionsTable()`
+-- @param uiType The type of UI to get the table for, one of "cmd", "dropdown", "dialog"
+-- @param uiName The name of the library/addon querying for the table, e.g. "MyLib-1.0"
+function AceConfigRegistry:GetOptionsTable(appName, uiType, uiName)
+	local f = AceConfigRegistry.tables[appName]
+	if not f then
+		return nil
+	end
+
+	if uiType then
+		return f(uiType,uiName,1)	-- get the table for us
+	else
+		return f	-- return the function
+	end
+end
diff --git a/EMA/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml b/EMA/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml
new file mode 100644
index 0000000..4ea69ca
--- /dev/null
+++ b/EMA/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceConfigRegistry-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceConsole-3.0/AceConsole-3.0.lua b/EMA/Libs/AceConsole-3.0/AceConsole-3.0.lua
new file mode 100644
index 0000000..0567a65
--- /dev/null
+++ b/EMA/Libs/AceConsole-3.0/AceConsole-3.0.lua
@@ -0,0 +1,250 @@
+--- **AceConsole-3.0** provides registration facilities for slash commands.
+-- You can register slash commands to your custom functions and use the `GetArgs` function to parse them
+-- to your addons individual needs.
+--
+-- **AceConsole-3.0** can be embeded into your addon, either explicitly by calling AceConsole:Embed(MyAddon) or by
+-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
+-- and can be accessed directly, without having to explicitly call AceConsole itself.\\
+-- It is recommended to embed AceConsole, otherwise you'll have to specify a custom `self` on all calls you
+-- make into AceConsole.
+-- @class file
+-- @name AceConsole-3.0
+-- @release $Id: AceConsole-3.0.lua 1143 2016-07-11 08:52:03Z nevcairiel $
+local MAJOR,MINOR = "AceConsole-3.0", 7
+
+local AceConsole, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceConsole then return end -- No upgrade needed
+
+AceConsole.embeds = AceConsole.embeds or {} -- table containing objects AceConsole is embedded in.
+AceConsole.commands = AceConsole.commands or {} -- table containing commands registered
+AceConsole.weakcommands = AceConsole.weakcommands or {} -- table containing self, command => func references for weak commands that don't persist through enable/disable
+
+-- Lua APIs
+local tconcat, tostring, select = table.concat, tostring, select
+local type, pairs, error = type, pairs, error
+local format, strfind, strsub = string.format, string.find, string.sub
+local max = math.max
+
+-- WoW APIs
+local _G = _G
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: DEFAULT_CHAT_FRAME, SlashCmdList, hash_SlashCmdList
+
+local tmp={}
+local function Print(self,frame,...)
+	local n=0
+	if self ~= AceConsole then
+		n=n+1
+		tmp[n] = "|cff33ff99"..tostring( self ).."|r:"
+	end
+	for i=1, select("#", ...) do
+		n=n+1
+		tmp[n] = tostring(select(i, ...))
+	end
+	frame:AddMessage( tconcat(tmp," ",1,n) )
+end
+
+--- Print to DEFAULT_CHAT_FRAME or given ChatFrame (anything with an .AddMessage function)
+-- @paramsig [chatframe ,] ...
+-- @param chatframe Custom ChatFrame to print to (or any frame with an .AddMessage function)
+-- @param ... List of any values to be printed
+function AceConsole:Print(...)
+	local frame = ...
+	if type(frame) == "table" and frame.AddMessage then	-- Is first argument something with an .AddMessage member?
+		return Print(self, frame, select(2,...))
+	else
+		return Print(self, DEFAULT_CHAT_FRAME, ...)
+	end
+end
+
+
+--- Formatted (using format()) print to DEFAULT_CHAT_FRAME or given ChatFrame (anything with an .AddMessage function)
+-- @paramsig [chatframe ,] "format"[, ...]
+-- @param chatframe Custom ChatFrame to print to (or any frame with an .AddMessage function)
+-- @param format Format string - same syntax as standard Lua format()
+-- @param ... Arguments to the format string
+function AceConsole:Printf(...)
+	local frame = ...
+	if type(frame) == "table" and frame.AddMessage then	-- Is first argument something with an .AddMessage member?
+		return Print(self, frame, format(select(2,...)))
+	else
+		return Print(self, DEFAULT_CHAT_FRAME, format(...))
+	end
+end
+
+
+
+
+--- Register a simple chat command
+-- @param command Chat command to be registered WITHOUT leading "/"
+-- @param func Function to call when the slash command is being used (funcref or methodname)
+-- @param persist if false, the command will be soft disabled/enabled when aceconsole is used as a mixin (default: true)
+function AceConsole:RegisterChatCommand( command, func, persist )
+	if type(command)~="string" then error([[Usage: AceConsole:RegisterChatCommand( "command", func[, persist ]): 'command' - expected a string]], 2) end
+
+	if persist==nil then persist=true end	-- I'd rather have my addon's "/addon enable" around if the author screws up. Having some extra slash regged when it shouldnt be isn't as destructive. True is a better default. /Mikk
+
+	local name = "ACECONSOLE_"..command:upper()
+
+	if type( func ) == "string" then
+		SlashCmdList[name] = function(input, editBox)
+			self[func](self, input, editBox)
+		end
+	else
+		SlashCmdList[name] = func
+	end
+	_G["SLASH_"..name.."1"] = "/"..command:lower()
+	AceConsole.commands[command] = name
+	-- non-persisting commands are registered for enabling disabling
+	if not persist then
+		if not AceConsole.weakcommands[self] then AceConsole.weakcommands[self] = {} end
+		AceConsole.weakcommands[self][command] = func
+	end
+	return true
+end
+
+--- Unregister a chatcommand
+-- @param command Chat command to be unregistered WITHOUT leading "/"
+function AceConsole:UnregisterChatCommand( command )
+	local name = AceConsole.commands[command]
+	if name then
+		SlashCmdList[name] = nil
+		_G["SLASH_" .. name .. "1"] = nil
+		hash_SlashCmdList["/" .. command:upper()] = nil
+		AceConsole.commands[command] = nil
+	end
+end
+
+--- Get an iterator over all Chat Commands registered with AceConsole
+-- @return Iterator (pairs) over all commands
+function AceConsole:IterateChatCommands() return pairs(AceConsole.commands) end
+
+
+local function nils(n, ...)
+	if n>1 then
+		return nil, nils(n-1, ...)
+	elseif n==1 then
+		return nil, ...
+	else
+		return ...
+	end
+end
+
+
+--- Retreive one or more space-separated arguments from a string.
+-- Treats quoted strings and itemlinks as non-spaced.
+-- @param str The raw argument string
+-- @param numargs How many arguments to get (default 1)
+-- @param startpos Where in the string to start scanning (default  1)
+-- @return Returns arg1, arg2, ..., nextposition\\
+-- Missing arguments will be returned as nils. 'nextposition' is returned as 1e9 at the end of the string.
+function AceConsole:GetArgs(str, numargs, startpos)
+	numargs = numargs or 1
+	startpos = max(startpos or 1, 1)
+
+	local pos=startpos
+
+	-- find start of new arg
+	pos = strfind(str, "[^ ]", pos)
+	if not pos then	-- whoops, end of string
+		return nils(numargs, 1e9)
+	end
+
+	if numargs<1 then
+		return pos
+	end
+
+	-- quoted or space separated? find out which pattern to use
+	local delim_or_pipe
+	local ch = strsub(str, pos, pos)
+	if ch=='"' then
+		pos = pos + 1
+		delim_or_pipe='([|"])'
+	elseif ch=="'" then
+		pos = pos + 1
+		delim_or_pipe="([|'])"
+	else
+		delim_or_pipe="([| ])"
+	end
+
+	startpos = pos
+
+	while true do
+		-- find delimiter or hyperlink
+		local ch,_
+		pos,_,ch = strfind(str, delim_or_pipe, pos)
+
+		if not pos then break end
+
+		if ch=="|" then
+			-- some kind of escape
+
+			if strsub(str,pos,pos+1)=="|H" then
+				-- It's a |H....|hhyper link!|h
+				pos=strfind(str, "|h", pos+2)	-- first |h
+				if not pos then break end
+
+				pos=strfind(str, "|h", pos+2)	-- second |h
+				if not pos then break end
+			elseif strsub(str,pos, pos+1) == "|T" then
+				-- It's a |T....|t  texture
+				pos=strfind(str, "|t", pos+2)
+				if not pos then break end
+			end
+
+			pos=pos+2 -- skip past this escape (last |h if it was a hyperlink)
+
+		else
+			-- found delimiter, done with this arg
+			return strsub(str, startpos, pos-1), AceConsole:GetArgs(str, numargs-1, pos+1)
+		end
+
+	end
+
+	-- search aborted, we hit end of string. return it all as one argument. (yes, even if it's an unterminated quote or hyperlink)
+	return strsub(str, startpos), nils(numargs-1, 1e9)
+end
+
+
+--- embedding and embed handling
+
+local mixins = {
+	"Print",
+	"Printf",
+	"RegisterChatCommand",
+	"UnregisterChatCommand",
+	"GetArgs",
+}
+
+-- Embeds AceConsole into the target object making the functions from the mixins list available on target:..
+-- @param target target object to embed AceBucket in
+function AceConsole:Embed( target )
+	for k, v in pairs( mixins ) do
+		target[v] = self[v]
+	end
+	self.embeds[target] = true
+	return target
+end
+
+function AceConsole:OnEmbedEnable( target )
+	if AceConsole.weakcommands[target] then
+		for command, func in pairs( AceConsole.weakcommands[target] ) do
+			target:RegisterChatCommand( command, func, false, true ) -- nonpersisting and silent registry
+		end
+	end
+end
+
+function AceConsole:OnEmbedDisable( target )
+	if AceConsole.weakcommands[target] then
+		for command, func in pairs( AceConsole.weakcommands[target] ) do
+			target:UnregisterChatCommand( command ) -- TODO: this could potentially unregister a command from another application in case of command conflicts. Do we care?
+		end
+	end
+end
+
+for addon in pairs(AceConsole.embeds) do
+	AceConsole:Embed(addon)
+end
diff --git a/EMA/Libs/AceConsole-3.0/AceConsole-3.0.xml b/EMA/Libs/AceConsole-3.0/AceConsole-3.0.xml
new file mode 100644
index 0000000..4f4699a
--- /dev/null
+++ b/EMA/Libs/AceConsole-3.0/AceConsole-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceConsole-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceDB-3.0/AceDB-3.0.lua b/EMA/Libs/AceDB-3.0/AceDB-3.0.lua
new file mode 100644
index 0000000..b42b442
--- /dev/null
+++ b/EMA/Libs/AceDB-3.0/AceDB-3.0.lua
@@ -0,0 +1,746 @@
+--- **AceDB-3.0** manages the SavedVariables of your addon.
+-- It offers profile management, smart defaults and namespaces for modules.\\
+-- Data can be saved in different data-types, depending on its intended usage.
+-- The most common data-type is the `profile` type, which allows the user to choose
+-- the active profile, and manage the profiles of all of his characters.\\
+-- The following data types are available:
+-- * **char** Character-specific data. Every character has its own database.
+-- * **realm** Realm-specific data. All of the players characters on the same realm share this database.
+-- * **class** Class-specific data. All of the players characters of the same class share this database.
+-- * **race** Race-specific data. All of the players characters of the same race share this database.
+-- * **faction** Faction-specific data. All of the players characters of the same faction share this database.
+-- * **factionrealm** Faction and realm specific data. All of the players characters on the same realm and of the same faction share this database.
+-- * **locale** Locale specific data, based on the locale of the players game client.
+-- * **global** Global Data. All characters on the same account share this database.
+-- * **profile** Profile-specific data. All characters using the same profile share this database. The user can control which profile should be used.
+--
+-- Creating a new Database using the `:New` function will return a new DBObject. A database will inherit all functions
+-- of the DBObjectLib listed here. \\
+-- If you create a new namespaced child-database (`:RegisterNamespace`), you'll get a DBObject as well, but note
+-- that the child-databases cannot individually change their profile, and are linked to their parents profile - and because of that,
+-- the profile related APIs are not available. Only `:RegisterDefaults` and `:ResetProfile` are available on child-databases.
+--
+-- For more details on how to use AceDB-3.0, see the [[AceDB-3.0 Tutorial]].
+--
+-- You may also be interested in [[libdualspec-1-0|LibDualSpec-1.0]] to do profile switching automatically when switching specs.
+--
+-- @usage
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("DBExample")
+--
+-- -- declare defaults to be used in the DB
+-- local defaults = {
+--   profile = {
+--     setting = true,
+--   }
+-- }
+--
+-- function MyAddon:OnInitialize()
+--   -- Assuming the .toc says ## SavedVariables: MyAddonDB
+--   self.db = LibStub("AceDB-3.0"):New("MyAddonDB", defaults, true)
+-- end
+-- @class file
+-- @name AceDB-3.0.lua
+-- @release $Id: AceDB-3.0.lua 1142 2016-07-11 08:36:19Z nevcairiel $
+local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 26
+local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
+
+if not AceDB then return end -- No upgrade needed
+
+-- Lua APIs
+local type, pairs, next, error = type, pairs, next, error
+local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget
+
+-- WoW APIs
+local _G = _G
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: LibStub
+
+AceDB.db_registry = AceDB.db_registry or {}
+AceDB.frame = AceDB.frame or CreateFrame("Frame")
+
+local CallbackHandler
+local CallbackDummy = { Fire = function() end }
+
+local DBObjectLib = {}
+
+--[[-------------------------------------------------------------------------
+	AceDB Utility Functions
+---------------------------------------------------------------------------]]
+
+-- Simple shallow copy for copying defaults
+local function copyTable(src, dest)
+	if type(dest) ~= "table" then dest = {} end
+	if type(src) == "table" then
+		for k,v in pairs(src) do
+			if type(v) == "table" then
+				-- try to index the key first so that the metatable creates the defaults, if set, and use that table
+				v = copyTable(v, dest[k])
+			end
+			dest[k] = v
+		end
+	end
+	return dest
+end
+
+-- Called to add defaults to a section of the database
+--
+-- When a ["*"] default section is indexed with a new key, a table is returned
+-- and set in the host table.  These tables must be cleaned up by removeDefaults
+-- in order to ensure we don't write empty default tables.
+local function copyDefaults(dest, src)
+	-- this happens if some value in the SV overwrites our default value with a non-table
+	--if type(dest) ~= "table" then return end
+	for k, v in pairs(src) do
+		if k == "*" or k == "**" then
+			if type(v) == "table" then
+				-- This is a metatable used for table defaults
+				local mt = {
+					-- This handles the lookup and creation of new subtables
+					__index = function(t,k)
+							if k == nil then return nil end
+							local tbl = {}
+							copyDefaults(tbl, v)
+							rawset(t, k, tbl)
+							return tbl
+						end,
+				}
+				setmetatable(dest, mt)
+				-- handle already existing tables in the SV
+				for dk, dv in pairs(dest) do
+					if not rawget(src, dk) and type(dv) == "table" then
+						copyDefaults(dv, v)
+					end
+				end
+			else
+				-- Values are not tables, so this is just a simple return
+				local mt = {__index = function(t,k) return k~=nil and v or nil end}
+				setmetatable(dest, mt)
+			end
+		elseif type(v) == "table" then
+			if not rawget(dest, k) then rawset(dest, k, {}) end
+			if type(dest[k]) == "table" then
+				copyDefaults(dest[k], v)
+				if src['**'] then
+					copyDefaults(dest[k], src['**'])
+				end
+			end
+		else
+			if rawget(dest, k) == nil then
+				rawset(dest, k, v)
+			end
+		end
+	end
+end
+
+-- Called to remove all defaults in the default table from the database
+local function removeDefaults(db, defaults, blocker)
+	-- remove all metatables from the db, so we don't accidentally create new sub-tables through them
+	setmetatable(db, nil)
+	-- loop through the defaults and remove their content
+	for k,v in pairs(defaults) do
+		if k == "*" or k == "**" then
+			if type(v) == "table" then
+				-- Loop through all the actual k,v pairs and remove
+				for key, value in pairs(db) do
+					if type(value) == "table" then
+						-- if the key was not explicitly specified in the defaults table, just strip everything from * and ** tables
+						if defaults[key] == nil and (not blocker or blocker[key] == nil) then
+							removeDefaults(value, v)
+							-- if the table is empty afterwards, remove it
+							if next(value) == nil then
+								db[key] = nil
+							end
+						-- if it was specified, only strip ** content, but block values which were set in the key table
+						elseif k == "**" then
+							removeDefaults(value, v, defaults[key])
+						end
+					end
+				end
+			elseif k == "*" then
+				-- check for non-table default
+				for key, value in pairs(db) do
+					if defaults[key] == nil and v == value then
+						db[key] = nil
+					end
+				end
+			end
+		elseif type(v) == "table" and type(db[k]) == "table" then
+			-- if a blocker was set, dive into it, to allow multi-level defaults
+			removeDefaults(db[k], v, blocker and blocker[k])
+			if next(db[k]) == nil then
+				db[k] = nil
+			end
+		else
+			-- check if the current value matches the default, and that its not blocked by another defaults table
+			if db[k] == defaults[k] and (not blocker or blocker[k] == nil) then
+				db[k] = nil
+			end
+		end
+	end
+end
+
+-- This is called when a table section is first accessed, to set up the defaults
+local function initSection(db, section, svstore, key, defaults)
+	local sv = rawget(db, "sv")
+
+	local tableCreated
+	if not sv[svstore] then sv[svstore] = {} end
+	if not sv[svstore][key] then
+		sv[svstore][key] = {}
+		tableCreated = true
+	end
+
+	local tbl = sv[svstore][key]
+
+	if defaults then
+		copyDefaults(tbl, defaults)
+	end
+	rawset(db, section, tbl)
+
+	return tableCreated, tbl
+end
+
+-- Metatable to handle the dynamic creation of sections and copying of sections.
+local dbmt = {
+	__index = function(t, section)
+			local keys = rawget(t, "keys")
+			local key = keys[section]
+			if key then
+				local defaultTbl = rawget(t, "defaults")
+				local defaults = defaultTbl and defaultTbl[section]
+
+				if section == "profile" then
+					local new = initSection(t, section, "profiles", key, defaults)
+					if new then
+						-- Callback: OnNewProfile, database, newProfileKey
+						t.callbacks:Fire("OnNewProfile", t, key)
+					end
+				elseif section == "profiles" then
+					local sv = rawget(t, "sv")
+					if not sv.profiles then sv.profiles = {} end
+					rawset(t, "profiles", sv.profiles)
+				elseif section == "global" then
+					local sv = rawget(t, "sv")
+					if not sv.global then sv.global = {} end
+					if defaults then
+						copyDefaults(sv.global, defaults)
+					end
+					rawset(t, section, sv.global)
+				else
+					initSection(t, section, section, key, defaults)
+				end
+			end
+
+			return rawget(t, section)
+		end
+}
+
+local function validateDefaults(defaults, keyTbl, offset)
+	if not defaults then return end
+	offset = offset or 0
+	for k in pairs(defaults) do
+		if not keyTbl[k] or k == "profiles" then
+			error(("Usage: AceDBObject:RegisterDefaults(defaults): '%s' is not a valid datatype."):format(k), 3 + offset)
+		end
+	end
+end
+
+local preserve_keys = {
+	["callbacks"] = true,
+	["RegisterCallback"] = true,
+	["UnregisterCallback"] = true,
+	["UnregisterAllCallbacks"] = true,
+	["children"] = true,
+}
+
+local realmKey = GetRealmName()
+local charKey = UnitName("player") .. " - " .. realmKey
+local _, classKey = UnitClass("player")
+local _, raceKey = UnitRace("player")
+local factionKey = UnitFactionGroup("player")
+local factionrealmKey = factionKey .. " - " .. realmKey
+local localeKey = GetLocale():lower()
+
+local regionTable = { "US", "KR", "EU", "TW", "CN" }
+local regionKey = regionTable[GetCurrentRegion()]
+local factionrealmregionKey = factionrealmKey .. " - " .. regionKey
+
+-- Actual database initialization function
+local function initdb(sv, defaults, defaultProfile, olddb, parent)
+	-- Generate the database keys for each section
+
+	-- map "true" to our "Default" profile
+	if defaultProfile == true then defaultProfile = "Default" end
+
+	local profileKey
+	if not parent then
+		-- Make a container for profile keys
+		if not sv.profileKeys then sv.profileKeys = {} end
+
+		-- Try to get the profile selected from the char db
+		profileKey = sv.profileKeys[charKey] or defaultProfile or charKey
+
+		-- save the selected profile for later
+		sv.profileKeys[charKey] = profileKey
+	else
+		-- Use the profile of the parents DB
+		profileKey = parent.keys.profile or defaultProfile or charKey
+
+		-- clear the profileKeys in the DB, namespaces don't need to store them
+		sv.profileKeys = nil
+	end
+
+	-- This table contains keys that enable the dynamic creation
+	-- of each section of the table.  The 'global' and 'profiles'
+	-- have a key of true, since they are handled in a special case
+	local keyTbl= {
+		["char"] = charKey,
+		["realm"] = realmKey,
+		["class"] = classKey,
+		["race"] = raceKey,
+		["faction"] = factionKey,
+		["factionrealm"] = factionrealmKey,
+		["factionrealmregion"] = factionrealmregionKey,
+		["profile"] = profileKey,
+		["locale"] = localeKey,
+		["global"] = true,
+		["profiles"] = true,
+	}
+
+	validateDefaults(defaults, keyTbl, 1)
+
+	-- This allows us to use this function to reset an entire database
+	-- Clear out the old database
+	if olddb then
+		for k,v in pairs(olddb) do if not preserve_keys[k] then olddb[k] = nil end end
+	end
+
+	-- Give this database the metatable so it initializes dynamically
+	local db = setmetatable(olddb or {}, dbmt)
+
+	if not rawget(db, "callbacks") then
+		-- try to load CallbackHandler-1.0 if it loaded after our library
+		if not CallbackHandler then CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0", true) end
+		db.callbacks = CallbackHandler and CallbackHandler:New(db) or CallbackDummy
+	end
+
+	-- Copy methods locally into the database object, to avoid hitting
+	-- the metatable when calling methods
+
+	if not parent then
+		for name, func in pairs(DBObjectLib) do
+			db[name] = func
+		end
+	else
+		-- hack this one in
+		db.RegisterDefaults = DBObjectLib.RegisterDefaults
+		db.ResetProfile = DBObjectLib.ResetProfile
+	end
+
+	-- Set some properties in the database object
+	db.profiles = sv.profiles
+	db.keys = keyTbl
+	db.sv = sv
+	--db.sv_name = name
+	db.defaults = defaults
+	db.parent = parent
+
+	-- store the DB in the registry
+	AceDB.db_registry[db] = true
+
+	return db
+end
+
+-- handle PLAYER_LOGOUT
+-- strip all defaults from all databases
+-- and cleans up empty sections
+local function logoutHandler(frame, event)
+	if event == "PLAYER_LOGOUT" then
+		for db in pairs(AceDB.db_registry) do
+			db.callbacks:Fire("OnDatabaseShutdown", db)
+			db:RegisterDefaults(nil)
+
+			-- cleanup sections that are empty without defaults
+			local sv = rawget(db, "sv")
+			for section in pairs(db.keys) do
+				if rawget(sv, section) then
+					-- global is special, all other sections have sub-entrys
+					-- also don't delete empty profiles on main dbs, only on namespaces
+					if section ~= "global" and (section ~= "profiles" or rawget(db, "parent")) then
+						for key in pairs(sv[section]) do
+							if not next(sv[section][key]) then
+								sv[section][key] = nil
+							end
+						end
+					end
+					if not next(sv[section]) then
+						sv[section] = nil
+					end
+				end
+			end
+		end
+	end
+end
+
+AceDB.frame:RegisterEvent("PLAYER_LOGOUT")
+AceDB.frame:SetScript("OnEvent", logoutHandler)
+
+
+--[[-------------------------------------------------------------------------
+	AceDB Object Method Definitions
+---------------------------------------------------------------------------]]
+
+--- Sets the defaults table for the given database object by clearing any
+-- that are currently set, and then setting the new defaults.
+-- @param defaults A table of defaults for this database
+function DBObjectLib:RegisterDefaults(defaults)
+	if defaults and type(defaults) ~= "table" then
+		error("Usage: AceDBObject:RegisterDefaults(defaults): 'defaults' - table or nil expected.", 2)
+	end
+
+	validateDefaults(defaults, self.keys)
+
+	-- Remove any currently set defaults
+	if self.defaults then
+		for section,key in pairs(self.keys) do
+			if self.defaults[section] and rawget(self, section) then
+				removeDefaults(self[section], self.defaults[section])
+			end
+		end
+	end
+
+	-- Set the DBObject.defaults table
+	self.defaults = defaults
+
+	-- Copy in any defaults, only touching those sections already created
+	if defaults then
+		for section,key in pairs(self.keys) do
+			if defaults[section] and rawget(self, section) then
+				copyDefaults(self[section], defaults[section])
+			end
+		end
+	end
+end
+
+--- Changes the profile of the database and all of it's namespaces to the
+-- supplied named profile
+-- @param name The name of the profile to set as the current profile
+function DBObjectLib:SetProfile(name)
+	if type(name) ~= "string" then
+		error("Usage: AceDBObject:SetProfile(name): 'name' - string expected.", 2)
+	end
+
+	-- changing to the same profile, dont do anything
+	if name == self.keys.profile then return end
+
+	local oldProfile = self.profile
+	local defaults = self.defaults and self.defaults.profile
+
+	-- Callback: OnProfileShutdown, database
+	self.callbacks:Fire("OnProfileShutdown", self)
+
+	if oldProfile and defaults then
+		-- Remove the defaults from the old profile
+		removeDefaults(oldProfile, defaults)
+	end
+
+	self.profile = nil
+	self.keys["profile"] = name
+
+	-- if the storage exists, save the new profile
+	-- this won't exist on namespaces.
+	if self.sv.profileKeys then
+		self.sv.profileKeys[charKey] = name
+	end
+
+	-- populate to child namespaces
+	if self.children then
+		for _, db in pairs(self.children) do
+			DBObjectLib.SetProfile(db, name)
+		end
+	end
+
+	-- Callback: OnProfileChanged, database, newProfileKey
+	self.callbacks:Fire("OnProfileChanged", self, name)
+end
+
+--- Returns a table with the names of the existing profiles in the database.
+-- You can optionally supply a table to re-use for this purpose.
+-- @param tbl A table to store the profile names in (optional)
+function DBObjectLib:GetProfiles(tbl)
+	if tbl and type(tbl) ~= "table" then
+		error("Usage: AceDBObject:GetProfiles(tbl): 'tbl' - table or nil expected.", 2)
+	end
+
+	-- Clear the container table
+	if tbl then
+		for k,v in pairs(tbl) do tbl[k] = nil end
+	else
+		tbl = {}
+	end
+
+	local curProfile = self.keys.profile
+
+	local i = 0
+	for profileKey in pairs(self.profiles) do
+		i = i + 1
+		tbl[i] = profileKey
+		if curProfile and profileKey == curProfile then curProfile = nil end
+	end
+
+	-- Add the current profile, if it hasn't been created yet
+	if curProfile then
+		i = i + 1
+		tbl[i] = curProfile
+	end
+
+	return tbl, i
+end
+
+--- Returns the current profile name used by the database
+function DBObjectLib:GetCurrentProfile()
+	return self.keys.profile
+end
+
+--- Deletes a named profile.  This profile must not be the active profile.
+-- @param name The name of the profile to be deleted
+-- @param silent If true, do not raise an error when the profile does not exist
+function DBObjectLib:DeleteProfile(name, silent)
+	if type(name) ~= "string" then
+		error("Usage: AceDBObject:DeleteProfile(name): 'name' - string expected.", 2)
+	end
+
+	if self.keys.profile == name then
+		error("Cannot delete the active profile in an AceDBObject.", 2)
+	end
+
+	if not rawget(self.profiles, name) and not silent then
+		error("Cannot delete profile '" .. name .. "'. It does not exist.", 2)
+	end
+
+	self.profiles[name] = nil
+
+	-- populate to child namespaces
+	if self.children then
+		for _, db in pairs(self.children) do
+			DBObjectLib.DeleteProfile(db, name, true)
+		end
+	end
+
+	-- switch all characters that use this profile back to the default
+	if self.sv.profileKeys then
+		for key, profile in pairs(self.sv.profileKeys) do
+			if profile == name then
+				self.sv.profileKeys[key] = nil
+			end
+		end
+	end
+
+	-- Callback: OnProfileDeleted, database, profileKey
+	self.callbacks:Fire("OnProfileDeleted", self, name)
+end
+
+--- Copies a named profile into the current profile, overwriting any conflicting
+-- settings.
+-- @param name The name of the profile to be copied into the current profile
+-- @param silent If true, do not raise an error when the profile does not exist
+function DBObjectLib:CopyProfile(name, silent)
+	if type(name) ~= "string" then
+		error("Usage: AceDBObject:CopyProfile(name): 'name' - string expected.", 2)
+	end
+
+	if name == self.keys.profile then
+		error("Cannot have the same source and destination profiles.", 2)
+	end
+
+	if not rawget(self.profiles, name) and not silent then
+		error("Cannot copy profile '" .. name .. "'. It does not exist.", 2)
+	end
+
+	-- Reset the profile before copying
+	DBObjectLib.ResetProfile(self, nil, true)
+
+	local profile = self.profile
+	local source = self.profiles[name]
+
+	copyTable(source, profile)
+
+	-- populate to child namespaces
+	if self.children then
+		for _, db in pairs(self.children) do
+			DBObjectLib.CopyProfile(db, name, true)
+		end
+	end
+
+	-- Callback: OnProfileCopied, database, sourceProfileKey
+	self.callbacks:Fire("OnProfileCopied", self, name)
+end
+
+--- Resets the current profile to the default values (if specified).
+-- @param noChildren if set to true, the reset will not be populated to the child namespaces of this DB object
+-- @param noCallbacks if set to true, won't fire the OnProfileReset callback
+function DBObjectLib:ResetProfile(noChildren, noCallbacks)
+	local profile = self.profile
+
+	for k,v in pairs(profile) do
+		profile[k] = nil
+	end
+
+	local defaults = self.defaults and self.defaults.profile
+	if defaults then
+		copyDefaults(profile, defaults)
+	end
+
+	-- populate to child namespaces
+	if self.children and not noChildren then
+		for _, db in pairs(self.children) do
+			DBObjectLib.ResetProfile(db, nil, noCallbacks)
+		end
+	end
+
+	-- Callback: OnProfileReset, database
+	if not noCallbacks then
+		self.callbacks:Fire("OnProfileReset", self)
+	end
+end
+
+--- Resets the entire database, using the string defaultProfile as the new default
+-- profile.
+-- @param defaultProfile The profile name to use as the default
+function DBObjectLib:ResetDB(defaultProfile)
+	if defaultProfile and type(defaultProfile) ~= "string" then
+		error("Usage: AceDBObject:ResetDB(defaultProfile): 'defaultProfile' - string or nil expected.", 2)
+	end
+
+	local sv = self.sv
+	for k,v in pairs(sv) do
+		sv[k] = nil
+	end
+
+	local parent = self.parent
+
+	initdb(sv, self.defaults, defaultProfile, self)
+
+	-- fix the child namespaces
+	if self.children then
+		if not sv.namespaces then sv.namespaces = {} end
+		for name, db in pairs(self.children) do
+			if not sv.namespaces[name] then sv.namespaces[name] = {} end
+			initdb(sv.namespaces[name], db.defaults, self.keys.profile, db, self)
+		end
+	end
+
+	-- Callback: OnDatabaseReset, database
+	self.callbacks:Fire("OnDatabaseReset", self)
+	-- Callback: OnProfileChanged, database, profileKey
+	self.callbacks:Fire("OnProfileChanged", self, self.keys["profile"])
+
+	return self
+end
+
+--- Creates a new database namespace, directly tied to the database.  This
+-- is a full scale database in it's own rights other than the fact that
+-- it cannot control its profile individually
+-- @param name The name of the new namespace
+-- @param defaults A table of values to use as defaults
+function DBObjectLib:RegisterNamespace(name, defaults)
+	if type(name) ~= "string" then
+		error("Usage: AceDBObject:RegisterNamespace(name, defaults): 'name' - string expected.", 2)
+	end
+	if defaults and type(defaults) ~= "table" then
+		error("Usage: AceDBObject:RegisterNamespace(name, defaults): 'defaults' - table or nil expected.", 2)
+	end
+	if self.children and self.children[name] then
+		error ("Usage: AceDBObject:RegisterNamespace(name, defaults): 'name' - a namespace with that name already exists.", 2)
+	end
+
+	local sv = self.sv
+	if not sv.namespaces then sv.namespaces = {} end
+	if not sv.namespaces[name] then
+		sv.namespaces[name] = {}
+	end
+
+	local newDB = initdb(sv.namespaces[name], defaults, self.keys.profile, nil, self)
+
+	if not self.children then self.children = {} end
+	self.children[name] = newDB
+	return newDB
+end
+
+--- Returns an already existing namespace from the database object.
+-- @param name The name of the new namespace
+-- @param silent if true, the addon is optional, silently return nil if its not found
+-- @usage
+-- local namespace = self.db:GetNamespace('namespace')
+-- @return the namespace object if found
+function DBObjectLib:GetNamespace(name, silent)
+	if type(name) ~= "string" then
+		error("Usage: AceDBObject:GetNamespace(name): 'name' - string expected.", 2)
+	end
+	if not silent and not (self.children and self.children[name]) then
+		error ("Usage: AceDBObject:GetNamespace(name): 'name' - namespace does not exist.", 2)
+	end
+	if not self.children then self.children = {} end
+	return self.children[name]
+end
+
+--[[-------------------------------------------------------------------------
+	AceDB Exposed Methods
+---------------------------------------------------------------------------]]
+
+--- Creates a new database object that can be used to handle database settings and profiles.
+-- By default, an empty DB is created, using a character specific profile.
+--
+-- You can override the default profile used by passing any profile name as the third argument,
+-- or by passing //true// as the third argument to use a globally shared profile called "Default".
+--
+-- Note that there is no token replacement in the default profile name, passing a defaultProfile as "char"
+-- will use a profile named "char", and not a character-specific profile.
+-- @param tbl The name of variable, or table to use for the database
+-- @param defaults A table of database defaults
+-- @param defaultProfile The name of the default profile. If not set, a character specific profile will be used as the default.
+-- You can also pass //true// to use a shared global profile called "Default".
+-- @usage
+-- -- Create an empty DB using a character-specific default profile.
+-- self.db = LibStub("AceDB-3.0"):New("MyAddonDB")
+-- @usage
+-- -- Create a DB using defaults and using a shared default profile
+-- self.db = LibStub("AceDB-3.0"):New("MyAddonDB", defaults, true)
+function AceDB:New(tbl, defaults, defaultProfile)
+	if type(tbl) == "string" then
+		local name = tbl
+		tbl = _G[name]
+		if not tbl then
+			tbl = {}
+			_G[name] = tbl
+		end
+	end
+
+	if type(tbl) ~= "table" then
+		error("Usage: AceDB:New(tbl, defaults, defaultProfile): 'tbl' - table expected.", 2)
+	end
+
+	if defaults and type(defaults) ~= "table" then
+		error("Usage: AceDB:New(tbl, defaults, defaultProfile): 'defaults' - table expected.", 2)
+	end
+
+	if defaultProfile and type(defaultProfile) ~= "string" and defaultProfile ~= true then
+		error("Usage: AceDB:New(tbl, defaults, defaultProfile): 'defaultProfile' - string or true expected.", 2)
+	end
+
+	return initdb(tbl, defaults, defaultProfile)
+end
+
+-- upgrade existing databases
+for db in pairs(AceDB.db_registry) do
+	if not db.parent then
+		for name,func in pairs(DBObjectLib) do
+			db[name] = func
+		end
+	else
+		db.RegisterDefaults = DBObjectLib.RegisterDefaults
+		db.ResetProfile = DBObjectLib.ResetProfile
+	end
+end
diff --git a/EMA/Libs/AceDB-3.0/AceDB-3.0.xml b/EMA/Libs/AceDB-3.0/AceDB-3.0.xml
new file mode 100644
index 0000000..108fc70
--- /dev/null
+++ b/EMA/Libs/AceDB-3.0/AceDB-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceDB-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua b/EMA/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
new file mode 100644
index 0000000..5028fef
--- /dev/null
+++ b/EMA/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
@@ -0,0 +1,460 @@
+--- AceDBOptions-3.0 provides a universal AceConfig options screen for managing AceDB-3.0 profiles.
+-- @class file
+-- @name AceDBOptions-3.0
+-- @release $Id: AceDBOptions-3.0.lua 1140 2016-07-03 07:53:29Z nevcairiel $
+local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 15
+local AceDBOptions, oldminor = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
+
+if not AceDBOptions then return end -- No upgrade needed
+
+-- Lua APIs
+local pairs, next = pairs, next
+
+-- WoW APIs
+local UnitClass = UnitClass
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: NORMAL_FONT_COLOR_CODE, FONT_COLOR_CODE_CLOSE
+
+AceDBOptions.optionTables = AceDBOptions.optionTables or {}
+AceDBOptions.handlers = AceDBOptions.handlers or {}
+
+--[[
+	Localization of AceDBOptions-3.0
+]]
+
+local L = {
+	choose = "Existing Profiles",
+	choose_desc = "You can either create a new profile by entering a name in the editbox, or choose one of the already existing profiles.",
+	choose_sub = "Select one of your currently available profiles.",
+	copy = "Copy From",
+	copy_desc = "Copy the settings from one existing profile into the currently active profile.",
+	current = "Current Profile:",
+	default = "Default",
+	delete = "Delete a Profile",
+	delete_confirm = "Are you sure you want to delete the selected profile?",
+	delete_desc = "Delete existing and unused profiles from the database to save space, and cleanup the SavedVariables file.",
+	delete_sub = "Deletes a profile from the database.",
+	intro = "You can change the active database profile, so you can have different settings for every character.",
+	new = "New",
+	new_sub = "Create a new empty profile.",
+	profiles = "Profiles",
+	profiles_sub = "Manage Profiles",
+	reset = "Reset Profile",
+	reset_desc = "Reset the current profile back to its default values, in case your configuration is broken, or you simply want to start over.",
+	reset_sub = "Reset the current profile to the default",
+}
+
+local LOCALE = GetLocale()
+if LOCALE == "deDE" then
+	L["choose"] = "Vorhandene Profile"
+	L["choose_desc"] = "Du kannst ein neues Profil erstellen, indem du einen neuen Namen in der Eingabebox 'Neu' eingibst, oder wähle eines der vorhandenen Profile aus."
+	L["choose_sub"] = "Wählt ein bereits vorhandenes Profil aus."
+	L["copy"] = "Kopieren von..."
+	L["copy_desc"] = "Kopiere die Einstellungen von einem vorhandenen Profil in das aktive Profil."
+	L["current"] = "Aktuelles Profil:"
+	L["default"] = "Standard"
+	L["delete"] = "Profil löschen"
+	L["delete_confirm"] = "Willst du das ausgewählte Profil wirklich löschen?"
+	L["delete_desc"] = "Lösche vorhandene oder unbenutzte Profile aus der Datenbank, um Platz zu sparen und die SavedVariables-Datei 'sauber' zu halten."
+	L["delete_sub"] = "Löscht ein Profil aus der Datenbank."
+	L["intro"] = "Hier kannst du das aktive Datenbankprofil ändern, damit du verschiedene Einstellungen für jeden Charakter erstellen kannst, wodurch eine sehr flexible Konfiguration möglich wird."
+	L["new"] = "Neu"
+	L["new_sub"] = "Ein neues Profil erstellen."
+	L["profiles"] = "Profile"
+	L["profiles_sub"] = "Profile verwalten"
+	L["reset"] = "Profil zurücksetzen"
+	L["reset_desc"] = "Setzt das momentane Profil auf Standardwerte zurück, für den Fall, dass mit der Konfiguration etwas schief lief oder weil du einfach neu starten willst."
+	L["reset_sub"] = "Das aktuelle Profil auf Standard zurücksetzen."
+elseif LOCALE == "frFR" then
+	L["choose"] = "Profils existants"
+	L["choose_desc"] = "Vous pouvez créer un nouveau profil en entrant un nouveau nom dans la boîte de saisie, ou en choississant un des profils déjà existants."
+	L["choose_sub"] = "Permet de choisir un des profils déjà disponibles."
+	L["copy"] = "Copier à partir de"
+	L["copy_desc"] = "Copie les paramètres d'un profil déjà existant dans le profil actuellement actif."
+	L["current"] = "Profil actuel :"
+	L["default"] = "Défaut"
+	L["delete"] = "Supprimer un profil"
+	L["delete_confirm"] = "Etes-vous sûr de vouloir supprimer le profil sélectionné ?"
+	L["delete_desc"] = "Supprime les profils existants inutilisés de la base de données afin de gagner de la place et de nettoyer le fichier SavedVariables."
+	L["delete_sub"] = "Supprime un profil de la base de données."
+	L["intro"] = "Vous pouvez changer le profil actuel afin d'avoir des paramètres différents pour chaque personnage, permettant ainsi d'avoir une configuration très flexible."
+	L["new"] = "Nouveau"
+	L["new_sub"] = "Créée un nouveau profil vierge."
+	L["profiles"] = "Profils"
+	L["profiles_sub"] = "Gestion des profils"
+	L["reset"] = "Réinitialiser le profil"
+	L["reset_desc"] = "Réinitialise le profil actuel au cas où votre configuration est corrompue ou si vous voulez tout simplement faire table rase."
+	L["reset_sub"] = "Réinitialise le profil actuel avec les paramètres par défaut."
+elseif LOCALE == "koKR" then
+	L["choose"] = "저장 중인 프로필"
+	L["choose_desc"] = "입력창에 새로운 이름을 입력하거나 저장 중인 프로필 중 하나를 선택하여 새로운 프로필을 만들 수 있습니다."
+	L["choose_sub"] = "현재 이용할 수 있는 프로필 중 하나를 선택합니다."
+	L["copy"] = "복사해오기"
+	L["copy_desc"] = "현재 사용 중인 프로필에 선택한 프로필의 설정을 복사합니다."
+	L["current"] = "현재 프로필:"
+	L["default"] = "기본값"
+	L["delete"] = "프로필 삭제"
+	L["delete_confirm"] = "정말로 선택한 프로필을 삭제할까요?"
+	L["delete_desc"] = "저장 공간 절약과 SavedVariables 파일의 정리를 위해 데이터베이스에서 사용하지 않는 프로필을 삭제하세요."
+	L["delete_sub"] = "데이터베이스의 프로필을 삭제합니다."
+	L["intro"] = "활성 데이터베이스 프로필을 변경할 수 있고, 각 캐릭터 별로 다른 설정을 할 수 있습니다."
+	L["new"] = "새로운 프로필"
+	L["new_sub"] = "새로운 프로필을 만듭니다."
+	L["profiles"] = "프로필"
+	L["profiles_sub"] = "프로필 관리"
+	L["reset"] = "프로필 초기화"
+	L["reset_desc"] = "설정이 깨졌거나 처음부터 다시 설정을 원하는 경우, 현재 프로필을 기본값으로 초기화하세요."
+	L["reset_sub"] = "현재 프로필을 기본값으로 초기화합니다"
+elseif LOCALE == "esES" or LOCALE == "esMX" then
+	L["choose"] = "Perfiles existentes"
+	L["choose_desc"] = "Puedes crear un nuevo perfil introduciendo un nombre en el recuadro o puedes seleccionar un perfil de los ya existentes."
+	L["choose_sub"] = "Selecciona uno de los perfiles disponibles."
+	L["copy"] = "Copiar de"
+	L["copy_desc"] = "Copia los ajustes de un perfil existente al perfil actual."
+	L["current"] = "Perfil actual:"
+	L["default"] = "Por defecto"
+	L["delete"] = "Borrar un Perfil"
+	L["delete_confirm"] = "¿Estas seguro que quieres borrar el perfil seleccionado?"
+	L["delete_desc"] = "Borra los perfiles existentes y sin uso de la base de datos para ganar espacio y limpiar el archivo SavedVariables."
+	L["delete_sub"] = "Borra un perfil de la base de datos."
+	L["intro"] = "Puedes cambiar el perfil activo de tal manera que cada personaje tenga diferentes configuraciones."
+	L["new"] = "Nuevo"
+	L["new_sub"] = "Crear un nuevo perfil vacio."
+	L["profiles"] = "Perfiles"
+	L["profiles_sub"] = "Manejar Perfiles"
+	L["reset"] = "Reiniciar Perfil"
+	L["reset_desc"] = "Reinicia el perfil actual a los valores por defectos, en caso de que se haya estropeado la configuración o quieras volver a empezar de nuevo."
+	L["reset_sub"] = "Reinicar el perfil actual al de por defecto"
+elseif LOCALE == "zhTW" then
+	L["choose"] = "現有的設定檔"
+	L["choose_desc"] = "您可以在文字方塊內輸入名字以建立新的設定檔,或是選擇一個現有的設定檔使用。"
+	L["choose_sub"] = "從當前可用的設定檔裡面選擇一個。"
+	L["copy"] = "複製自"
+	L["copy_desc"] = "從一個現有的設定檔,將設定複製到現在使用中的設定檔。"
+	L["current"] = "目前設定檔:"
+	L["default"] = "預設"
+	L["delete"] = "刪除一個設定檔"
+	L["delete_confirm"] = "確定要刪除所選擇的設定檔嗎?"
+	L["delete_desc"] = "從資料庫裡刪除不再使用的設定檔,以節省空間,並且清理 SavedVariables 檔案。"
+	L["delete_sub"] = "從資料庫裡刪除一個設定檔。"
+	L["intro"] = "您可以從資料庫中選擇一個設定檔來使用,如此就可以讓每個角色使用不同的設定。"
+	L["new"] = "新建"
+	L["new_sub"] = "新建一個空的設定檔。"
+	L["profiles"] = "設定檔"
+	L["profiles_sub"] = "管理設定檔"
+	L["reset"] = "重置設定檔"
+	L["reset_desc"] = "將現用的設定檔重置為預設值;用於設定檔損壞,或者單純想要重來的情況。"
+	L["reset_sub"] = "將目前的設定檔重置為預設值"
+elseif LOCALE == "zhCN" then
+	L["choose"] = "现有的配置文件"
+	L["choose_desc"] = "你可以通过在文本框内输入一个名字创立一个新的配置文件,也可以选择一个已经存在的配置文件。"
+	L["choose_sub"] = "从当前可用的配置文件里面选择一个。"
+	L["copy"] = "复制自"
+	L["copy_desc"] = "从当前某个已保存的配置文件复制到当前正使用的配置文件。"
+	L["current"] = "当前配置文件:"
+	L["default"] = "默认"
+	L["delete"] = "删除一个配置文件"
+	L["delete_confirm"] = "你确定要删除所选择的配置文件么?"
+	L["delete_desc"] = "从数据库里删除不再使用的配置文件,以节省空间,并且清理SavedVariables文件。"
+	L["delete_sub"] = "从数据库里删除一个配置文件。"
+	L["intro"] = "你可以选择一个活动的数据配置文件,这样你的每个角色就可以拥有不同的设置值,可以给你的插件配置带来极大的灵活性。"
+	L["new"] = "新建"
+	L["new_sub"] = "新建一个空的配置文件。"
+	L["profiles"] = "配置文件"
+	L["profiles_sub"] = "管理配置文件"
+	L["reset"] = "重置配置文件"
+	L["reset_desc"] = "将当前的配置文件恢复到它的默认值,用于你的配置文件损坏,或者你只是想重来的情况。"
+	L["reset_sub"] = "将当前的配置文件恢复为默认值"
+elseif LOCALE == "ruRU" then
+	L["choose"] = "Существующие профили"
+	L["choose_desc"] = "Вы можете создать новый профиль, введя название в поле ввода, или выбрать один из уже существующих профилей."
+	L["choose_sub"] = "Выбор одиного из уже доступных профилей"
+	L["copy"] = "Скопировать из"
+	L["copy_desc"] = "Скопировать настройки из выбранного профиля в активный."
+	L["current"] = "Текущий профиль:"
+	L["default"] = "По умолчанию"
+	L["delete"] = "Удалить профиль"
+	L["delete_confirm"] = "Вы уверены, что вы хотите удалить выбранный профиль?"
+	L["delete_desc"] = "Удалить существующий и неиспользуемый профиль из БД для сохранения места, и очистить SavedVariables файл."
+	L["delete_sub"] = "Удаление профиля из БД"
+	L["intro"] = "Изменяя активный профиль, вы можете задать различные настройки модификаций для каждого персонажа."
+	L["new"] = "Новый"
+	L["new_sub"] = "Создать новый чистый профиль"
+	L["profiles"] = "Профили"
+	L["profiles_sub"] = "Управление профилями"
+	L["reset"] = "Сброс профиля"
+	L["reset_desc"] = "Сбросить текущий профиль к стандартным настройкам, если ваша конфигурация испорчена или вы хотите настроить всё заново."
+	L["reset_sub"] = "Сброс текущего профиля на стандартный"
+elseif LOCALE == "itIT" then
+	L["choose"] = "Profili Esistenti"
+	L["choose_desc"] = "Puoi creare un nuovo profilo digitando il nome della casella di testo, oppure scegliendone uno tra i profili già esistenti."
+	L["choose_sub"] = "Seleziona uno dei profili attualmente disponibili."
+	L["copy"] = "Copia Da"
+	L["copy_desc"] = "Copia le impostazioni da un profilo esistente, nel profilo attivo in questo momento."
+	L["current"] = "Profilo Attivo:"
+	L["default"] = "Standard"
+	L["delete"] = "Cancella un Profilo"
+	L["delete_confirm"] = "Sei sicuro di voler cancellare il profilo selezionato?"
+	L["delete_desc"] = "Cancella i profili non utilizzati dal database per risparmiare spazio e mantenere puliti i file di configurazione SavedVariables."
+	L["delete_sub"] = "Cancella un profilo dal Database."
+	L["intro"] = "Puoi cambiare il profilo attivo, in modo da usare impostazioni diverse per ogni personaggio."
+	L["new"] = "Nuovo"
+	L["new_sub"] = "Crea un nuovo profilo vuoto."
+	L["profiles"] = "Profili"
+	L["profiles_sub"] = "Gestisci Profili"
+	L["reset"] = "Reimposta Profilo"
+	L["reset_desc"] = "Riporta il tuo profilo attivo alle sue impostazioni predefinite, nel caso in cui la tua configurazione si sia corrotta, o semplicemente tu voglia re-inizializzarla."
+	L["reset_sub"] = "Reimposta il profilo ai suoi valori predefiniti."
+elseif LOCALE == "ptBR" then
+	L["choose"] = "Perfis Existentes"
+	L["choose_desc"] = "Você pode tanto criar um perfil novo tanto digitando um nome na caixa de texto, quanto escolher um dos perfis já existentes."
+	L["choose_sub"] = "Selecione um de seus perfis atualmente disponíveis."
+	L["copy"] = "Copiar De"
+	L["copy_desc"] = "Copia as definições de um perfil existente no perfil atualmente ativo."
+	L["current"] = "Perfil Autal:"
+	L["default"] = "Padrão"
+	L["delete"] = "Remover um Perfil"
+	L["delete_confirm"] = "Tem certeza que deseja remover o perfil selecionado?"
+	L["delete_desc"] = "Remove perfis existentes e inutilizados do banco de dados para economizar espaço, e limpar o arquivo SavedVariables."
+	L["delete_sub"] = "Remove um perfil do banco de dados."
+	L["intro"] = "Você pode alterar o perfil do banco de dados ativo, para que possa ter definições diferentes para cada personagem."
+	L["new"] = "Novo"
+	L["new_sub"] = "Cria um novo perfil vazio."
+	L["profiles"] = "Perfis"
+	L["profiles_sub"] = "Gerenciar Perfis"
+	L["reset"] = "Resetar Perfil"
+	L["reset_desc"] = "Reseta o perfil atual para os valores padrões, no caso de sua configuração estar quebrada, ou simplesmente se deseja começar novamente."
+	L["reset_sub"] = "Resetar o perfil atual ao padrão"
+end
+
+local defaultProfiles
+local tmpprofiles = {}
+
+-- Get a list of available profiles for the specified database.
+-- You can specify which profiles to include/exclude in the list using the two boolean parameters listed below.
+-- @param db The db object to retrieve the profiles from
+-- @param common If true, getProfileList will add the default profiles to the return list, even if they have not been created yet
+-- @param nocurrent If true, then getProfileList will not display the current profile in the list
+-- @return Hashtable of all profiles with the internal name as keys and the display name as value.
+local function getProfileList(db, common, nocurrent)
+	local profiles = {}
+
+	-- copy existing profiles into the table
+	local currentProfile = db:GetCurrentProfile()
+	for i,v in pairs(db:GetProfiles(tmpprofiles)) do
+		if not (nocurrent and v == currentProfile) then
+			profiles[v] = v
+		end
+	end
+
+	-- add our default profiles to choose from ( or rename existing profiles)
+	for k,v in pairs(defaultProfiles) do
+		if (common or profiles[k]) and not (nocurrent and k == currentProfile) then
+			profiles[k] = v
+		end
+	end
+
+	return profiles
+end
+
+--[[
+	OptionsHandlerPrototype
+	prototype class for handling the options in a sane way
+]]
+local OptionsHandlerPrototype = {}
+
+--[[ Reset the profile ]]
+function OptionsHandlerPrototype:Reset()
+	self.db:ResetProfile()
+end
+
+--[[ Set the profile to value ]]
+function OptionsHandlerPrototype:SetProfile(info, value)
+	self.db:SetProfile(value)
+end
+
+--[[ returns the currently active profile ]]
+function OptionsHandlerPrototype:GetCurrentProfile()
+	return self.db:GetCurrentProfile()
+end
+
+--[[
+	List all active profiles
+	you can control the output with the .arg variable
+	currently four modes are supported
+
+	(empty) - return all available profiles
+	"nocurrent" - returns all available profiles except the currently active profile
+	"common" - returns all avaialble profiles + some commonly used profiles ("char - realm", "realm", "class", "Default")
+	"both" - common except the active profile
+]]
+function OptionsHandlerPrototype:ListProfiles(info)
+	local arg = info.arg
+	local profiles
+	if arg == "common" and not self.noDefaultProfiles then
+		profiles = getProfileList(self.db, true, nil)
+	elseif arg == "nocurrent" then
+		profiles = getProfileList(self.db, nil, true)
+	elseif arg == "both" then -- currently not used
+		profiles = getProfileList(self.db, (not self.noDefaultProfiles) and true, true)
+	else
+		profiles = getProfileList(self.db)
+	end
+
+	return profiles
+end
+
+function OptionsHandlerPrototype:HasNoProfiles(info)
+	local profiles = self:ListProfiles(info)
+	return ((not next(profiles)) and true or false)
+end
+
+--[[ Copy a profile ]]
+function OptionsHandlerPrototype:CopyProfile(info, value)
+	self.db:CopyProfile(value)
+end
+
+--[[ Delete a profile from the db ]]
+function OptionsHandlerPrototype:DeleteProfile(info, value)
+	self.db:DeleteProfile(value)
+end
+
+--[[ fill defaultProfiles with some generic values ]]
+local function generateDefaultProfiles(db)
+	defaultProfiles = {
+		["Default"] = L["default"],
+		[db.keys.char] = db.keys.char,
+		[db.keys.realm] = db.keys.realm,
+		[db.keys.class] = UnitClass("player")
+	}
+end
+
+--[[ create and return a handler object for the db, or upgrade it if it already existed ]]
+local function getOptionsHandler(db, noDefaultProfiles)
+	if not defaultProfiles then
+		generateDefaultProfiles(db)
+	end
+
+	local handler = AceDBOptions.handlers[db] or { db = db, noDefaultProfiles = noDefaultProfiles }
+
+	for k,v in pairs(OptionsHandlerPrototype) do
+		handler[k] = v
+	end
+
+	AceDBOptions.handlers[db] = handler
+	return handler
+end
+
+--[[
+	the real options table
+]]
+local optionsTable = {
+	desc = {
+		order = 1,
+		type = "description",
+		name = L["intro"] .. "\n",
+	},
+	descreset = {
+		order = 9,
+		type = "description",
+		name = L["reset_desc"],
+	},
+	reset = {
+		order = 10,
+		type = "execute",
+		name = L["reset"],
+		desc = L["reset_sub"],
+		func = "Reset",
+	},
+	current = {
+		order = 11,
+		type = "description",
+		name = function(info) return L["current"] .. " " .. NORMAL_FONT_COLOR_CODE .. info.handler:GetCurrentProfile() .. FONT_COLOR_CODE_CLOSE end,
+		width = "default",
+	},
+	choosedesc = {
+		order = 20,
+		type = "description",
+		name = "\n" .. L["choose_desc"],
+	},
+	new = {
+		name = L["new"],
+		desc = L["new_sub"],
+		type = "input",
+		order = 30,
+		get = false,
+		set = "SetProfile",
+	},
+	choose = {
+		name = L["choose"],
+		desc = L["choose_sub"],
+		type = "select",
+		order = 40,
+		get = "GetCurrentProfile",
+		set = "SetProfile",
+		values = "ListProfiles",
+		arg = "common",
+	},
+	copydesc = {
+		order = 50,
+		type = "description",
+		name = "\n" .. L["copy_desc"],
+	},
+	copyfrom = {
+		order = 60,
+		type = "select",
+		name = L["copy"],
+		desc = L["copy_desc"],
+		get = false,
+		set = "CopyProfile",
+		values = "ListProfiles",
+		disabled = "HasNoProfiles",
+		arg = "nocurrent",
+	},
+	deldesc = {
+		order = 70,
+		type = "description",
+		name = "\n" .. L["delete_desc"],
+	},
+	delete = {
+		order = 80,
+		type = "select",
+		name = L["delete"],
+		desc = L["delete_sub"],
+		get = false,
+		set = "DeleteProfile",
+		values = "ListProfiles",
+		disabled = "HasNoProfiles",
+		arg = "nocurrent",
+		confirm = true,
+		confirmText = L["delete_confirm"],
+	},
+}
+
+--- Get/Create a option table that you can use in your addon to control the profiles of AceDB-3.0.
+-- @param db The database object to create the options table for.
+-- @return The options table to be used in AceConfig-3.0
+-- @usage
+-- -- Assuming `options` is your top-level options table and `self.db` is your database:
+-- options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
+function AceDBOptions:GetOptionsTable(db, noDefaultProfiles)
+	local tbl = AceDBOptions.optionTables[db] or {
+			type = "group",
+			name = L["profiles"],
+			desc = L["profiles_sub"],
+		}
+
+	tbl.handler = getOptionsHandler(db, noDefaultProfiles)
+	tbl.args = optionsTable
+
+	AceDBOptions.optionTables[db] = tbl
+	return tbl
+end
+
+-- upgrade existing tables
+for db,tbl in pairs(AceDBOptions.optionTables) do
+	tbl.handler = getOptionsHandler(db)
+	tbl.args = optionsTable
+end
diff --git a/EMA/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml b/EMA/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml
new file mode 100644
index 0000000..51305f9
--- /dev/null
+++ b/EMA/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceDBOptions-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceEvent-3.0/AceEvent-3.0.lua b/EMA/Libs/AceEvent-3.0/AceEvent-3.0.lua
new file mode 100644
index 0000000..bbf55c2
--- /dev/null
+++ b/EMA/Libs/AceEvent-3.0/AceEvent-3.0.lua
@@ -0,0 +1,126 @@
+--- AceEvent-3.0 provides event registration and secure dispatching.
+-- All dispatching is done using **CallbackHandler-1.0**. AceEvent is a simple wrapper around
+-- CallbackHandler, and dispatches all game events or addon message to the registrees.
+--
+-- **AceEvent-3.0** can be embeded into your addon, either explicitly by calling AceEvent:Embed(MyAddon) or by
+-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
+-- and can be accessed directly, without having to explicitly call AceEvent itself.\\
+-- It is recommended to embed AceEvent, otherwise you'll have to specify a custom `self` on all calls you
+-- make into AceEvent.
+-- @class file
+-- @name AceEvent-3.0
+-- @release $Id: AceEvent-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
+local CallbackHandler = LibStub("CallbackHandler-1.0")
+
+local MAJOR, MINOR = "AceEvent-3.0", 4
+local AceEvent = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceEvent then return end
+
+-- Lua APIs
+local pairs = pairs
+
+AceEvent.frame = AceEvent.frame or CreateFrame("Frame", "AceEvent30Frame") -- our event frame
+AceEvent.embeds = AceEvent.embeds or {} -- what objects embed this lib
+
+-- APIs and registry for blizzard events, using CallbackHandler lib
+if not AceEvent.events then
+	AceEvent.events = CallbackHandler:New(AceEvent,
+		"RegisterEvent", "UnregisterEvent", "UnregisterAllEvents")
+end
+
+function AceEvent.events:OnUsed(target, eventname)
+	AceEvent.frame:RegisterEvent(eventname)
+end
+
+function AceEvent.events:OnUnused(target, eventname)
+	AceEvent.frame:UnregisterEvent(eventname)
+end
+
+
+-- APIs and registry for IPC messages, using CallbackHandler lib
+if not AceEvent.messages then
+	AceEvent.messages = CallbackHandler:New(AceEvent,
+		"RegisterMessage", "UnregisterMessage", "UnregisterAllMessages"
+	)
+	AceEvent.SendMessage = AceEvent.messages.Fire
+end
+
+--- embedding and embed handling
+local mixins = {
+	"RegisterEvent", "UnregisterEvent",
+	"RegisterMessage", "UnregisterMessage",
+	"SendMessage",
+	"UnregisterAllEvents", "UnregisterAllMessages",
+}
+
+--- Register for a Blizzard Event.
+-- The callback will be called with the optional `arg` as the first argument (if supplied), and the event name as the second (or first, if no arg was supplied)
+-- Any arguments to the event will be passed on after that.
+-- @name AceEvent:RegisterEvent
+-- @class function
+-- @paramsig event[, callback [, arg]]
+-- @param event The event to register for
+-- @param callback The callback function to call when the event is triggered (funcref or method, defaults to a method with the event name)
+-- @param arg An optional argument to pass to the callback function
+
+--- Unregister an event.
+-- @name AceEvent:UnregisterEvent
+-- @class function
+-- @paramsig event
+-- @param event The event to unregister
+
+--- Register for a custom AceEvent-internal message.
+-- The callback will be called with the optional `arg` as the first argument (if supplied), and the event name as the second (or first, if no arg was supplied)
+-- Any arguments to the event will be passed on after that.
+-- @name AceEvent:RegisterMessage
+-- @class function
+-- @paramsig message[, callback [, arg]]
+-- @param message The message to register for
+-- @param callback The callback function to call when the message is triggered (funcref or method, defaults to a method with the event name)
+-- @param arg An optional argument to pass to the callback function
+
+--- Unregister a message
+-- @name AceEvent:UnregisterMessage
+-- @class function
+-- @paramsig message
+-- @param message The message to unregister
+
+--- Send a message over the AceEvent-3.0 internal message system to other addons registered for this message.
+-- @name AceEvent:SendMessage
+-- @class function
+-- @paramsig message, ...
+-- @param message The message to send
+-- @param ... Any arguments to the message
+
+
+-- Embeds AceEvent into the target object making the functions from the mixins list available on target:..
+-- @param target target object to embed AceEvent in
+function AceEvent:Embed(target)
+	for k, v in pairs(mixins) do
+		target[v] = self[v]
+	end
+	self.embeds[target] = true
+	return target
+end
+
+-- AceEvent:OnEmbedDisable( target )
+-- target (object) - target object that is being disabled
+--
+-- Unregister all events messages etc when the target disables.
+-- this method should be called by the target manually or by an addon framework
+function AceEvent:OnEmbedDisable(target)
+	target:UnregisterAllEvents()
+	target:UnregisterAllMessages()
+end
+
+-- Script to fire blizzard events into the event listeners
+local events = AceEvent.events
+AceEvent.frame:SetScript("OnEvent", function(this, event, ...)
+	events:Fire(event, ...)
+end)
+
+--- Finally: upgrade our old embeds
+for target, v in pairs(AceEvent.embeds) do
+	AceEvent:Embed(target)
+end
diff --git a/EMA/Libs/AceEvent-3.0/AceEvent-3.0.xml b/EMA/Libs/AceEvent-3.0/AceEvent-3.0.xml
new file mode 100644
index 0000000..41ef791
--- /dev/null
+++ b/EMA/Libs/AceEvent-3.0/AceEvent-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceEvent-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc
new file mode 100644
index 0000000..3644493
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc
@@ -0,0 +1,19 @@
+## Interface: 60200
+## X-Curse-Packaged-Version: r53
+## X-Curse-Project-Name: AceGUI-3.0-SharedMediaWidgets
+## X-Curse-Project-ID: ace-gui-3-0-shared-media-widgets
+## X-Curse-Repository-ID: wow/ace-gui-3-0-shared-media-widgets/mainline
+
+## Title: Lib: AceGUI-3.0-SharedMediaWidgets
+## Notes: Enables AceGUI-3.0 widgets for the 5 basic SharedMedia-3.0 types
+## Author: Yssaril
+## OptionalDeps: Ace3, LibSharedMedia-3.0, Libstub, CallbackHandler-1.0
+## X-Category: Library
+
+#@no-lib-strip@
+# Libs\Libstub\Libstub.lua
+# Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
+# Libs\AceGUI-3.0\AceGUI-3.0.xml
+#@end-no-lib-strip@
+
+widget.xml
\ No newline at end of file
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
new file mode 100644
index 0000000..0b75952
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
@@ -0,0 +1,235 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+	local widgetType = "LSM30_Background"
+	local widgetVersion = 11
+
+	local contentFrameCache = {}
+	local function ReturnSelf(self)
+		self:ClearAllPoints()
+		self:Hide()
+		self.check:Hide()
+		table.insert(contentFrameCache, self)
+	end
+
+	local function ContentOnClick(this, button)
+		local self = this.obj
+		self:Fire("OnValueChanged", this.text:GetText())
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function ContentOnEnter(this, button)
+		local self = this.obj
+		local text = this.text:GetText()
+		local background = self.list[text] ~= text and self.list[text] or Media:Fetch('background',text)
+		self.dropdown.bgTex:SetTexture(background)
+	end
+
+	local function GetContentLine()
+		local frame
+		if next(contentFrameCache) then
+			frame = table.remove(contentFrameCache)
+		else
+			frame = CreateFrame("Button", nil, UIParent)
+				--frame:SetWidth(200)
+				frame:SetHeight(18)
+				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+				frame:SetScript("OnClick", ContentOnClick)
+				frame:SetScript("OnEnter", ContentOnEnter)
+
+			local check = frame:CreateTexture("OVERLAY")
+				check:SetWidth(16)
+				check:SetHeight(16)
+				check:SetPoint("LEFT",frame,"LEFT",1,-1)
+				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+				check:Hide()
+			frame.check = check
+
+			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+				local font, size = text:GetFont()
+				text:SetFont(font,size,"OUTLINE")
+
+				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
+				text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
+				text:SetJustifyH("LEFT")
+				text:SetText("Test Test Test Test Test Test Test")
+			frame.text = text
+
+			frame.ReturnSelf = ReturnSelf
+		end
+		frame:Show()
+		return frame
+	end
+
+	local function OnAcquire(self)
+		self:SetHeight(44)
+		self:SetWidth(200)
+	end
+
+	local function OnRelease(self)
+		self:SetText("")
+		self:SetLabel("")
+		self:SetDisabled(false)
+
+		self.value = nil
+		self.list = nil
+		self.open = nil
+		self.hasClose = nil
+
+		self.frame:ClearAllPoints()
+		self.frame:Hide()
+	end
+
+	local function SetValue(self, value) -- Set the value to an item in the List.
+		if self.list then
+			self:SetText(value or "")
+		end
+		self.value = value
+	end
+
+	local function GetValue(self)
+		return self.value
+	end
+
+	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+		self.list = list or Media:HashTable("background")
+	end
+
+
+	local function SetText(self, text) -- Set the text displayed in the box.
+		self.frame.text:SetText(text or "")
+		local background = self.list[text] ~= text and self.list[text] or Media:Fetch('background',text)
+
+		self.frame.displayButton:SetBackdrop({bgFile = background,
+			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
+			edgeSize = 16,
+			insets = { left = 4, right = 4, top = 4, bottom = 4 }})
+	end
+
+	local function SetLabel(self, text) -- Set the text for the label.
+		self.frame.label:SetText(text or "")
+	end
+
+	local function AddItem(self, key, value) -- Add an item to the list.
+		self.list = self.list or {}
+		self.list[key] = value
+	end
+	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
+
+	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
+	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
+	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
+
+	local function SetDisabled(self, disabled) -- Disable the widget.
+		self.disabled = disabled
+		if disabled then
+			self.frame:Disable()
+			self.frame.displayButton:SetBackdropColor(.2,.2,.2,1)
+		else
+			self.frame:Enable()
+			self.frame.displayButton:SetBackdropColor(1,1,1,1)
+		end
+	end
+
+	local function textSort(a,b)
+		return string.upper(a) < string.upper(b)
+	end
+
+	local sortedlist = {}
+	local function ToggleDrop(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+			AceGUI:ClearFocus()
+		else
+			AceGUI:SetFocus(self)
+			self.dropdown = AGSMW:GetDropDownFrame()
+			local width = self.frame:GetWidth()
+			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+			for k, v in pairs(self.list) do
+				sortedlist[#sortedlist+1] = k
+			end
+			table.sort(sortedlist, textSort)
+			for i, k in ipairs(sortedlist) do
+				local f = GetContentLine()
+				f.text:SetText(k)
+				--print(k)
+				if k == self.value then
+					f.check:Show()
+				end
+				f.obj = self
+				f.dropdown = self.dropdown
+				self.dropdown:AddFrame(f)
+			end
+			wipe(sortedlist)
+		end
+	end
+
+	local function ClearFocus(self)
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function OnHide(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function Drop_OnEnter(this)
+		this.obj:Fire("OnEnter")
+	end
+
+	local function Drop_OnLeave(this)
+		this.obj:Fire("OnLeave")
+	end
+
+	local function Constructor()
+		local frame = AGSMW:GetBaseFrameWithWindow()
+		local self = {}
+
+		self.type = widgetType
+		self.frame = frame
+		frame.obj = self
+		frame.dropButton.obj = self
+		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+		frame.dropButton:SetScript("OnClick",ToggleDrop)
+		frame:SetScript("OnHide", OnHide)
+
+		self.alignoffset = 31
+
+		self.OnRelease = OnRelease
+		self.OnAcquire = OnAcquire
+		self.ClearFocus = ClearFocus
+		self.SetText = SetText
+		self.SetValue = SetValue
+		self.GetValue = GetValue
+		self.SetList = SetList
+		self.SetLabel = SetLabel
+		self.SetDisabled = SetDisabled
+		self.AddItem = AddItem
+		self.SetMultiselect = SetMultiselect
+		self.GetMultiselect = GetMultiselect
+		self.SetItemValue = SetItemValue
+		self.SetItemDisabled = SetItemDisabled
+		self.ToggleDrop = ToggleDrop
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
new file mode 100644
index 0000000..0cd2959
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
@@ -0,0 +1,230 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+	local widgetType = "LSM30_Border"
+	local widgetVersion = 11
+
+	local contentFrameCache = {}
+	local function ReturnSelf(self)
+		self:ClearAllPoints()
+		self:Hide()
+		self.check:Hide()
+		table.insert(contentFrameCache, self)
+	end
+
+	local function ContentOnClick(this, button)
+		local self = this.obj
+		self:Fire("OnValueChanged", this.text:GetText())
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function ContentOnEnter(this, button)
+		local self = this.obj
+		local text = this.text:GetText()
+		local border = self.list[text] ~= text and self.list[text] or Media:Fetch('border',text)
+		this.dropdown:SetBackdrop({edgeFile = border,
+			bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
+			tile = true, tileSize = 16, edgeSize = 16,
+			insets = { left = 4, right = 4, top = 4, bottom = 4 }})
+	end
+
+	local function GetContentLine()
+		local frame
+		if next(contentFrameCache) then
+			frame = table.remove(contentFrameCache)
+		else
+			frame = CreateFrame("Button", nil, UIParent)
+				--frame:SetWidth(200)
+				frame:SetHeight(18)
+				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+				frame:SetScript("OnClick", ContentOnClick)
+				frame:SetScript("OnEnter", ContentOnEnter)
+			local check = frame:CreateTexture("OVERLAY")
+				check:SetWidth(16)
+				check:SetHeight(16)
+				check:SetPoint("LEFT",frame,"LEFT",1,-1)
+				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+				check:Hide()
+			frame.check = check
+			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
+				text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
+				text:SetJustifyH("LEFT")
+				text:SetText("Test Test Test Test Test Test Test")
+			frame.text = text
+			frame.ReturnSelf = ReturnSelf
+		end
+		frame:Show()
+		return frame
+	end
+
+	local function OnAcquire(self)
+		self:SetHeight(44)
+		self:SetWidth(200)
+	end
+
+	local function OnRelease(self)
+		self:SetText("")
+		self:SetLabel("")
+		self:SetDisabled(false)
+
+		self.value = nil
+		self.list = nil
+		self.open = nil
+		self.hasClose = nil
+
+		self.frame:ClearAllPoints()
+		self.frame:Hide()
+	end
+
+	local function SetValue(self, value) -- Set the value to an item in the List.
+		if self.list then
+			self:SetText(value or "")
+		end
+		self.value = value
+	end
+
+	local function GetValue(self)
+		return self.value
+	end
+
+	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+		self.list = list or Media:HashTable("border")
+	end
+
+
+	local function SetText(self, text) -- Set the text displayed in the box.
+		self.frame.text:SetText(text or "")
+		local border = self.list[text] ~= text and self.list[text] or Media:Fetch('border',text)
+
+		self.frame.displayButton:SetBackdrop({edgeFile = border,
+			bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
+			tile = true, tileSize = 16, edgeSize = 16,
+			insets = { left = 4, right = 4, top = 4, bottom = 4 }})
+	end
+
+	local function SetLabel(self, text) -- Set the text for the label.
+		self.frame.label:SetText(text or "")
+	end
+
+	local function AddItem(self, key, value) -- Add an item to the list.
+		self.list = self.list or {}
+		self.list[key] = value
+	end
+	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
+
+	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
+	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
+	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
+
+	local function SetDisabled(self, disabled) -- Disable the widget.
+		self.disabled = disabled
+		if disabled then
+			self.frame:Disable()
+		else
+			self.frame:Enable()
+		end
+	end
+
+	local function textSort(a,b)
+		return string.upper(a) < string.upper(b)
+	end
+
+	local sortedlist = {}
+	local function ToggleDrop(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+			AceGUI:ClearFocus()
+		else
+			AceGUI:SetFocus(self)
+			self.dropdown = AGSMW:GetDropDownFrame()
+			local width = self.frame:GetWidth()
+			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+			for k, v in pairs(self.list) do
+				sortedlist[#sortedlist+1] = k
+			end
+			table.sort(sortedlist, textSort)
+			for i, k in ipairs(sortedlist) do
+				local f = GetContentLine()
+				f.text:SetText(k)
+				--print(k)
+				if k == self.value then
+					f.check:Show()
+				end
+				f.obj = self
+				f.dropdown = self.dropdown
+				self.dropdown:AddFrame(f)
+			end
+			wipe(sortedlist)
+		end
+	end
+
+	local function ClearFocus(self)
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function OnHide(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function Drop_OnEnter(this)
+		this.obj:Fire("OnEnter")
+	end
+
+	local function Drop_OnLeave(this)
+		this.obj:Fire("OnLeave")
+	end
+
+	local function Constructor()
+		local frame = AGSMW:GetBaseFrameWithWindow()
+		local self = {}
+
+		self.type = widgetType
+		self.frame = frame
+		frame.obj = self
+		frame.dropButton.obj = self
+		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+		frame.dropButton:SetScript("OnClick",ToggleDrop)
+		frame:SetScript("OnHide", OnHide)
+
+		self.alignoffset = 31
+
+		self.OnRelease = OnRelease
+		self.OnAcquire = OnAcquire
+		self.ClearFocus = ClearFocus
+		self.SetText = SetText
+		self.SetValue = SetValue
+		self.GetValue = GetValue
+		self.SetList = SetList
+		self.SetLabel = SetLabel
+		self.SetDisabled = SetDisabled
+		self.AddItem = AddItem
+		self.SetMultiselect = SetMultiselect
+		self.GetMultiselect = GetMultiselect
+		self.SetItemValue = SetItemValue
+		self.SetItemDisabled = SetItemDisabled
+		self.ToggleDrop = ToggleDrop
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
new file mode 100644
index 0000000..eadf35f
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
@@ -0,0 +1,216 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+	local widgetType = "LSM30_Font"
+	local widgetVersion = 11
+
+	local contentFrameCache = {}
+	local function ReturnSelf(self)
+		self:ClearAllPoints()
+		self:Hide()
+		self.check:Hide()
+		table.insert(contentFrameCache, self)
+	end
+
+	local function ContentOnClick(this, button)
+		local self = this.obj
+		self:Fire("OnValueChanged", this.text:GetText())
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function GetContentLine()
+		local frame
+		if next(contentFrameCache) then
+			frame = table.remove(contentFrameCache)
+		else
+			frame = CreateFrame("Button", nil, UIParent)
+				--frame:SetWidth(200)
+				frame:SetHeight(18)
+				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+				frame:SetScript("OnClick", ContentOnClick)
+			local check = frame:CreateTexture("OVERLAY")
+				check:SetWidth(16)
+				check:SetHeight(16)
+				check:SetPoint("LEFT",frame,"LEFT",1,-1)
+				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+				check:Hide()
+			frame.check = check
+			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
+				text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
+				text:SetJustifyH("LEFT")
+				text:SetText("Test Test Test Test Test Test Test")
+			frame.text = text
+			frame.ReturnSelf = ReturnSelf
+		end
+		frame:Show()
+		return frame
+	end
+
+	local function OnAcquire(self)
+		self:SetHeight(44)
+		self:SetWidth(200)
+	end
+
+	local function OnRelease(self)
+		self:SetText("")
+		self:SetLabel("")
+		self:SetDisabled(false)
+
+		self.value = nil
+		self.list = nil
+		self.open = nil
+		self.hasClose = nil
+
+		self.frame:ClearAllPoints()
+		self.frame:Hide()
+	end
+
+	local function SetValue(self, value) -- Set the value to an item in the List.
+		if self.list then
+			self:SetText(value or "")
+		end
+		self.value = value
+	end
+
+	local function GetValue(self)
+		return self.value
+	end
+
+	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+		self.list = list or Media:HashTable("font")
+	end
+
+	local function SetText(self, text) -- Set the text displayed in the box.
+		self.frame.text:SetText(text or "")
+		local font = self.list[text] ~= text and self.list[text] or Media:Fetch('font',text)
+		local _, size, outline= self.frame.text:GetFont()
+		self.frame.text:SetFont(font,size,outline)
+	end
+
+	local function SetLabel(self, text) -- Set the text for the label.
+		self.frame.label:SetText(text or "")
+	end
+
+	local function AddItem(self, key, value) -- Add an item to the list.
+		self.list = self.list or {}
+		self.list[key] = value
+	end
+	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
+
+	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
+	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
+	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
+
+	local function SetDisabled(self, disabled) -- Disable the widget.
+		self.disabled = disabled
+		if disabled then
+			self.frame:Disable()
+		else
+			self.frame:Enable()
+		end
+	end
+
+	local function textSort(a,b)
+		return string.upper(a) < string.upper(b)
+	end
+
+	local sortedlist = {}
+	local function ToggleDrop(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+			AceGUI:ClearFocus()
+		else
+			AceGUI:SetFocus(self)
+			self.dropdown = AGSMW:GetDropDownFrame()
+			local width = self.frame:GetWidth()
+			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+			for k, v in pairs(self.list) do
+				sortedlist[#sortedlist+1] = k
+			end
+			table.sort(sortedlist, textSort)
+			for i, k in ipairs(sortedlist) do
+				local f = GetContentLine()
+				local _, size, outline= f.text:GetFont()
+				local font = self.list[k] ~= k and self.list[k] or Media:Fetch('font',k)
+				f.text:SetFont(font,size,outline)
+				f.text:SetText(k)
+				if k == self.value then
+					f.check:Show()
+				end
+				f.obj = self
+				self.dropdown:AddFrame(f)
+			end
+			wipe(sortedlist)
+		end
+	end
+
+	local function ClearFocus(self)
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function OnHide(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function Drop_OnEnter(this)
+		this.obj:Fire("OnEnter")
+	end
+
+	local function Drop_OnLeave(this)
+		this.obj:Fire("OnLeave")
+	end
+
+	local function Constructor()
+		local frame = AGSMW:GetBaseFrame()
+		local self = {}
+
+		self.type = widgetType
+		self.frame = frame
+		frame.obj = self
+		frame.dropButton.obj = self
+		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+		frame.dropButton:SetScript("OnClick",ToggleDrop)
+		frame:SetScript("OnHide", OnHide)
+
+		self.alignoffset = 31
+
+		self.OnRelease = OnRelease
+		self.OnAcquire = OnAcquire
+		self.ClearFocus = ClearFocus
+		self.SetText = SetText
+		self.SetValue = SetValue
+		self.GetValue = GetValue
+		self.SetList = SetList
+		self.SetLabel = SetLabel
+		self.SetDisabled = SetDisabled
+		self.AddItem = AddItem
+		self.SetMultiselect = SetMultiselect
+		self.GetMultiselect = GetMultiselect
+		self.SetItemValue = SetItemValue
+		self.SetItemDisabled = SetItemDisabled
+		self.ToggleDrop = ToggleDrop
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua
new file mode 100644
index 0000000..7725598
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua
@@ -0,0 +1,55 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+LoadAddOn("LibSharedMedia-3.0")
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+AceGUISharedMediaWidgets = {}
+do
+	AceGUIWidgetLSMlists = {
+		['font'] = Media:HashTable("font"),
+		['sound'] = Media:HashTable("sound"),
+		['statusbar'] = Media:HashTable("statusbar"),
+		['border'] = Media:HashTable("border"),
+		['background'] = Media:HashTable("background"),
+	}
+
+	local min, max, floor = math.min, math.max, math.floor
+
+	local function fixlevels(parent,...)
+		local i = 1
+		local child = select(i, ...)
+		while child do
+			child:SetFrameLevel(parent:GetFrameLevel()+1)
+			fixlevels(child, child:GetChildren())
+			i = i + 1
+			child = select(i, ...)
+		end
+	end
+
+	local function OnItemValueChanged(this, event, checked)
+		local self = this.userdata.obj
+		if self.multiselect then
+			self:Fire("OnValueChanged", this.userdata.value, checked)
+		else
+			if checked then
+				self:SetValue(this.userdata.value)
+				self:Fire("OnValueChanged", this.userdata.value)
+			else
+				this:SetValue(true)
+			end
+			self.pullout:Close()
+		end
+	end
+
+	local function SetValue(self, value)
+		if value then
+			self:SetText(value or "")
+		end
+		self.value = value
+	end
+
+	AceGUISharedMediaWidgets.fixlevels = fixlevels
+	AceGUISharedMediaWidgets.OnItemValueChanged = OnItemValueChanged
+	AceGUISharedMediaWidgets.SetValue = SetValue
+end
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
new file mode 100644
index 0000000..1d39c28
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
@@ -0,0 +1,264 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+	local widgetType = "LSM30_Sound"
+	local widgetVersion = 11
+
+	local contentFrameCache = {}
+	local function ReturnSelf(self)
+		self:ClearAllPoints()
+		self:Hide()
+		self.check:Hide()
+		table.insert(contentFrameCache, self)
+	end
+
+	local function ContentOnClick(this, button)
+		local self = this.obj
+		self:Fire("OnValueChanged", this.text:GetText())
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function ContentSpeakerOnClick(this, button)
+		local self = this.frame.obj
+		local sound = this.frame.text:GetText()
+		PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound), "Master")
+	end
+
+	local function GetContentLine()
+		local frame
+		if next(contentFrameCache) then
+			frame = table.remove(contentFrameCache)
+		else
+			frame = CreateFrame("Button", nil, UIParent)
+				--frame:SetWidth(200)
+				frame:SetHeight(18)
+				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+				frame:SetScript("OnClick", ContentOnClick)
+			local check = frame:CreateTexture("OVERLAY")
+				check:SetWidth(16)
+				check:SetHeight(16)
+				check:SetPoint("LEFT",frame,"LEFT",1,-1)
+				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+				check:Hide()
+			frame.check = check
+
+			local soundbutton = CreateFrame("Button", nil, frame)
+				soundbutton:SetWidth(16)
+				soundbutton:SetHeight(16)
+				soundbutton:SetPoint("RIGHT",frame,"RIGHT",-1,0)
+				soundbutton.frame = frame
+				soundbutton:SetScript("OnClick", ContentSpeakerOnClick)
+			frame.soundbutton = soundbutton
+
+			local speaker = soundbutton:CreateTexture(nil, "BACKGROUND")
+				speaker:SetTexture("Interface\\Common\\VoiceChat-Speaker")
+				speaker:SetAllPoints(soundbutton)
+			frame.speaker = speaker
+			local speakeron = soundbutton:CreateTexture(nil, "HIGHLIGHT")
+				speakeron:SetTexture("Interface\\Common\\VoiceChat-On")
+				speakeron:SetAllPoints(soundbutton)
+			frame.speakeron = speakeron
+
+			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
+				text:SetPoint("BOTTOMRIGHT", soundbutton, "BOTTOMLEFT", -2, 0)
+				text:SetJustifyH("LEFT")
+				text:SetText("Test Test Test Test Test Test Test")
+			frame.text = text
+			frame.ReturnSelf = ReturnSelf
+		end
+		frame:Show()
+		return frame
+	end
+
+	local function OnAcquire(self)
+		self:SetHeight(44)
+		self:SetWidth(200)
+	end
+
+	local function OnRelease(self)
+		self:SetText("")
+		self:SetLabel("")
+		self:SetDisabled(false)
+
+		self.value = nil
+		self.list = nil
+		self.open = nil
+		self.hasClose = nil
+
+		self.frame:ClearAllPoints()
+		self.frame:Hide()
+	end
+
+	local function SetValue(self, value) -- Set the value to an item in the List.
+		if self.list then
+			self:SetText(value or "")
+		end
+		self.value = value
+	end
+
+	local function GetValue(self)
+		return self.value
+	end
+
+	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+		self.list = list or Media:HashTable("sound")
+	end
+
+	local function SetText(self, text) -- Set the text displayed in the box.
+		self.frame.text:SetText(text or "")
+	end
+
+	local function SetLabel(self, text) -- Set the text for the label.
+		self.frame.label:SetText(text or "")
+	end
+
+	local function AddItem(self, key, value) -- Add an item to the list.
+		self.list = self.list or {}
+		self.list[key] = value
+	end
+	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
+
+	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
+	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
+	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
+
+	local function SetDisabled(self, disabled) -- Disable the widget.
+		self.disabled = disabled
+		if disabled then
+			self.frame:Disable()
+			self.speaker:SetDesaturated(true)
+			self.speakeron:SetDesaturated(true)
+		else
+			self.frame:Enable()
+			self.speaker:SetDesaturated(false)
+			self.speakeron:SetDesaturated(false)
+		end
+	end
+
+	local function textSort(a,b)
+		return string.upper(a) < string.upper(b)
+	end
+
+	local sortedlist = {}
+	local function ToggleDrop(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+			AceGUI:ClearFocus()
+		else
+			AceGUI:SetFocus(self)
+			self.dropdown = AGSMW:GetDropDownFrame()
+			local width = self.frame:GetWidth()
+			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+			for k, v in pairs(self.list) do
+				sortedlist[#sortedlist+1] = k
+			end
+			table.sort(sortedlist, textSort)
+			for i, k in ipairs(sortedlist) do
+				local f = GetContentLine()
+				f.text:SetText(k)
+				if k == self.value then
+					f.check:Show()
+				end
+				f.obj = self
+				self.dropdown:AddFrame(f)
+			end
+			wipe(sortedlist)
+		end
+	end
+
+	local function ClearFocus(self)
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function OnHide(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function Drop_OnEnter(this)
+		this.obj:Fire("OnEnter")
+	end
+
+	local function Drop_OnLeave(this)
+		this.obj:Fire("OnLeave")
+	end
+
+	local function WidgetPlaySound(this)
+		local self = this.obj
+		local sound = self.frame.text:GetText()
+		PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound), "Master")
+	end
+
+	local function Constructor()
+		local frame = AGSMW:GetBaseFrame()
+		local self = {}
+
+		self.type = widgetType
+		self.frame = frame
+		frame.obj = self
+		frame.dropButton.obj = self
+		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+		frame.dropButton:SetScript("OnClick",ToggleDrop)
+		frame:SetScript("OnHide", OnHide)
+
+
+		local soundbutton = CreateFrame("Button", nil, frame)
+			soundbutton:SetWidth(16)
+			soundbutton:SetHeight(16)
+			soundbutton:SetPoint("LEFT",frame.DLeft,"LEFT",26,1)
+			soundbutton:SetScript("OnClick", WidgetPlaySound)
+			soundbutton.obj = self
+		self.soundbutton = soundbutton
+		frame.text:SetPoint("LEFT",soundbutton,"RIGHT",2,0)
+
+
+		local speaker = soundbutton:CreateTexture(nil, "BACKGROUND")
+			speaker:SetTexture("Interface\\Common\\VoiceChat-Speaker")
+			speaker:SetAllPoints(soundbutton)
+		self.speaker = speaker
+		local speakeron = soundbutton:CreateTexture(nil, "HIGHLIGHT")
+			speakeron:SetTexture("Interface\\Common\\VoiceChat-On")
+			speakeron:SetAllPoints(soundbutton)
+		self.speakeron = speakeron
+
+		self.alignoffset = 31
+
+		self.OnRelease = OnRelease
+		self.OnAcquire = OnAcquire
+		self.ClearFocus = ClearFocus
+		self.SetText = SetText
+		self.SetValue = SetValue
+		self.GetValue = GetValue
+		self.SetList = SetList
+		self.SetLabel = SetLabel
+		self.SetDisabled = SetDisabled
+		self.AddItem = AddItem
+		self.SetMultiselect = SetMultiselect
+		self.GetMultiselect = GetMultiselect
+		self.SetItemValue = SetItemValue
+		self.SetItemDisabled = SetItemDisabled
+		self.ToggleDrop = ToggleDrop
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
new file mode 100644
index 0000000..2d0e32c
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
@@ -0,0 +1,233 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+	local widgetType = "LSM30_Statusbar"
+	local widgetVersion = 11
+
+	local contentFrameCache = {}
+	local function ReturnSelf(self)
+		self:ClearAllPoints()
+		self:Hide()
+		self.check:Hide()
+		table.insert(contentFrameCache, self)
+	end
+
+	local function ContentOnClick(this, button)
+		local self = this.obj
+		self:Fire("OnValueChanged", this.text:GetText())
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function GetContentLine()
+		local frame
+		if next(contentFrameCache) then
+			frame = table.remove(contentFrameCache)
+		else
+			frame = CreateFrame("Button", nil, UIParent)
+				--frame:SetWidth(200)
+				frame:SetHeight(18)
+				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+				frame:SetScript("OnClick", ContentOnClick)
+			local check = frame:CreateTexture("OVERLAY")
+				check:SetWidth(16)
+				check:SetHeight(16)
+				check:SetPoint("LEFT",frame,"LEFT",1,-1)
+				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+				check:Hide()
+			frame.check = check
+			local bar = frame:CreateTexture("ARTWORK")
+				bar:SetHeight(16)
+				bar:SetPoint("LEFT",check,"RIGHT",1,0)
+				bar:SetPoint("RIGHT",frame,"RIGHT",-1,0)
+			frame.bar = bar
+			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+
+				local font, size = text:GetFont()
+				text:SetFont(font,size,"OUTLINE")
+
+				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 3, 0)
+				text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
+				text:SetJustifyH("LEFT")
+				text:SetText("Test Test Test Test Test Test Test")
+			frame.text = text
+			frame.ReturnSelf = ReturnSelf
+		end
+		frame:Show()
+		return frame
+	end
+
+	local function OnAcquire(self)
+		self:SetHeight(44)
+		self:SetWidth(200)
+	end
+
+	local function OnRelease(self)
+		self:SetText("")
+		self:SetLabel("")
+		self:SetDisabled(false)
+
+		self.value = nil
+		self.list = nil
+		self.open = nil
+		self.hasClose = nil
+
+		self.frame:ClearAllPoints()
+		self.frame:Hide()
+	end
+
+	local function SetValue(self, value) -- Set the value to an item in the List.
+		if self.list then
+			self:SetText(value or "")
+		end
+		self.value = value
+	end
+
+	local function GetValue(self)
+		return self.value
+	end
+
+	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+		self.list = list or Media:HashTable("statusbar")
+	end
+
+
+	local function SetText(self, text) -- Set the text displayed in the box.
+		self.frame.text:SetText(text or "")
+		local statusbar = self.list[text] ~= text and self.list[text] or Media:Fetch('statusbar',text)
+		self.bar:SetTexture(statusbar)
+	end
+
+	local function SetLabel(self, text) -- Set the text for the label.
+		self.frame.label:SetText(text or "")
+	end
+
+	local function AddItem(self, key, value) -- Add an item to the list.
+		self.list = self.list or {}
+		self.list[key] = value
+	end
+	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
+
+	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
+	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
+	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
+
+	local function SetDisabled(self, disabled) -- Disable the widget.
+		self.disabled = disabled
+		if disabled then
+			self.frame:Disable()
+		else
+			self.frame:Enable()
+		end
+	end
+
+	local function textSort(a,b)
+		return string.upper(a) < string.upper(b)
+	end
+
+	local sortedlist = {}
+	local function ToggleDrop(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+			AceGUI:ClearFocus()
+		else
+			AceGUI:SetFocus(self)
+			self.dropdown = AGSMW:GetDropDownFrame()
+			local width = self.frame:GetWidth()
+			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+			for k, v in pairs(self.list) do
+				sortedlist[#sortedlist+1] = k
+			end
+			table.sort(sortedlist, textSort)
+			for i, k in ipairs(sortedlist) do
+				local f = GetContentLine()
+				f.text:SetText(k)
+				--print(k)
+				if k == self.value then
+					f.check:Show()
+				end
+
+				local statusbar = self.list[k] ~= k and self.list[k] or Media:Fetch('statusbar',k)
+				f.bar:SetTexture(statusbar)
+				f.obj = self
+				f.dropdown = self.dropdown
+				self.dropdown:AddFrame(f)
+			end
+			wipe(sortedlist)
+		end
+	end
+
+	local function ClearFocus(self)
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function OnHide(this)
+		local self = this.obj
+		if self.dropdown then
+			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+		end
+	end
+
+	local function Drop_OnEnter(this)
+		this.obj:Fire("OnEnter")
+	end
+
+	local function Drop_OnLeave(this)
+		this.obj:Fire("OnLeave")
+	end
+
+	local function Constructor()
+		local frame = AGSMW:GetBaseFrame()
+		local self = {}
+
+		self.type = widgetType
+		self.frame = frame
+		frame.obj = self
+		frame.dropButton.obj = self
+		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+		frame.dropButton:SetScript("OnClick",ToggleDrop)
+		frame:SetScript("OnHide", OnHide)
+
+		local bar = frame:CreateTexture(nil, "OVERLAY")
+			bar:SetPoint("TOPLEFT", frame,"TOPLEFT",6,-25)
+			bar:SetPoint("BOTTOMRIGHT", frame,"BOTTOMRIGHT", -21, 5)
+			bar:SetAlpha(0.5)
+		self.bar = bar
+
+		self.alignoffset = 31
+
+		self.OnRelease = OnRelease
+		self.OnAcquire = OnAcquire
+		self.ClearFocus = ClearFocus
+		self.SetText = SetText
+		self.SetValue = SetValue
+		self.GetValue = GetValue
+		self.SetList = SetList
+		self.SetLabel = SetLabel
+		self.SetDisabled = SetDisabled
+		self.AddItem = AddItem
+		self.SetMultiselect = SetMultiselect
+		self.GetMultiselect = GetMultiselect
+		self.SetItemValue = SetItemValue
+		self.SetItemDisabled = SetItemDisabled
+		self.ToggleDrop = ToggleDrop
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
new file mode 100644
index 0000000..1af9928
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
@@ -0,0 +1,274 @@
+-- Widget created by Yssaril
+--[===[@debug@
+local DataVersion = 9001 -- dev version always overwrites everything else :)
+--@end-debug@]===]
+--@non-debug@
+local DataVersion = 53
+--@end-non-debug@
+local AGSMW = LibStub:NewLibrary("AceGUISharedMediaWidgets-1.0", DataVersion)
+
+if not AGSMW then
+  return	-- already loaded and no upgrade necessary
+end
+
+LoadAddOn("LibSharedMedia-3.0")
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+AGSMW = AGSMW or {}
+
+AceGUIWidgetLSMlists = {
+	['font'] = Media:HashTable("font"),
+	['sound'] = Media:HashTable("sound"),
+	['statusbar'] = Media:HashTable("statusbar"),
+	['border'] = Media:HashTable("border"),
+	['background'] = Media:HashTable("background"),
+}
+
+do
+	local function disable(frame)
+		frame.label:SetTextColor(.5,.5,.5)
+		frame.text:SetTextColor(.5,.5,.5)
+		frame.dropButton:Disable()
+		if frame.displayButtonFont then
+			frame.displayButtonFont:SetTextColor(.5,.5,.5)
+			frame.displayButton:Disable()
+		end
+	end
+
+	local function enable(frame)
+		frame.label:SetTextColor(1,.82,0)
+		frame.text:SetTextColor(1,1,1)
+		frame.dropButton:Enable()
+		if frame.displayButtonFont then
+			frame.displayButtonFont:SetTextColor(1,1,1)
+			frame.displayButton:Enable()
+		end
+	end
+
+	local displayButtonBackdrop = {
+		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
+		tile = true, tileSize = 16, edgeSize = 16,
+		insets = { left = 4, right = 4, top = 4, bottom = 4 },
+	}
+
+	-- create or retrieve BaseFrame
+	function AGSMW:GetBaseFrame()
+		local frame = CreateFrame("Frame", nil, UIParent)
+		frame:SetHeight(44)
+		frame:SetWidth(200)
+
+		local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
+			label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
+			label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
+			label:SetJustifyH("LEFT")
+			label:SetHeight(18)
+			label:SetText("")
+		frame.label = label
+
+		local DLeft = frame:CreateTexture(nil, "ARTWORK")
+			DLeft:SetWidth(25)
+			DLeft:SetHeight(64)
+			DLeft:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", -17, -21)
+			DLeft:SetTexture([[Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame]])
+			DLeft:SetTexCoord(0, 0.1953125, 0, 1)
+		frame.DLeft = DLeft
+
+		local DRight = frame:CreateTexture(nil, "ARTWORK")
+			DRight:SetWidth(25)
+			DRight:SetHeight(64)
+			DRight:SetPoint("TOP", DLeft, "TOP")
+			DRight:SetPoint("RIGHT", frame, "RIGHT", 17, 0)
+			DRight:SetTexture([[Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame]])
+			DRight:SetTexCoord(0.8046875, 1, 0, 1)
+		frame.DRight = DRight
+
+		local DMiddle = frame:CreateTexture(nil, "ARTWORK")
+			DMiddle:SetHeight(64)
+			DMiddle:SetPoint("TOP", DLeft, "TOP")
+			DMiddle:SetPoint("LEFT", DLeft, "RIGHT")
+			DMiddle:SetPoint("RIGHT", DRight, "LEFT")
+			DMiddle:SetTexture([[Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame]])
+			DMiddle:SetTexCoord(0.1953125, 0.8046875, 0, 1)
+		frame.DMiddle = DMiddle
+
+		local text = frame:CreateFontString(nil,"OVERLAY","GameFontHighlightSmall")
+			text:SetPoint("RIGHT",DRight,"RIGHT",-43,1)
+			text:SetPoint("LEFT",DLeft,"LEFT",26,1)
+			text:SetJustifyH("RIGHT")
+			text:SetHeight(18)
+			text:SetText("")
+		frame.text = text
+
+		local dropButton = CreateFrame("Button", nil, frame)
+			dropButton:SetWidth(24)
+			dropButton:SetHeight(24)
+			dropButton:SetPoint("TOPRIGHT", DRight, "TOPRIGHT", -16, -18)
+			dropButton:SetNormalTexture([[Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up]])
+			dropButton:SetPushedTexture([[Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down]])
+			dropButton:SetDisabledTexture([[Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled]])
+			dropButton:SetHighlightTexture([[Interface\Buttons\UI-Common-MouseHilight]], "ADD")
+		frame.dropButton = dropButton
+
+		frame.Disable = disable
+		frame.Enable = enable
+		return frame
+	end
+
+	function AGSMW:GetBaseFrameWithWindow()
+		local frame = self:GetBaseFrame()
+
+		local displayButton = CreateFrame("Button", nil, frame)
+			displayButton:SetHeight(42)
+			displayButton:SetWidth(42)
+			displayButton:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -2)
+			displayButton:SetBackdrop(displayButtonBackdrop)
+			displayButton:SetBackdropBorderColor(.5, .5, .5)
+		frame.displayButton = displayButton
+
+		frame.label:SetPoint("TOPLEFT",displayButton,"TOPRIGHT",1,2)
+
+		frame.DLeft:SetPoint("BOTTOMLEFT", displayButton, "BOTTOMRIGHT", -17, -20)
+
+		return frame
+	end
+
+end
+
+do
+
+	local sliderBackdrop = {
+		["bgFile"] = [[Interface\Buttons\UI-SliderBar-Background]],
+		["edgeFile"] = [[Interface\Buttons\UI-SliderBar-Border]],
+		["tile"] = true,
+		["edgeSize"] = 8,
+		["tileSize"] = 8,
+		["insets"] = {
+			["left"] = 3,
+			["right"] = 3,
+			["top"] = 3,
+			["bottom"] = 3,
+		},
+	}
+	local frameBackdrop = {
+		bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
+		edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]],
+		tile = true, tileSize = 32, edgeSize = 32,
+		insets = { left = 11, right = 12, top = 12, bottom = 9 },
+	}
+
+	local function OnMouseWheel(self, dir)
+		self.slider:SetValue(self.slider:GetValue()+(15*dir*-1))
+	end
+
+	local function AddFrame(self, frame)
+		frame:SetParent(self.contentframe)
+		frame:SetFrameStrata(self:GetFrameStrata())
+		frame:SetFrameLevel(self:GetFrameLevel() + 100)
+
+		if next(self.contentRepo) then
+			frame:SetPoint("TOPLEFT", self.contentRepo[#self.contentRepo], "BOTTOMLEFT", 0, 0)
+			frame:SetPoint("RIGHT", self.contentframe, "RIGHT", 0, 0)
+			self.contentframe:SetHeight(self.contentframe:GetHeight() + frame:GetHeight())
+			self.contentRepo[#self.contentRepo+1] = frame
+		else
+			self.contentframe:SetHeight(frame:GetHeight())
+			frame:SetPoint("TOPLEFT", self.contentframe, "TOPLEFT", 0, 0)
+			frame:SetPoint("RIGHT", self.contentframe, "RIGHT", 0, 0)
+			self.contentRepo[1] = frame
+		end
+
+		if self.contentframe:GetHeight() > UIParent:GetHeight()*2/5 - 20 then
+			self.scrollframe:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -28, 12)
+			self:SetHeight(UIParent:GetHeight()*2/5)
+			self.slider:Show()
+			self:SetScript("OnMouseWheel", OnMouseWheel)
+			self.scrollframe:UpdateScrollChildRect()
+			self.slider:SetMinMaxValues(0, self.contentframe:GetHeight()-self.scrollframe:GetHeight())
+		else
+			self.scrollframe:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -14, 12)
+			self:SetHeight(self.contentframe:GetHeight()+25)
+			self.slider:Hide()
+			self:SetScript("OnMouseWheel", nil)
+			self.scrollframe:UpdateScrollChildRect()
+			self.slider:SetMinMaxValues(0, 0)
+		end
+		self.contentframe:SetWidth(self.scrollframe:GetWidth())
+	end
+
+	local function ClearFrames(self)
+		for i, frame in ipairs(self.contentRepo) do
+			frame:ReturnSelf()
+			self.contentRepo[i] = nil
+		end
+	end
+
+	local function slider_OnValueChanged(self, value)
+		self.frame.scrollframe:SetVerticalScroll(value)
+	end
+
+	local DropDownCache = {}
+	function AGSMW:GetDropDownFrame()
+		local frame
+		if next(DropDownCache) then
+			frame = table.remove(DropDownCache)
+		else
+			frame = CreateFrame("Frame", nil, UIParent)
+				frame:SetClampedToScreen(true)
+				frame:SetWidth(188)
+				frame:SetBackdrop(frameBackdrop)
+				frame:SetFrameStrata("TOOLTIP")
+				frame:EnableMouseWheel(true)
+
+			local contentframe = CreateFrame("Frame", nil, frame)
+				contentframe:SetWidth(160)
+				contentframe:SetHeight(0)
+			frame.contentframe = contentframe
+
+			local scrollframe = CreateFrame("ScrollFrame", nil, frame)
+				scrollframe:SetWidth(160)
+				scrollframe:SetPoint("TOPLEFT", frame, "TOPLEFT", 14, -13)
+				scrollframe:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -14, 12)
+				scrollframe:SetScrollChild(contentframe)
+			frame.scrollframe = scrollframe
+
+			contentframe:SetPoint("TOPLEFT", scrollframe)
+			contentframe:SetPoint("TOPRIGHT", scrollframe)
+
+			local bgTex = frame:CreateTexture(nil, "ARTWORK")
+				bgTex:SetAllPoints(scrollframe)
+			frame.bgTex = bgTex
+
+			frame.AddFrame = AddFrame
+			frame.ClearFrames = ClearFrames
+			frame.contentRepo = {} -- store all our frames in here so we can get rid of them later
+
+			local slider = CreateFrame("Slider", nil, scrollframe)
+				slider:SetOrientation("VERTICAL")
+				slider:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -14, -10)
+				slider:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -14, 10)
+				slider:SetBackdrop(sliderBackdrop)
+				slider:SetThumbTexture([[Interface\Buttons\UI-SliderBar-Button-Vertical]])
+				slider:SetMinMaxValues(0, 1)
+				--slider:SetValueStep(1)
+				slider:SetWidth(12)
+				slider.frame = frame
+				slider:SetScript("OnValueChanged", slider_OnValueChanged)
+			frame.slider = slider
+		end
+		frame:SetHeight(UIParent:GetHeight()*2/5)
+		frame.slider:SetValue(0)
+		frame:Show()
+		return frame
+	end
+
+	function AGSMW:ReturnDropDownFrame(frame)
+		ClearFrames(frame)
+		frame:ClearAllPoints()
+		frame:Hide()
+		frame:SetBackdrop(frameBackdrop)
+		frame.bgTex:SetTexture(nil)
+		table.insert(DropDownCache, frame)
+		return nil
+	end
+end
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml
new file mode 100644
index 0000000..15cd102
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml
@@ -0,0 +1,9 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="prototypes.lua" />
+	<Script file="FontWidget.lua" />
+	<Script file="SoundWidget.lua" />
+	<Script file="StatusbarWidget.lua" />
+	<Script file="BorderWidget.lua" />
+	<Script file="BackgroundWidget.lua" />
+</Ui>
\ No newline at end of file
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt
new file mode 100644
index 0000000..2163c0d
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt
@@ -0,0 +1,19 @@
+------------------------------------------------------------------------
+r48 | funkydude | 2013-05-26 11:10:27 +0000 (Sun, 26 May 2013) | 1 line
+Changed paths:
+   A /tags/r48-release (from /trunk:47)
+
+Tagging as r48-release
+------------------------------------------------------------------------
+r47 | funkydude | 2013-05-26 11:09:17 +0000 (Sun, 26 May 2013) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0-SharedMediaWidgets.toc
+
+bump toc
+------------------------------------------------------------------------
+r46 | Phanx | 2013-01-02 06:47:48 +0000 (Wed, 02 Jan 2013) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
+
+Fixed an anchoring issue that could prevent interaction with menu buttons.
+------------------------------------------------------------------------
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt
new file mode 100644
index 0000000..91e3976
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt
@@ -0,0 +1,7 @@
+------------------------------------------------------------------------
+r53 | nevcairiel | 2016-06-03 06:51:46 +0000 (Fri, 03 Jun 2016) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
+
+Remove SetPoint to UIParent, AceGUI-3.0 will properly position the element when its used
+------------------------------------------------------------------------
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt
new file mode 100644
index 0000000..eeb78d0
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt
@@ -0,0 +1,17 @@
+------------------------------------------------------------------------
+r19 | yssaril | 2009-12-05 07:44:46 +0000 (Sat, 05 Dec 2009) | 1 line
+Changed paths:
+   A /tags/v3.3.2 (from /trunk:18)
+
+Tagging as v3.3.2
+------------------------------------------------------------------------
+r18 | yssaril | 2009-12-05 07:43:22 +0000 (Sat, 05 Dec 2009) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
+   M /trunk/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
+   M /trunk/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
+   M /trunk/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
+   M /trunk/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
+
+fix dropdowns not clearing properly
+------------------------------------------------------------------------
diff --git a/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
new file mode 100644
index 0000000..dd3eb2b
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Include file="AceGUI-3.0-SharedMediaWidgets\widget.xml" />
+</Ui>
\ No newline at end of file
diff --git a/EMA/Libs/AceGUI-3.0/AceGUI-3.0.lua b/EMA/Libs/AceGUI-3.0/AceGUI-3.0.lua
new file mode 100644
index 0000000..08904e4
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/AceGUI-3.0.lua
@@ -0,0 +1,1031 @@
+--- **AceGUI-3.0** provides access to numerous widgets which can be used to create GUIs.
+-- AceGUI is used by AceConfigDialog to create the option GUIs, but you can use it by itself
+-- to create any custom GUI. There are more extensive examples in the test suite in the Ace3
+-- stand-alone distribution.
+--
+-- **Note**: When using AceGUI-3.0 directly, please do not modify the frames of the widgets directly,
+-- as any "unknown" change to the widgets will cause addons that get your widget out of the widget pool
+-- to misbehave. If you think some part of a widget should be modifiable, please open a ticket, and we"ll
+-- implement a proper API to modify it.
+-- @usage
+-- local AceGUI = LibStub("AceGUI-3.0")
+-- -- Create a container frame
+-- local f = AceGUI:Create("Frame")
+-- f:SetCallback("OnClose",function(widget) AceGUI:Release(widget) end)
+-- f:SetTitle("AceGUI-3.0 Example")
+-- f:SetStatusText("Status Bar")
+-- f:SetLayout("Flow")
+-- -- Create a button
+-- local btn = AceGUI:Create("Button")
+-- btn:SetWidth(170)
+-- btn:SetText("Button !")
+-- btn:SetCallback("OnClick", function() print("Click!") end)
+-- -- Add the button to the container
+-- f:AddChild(btn)
+-- @class file
+-- @name AceGUI-3.0
+-- @release $Id: AceGUI-3.0.lua 1177 2018-06-25 12:12:48Z nevcairiel $
+local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 36
+local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
+
+if not AceGUI then return end -- No upgrade needed
+
+-- Lua APIs
+local tconcat, tremove, tinsert = table.concat, table.remove, table.insert
+local select, pairs, next, type = select, pairs, next, type
+local error, assert, loadstring = error, assert, loadstring
+local setmetatable, rawget, rawset = setmetatable, rawget, rawset
+local math_max = math.max
+
+-- WoW APIs
+local UIParent = UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: geterrorhandler, LibStub
+
+--local con = LibStub("AceConsole-3.0",true)
+
+AceGUI.WidgetRegistry = AceGUI.WidgetRegistry or {}
+AceGUI.LayoutRegistry = AceGUI.LayoutRegistry or {}
+AceGUI.WidgetBase = AceGUI.WidgetBase or {}
+AceGUI.WidgetContainerBase = AceGUI.WidgetContainerBase or {}
+AceGUI.WidgetVersions = AceGUI.WidgetVersions or {}
+
+-- local upvalues
+local WidgetRegistry = AceGUI.WidgetRegistry
+local LayoutRegistry = AceGUI.LayoutRegistry
+local WidgetVersions = AceGUI.WidgetVersions
+
+--[[
+	 xpcall safecall implementation
+]]
+local xpcall = xpcall
+
+local function errorhandler(err)
+	return geterrorhandler()(err)
+end
+
+local function CreateDispatcher(argCount)
+	local code = [[
+		local xpcall, eh = ...
+		local method, ARGS
+		local function call() return method(ARGS) end
+
+		local function dispatch(func, ...)
+			method = func
+			if not method then return end
+			ARGS = ...
+			return xpcall(call, eh)
+		end
+
+		return dispatch
+	]]
+
+	local ARGS = {}
+	for i = 1, argCount do ARGS[i] = "arg"..i end
+	code = code:gsub("ARGS", tconcat(ARGS, ", "))
+	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
+end
+
+local Dispatchers = setmetatable({}, {__index=function(self, argCount)
+	local dispatcher = CreateDispatcher(argCount)
+	rawset(self, argCount, dispatcher)
+	return dispatcher
+end})
+Dispatchers[0] = function(func)
+	return xpcall(func, errorhandler)
+end
+
+local function safecall(func, ...)
+	return Dispatchers[select("#", ...)](func, ...)
+end
+
+-- Recycling functions
+local newWidget, delWidget
+do
+	-- Version Upgrade in Minor 29
+	-- Internal Storage of the objects changed, from an array table
+	-- to a hash table, and additionally we introduced versioning on
+	-- the widgets which would discard all widgets from a pre-29 version
+	-- anyway, so we just clear the storage now, and don't try to
+	-- convert the storage tables to the new format.
+	-- This should generally not cause *many* widgets to end up in trash,
+	-- since once dialogs are opened, all addons should be loaded already
+	-- and AceGUI should be on the latest version available on the users
+	-- setup.
+	-- -- nevcairiel - Nov 2nd, 2009
+	if oldminor and oldminor < 29 and AceGUI.objPools then
+		AceGUI.objPools = nil
+	end
+
+	AceGUI.objPools = AceGUI.objPools or {}
+	local objPools = AceGUI.objPools
+	--Returns a new instance, if none are available either returns a new table or calls the given contructor
+	function newWidget(type)
+		if not WidgetRegistry[type] then
+			error("Attempt to instantiate unknown widget type", 2)
+		end
+
+		if not objPools[type] then
+			objPools[type] = {}
+		end
+
+		local newObj = next(objPools[type])
+		if not newObj then
+			newObj = WidgetRegistry[type]()
+			newObj.AceGUIWidgetVersion = WidgetVersions[type]
+		else
+			objPools[type][newObj] = nil
+			-- if the widget is older then the latest, don't even try to reuse it
+			-- just forget about it, and grab a new one.
+			if not newObj.AceGUIWidgetVersion or newObj.AceGUIWidgetVersion < WidgetVersions[type] then
+				return newWidget(type)
+			end
+		end
+		return newObj
+	end
+	-- Releases an instance to the Pool
+	function delWidget(obj,type)
+		if not objPools[type] then
+			objPools[type] = {}
+		end
+		if objPools[type][obj] then
+			error("Attempt to Release Widget that is already released", 2)
+		end
+		objPools[type][obj] = true
+	end
+end
+
+
+-------------------
+-- API Functions --
+-------------------
+
+-- Gets a widget Object
+
+--- Create a new Widget of the given type.
+-- This function will instantiate a new widget (or use one from the widget pool), and call the
+-- OnAcquire function on it, before returning.
+-- @param type The type of the widget.
+-- @return The newly created widget.
+function AceGUI:Create(type)
+	if WidgetRegistry[type] then
+		local widget = newWidget(type)
+
+		if rawget(widget, "Acquire") then
+			widget.OnAcquire = widget.Acquire
+			widget.Acquire = nil
+		elseif rawget(widget, "Aquire") then
+			widget.OnAcquire = widget.Aquire
+			widget.Aquire = nil
+		end
+
+		if rawget(widget, "Release") then
+			widget.OnRelease = rawget(widget, "Release")
+			widget.Release = nil
+		end
+
+		if widget.OnAcquire then
+			widget:OnAcquire()
+		else
+			error(("Widget type %s doesn't supply an OnAcquire Function"):format(type))
+		end
+		-- Set the default Layout ("List")
+		safecall(widget.SetLayout, widget, "List")
+		safecall(widget.ResumeLayout, widget)
+		return widget
+	end
+end
+
+--- Releases a widget Object.
+-- This function calls OnRelease on the widget and places it back in the widget pool.
+-- Any data on the widget is being erased, and the widget will be hidden.\\
+-- If this widget is a Container-Widget, all of its Child-Widgets will be releases as well.
+-- @param widget The widget to release
+function AceGUI:Release(widget)
+	safecall(widget.PauseLayout, widget)
+	widget:Fire("OnRelease")
+	safecall(widget.ReleaseChildren, widget)
+
+	if widget.OnRelease then
+		widget:OnRelease()
+--	else
+--		error(("Widget type %s doesn't supply an OnRelease Function"):format(widget.type))
+	end
+	for k in pairs(widget.userdata) do
+		widget.userdata[k] = nil
+	end
+	for k in pairs(widget.events) do
+		widget.events[k] = nil
+	end
+	widget.width = nil
+	widget.relWidth = nil
+	widget.height = nil
+	widget.relHeight = nil
+	widget.noAutoHeight = nil
+	widget.frame:ClearAllPoints()
+	widget.frame:Hide()
+	widget.frame:SetParent(UIParent)
+	widget.frame.width = nil
+	widget.frame.height = nil
+	if widget.content then
+		widget.content.width = nil
+		widget.content.height = nil
+	end
+	delWidget(widget, widget.type)
+end
+
+-----------
+-- Focus --
+-----------
+
+
+--- Called when a widget has taken focus.
+-- e.g. Dropdowns opening, Editboxes gaining kb focus
+-- @param widget The widget that should be focused
+function AceGUI:SetFocus(widget)
+	if self.FocusedWidget and self.FocusedWidget ~= widget then
+		safecall(self.FocusedWidget.ClearFocus, self.FocusedWidget)
+	end
+	self.FocusedWidget = widget
+end
+
+
+--- Called when something has happened that could cause widgets with focus to drop it
+-- e.g. titlebar of a frame being clicked
+function AceGUI:ClearFocus()
+	if self.FocusedWidget then
+		safecall(self.FocusedWidget.ClearFocus, self.FocusedWidget)
+		self.FocusedWidget = nil
+	end
+end
+
+-------------
+-- Widgets --
+-------------
+--[[
+	Widgets must provide the following functions
+		OnAcquire() - Called when the object is acquired, should set everything to a default hidden state
+
+	And the following members
+		frame - the frame or derivitive object that will be treated as the widget for size and anchoring purposes
+		type - the type of the object, same as the name given to :RegisterWidget()
+
+	Widgets contain a table called userdata, this is a safe place to store data associated with the wigdet
+	It will be cleared automatically when a widget is released
+	Placing values directly into a widget object should be avoided
+
+	If the Widget can act as a container for other Widgets the following
+		content - frame or derivitive that children will be anchored to
+
+	The Widget can supply the following Optional Members
+		:OnRelease() - Called when the object is Released, should remove any additional anchors and clear any data
+		:OnWidthSet(width) - Called when the width of the widget is changed
+		:OnHeightSet(height) - Called when the height of the widget is changed
+			Widgets should not use the OnSizeChanged events of thier frame or content members, use these methods instead
+			AceGUI already sets a handler to the event
+		:LayoutFinished(width, height) - called after a layout has finished, the width and height will be the width and height of the
+			area used for controls. These can be nil if the layout used the existing size to layout the controls.
+
+]]
+
+--------------------------
+-- Widget Base Template --
+--------------------------
+do
+	local WidgetBase = AceGUI.WidgetBase
+
+	WidgetBase.SetParent = function(self, parent)
+		local frame = self.frame
+		frame:SetParent(nil)
+		frame:SetParent(parent.content)
+		self.parent = parent
+	end
+
+	WidgetBase.SetCallback = function(self, name, func)
+		if type(func) == "function" then
+			self.events[name] = func
+		end
+	end
+
+	WidgetBase.Fire = function(self, name, ...)
+		if self.events[name] then
+			local success, ret = safecall(self.events[name], self, name, ...)
+			if success then
+				return ret
+			end
+		end
+	end
+
+	WidgetBase.SetWidth = function(self, width)
+		self.frame:SetWidth(width)
+		self.frame.width = width
+		if self.OnWidthSet then
+			self:OnWidthSet(width)
+		end
+	end
+
+	WidgetBase.SetRelativeWidth = function(self, width)
+		if width <= 0 or width > 1 then
+			error(":SetRelativeWidth(width): Invalid relative width.", 2)
+		end
+		self.relWidth = width
+		self.width = "relative"
+	end
+
+	WidgetBase.SetHeight = function(self, height)
+		self.frame:SetHeight(height)
+		self.frame.height = height
+		if self.OnHeightSet then
+			self:OnHeightSet(height)
+		end
+	end
+
+	--[[ WidgetBase.SetRelativeHeight = function(self, height)
+		if height <= 0 or height > 1 then
+			error(":SetRelativeHeight(height): Invalid relative height.", 2)
+		end
+		self.relHeight = height
+		self.height = "relative"
+	end ]]
+
+	WidgetBase.IsVisible = function(self)
+		return self.frame:IsVisible()
+	end
+
+	WidgetBase.IsShown= function(self)
+		return self.frame:IsShown()
+	end
+
+	WidgetBase.Release = function(self)
+		AceGUI:Release(self)
+	end
+
+	WidgetBase.SetPoint = function(self, ...)
+		return self.frame:SetPoint(...)
+	end
+
+	WidgetBase.ClearAllPoints = function(self)
+		return self.frame:ClearAllPoints()
+	end
+
+	WidgetBase.GetNumPoints = function(self)
+		return self.frame:GetNumPoints()
+	end
+
+	WidgetBase.GetPoint = function(self, ...)
+		return self.frame:GetPoint(...)
+	end
+
+	WidgetBase.GetUserDataTable = function(self)
+		return self.userdata
+	end
+
+	WidgetBase.SetUserData = function(self, key, value)
+		self.userdata[key] = value
+	end
+
+	WidgetBase.GetUserData = function(self, key)
+		return self.userdata[key]
+	end
+
+	WidgetBase.IsFullHeight = function(self)
+		return self.height == "fill"
+	end
+
+	WidgetBase.SetFullHeight = function(self, isFull)
+		if isFull then
+			self.height = "fill"
+		else
+			self.height = nil
+		end
+	end
+
+	WidgetBase.IsFullWidth = function(self)
+		return self.width == "fill"
+	end
+
+	WidgetBase.SetFullWidth = function(self, isFull)
+		if isFull then
+			self.width = "fill"
+		else
+			self.width = nil
+		end
+	end
+
+--	local function LayoutOnUpdate(this)
+--		this:SetScript("OnUpdate",nil)
+--		this.obj:PerformLayout()
+--	end
+
+	local WidgetContainerBase = AceGUI.WidgetContainerBase
+
+	WidgetContainerBase.PauseLayout = function(self)
+		self.LayoutPaused = true
+	end
+
+	WidgetContainerBase.ResumeLayout = function(self)
+		self.LayoutPaused = nil
+	end
+
+	WidgetContainerBase.PerformLayout = function(self)
+		if self.LayoutPaused then
+			return
+		end
+		safecall(self.LayoutFunc, self.content, self.children)
+	end
+
+	--call this function to layout, makes sure layed out objects get a frame to get sizes etc
+	WidgetContainerBase.DoLayout = function(self)
+		self:PerformLayout()
+--		if not self.parent then
+--			self.frame:SetScript("OnUpdate", LayoutOnUpdate)
+--		end
+	end
+
+	WidgetContainerBase.AddChild = function(self, child, beforeWidget)
+		if beforeWidget then
+			local siblingIndex = 1
+			for _, widget in pairs(self.children) do
+				if widget == beforeWidget then
+					break
+				end
+				siblingIndex = siblingIndex + 1
+			end
+			tinsert(self.children, siblingIndex, child)
+		else
+			tinsert(self.children, child)
+		end
+		child:SetParent(self)
+		child.frame:Show()
+		self:DoLayout()
+	end
+
+	WidgetContainerBase.AddChildren = function(self, ...)
+		for i = 1, select("#", ...) do
+			local child = select(i, ...)
+			tinsert(self.children, child)
+			child:SetParent(self)
+			child.frame:Show()
+		end
+		self:DoLayout()
+	end
+
+	WidgetContainerBase.ReleaseChildren = function(self)
+		local children = self.children
+		for i = 1,#children do
+			AceGUI:Release(children[i])
+			children[i] = nil
+		end
+	end
+
+	WidgetContainerBase.SetLayout = function(self, Layout)
+		self.LayoutFunc = AceGUI:GetLayout(Layout)
+	end
+
+	WidgetContainerBase.SetAutoAdjustHeight = function(self, adjust)
+		if adjust then
+			self.noAutoHeight = nil
+		else
+			self.noAutoHeight = true
+		end
+	end
+
+	local function FrameResize(this)
+		local self = this.obj
+		if this:GetWidth() and this:GetHeight() then
+			if self.OnWidthSet then
+				self:OnWidthSet(this:GetWidth())
+			end
+			if self.OnHeightSet then
+				self:OnHeightSet(this:GetHeight())
+			end
+		end
+	end
+
+	local function ContentResize(this)
+		if this:GetWidth() and this:GetHeight() then
+			this.width = this:GetWidth()
+			this.height = this:GetHeight()
+			this.obj:DoLayout()
+		end
+	end
+
+	setmetatable(WidgetContainerBase, {__index=WidgetBase})
+
+	--One of these function should be called on each Widget Instance as part of its creation process
+
+	--- Register a widget-class as a container for newly created widgets.
+	-- @param widget The widget class
+	function AceGUI:RegisterAsContainer(widget)
+		widget.children = {}
+		widget.userdata = {}
+		widget.events = {}
+		widget.base = WidgetContainerBase
+		widget.content.obj = widget
+		widget.frame.obj = widget
+		widget.content:SetScript("OnSizeChanged", ContentResize)
+		widget.frame:SetScript("OnSizeChanged", FrameResize)
+		setmetatable(widget, {__index = WidgetContainerBase})
+		widget:SetLayout("List")
+		return widget
+	end
+
+	--- Register a widget-class as a widget.
+	-- @param widget The widget class
+	function AceGUI:RegisterAsWidget(widget)
+		widget.userdata = {}
+		widget.events = {}
+		widget.base = WidgetBase
+		widget.frame.obj = widget
+		widget.frame:SetScript("OnSizeChanged", FrameResize)
+		setmetatable(widget, {__index = WidgetBase})
+		return widget
+	end
+end
+
+
+
+
+------------------
+-- Widget API   --
+------------------
+
+--- Registers a widget Constructor, this function returns a new instance of the Widget
+-- @param Name The name of the widget
+-- @param Constructor The widget constructor function
+-- @param Version The version of the widget
+function AceGUI:RegisterWidgetType(Name, Constructor, Version)
+	assert(type(Constructor) == "function")
+	assert(type(Version) == "number")
+
+	local oldVersion = WidgetVersions[Name]
+	if oldVersion and oldVersion >= Version then return end
+
+	WidgetVersions[Name] = Version
+	WidgetRegistry[Name] = Constructor
+end
+
+--- Registers a Layout Function
+-- @param Name The name of the layout
+-- @param LayoutFunc Reference to the layout function
+function AceGUI:RegisterLayout(Name, LayoutFunc)
+	assert(type(LayoutFunc) == "function")
+	if type(Name) == "string" then
+		Name = Name:upper()
+	end
+	LayoutRegistry[Name] = LayoutFunc
+end
+
+--- Get a Layout Function from the registry
+-- @param Name The name of the layout
+function AceGUI:GetLayout(Name)
+	if type(Name) == "string" then
+		Name = Name:upper()
+	end
+	return LayoutRegistry[Name]
+end
+
+AceGUI.counts = AceGUI.counts or {}
+
+--- A type-based counter to count the number of widgets created.
+-- This is used by widgets that require a named frame, e.g. when a Blizzard
+-- Template requires it.
+-- @param type The widget type
+function AceGUI:GetNextWidgetNum(type)
+	if not self.counts[type] then
+		self.counts[type] = 0
+	end
+	self.counts[type] = self.counts[type] + 1
+	return self.counts[type]
+end
+
+--- Return the number of created widgets for this type.
+-- In contrast to GetNextWidgetNum, the number is not incremented.
+-- @param type The widget type
+function AceGUI:GetWidgetCount(type)
+	return self.counts[type] or 0
+end
+
+--- Return the version of the currently registered widget type.
+-- @param type The widget type
+function AceGUI:GetWidgetVersion(type)
+	return WidgetVersions[type]
+end
+
+-------------
+-- Layouts --
+-------------
+
+--[[
+	A Layout is a func that takes 2 parameters
+		content - the frame that widgets will be placed inside
+		children - a table containing the widgets to layout
+]]
+
+-- Very simple Layout, Children are stacked on top of each other down the left side
+AceGUI:RegisterLayout("List",
+	function(content, children)
+		local height = 0
+		local width = content.width or content:GetWidth() or 0
+		for i = 1, #children do
+			local child = children[i]
+
+			local frame = child.frame
+			frame:ClearAllPoints()
+			frame:Show()
+			if i == 1 then
+				frame:SetPoint("TOPLEFT", content)
+			else
+				frame:SetPoint("TOPLEFT", children[i-1].frame, "BOTTOMLEFT")
+			end
+
+			if child.width == "fill" then
+				child:SetWidth(width)
+				frame:SetPoint("RIGHT", content)
+
+				if child.DoLayout then
+					child:DoLayout()
+				end
+			elseif child.width == "relative" then
+				child:SetWidth(width * child.relWidth)
+
+				if child.DoLayout then
+					child:DoLayout()
+				end
+			end
+
+			height = height + (frame.height or frame:GetHeight() or 0)
+		end
+		safecall(content.obj.LayoutFinished, content.obj, nil, height)
+	end)
+
+-- A single control fills the whole content area
+AceGUI:RegisterLayout("Fill",
+	function(content, children)
+		if children[1] then
+			children[1]:SetWidth(content:GetWidth() or 0)
+			children[1]:SetHeight(content:GetHeight() or 0)
+			children[1].frame:SetAllPoints(content)
+			children[1].frame:Show()
+			safecall(content.obj.LayoutFinished, content.obj, nil, children[1].frame:GetHeight())
+		end
+	end)
+
+local layoutrecursionblock = nil
+local function safelayoutcall(object, func, ...)
+	layoutrecursionblock = true
+	object[func](object, ...)
+	layoutrecursionblock = nil
+end
+
+AceGUI:RegisterLayout("Flow",
+	function(content, children)
+		if layoutrecursionblock then return end
+		--used height so far
+		local height = 0
+		--width used in the current row
+		local usedwidth = 0
+		--height of the current row
+		local rowheight = 0
+		local rowoffset = 0
+		local lastrowoffset
+
+		local width = content.width or content:GetWidth() or 0
+
+		--control at the start of the row
+		local rowstart
+		local rowstartoffset
+		local lastrowstart
+		local isfullheight
+
+		local frameoffset
+		local lastframeoffset
+		local oversize
+		for i = 1, #children do
+			local child = children[i]
+			oversize = nil
+			local frame = child.frame
+			local frameheight = frame.height or frame:GetHeight() or 0
+			local framewidth = frame.width or frame:GetWidth() or 0
+			lastframeoffset = frameoffset
+			-- HACK: Why did we set a frameoffset of (frameheight / 2) ?
+			-- That was moving all widgets half the widgets size down, is that intended?
+			-- Actually, it seems to be neccessary for many cases, we'll leave it in for now.
+			-- If widgets seem to anchor weirdly with this, provide a valid alignoffset for them.
+			-- TODO: Investigate moar!
+			frameoffset = child.alignoffset or (frameheight / 2)
+
+			if child.width == "relative" then
+				framewidth = width * child.relWidth
+			end
+
+			frame:Show()
+			frame:ClearAllPoints()
+			if i == 1 then
+				-- anchor the first control to the top left
+				frame:SetPoint("TOPLEFT", content)
+				rowheight = frameheight
+				rowoffset = frameoffset
+				rowstart = frame
+				rowstartoffset = frameoffset
+				usedwidth = framewidth
+				if usedwidth > width then
+					oversize = true
+				end
+			else
+				-- if there isn't available width for the control start a new row
+				-- if a control is "fill" it will be on a row of its own full width
+				if usedwidth == 0 or ((framewidth) + usedwidth > width) or child.width == "fill" then
+					if isfullheight then
+						-- a previous row has already filled the entire height, there's nothing we can usefully do anymore
+						-- (maybe error/warn about this?)
+						break
+					end
+					--anchor the previous row, we will now know its height and offset
+					rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -(height + (rowoffset - rowstartoffset) + 3))
+					height = height + rowheight + 3
+					--save this as the rowstart so we can anchor it after the row is complete and we have the max height and offset of controls in it
+					rowstart = frame
+					rowstartoffset = frameoffset
+					rowheight = frameheight
+					rowoffset = frameoffset
+					usedwidth = framewidth
+					if usedwidth > width then
+						oversize = true
+					end
+				-- put the control on the current row, adding it to the width and checking if the height needs to be increased
+				else
+					--handles cases where the new height is higher than either control because of the offsets
+					--math.max(rowheight-rowoffset+frameoffset, frameheight-frameoffset+rowoffset)
+
+					--offset is always the larger of the two offsets
+					rowoffset = math_max(rowoffset, frameoffset)
+					rowheight = math_max(rowheight, rowoffset + (frameheight / 2))
+
+					frame:SetPoint("TOPLEFT", children[i-1].frame, "TOPRIGHT", 0, frameoffset - lastframeoffset)
+					usedwidth = framewidth + usedwidth
+				end
+			end
+
+			if child.width == "fill" then
+				safelayoutcall(child, "SetWidth", width)
+				frame:SetPoint("RIGHT", content)
+
+				usedwidth = 0
+				rowstart = frame
+				rowstartoffset = frameoffset
+
+				if child.DoLayout then
+					child:DoLayout()
+				end
+				rowheight = frame.height or frame:GetHeight() or 0
+				rowoffset = child.alignoffset or (rowheight / 2)
+				rowstartoffset = rowoffset
+			elseif child.width == "relative" then
+				safelayoutcall(child, "SetWidth", width * child.relWidth)
+
+				if child.DoLayout then
+					child:DoLayout()
+				end
+			elseif oversize then
+				if width > 1 then
+					frame:SetPoint("RIGHT", content)
+				end
+			end
+
+			if child.height == "fill" then
+				frame:SetPoint("BOTTOM", content)
+				isfullheight = true
+			end
+		end
+
+		--anchor the last row, if its full height needs a special case since  its height has just been changed by the anchor
+		if isfullheight then
+			rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -height)
+		elseif rowstart then
+			rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -(height + (rowoffset - rowstartoffset) + 3))
+		end
+
+		height = height + rowheight + 3
+		safecall(content.obj.LayoutFinished, content.obj, nil, height)
+	end)
+
+-- Get alignment method and value. Possible alignment methods are a callback, a number, "start", "middle", "end", "fill" or "TOPLEFT", "BOTTOMRIGHT" etc.
+local GetCellAlign = function (dir, tableObj, colObj, cellObj, cell, child)
+	local fn = cellObj and (cellObj["align" .. dir] or cellObj.align)
+			or colObj and (colObj["align" .. dir] or colObj.align)
+			or tableObj["align" .. dir] or tableObj.align
+			or "CENTERLEFT"
+	local child, cell, val = child or 0, cell or 0, nil
+
+	if type(fn) == "string" then
+		fn = fn:lower()
+		fn = dir == "V" and (fn:sub(1, 3) == "top" and "start" or fn:sub(1, 6) == "bottom" and "end" or fn:sub(1, 6) == "center" and "middle")
+		  or dir == "H" and (fn:sub(-4) == "left" and "start" or fn:sub(-5) == "right" and "end" or fn:sub(-6) == "center" and "middle")
+		  or fn
+		val = (fn == "start" or fn == "fill") and 0 or fn == "end" and cell - child or (cell - child) / 2
+	elseif type(fn) == "function" then
+		val = fn(child or 0, cell, dir)
+	else
+		val = fn
+	end
+
+	return fn, max(0, min(val, cell))
+end
+
+-- Get width or height for multiple cells combined
+local GetCellDimension = function (dir, laneDim, from, to, space)
+	local dim = 0
+	for cell=from,to do
+		dim = dim + (laneDim[cell] or 0)
+	end
+	return dim + max(0, to - from) * (space or 0)
+end
+
+--[[ Options
+============
+Container:
+ - columns ({col, col, ...}): Column settings. "col" can be a number (<= 0: content width, <1: rel. width, <10: weight, >=10: abs. width) or a table with column setting.
+ - space, spaceH, spaceV: Overall, horizontal and vertical spacing between cells.
+ - align, alignH, alignV: Overall, horizontal and vertical cell alignment. See GetCellAlign() for possible values.
+Columns:
+ - width: Fixed column width (nil or <=0: content width, <1: rel. width, >=1: abs. width).
+ - min or 1: Min width for content based width
+ - max or 2: Max width for content based width
+ - weight: Flexible column width. The leftover width after accounting for fixed-width columns is distributed to weighted columns according to their weights.
+ - align, alignH, alignV: Overwrites the container setting for alignment.
+Cell:
+ - colspan: Makes a cell span multiple columns.
+ - rowspan: Makes a cell span multiple rows.
+ - align, alignH, alignV: Overwrites the container and column setting for alignment.
+]]
+AceGUI:RegisterLayout("Table",
+	function (content, children)
+		local obj = content.obj
+		obj:PauseLayout()
+
+		local tableObj = obj:GetUserData("table")
+		local cols = tableObj.columns
+		local spaceH = tableObj.spaceH or tableObj.space or 0
+		local spaceV = tableObj.spaceV or tableObj.space or 0
+		local totalH = (content:GetWidth() or content.width or 0) - spaceH * (#cols - 1)
+
+		-- We need to reuse these because layout events can come in very frequently
+		local layoutCache = obj:GetUserData("layoutCache")
+		if not layoutCache then
+			layoutCache = {{}, {}, {}, {}, {}, {}}
+			obj:SetUserData("layoutCache", layoutCache)
+		end
+		local t, laneH, laneV, rowspans, rowStart, colStart = unpack(layoutCache)
+
+		-- Create the grid
+		local n, slotFound = 0
+		for i,child in ipairs(children) do
+			if child:IsShown() then
+				repeat
+					n = n + 1
+					local col = (n - 1) % #cols + 1
+					local row = ceil(n / #cols)
+					local rowspan = rowspans[col]
+					local cell = rowspan and rowspan.child or child
+					local cellObj = cell:GetUserData("cell")
+					slotFound = not rowspan
+
+					-- Rowspan
+					if not rowspan and cellObj and cellObj.rowspan then
+						rowspan = {child = child, from = row, to = row + cellObj.rowspan - 1}
+						rowspans[col] = rowspan
+					end
+					if rowspan and i == #children then
+						rowspan.to = row
+					end
+
+					-- Colspan
+					local colspan = max(0, min((cellObj and cellObj.colspan or 1) - 1, #cols - col))
+					n = n + colspan
+
+					-- Place the cell
+					if not rowspan or rowspan.to == row then
+						t[n] = cell
+						rowStart[cell] = rowspan and rowspan.from or row
+						colStart[cell] = col
+
+						if rowspan then
+							rowspans[col] = nil
+						end
+					end
+				until slotFound
+			end
+		end
+
+		local rows = ceil(n / #cols)
+
+		-- Determine fixed size cols and collect weights
+		local extantH, totalWeight = totalH, 0
+		for col,colObj in ipairs(cols) do
+			laneH[col] = 0
+
+			if type(colObj) == "number" then
+				colObj = {[colObj >= 1 and colObj < 10 and "weight" or "width"] = colObj}
+				cols[col] = colObj
+			end
+
+			if colObj.weight then
+				-- Weight
+				totalWeight = totalWeight + (colObj.weight or 1)
+			else
+				if not colObj.width or colObj.width <= 0 then
+					-- Content width
+					for row=1,rows do
+						local child = t[(row - 1) * #cols + col]
+						if child then
+							local f = child.frame
+							f:ClearAllPoints()
+							local childH = f:GetWidth() or 0
+
+							laneH[col] = max(laneH[col], childH - GetCellDimension("H", laneH, colStart[child], col - 1, spaceH))
+						end
+					end
+
+					laneH[col] = max(colObj.min or colObj[1] or 0, min(laneH[col], colObj.max or colObj[2] or laneH[col]))
+				else
+					-- Rel./Abs. width
+					laneH[col] = colObj.width < 1 and colObj.width * totalH or colObj.width
+				end
+				extantH = max(0, extantH - laneH[col])
+			end
+		end
+
+		-- Determine sizes based on weight
+		local scale = totalWeight > 0 and extantH / totalWeight or 0
+		for col,colObj in pairs(cols) do
+			if colObj.weight then
+				laneH[col] = scale * colObj.weight
+			end
+		end
+
+		-- Arrange children
+		for row=1,rows do
+			local rowV = 0
+
+			-- Horizontal placement and sizing
+			for col=1,#cols do
+				local child = t[(row - 1) * #cols + col]
+				if child then
+					local colObj = cols[colStart[child]]
+					local cellObj = child:GetUserData("cell")
+					local offsetH = GetCellDimension("H", laneH, 1, colStart[child] - 1, spaceH) + (colStart[child] == 1 and 0 or spaceH)
+					local cellH = GetCellDimension("H", laneH, colStart[child], col, spaceH)
+
+					local f = child.frame
+					f:ClearAllPoints()
+					local childH = f:GetWidth() or 0
+
+					local alignFn, align = GetCellAlign("H", tableObj, colObj, cellObj, cellH, childH)
+					f:SetPoint("LEFT", content, offsetH + align, 0)
+					if child:IsFullWidth() or alignFn == "fill" or childH > cellH then
+						f:SetPoint("RIGHT", content, "LEFT", offsetH + align + cellH, 0)
+					end
+
+					if child.DoLayout then
+						child:DoLayout()
+					end
+
+					rowV = max(rowV, (f:GetHeight() or 0) - GetCellDimension("V", laneV, rowStart[child], row - 1, spaceV))
+				end
+			end
+
+			laneV[row] = rowV
+
+			-- Vertical placement and sizing
+			for col=1,#cols do
+				local child = t[(row - 1) * #cols + col]
+				if child then
+					local colObj = cols[colStart[child]]
+					local cellObj = child:GetUserData("cell")
+					local offsetV = GetCellDimension("V", laneV, 1, rowStart[child] - 1, spaceV) + (rowStart[child] == 1 and 0 or spaceV)
+					local cellV = GetCellDimension("V", laneV, rowStart[child], row, spaceV)
+
+					local f = child.frame
+					local childV = f:GetHeight() or 0
+
+					local alignFn, align = GetCellAlign("V", tableObj, colObj, cellObj, cellV, childV)
+					if child:IsFullHeight() or alignFn == "fill" then
+						f:SetHeight(cellV)
+					end
+					f:SetPoint("TOP", content, 0, -(offsetV + align))
+				end
+			end
+		end
+
+		-- Calculate total height
+		local totalV = GetCellDimension("V", laneV, 1, #laneV, spaceV)
+
+		-- Cleanup
+		for _,v in pairs(layoutCache) do wipe(v) end
+
+		safecall(obj.LayoutFinished, obj, nil, totalV)
+		obj:ResumeLayout()
+	end)
diff --git a/EMA/Libs/AceGUI-3.0/AceGUI-3.0.xml b/EMA/Libs/AceGUI-3.0/AceGUI-3.0.xml
new file mode 100644
index 0000000..b515077
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/AceGUI-3.0.xml
@@ -0,0 +1,28 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceGUI-3.0.lua"/>
+	<!-- Container -->
+	<Script file="widgets\AceGUIContainer-BlizOptionsGroup.lua"/>
+	<Script file="widgets\AceGUIContainer-DropDownGroup.lua"/>
+	<Script file="widgets\AceGUIContainer-Frame.lua"/>
+	<Script file="widgets\AceGUIContainer-InlineGroup.lua"/>
+	<Script file="widgets\AceGUIContainer-ScrollFrame.lua"/>
+	<Script file="widgets\AceGUIContainer-SimpleGroup.lua"/>
+	<Script file="widgets\AceGUIContainer-TabGroup.lua"/>
+	<Script file="widgets\AceGUIContainer-TreeGroup.lua"/>
+	<Script file="widgets\AceGUIContainer-Window.lua"/>
+	<!-- Widgets -->
+	<Script file="widgets\AceGUIWidget-Button.lua"/>
+	<Script file="widgets\AceGUIWidget-CheckBox.lua"/>
+	<Script file="widgets\AceGUIWidget-ColorPicker.lua"/>
+	<Script file="widgets\AceGUIWidget-DropDown.lua"/>
+	<Script file="widgets\AceGUIWidget-DropDown-Items.lua"/>
+	<Script file="widgets\AceGUIWidget-EditBox.lua"/>
+	<Script file="widgets\AceGUIWidget-Heading.lua"/>
+	<Script file="widgets\AceGUIWidget-Icon.lua"/>
+	<Script file="widgets\AceGUIWidget-InteractiveLabel.lua"/>
+	<Script file="widgets\AceGUIWidget-Keybinding.lua"/>
+	<Script file="widgets\AceGUIWidget-Label.lua"/>
+	<Script file="widgets\AceGUIWidget-MultiLineEditBox.lua"/>
+	<Script file="widgets\AceGUIWidget-Slider.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
new file mode 100644
index 0000000..9a48f8b
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
@@ -0,0 +1,138 @@
+--[[-----------------------------------------------------------------------------
+BlizOptionsGroup Container
+Simple container widget for the integration of AceGUI into the Blizzard Interface Options
+-------------------------------------------------------------------------------]]
+local Type, Version = "BlizOptionsGroup", 21
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs = pairs
+
+-- WoW APIs
+local CreateFrame = CreateFrame
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+
+local function OnShow(frame)
+	frame.obj:Fire("OnShow")
+end
+
+local function OnHide(frame)
+	frame.obj:Fire("OnHide")
+end
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+
+local function okay(frame)
+	frame.obj:Fire("okay")
+end
+
+local function cancel(frame)
+	frame.obj:Fire("cancel")
+end
+
+local function default(frame)
+	frame.obj:Fire("default")
+end
+
+local function refresh(frame)
+	frame.obj:Fire("refresh")
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetName()
+		self:SetTitle()
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		local contentwidth = width - 63
+		if contentwidth < 0 then
+			contentwidth = 0
+		end
+		content:SetWidth(contentwidth)
+		content.width = contentwidth
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		local contentheight = height - 26
+		if contentheight < 0 then
+			contentheight = 0
+		end
+		content:SetHeight(contentheight)
+		content.height = contentheight
+	end,
+
+	["SetName"] = function(self, name, parent)
+		self.frame.name = name
+		self.frame.parent = parent
+	end,
+
+	["SetTitle"] = function(self, title)
+		local content = self.content
+		content:ClearAllPoints()
+		if not title or title == "" then
+			content:SetPoint("TOPLEFT", 10, -10)
+			self.label:SetText("")
+		else
+			content:SetPoint("TOPLEFT", 10, -40)
+			self.label:SetText(title)
+		end
+		content:SetPoint("BOTTOMRIGHT", -10, 10)
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local frame = CreateFrame("Frame")
+	frame:Hide()
+
+	-- support functions for the Blizzard Interface Options
+	frame.okay = okay
+	frame.cancel = cancel
+	frame.default = default
+	frame.refresh = refresh
+
+	frame:SetScript("OnHide", OnHide)
+	frame:SetScript("OnShow", OnShow)
+
+	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
+	label:SetPoint("TOPLEFT", 10, -15)
+	label:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", 10, -45)
+	label:SetJustifyH("LEFT")
+	label:SetJustifyV("TOP")
+
+	--Container Support
+	local content = CreateFrame("Frame", nil, frame)
+	content:SetPoint("TOPLEFT", 10, -10)
+	content:SetPoint("BOTTOMRIGHT", -10, 10)
+
+	local widget = {
+		label   = label,
+		frame   = frame,
+		content = content,
+		type    = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
new file mode 100644
index 0000000..b0f81b7
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
@@ -0,0 +1,157 @@
+--[[-----------------------------------------------------------------------------
+DropdownGroup Container
+Container controlled by a dropdown on the top.
+-------------------------------------------------------------------------------]]
+local Type, Version = "DropdownGroup", 21
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local assert, pairs, type = assert, pairs, type
+
+-- WoW APIs
+local CreateFrame = CreateFrame
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function SelectedGroup(self, event, value)
+	local group = self.parentgroup
+	local status = group.status or group.localstatus
+	status.selected = value
+	self.parentgroup:Fire("OnGroupSelected", value)
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self.dropdown:SetText("")
+		self:SetDropdownWidth(200)
+		self:SetTitle("")
+	end,
+
+	["OnRelease"] = function(self)
+		self.dropdown.list = nil
+		self.status = nil
+		for k in pairs(self.localstatus) do
+			self.localstatus[k] = nil
+		end
+	end,
+
+	["SetTitle"] = function(self, title)
+		self.titletext:SetText(title)
+		self.dropdown.frame:ClearAllPoints()
+		if title and title ~= "" then
+			self.dropdown.frame:SetPoint("TOPRIGHT", -2, 0)
+		else
+			self.dropdown.frame:SetPoint("TOPLEFT", -1, 0)
+		end
+	end,
+
+	["SetGroupList"] = function(self,list,order)
+		self.dropdown:SetList(list,order)
+	end,
+
+	["SetStatusTable"] = function(self, status)
+		assert(type(status) == "table")
+		self.status = status
+	end,
+
+	["SetGroup"] = function(self,group)
+		self.dropdown:SetValue(group)
+		local status = self.status or self.localstatus
+		status.selected = group
+		self:Fire("OnGroupSelected", group)
+	end,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		local contentwidth = width - 26
+		if contentwidth < 0 then
+			contentwidth = 0
+		end
+		content:SetWidth(contentwidth)
+		content.width = contentwidth
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		local contentheight = height - 63
+		if contentheight < 0 then
+			contentheight = 0
+		end
+		content:SetHeight(contentheight)
+		content.height = contentheight
+	end,
+
+	["LayoutFinished"] = function(self, width, height)
+		self:SetHeight((height or 0) + 63)
+	end,
+
+	["SetDropdownWidth"] = function(self, width)
+		self.dropdown:SetWidth(width)
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local PaneBackdrop  = {
+	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+	tile = true, tileSize = 16, edgeSize = 16,
+	insets = { left = 3, right = 3, top = 5, bottom = 3 }
+}
+
+local function Constructor()
+	local frame = CreateFrame("Frame")
+	frame:SetHeight(100)
+	frame:SetWidth(100)
+	frame:SetFrameStrata("FULLSCREEN_DIALOG")
+
+	local titletext = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+	titletext:SetPoint("TOPLEFT", 4, -5)
+	titletext:SetPoint("TOPRIGHT", -4, -5)
+	titletext:SetJustifyH("LEFT")
+	titletext:SetHeight(18)
+
+	local dropdown = AceGUI:Create("Dropdown")
+	dropdown.frame:SetParent(frame)
+	dropdown.frame:SetFrameLevel(dropdown.frame:GetFrameLevel() + 2)
+	dropdown:SetCallback("OnValueChanged", SelectedGroup)
+	dropdown.frame:SetPoint("TOPLEFT", -1, 0)
+	dropdown.frame:Show()
+	dropdown:SetLabel("")
+
+	local border = CreateFrame("Frame", nil, frame)
+	border:SetPoint("TOPLEFT", 0, -26)
+	border:SetPoint("BOTTOMRIGHT", 0, 3)
+	border:SetBackdrop(PaneBackdrop)
+	border:SetBackdropColor(0.1,0.1,0.1,0.5)
+	border:SetBackdropBorderColor(0.4,0.4,0.4)
+
+	--Container Support
+	local content = CreateFrame("Frame", nil, border)
+	content:SetPoint("TOPLEFT", 10, -10)
+	content:SetPoint("BOTTOMRIGHT", -10, 10)
+
+	local widget = {
+		frame       = frame,
+		localstatus = {},
+		titletext   = titletext,
+		dropdown    = dropdown,
+		border      = border,
+		content     = content,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	dropdown.parentgroup = widget
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
new file mode 100644
index 0000000..80fd582
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
@@ -0,0 +1,316 @@
+--[[-----------------------------------------------------------------------------
+Frame Container
+-------------------------------------------------------------------------------]]
+local Type, Version = "Frame", 26
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs, assert, type = pairs, assert, type
+local wipe = table.wipe
+
+-- WoW APIs
+local PlaySound = PlaySound
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: CLOSE
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Button_OnClick(frame)
+	PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
+	frame.obj:Hide()
+end
+
+local function Frame_OnShow(frame)
+	frame.obj:Fire("OnShow")
+end
+
+local function Frame_OnClose(frame)
+	frame.obj:Fire("OnClose")
+end
+
+local function Frame_OnMouseDown(frame)
+	AceGUI:ClearFocus()
+end
+
+local function Title_OnMouseDown(frame)
+	frame:GetParent():StartMoving()
+	AceGUI:ClearFocus()
+end
+
+local function MoverSizer_OnMouseUp(mover)
+	local frame = mover:GetParent()
+	frame:StopMovingOrSizing()
+	local self = frame.obj
+	local status = self.status or self.localstatus
+	status.width = frame:GetWidth()
+	status.height = frame:GetHeight()
+	status.top = frame:GetTop()
+	status.left = frame:GetLeft()
+end
+
+local function SizerSE_OnMouseDown(frame)
+	frame:GetParent():StartSizing("BOTTOMRIGHT")
+	AceGUI:ClearFocus()
+end
+
+local function SizerS_OnMouseDown(frame)
+	frame:GetParent():StartSizing("BOTTOM")
+	AceGUI:ClearFocus()
+end
+
+local function SizerE_OnMouseDown(frame)
+	frame:GetParent():StartSizing("RIGHT")
+	AceGUI:ClearFocus()
+end
+
+local function StatusBar_OnEnter(frame)
+	frame.obj:Fire("OnEnterStatusBar")
+end
+
+local function StatusBar_OnLeave(frame)
+	frame.obj:Fire("OnLeaveStatusBar")
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self.frame:SetParent(UIParent)
+		self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
+		self:SetTitle()
+		self:SetStatusText()
+		self:ApplyStatus()
+		self:Show()
+        self:EnableResize(true)
+	end,
+
+	["OnRelease"] = function(self)
+		self.status = nil
+		wipe(self.localstatus)
+	end,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		local contentwidth = width - 34
+		if contentwidth < 0 then
+			contentwidth = 0
+		end
+		content:SetWidth(contentwidth)
+		content.width = contentwidth
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		local contentheight = height - 57
+		if contentheight < 0 then
+			contentheight = 0
+		end
+		content:SetHeight(contentheight)
+		content.height = contentheight
+	end,
+
+	["SetTitle"] = function(self, title)
+		self.titletext:SetText(title)
+		self.titlebg:SetWidth((self.titletext:GetWidth() or 0) + 10)
+	end,
+
+	["SetStatusText"] = function(self, text)
+		self.statustext:SetText(text)
+	end,
+
+	["Hide"] = function(self)
+		self.frame:Hide()
+	end,
+
+	["Show"] = function(self)
+		self.frame:Show()
+	end,
+
+	["EnableResize"] = function(self, state)
+		local func = state and "Show" or "Hide"
+		self.sizer_se[func](self.sizer_se)
+		self.sizer_s[func](self.sizer_s)
+		self.sizer_e[func](self.sizer_e)
+	end,
+
+	-- called to set an external table to store status in
+	["SetStatusTable"] = function(self, status)
+		assert(type(status) == "table")
+		self.status = status
+		self:ApplyStatus()
+	end,
+
+	["ApplyStatus"] = function(self)
+		local status = self.status or self.localstatus
+		local frame = self.frame
+		self:SetWidth(status.width or 700)
+		self:SetHeight(status.height or 500)
+		frame:ClearAllPoints()
+		if status.top and status.left then
+			frame:SetPoint("TOP", UIParent, "BOTTOM", 0, status.top)
+			frame:SetPoint("LEFT", UIParent, "LEFT", status.left, 0)
+		else
+			frame:SetPoint("CENTER")
+		end
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local FrameBackdrop = {
+	bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+	edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
+	tile = true, tileSize = 32, edgeSize = 32,
+	insets = { left = 8, right = 8, top = 8, bottom = 8 }
+}
+
+local PaneBackdrop  = {
+	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+	tile = true, tileSize = 16, edgeSize = 16,
+	insets = { left = 3, right = 3, top = 5, bottom = 3 }
+}
+
+local function Constructor()
+	local frame = CreateFrame("Frame", nil, UIParent)
+	frame:Hide()
+
+	frame:EnableMouse(true)
+	frame:SetMovable(true)
+	frame:SetResizable(true)
+	frame:SetFrameStrata("FULLSCREEN_DIALOG")
+	frame:SetBackdrop(FrameBackdrop)
+	frame:SetBackdropColor(0, 0, 0, 1)
+	frame:SetMinResize(400, 200)
+	frame:SetToplevel(true)
+	frame:SetScript("OnShow", Frame_OnShow)
+	frame:SetScript("OnHide", Frame_OnClose)
+	frame:SetScript("OnMouseDown", Frame_OnMouseDown)
+
+	local closebutton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate")
+	closebutton:SetScript("OnClick", Button_OnClick)
+	closebutton:SetPoint("BOTTOMRIGHT", -27, 17)
+	closebutton:SetHeight(20)
+	closebutton:SetWidth(100)
+	closebutton:SetText(CLOSE)
+
+	local statusbg = CreateFrame("Button", nil, frame)
+	statusbg:SetPoint("BOTTOMLEFT", 15, 15)
+	statusbg:SetPoint("BOTTOMRIGHT", -132, 15)
+	statusbg:SetHeight(24)
+	statusbg:SetBackdrop(PaneBackdrop)
+	statusbg:SetBackdropColor(0.1,0.1,0.1)
+	statusbg:SetBackdropBorderColor(0.4,0.4,0.4)
+	statusbg:SetScript("OnEnter", StatusBar_OnEnter)
+	statusbg:SetScript("OnLeave", StatusBar_OnLeave)
+
+	local statustext = statusbg:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+	statustext:SetPoint("TOPLEFT", 7, -2)
+	statustext:SetPoint("BOTTOMRIGHT", -7, 2)
+	statustext:SetHeight(20)
+	statustext:SetJustifyH("LEFT")
+	statustext:SetText("")
+
+	local titlebg = frame:CreateTexture(nil, "OVERLAY")
+	titlebg:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
+	titlebg:SetTexCoord(0.31, 0.67, 0, 0.63)
+	titlebg:SetPoint("TOP", 0, 12)
+	titlebg:SetWidth(100)
+	titlebg:SetHeight(40)
+
+	local title = CreateFrame("Frame", nil, frame)
+	title:EnableMouse(true)
+	title:SetScript("OnMouseDown", Title_OnMouseDown)
+	title:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
+	title:SetAllPoints(titlebg)
+
+	local titletext = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+	titletext:SetPoint("TOP", titlebg, "TOP", 0, -14)
+
+	local titlebg_l = frame:CreateTexture(nil, "OVERLAY")
+	titlebg_l:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
+	titlebg_l:SetTexCoord(0.21, 0.31, 0, 0.63)
+	titlebg_l:SetPoint("RIGHT", titlebg, "LEFT")
+	titlebg_l:SetWidth(30)
+	titlebg_l:SetHeight(40)
+
+	local titlebg_r = frame:CreateTexture(nil, "OVERLAY")
+	titlebg_r:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
+	titlebg_r:SetTexCoord(0.67, 0.77, 0, 0.63)
+	titlebg_r:SetPoint("LEFT", titlebg, "RIGHT")
+	titlebg_r:SetWidth(30)
+	titlebg_r:SetHeight(40)
+
+	local sizer_se = CreateFrame("Frame", nil, frame)
+	sizer_se:SetPoint("BOTTOMRIGHT")
+	sizer_se:SetWidth(25)
+	sizer_se:SetHeight(25)
+	sizer_se:EnableMouse()
+	sizer_se:SetScript("OnMouseDown",SizerSE_OnMouseDown)
+	sizer_se:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
+
+	local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
+	line1:SetWidth(14)
+	line1:SetHeight(14)
+	line1:SetPoint("BOTTOMRIGHT", -8, 8)
+	line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
+	local x = 0.1 * 14/17
+	line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
+
+	local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
+	line2:SetWidth(8)
+	line2:SetHeight(8)
+	line2:SetPoint("BOTTOMRIGHT", -8, 8)
+	line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
+	local x = 0.1 * 8/17
+	line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
+
+	local sizer_s = CreateFrame("Frame", nil, frame)
+	sizer_s:SetPoint("BOTTOMRIGHT", -25, 0)
+	sizer_s:SetPoint("BOTTOMLEFT")
+	sizer_s:SetHeight(25)
+	sizer_s:EnableMouse(true)
+	sizer_s:SetScript("OnMouseDown", SizerS_OnMouseDown)
+	sizer_s:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
+
+	local sizer_e = CreateFrame("Frame", nil, frame)
+	sizer_e:SetPoint("BOTTOMRIGHT", 0, 25)
+	sizer_e:SetPoint("TOPRIGHT")
+	sizer_e:SetWidth(25)
+	sizer_e:EnableMouse(true)
+	sizer_e:SetScript("OnMouseDown", SizerE_OnMouseDown)
+	sizer_e:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
+
+	--Container Support
+	local content = CreateFrame("Frame", nil, frame)
+	content:SetPoint("TOPLEFT", 17, -27)
+	content:SetPoint("BOTTOMRIGHT", -17, 40)
+
+	local widget = {
+		localstatus = {},
+		titletext   = titletext,
+		statustext  = statustext,
+		titlebg     = titlebg,
+		sizer_se    = sizer_se,
+		sizer_s     = sizer_s,
+		sizer_e     = sizer_e,
+		content     = content,
+		frame       = frame,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	closebutton.obj, statusbg.obj = widget, widget
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
new file mode 100644
index 0000000..f3db7d6
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
@@ -0,0 +1,103 @@
+--[[-----------------------------------------------------------------------------
+InlineGroup Container
+Simple container widget that creates a visible "box" with an optional title.
+-------------------------------------------------------------------------------]]
+local Type, Version = "InlineGroup", 21
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs = pairs
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetWidth(300)
+		self:SetHeight(100)
+		self:SetTitle("")
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["SetTitle"] = function(self,title)
+		self.titletext:SetText(title)
+	end,
+
+
+	["LayoutFinished"] = function(self, width, height)
+		if self.noAutoHeight then return end
+		self:SetHeight((height or 0) + 40)
+	end,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		local contentwidth = width - 20
+		if contentwidth < 0 then
+			contentwidth = 0
+		end
+		content:SetWidth(contentwidth)
+		content.width = contentwidth
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		local contentheight = height - 20
+		if contentheight < 0 then
+			contentheight = 0
+		end
+		content:SetHeight(contentheight)
+		content.height = contentheight
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local PaneBackdrop  = {
+	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+	tile = true, tileSize = 16, edgeSize = 16,
+	insets = { left = 3, right = 3, top = 5, bottom = 3 }
+}
+
+local function Constructor()
+	local frame = CreateFrame("Frame", nil, UIParent)
+	frame:SetFrameStrata("FULLSCREEN_DIALOG")
+
+	local titletext = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+	titletext:SetPoint("TOPLEFT", 14, 0)
+	titletext:SetPoint("TOPRIGHT", -14, 0)
+	titletext:SetJustifyH("LEFT")
+	titletext:SetHeight(18)
+
+	local border = CreateFrame("Frame", nil, frame)
+	border:SetPoint("TOPLEFT", 0, -17)
+	border:SetPoint("BOTTOMRIGHT", -1, 3)
+	border:SetBackdrop(PaneBackdrop)
+	border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
+	border:SetBackdropBorderColor(0.4, 0.4, 0.4)
+
+	--Container Support
+	local content = CreateFrame("Frame", nil, border)
+	content:SetPoint("TOPLEFT", 10, -10)
+	content:SetPoint("BOTTOMRIGHT", -10, 10)
+
+	local widget = {
+		frame     = frame,
+		content   = content,
+		titletext = titletext,
+		type      = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
new file mode 100644
index 0000000..9afb54b
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
@@ -0,0 +1,204 @@
+--[[-----------------------------------------------------------------------------
+ScrollFrame Container
+Plain container that scrolls its content and doesn't grow in height.
+-------------------------------------------------------------------------------]]
+local Type, Version = "ScrollFrame", 24
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs, assert, type = pairs, assert, type
+local min, max, floor, abs = math.min, math.max, math.floor, math.abs
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+local function FixScrollOnUpdate(frame)
+	frame:SetScript("OnUpdate", nil)
+	frame.obj:FixScroll()
+end
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function ScrollFrame_OnMouseWheel(frame, value)
+	frame.obj:MoveScroll(value)
+end
+
+local function ScrollFrame_OnSizeChanged(frame)
+	frame:SetScript("OnUpdate", FixScrollOnUpdate)
+end
+
+local function ScrollBar_OnScrollValueChanged(frame, value)
+	frame.obj:SetScroll(value)
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetScroll(0)
+		self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate)
+	end,
+
+	["OnRelease"] = function(self)
+		self.status = nil
+		for k in pairs(self.localstatus) do
+			self.localstatus[k] = nil
+		end
+		self.scrollframe:SetPoint("BOTTOMRIGHT")
+		self.scrollbar:Hide()
+		self.scrollBarShown = nil
+		self.content.height, self.content.width = nil, nil
+	end,
+
+	["SetScroll"] = function(self, value)
+		local status = self.status or self.localstatus
+		local viewheight = self.scrollframe:GetHeight()
+		local height = self.content:GetHeight()
+		local offset
+
+		if viewheight > height then
+			offset = 0
+		else
+			offset = floor((height - viewheight) / 1000.0 * value)
+		end
+		self.content:ClearAllPoints()
+		self.content:SetPoint("TOPLEFT", 0, offset)
+		self.content:SetPoint("TOPRIGHT", 0, offset)
+		status.offset = offset
+		status.scrollvalue = value
+	end,
+
+	["MoveScroll"] = function(self, value)
+		local status = self.status or self.localstatus
+		local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight()
+
+		if self.scrollBarShown then
+			local diff = height - viewheight
+			local delta = 1
+			if value < 0 then
+				delta = -1
+			end
+			self.scrollbar:SetValue(min(max(status.scrollvalue + delta*(1000/(diff/45)),0), 1000))
+		end
+	end,
+
+	["FixScroll"] = function(self)
+		if self.updateLock then return end
+		self.updateLock = true
+		local status = self.status or self.localstatus
+		local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight()
+		local offset = status.offset or 0
+		local curvalue = self.scrollbar:GetValue()
+		-- Give us a margin of error of 2 pixels to stop some conditions that i would blame on floating point inaccuracys
+		-- No-one is going to miss 2 pixels at the bottom of the frame, anyhow!
+		if viewheight < height + 2 then
+			if self.scrollBarShown then
+				self.scrollBarShown = nil
+				self.scrollbar:Hide()
+				self.scrollbar:SetValue(0)
+				self.scrollframe:SetPoint("BOTTOMRIGHT")
+				self:DoLayout()
+			end
+		else
+			if not self.scrollBarShown then
+				self.scrollBarShown = true
+				self.scrollbar:Show()
+				self.scrollframe:SetPoint("BOTTOMRIGHT", -20, 0)
+				self:DoLayout()
+			end
+			local value = (offset / (viewheight - height) * 1000)
+			if value > 1000 then value = 1000 end
+			self.scrollbar:SetValue(value)
+			self:SetScroll(value)
+			if value < 1000 then
+				self.content:ClearAllPoints()
+				self.content:SetPoint("TOPLEFT", 0, offset)
+				self.content:SetPoint("TOPRIGHT", 0, offset)
+				status.offset = offset
+			end
+		end
+		self.updateLock = nil
+	end,
+
+	["LayoutFinished"] = function(self, width, height)
+		self.content:SetHeight(height or 0 + 20)
+		self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate)
+	end,
+
+	["SetStatusTable"] = function(self, status)
+		assert(type(status) == "table")
+		self.status = status
+		if not status.scrollvalue then
+			status.scrollvalue = 0
+		end
+	end,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		content.width = width
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		content.height = height
+	end
+}
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local frame = CreateFrame("Frame", nil, UIParent)
+	local num = AceGUI:GetNextWidgetNum(Type)
+
+	local scrollframe = CreateFrame("ScrollFrame", nil, frame)
+	scrollframe:SetPoint("TOPLEFT")
+	scrollframe:SetPoint("BOTTOMRIGHT")
+	scrollframe:EnableMouseWheel(true)
+	scrollframe:SetScript("OnMouseWheel", ScrollFrame_OnMouseWheel)
+	scrollframe:SetScript("OnSizeChanged", ScrollFrame_OnSizeChanged)
+
+	local scrollbar = CreateFrame("Slider", ("AceConfigDialogScrollFrame%dScrollBar"):format(num), scrollframe, "UIPanelScrollBarTemplate")
+	scrollbar:SetPoint("TOPLEFT", scrollframe, "TOPRIGHT", 4, -16)
+	scrollbar:SetPoint("BOTTOMLEFT", scrollframe, "BOTTOMRIGHT", 4, 16)
+	scrollbar:SetMinMaxValues(0, 1000)
+	scrollbar:SetValueStep(1)
+	scrollbar:SetValue(0)
+	scrollbar:SetWidth(16)
+	scrollbar:Hide()
+	-- set the script as the last step, so it doesn't fire yet
+	scrollbar:SetScript("OnValueChanged", ScrollBar_OnScrollValueChanged)
+
+	local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
+	scrollbg:SetAllPoints(scrollbar)
+	scrollbg:SetColorTexture(0, 0, 0, 0.4)
+
+	--Container Support
+	local content = CreateFrame("Frame", nil, scrollframe)
+	content:SetPoint("TOPLEFT")
+	content:SetPoint("TOPRIGHT")
+	content:SetHeight(400)
+	scrollframe:SetScrollChild(content)
+
+	local widget = {
+		localstatus = { scrollvalue = 0 },
+		scrollframe = scrollframe,
+		scrollbar   = scrollbar,
+		content     = content,
+		frame       = frame,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	scrollframe.obj, scrollbar.obj = widget, widget
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua
new file mode 100644
index 0000000..57512c3
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua
@@ -0,0 +1,69 @@
+--[[-----------------------------------------------------------------------------
+SimpleGroup Container
+Simple container widget that just groups widgets.
+-------------------------------------------------------------------------------]]
+local Type, Version = "SimpleGroup", 20
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs = pairs
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetWidth(300)
+		self:SetHeight(100)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["LayoutFinished"] = function(self, width, height)
+		if self.noAutoHeight then return end
+		self:SetHeight(height or 0)
+	end,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		content:SetWidth(width)
+		content.width = width
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		content:SetHeight(height)
+		content.height = height
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local frame = CreateFrame("Frame", nil, UIParent)
+	frame:SetFrameStrata("FULLSCREEN_DIALOG")
+
+	--Container Support
+	local content = CreateFrame("Frame", nil, frame)
+	content:SetPoint("TOPLEFT")
+	content:SetPoint("BOTTOMRIGHT")
+
+	local widget = {
+		frame     = frame,
+		content   = content,
+		type      = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
new file mode 100644
index 0000000..95544c5
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
@@ -0,0 +1,350 @@
+--[[-----------------------------------------------------------------------------
+TabGroup Container
+Container that uses tabs on top to switch between groups.
+-------------------------------------------------------------------------------]]
+local Type, Version = "TabGroup", 36
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs, ipairs, assert, type, wipe = pairs, ipairs, assert, type, wipe
+
+-- WoW APIs
+local PlaySound = PlaySound
+local CreateFrame, UIParent = CreateFrame, UIParent
+local _G = _G
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: PanelTemplates_TabResize, PanelTemplates_SetDisabledTabState, PanelTemplates_SelectTab, PanelTemplates_DeselectTab
+
+-- local upvalue storage used by BuildTabs
+local widths = {}
+local rowwidths = {}
+local rowends = {}
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+local function UpdateTabLook(frame)
+	if frame.disabled then
+		PanelTemplates_SetDisabledTabState(frame)
+	elseif frame.selected then
+		PanelTemplates_SelectTab(frame)
+	else
+		PanelTemplates_DeselectTab(frame)
+	end
+end
+
+local function Tab_SetText(frame, text)
+	frame:_SetText(text)
+	local width = frame.obj.frame.width or frame.obj.frame:GetWidth() or 0
+	PanelTemplates_TabResize(frame, 0, nil, nil, width, frame:GetFontString():GetStringWidth())
+end
+
+local function Tab_SetSelected(frame, selected)
+	frame.selected = selected
+	UpdateTabLook(frame)
+end
+
+local function Tab_SetDisabled(frame, disabled)
+	frame.disabled = disabled
+	UpdateTabLook(frame)
+end
+
+local function BuildTabsOnUpdate(frame)
+	local self = frame.obj
+	self:BuildTabs()
+	frame:SetScript("OnUpdate", nil)
+end
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Tab_OnClick(frame)
+	if not (frame.selected or frame.disabled) then
+		PlaySound(841) -- SOUNDKIT.IG_CHARACTER_INFO_TAB
+		frame.obj:SelectTab(frame.value)
+	end
+end
+
+local function Tab_OnEnter(frame)
+	local self = frame.obj
+	self:Fire("OnTabEnter", self.tabs[frame.id].value, frame)
+end
+
+local function Tab_OnLeave(frame)
+	local self = frame.obj
+	self:Fire("OnTabLeave", self.tabs[frame.id].value, frame)
+end
+
+local function Tab_OnShow(frame)
+	_G[frame:GetName().."HighlightTexture"]:SetWidth(frame:GetTextWidth() + 30)
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetTitle()
+	end,
+
+	["OnRelease"] = function(self)
+		self.status = nil
+		for k in pairs(self.localstatus) do
+			self.localstatus[k] = nil
+		end
+		self.tablist = nil
+		for _, tab in pairs(self.tabs) do
+			tab:Hide()
+		end
+	end,
+
+	["CreateTab"] = function(self, id)
+		local tabname = ("AceGUITabGroup%dTab%d"):format(self.num, id)
+		local tab = CreateFrame("Button", tabname, self.border, "OptionsFrameTabButtonTemplate")
+		tab.obj = self
+		tab.id = id
+
+		tab.text = _G[tabname .. "Text"]
+		tab.text:ClearAllPoints()
+		tab.text:SetPoint("LEFT", 14, -3)
+		tab.text:SetPoint("RIGHT", -12, -3)
+
+		tab:SetScript("OnClick", Tab_OnClick)
+		tab:SetScript("OnEnter", Tab_OnEnter)
+		tab:SetScript("OnLeave", Tab_OnLeave)
+		tab:SetScript("OnShow", Tab_OnShow)
+
+		tab._SetText = tab.SetText
+		tab.SetText = Tab_SetText
+		tab.SetSelected = Tab_SetSelected
+		tab.SetDisabled = Tab_SetDisabled
+
+		return tab
+	end,
+
+	["SetTitle"] = function(self, text)
+		self.titletext:SetText(text or "")
+		if text and text ~= "" then
+			self.alignoffset = 25
+		else
+			self.alignoffset = 18
+		end
+		self:BuildTabs()
+	end,
+
+	["SetStatusTable"] = function(self, status)
+		assert(type(status) == "table")
+		self.status = status
+	end,
+
+	["SelectTab"] = function(self, value)
+		local status = self.status or self.localstatus
+		local found
+		for i, v in ipairs(self.tabs) do
+			if v.value == value then
+				v:SetSelected(true)
+				found = true
+			else
+				v:SetSelected(false)
+			end
+		end
+		status.selected = value
+		if found then
+			self:Fire("OnGroupSelected",value)
+		end
+	end,
+
+	["SetTabs"] = function(self, tabs)
+		self.tablist = tabs
+		self:BuildTabs()
+	end,
+
+
+	["BuildTabs"] = function(self)
+		local hastitle = (self.titletext:GetText() and self.titletext:GetText() ~= "")
+		local status = self.status or self.localstatus
+		local tablist = self.tablist
+		local tabs = self.tabs
+
+		if not tablist then return end
+
+		local width = self.frame.width or self.frame:GetWidth() or 0
+
+		wipe(widths)
+		wipe(rowwidths)
+		wipe(rowends)
+
+		--Place Text into tabs and get thier initial width
+		for i, v in ipairs(tablist) do
+			local tab = tabs[i]
+			if not tab then
+				tab = self:CreateTab(i)
+				tabs[i] = tab
+			end
+
+			tab:Show()
+			tab:SetText(v.text)
+			tab:SetDisabled(v.disabled)
+			tab.value = v.value
+
+			widths[i] = tab:GetWidth() - 6 --tabs are anchored 10 pixels from the right side of the previous one to reduce spacing, but add a fixed 4px padding for the text
+		end
+
+		for i = (#tablist)+1, #tabs, 1 do
+			tabs[i]:Hide()
+		end
+
+		--First pass, find the minimum number of rows needed to hold all tabs and the initial tab layout
+		local numtabs = #tablist
+		local numrows = 1
+		local usedwidth = 0
+
+		for i = 1, #tablist do
+			--If this is not the first tab of a row and there isn't room for it
+			if usedwidth ~= 0 and (width - usedwidth - widths[i]) < 0 then
+				rowwidths[numrows] = usedwidth + 10 --first tab in each row takes up an extra 10px
+				rowends[numrows] = i - 1
+				numrows = numrows + 1
+				usedwidth = 0
+			end
+			usedwidth = usedwidth + widths[i]
+		end
+		rowwidths[numrows] = usedwidth + 10 --first tab in each row takes up an extra 10px
+		rowends[numrows] = #tablist
+
+		--Fix for single tabs being left on the last row, move a tab from the row above if applicable
+		if numrows > 1 then
+			--if the last row has only one tab
+			if rowends[numrows-1] == numtabs-1 then
+				--if there are more than 2 tabs in the 2nd last row
+				if (numrows == 2 and rowends[numrows-1] > 2) or (rowends[numrows] - rowends[numrows-1] > 2) then
+					--move 1 tab from the second last row to the last, if there is enough space
+					if (rowwidths[numrows] + widths[numtabs-1]) <= width then
+						rowends[numrows-1] = rowends[numrows-1] - 1
+						rowwidths[numrows] = rowwidths[numrows] + widths[numtabs-1]
+						rowwidths[numrows-1] = rowwidths[numrows-1] - widths[numtabs-1]
+					end
+				end
+			end
+		end
+
+		--anchor the rows as defined and resize tabs to fill thier row
+		local starttab = 1
+		for row, endtab in ipairs(rowends) do
+			local first = true
+			for tabno = starttab, endtab do
+				local tab = tabs[tabno]
+				tab:ClearAllPoints()
+				if first then
+					tab:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, -(hastitle and 14 or 7)-(row-1)*20 )
+					first = false
+				else
+					tab:SetPoint("LEFT", tabs[tabno-1], "RIGHT", -10, 0)
+				end
+			end
+
+			-- equal padding for each tab to fill the available width,
+			-- if the used space is above 75% already
+			-- the 18 pixel is the typical width of a scrollbar, so we can have a tab group inside a scrolling frame,
+			-- and not have the tabs jump around funny when switching between tabs that need scrolling and those that don't
+			local padding = 0
+			if not (numrows == 1 and rowwidths[1] < width*0.75 - 18) then
+				padding = (width - rowwidths[row]) / (endtab - starttab+1)
+			end
+
+			for i = starttab, endtab do
+				PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width, tabs[i]:GetFontString():GetStringWidth())
+			end
+			starttab = endtab + 1
+		end
+
+		self.borderoffset = (hastitle and 17 or 10)+((numrows)*20)
+		self.border:SetPoint("TOPLEFT", 1, -self.borderoffset)
+	end,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		local contentwidth = width - 60
+		if contentwidth < 0 then
+			contentwidth = 0
+		end
+		content:SetWidth(contentwidth)
+		content.width = contentwidth
+		self:BuildTabs(self)
+		self.frame:SetScript("OnUpdate", BuildTabsOnUpdate)
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		local contentheight = height - (self.borderoffset + 23)
+		if contentheight < 0 then
+			contentheight = 0
+		end
+		content:SetHeight(contentheight)
+		content.height = contentheight
+	end,
+
+	["LayoutFinished"] = function(self, width, height)
+		if self.noAutoHeight then return end
+		self:SetHeight((height or 0) + (self.borderoffset + 23))
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local PaneBackdrop  = {
+	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+	tile = true, tileSize = 16, edgeSize = 16,
+	insets = { left = 3, right = 3, top = 5, bottom = 3 }
+}
+
+local function Constructor()
+	local num = AceGUI:GetNextWidgetNum(Type)
+	local frame = CreateFrame("Frame",nil,UIParent)
+	frame:SetHeight(100)
+	frame:SetWidth(100)
+	frame:SetFrameStrata("FULLSCREEN_DIALOG")
+
+	local titletext = frame:CreateFontString(nil,"OVERLAY","GameFontNormal")
+	titletext:SetPoint("TOPLEFT", 14, 0)
+	titletext:SetPoint("TOPRIGHT", -14, 0)
+	titletext:SetJustifyH("LEFT")
+	titletext:SetHeight(18)
+	titletext:SetText("")
+
+	local border = CreateFrame("Frame", nil, frame)
+	border:SetPoint("TOPLEFT", 1, -27)
+	border:SetPoint("BOTTOMRIGHT", -1, 3)
+	border:SetBackdrop(PaneBackdrop)
+	border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
+	border:SetBackdropBorderColor(0.4, 0.4, 0.4)
+
+	local content = CreateFrame("Frame", nil, border)
+	content:SetPoint("TOPLEFT", 10, -7)
+	content:SetPoint("BOTTOMRIGHT", -10, 7)
+
+	local widget = {
+		num          = num,
+		frame        = frame,
+		localstatus  = {},
+		alignoffset  = 18,
+		titletext    = titletext,
+		border       = border,
+		borderoffset = 27,
+		tabs         = {},
+		content      = content,
+		type         = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
new file mode 100644
index 0000000..236f633
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
@@ -0,0 +1,720 @@
+--[[-----------------------------------------------------------------------------
+TreeGroup Container
+Container that uses a tree control to switch between groups.
+-------------------------------------------------------------------------------]]
+local Type, Version = "TreeGroup", 41
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+local WoW80 = select(4, GetBuildInfo()) >= 80000
+
+-- Lua APIs
+local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
+local math_min, math_max, floor = math.min, math.max, floor
+local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: GameTooltip, FONT_COLOR_CODE_CLOSE
+
+-- Recycling functions
+local new, del
+do
+	local pool = setmetatable({},{__mode='k'})
+	function new()
+		local t = next(pool)
+		if t then
+			pool[t] = nil
+			return t
+		else
+			return {}
+		end
+	end
+	function del(t)
+		for k in pairs(t) do
+			t[k] = nil
+		end
+		pool[t] = true
+	end
+end
+
+local DEFAULT_TREE_WIDTH = 175
+local DEFAULT_TREE_SIZABLE = true
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+local function GetButtonUniqueValue(line)
+	local parent = line.parent
+	if parent and parent.value then
+		return GetButtonUniqueValue(parent).."\001"..line.value
+	else
+		return line.value
+	end
+end
+
+local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
+	local self = button.obj
+	local toggle = button.toggle
+	local frame = self.frame
+	local text = treeline.text or ""
+	local icon = treeline.icon
+	local iconCoords = treeline.iconCoords
+	local level = treeline.level
+	local value = treeline.value
+	local uniquevalue = treeline.uniquevalue
+	local disabled = treeline.disabled
+
+	button.treeline = treeline
+	button.value = value
+	button.uniquevalue = uniquevalue
+	if selected then
+		button:LockHighlight()
+		button.selected = true
+	else
+		button:UnlockHighlight()
+		button.selected = false
+	end
+	local normalTexture = button:GetNormalTexture()
+	local line = button.line
+	button.level = level
+	if ( level == 1 ) then
+		button:SetNormalFontObject("GameFontNormal")
+		button:SetHighlightFontObject("GameFontHighlight")
+		button.text:SetPoint("LEFT", (icon and 16 or 0) + 8, 2)
+	else
+		button:SetNormalFontObject("GameFontHighlightSmall")
+		button:SetHighlightFontObject("GameFontHighlightSmall")
+		button.text:SetPoint("LEFT", (icon and 16 or 0) + 8 * level, 2)
+	end
+
+	if disabled then
+		button:EnableMouse(false)
+		button.text:SetText("|cff808080"..text..FONT_COLOR_CODE_CLOSE)
+	else
+		button.text:SetText(text)
+		button:EnableMouse(true)
+	end
+
+	if icon then
+		button.icon:SetTexture(icon)
+		button.icon:SetPoint("LEFT", 8 * level, (level == 1) and 0 or 1)
+	else
+		button.icon:SetTexture(nil)
+	end
+
+	if iconCoords then
+		button.icon:SetTexCoord(unpack(iconCoords))
+	else
+		button.icon:SetTexCoord(0, 1, 0, 1)
+	end
+
+	if canExpand then
+		if not isExpanded then
+			toggle:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-UP")
+			toggle:SetPushedTexture("Interface\\Buttons\\UI-PlusButton-DOWN")
+		else
+			toggle:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-UP")
+			toggle:SetPushedTexture("Interface\\Buttons\\UI-MinusButton-DOWN")
+		end
+		toggle:Show()
+	else
+		toggle:Hide()
+	end
+end
+
+local function ShouldDisplayLevel(tree)
+	local result = false
+	for k, v in ipairs(tree) do
+		if v.children == nil and v.visible ~= false then
+			result = true
+		elseif v.children then
+			result = result or ShouldDisplayLevel(v.children)
+		end
+		if result then return result end
+	end
+	return false
+end
+
+local function addLine(self, v, tree, level, parent)
+	local line = new()
+	line.value = v.value
+	line.text = v.text
+	line.icon = v.icon
+	line.iconCoords = v.iconCoords
+	line.disabled = v.disabled
+	line.tree = tree
+	line.level = level
+	line.parent = parent
+	line.visible = v.visible
+	line.uniquevalue = GetButtonUniqueValue(line)
+	if v.children then
+		line.hasChildren = true
+	else
+		line.hasChildren = nil
+	end
+	self.lines[#self.lines+1] = line
+	return line
+end
+
+--fire an update after one frame to catch the treeframes height
+local function FirstFrameUpdate(frame)
+	local self = frame.obj
+	frame:SetScript("OnUpdate", nil)
+	self:RefreshTree(nil, true)
+end
+
+local function BuildUniqueValue(...)
+	local n = select('#', ...)
+	if n == 1 then
+		return ...
+	else
+		return (...).."\001"..BuildUniqueValue(select(2,...))
+	end
+end
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Expand_OnClick(frame)
+	local button = frame.button
+	local self = button.obj
+	local status = (self.status or self.localstatus).groups
+	status[button.uniquevalue] = not status[button.uniquevalue]
+	self:RefreshTree()
+end
+
+local function Button_OnClick(frame)
+	local self = frame.obj
+	self:Fire("OnClick", frame.uniquevalue, frame.selected)
+	if not frame.selected then
+		self:SetSelected(frame.uniquevalue)
+		frame.selected = true
+		frame:LockHighlight()
+		self:RefreshTree()
+	end
+	AceGUI:ClearFocus()
+end
+
+local function Button_OnDoubleClick(button)
+	local self = button.obj
+	local status = self.status or self.localstatus
+	local status = (self.status or self.localstatus).groups
+	status[button.uniquevalue] = not status[button.uniquevalue]
+	self:RefreshTree()
+end
+
+local function Button_OnEnter(frame)
+	local self = frame.obj
+	self:Fire("OnButtonEnter", frame.uniquevalue, frame)
+
+	if self.enabletooltips then
+		GameTooltip:SetOwner(frame, "ANCHOR_NONE")
+		GameTooltip:SetPoint("LEFT",frame,"RIGHT")
+		GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
+
+		GameTooltip:Show()
+	end
+end
+
+local function Button_OnLeave(frame)
+	local self = frame.obj
+	self:Fire("OnButtonLeave", frame.uniquevalue, frame)
+
+	if self.enabletooltips then
+		GameTooltip:Hide()
+	end
+end
+
+local function OnScrollValueChanged(frame, value)
+	if frame.obj.noupdate then return end
+	local self = frame.obj
+	local status = self.status or self.localstatus
+	status.scrollvalue = floor(value + 0.5)
+	self:RefreshTree()
+	AceGUI:ClearFocus()
+end
+
+local function Tree_OnSizeChanged(frame)
+	frame.obj:RefreshTree()
+end
+
+local function Tree_OnMouseWheel(frame, delta)
+	local self = frame.obj
+	if self.showscroll then
+		local scrollbar = self.scrollbar
+		local min, max = scrollbar:GetMinMaxValues()
+		local value = scrollbar:GetValue()
+		local newvalue = math_min(max,math_max(min,value - delta))
+		if value ~= newvalue then
+			scrollbar:SetValue(newvalue)
+		end
+	end
+end
+
+local function Dragger_OnLeave(frame)
+	frame:SetBackdropColor(1, 1, 1, 0)
+end
+
+local function Dragger_OnEnter(frame)
+	frame:SetBackdropColor(1, 1, 1, 0.8)
+end
+
+local function Dragger_OnMouseDown(frame)
+	local treeframe = frame:GetParent()
+	treeframe:StartSizing("RIGHT")
+end
+
+local function Dragger_OnMouseUp(frame)
+	local treeframe = frame:GetParent()
+	local self = treeframe.obj
+	local frame = treeframe:GetParent()
+	treeframe:StopMovingOrSizing()
+	--treeframe:SetScript("OnUpdate", nil)
+	treeframe:SetUserPlaced(false)
+	--Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize
+	treeframe:SetHeight(0)
+	treeframe:SetPoint("TOPLEFT", frame, "TOPLEFT",0,0)
+	treeframe:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT",0,0)
+
+	local status = self.status or self.localstatus
+	status.treewidth = treeframe:GetWidth()
+
+	treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth())
+	-- recalculate the content width
+	treeframe.obj:OnWidthSet(status.fullwidth)
+	-- update the layout of the content
+	treeframe.obj:DoLayout()
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
+		self:EnableButtonTooltips(true)
+		self.frame:SetScript("OnUpdate", FirstFrameUpdate)
+	end,
+
+	["OnRelease"] = function(self)
+		self.status = nil
+		self.tree = nil
+		self.frame:SetScript("OnUpdate", nil)
+		for k, v in pairs(self.localstatus) do
+			if k == "groups" then
+				for k2 in pairs(v) do
+					v[k2] = nil
+				end
+			else
+				self.localstatus[k] = nil
+			end
+		end
+		self.localstatus.scrollvalue = 0
+		self.localstatus.treewidth = DEFAULT_TREE_WIDTH
+		self.localstatus.treesizable = DEFAULT_TREE_SIZABLE
+	end,
+
+	["EnableButtonTooltips"] = function(self, enable)
+		self.enabletooltips = enable
+	end,
+
+	["CreateButton"] = function(self)
+		local num = AceGUI:GetNextWidgetNum("TreeGroupButton")
+		local button = CreateFrame("Button", ("AceGUI30TreeButton%d"):format(num), self.treeframe, "OptionsListButtonTemplate")
+		button.obj = self
+
+		local icon = button:CreateTexture(nil, "OVERLAY")
+		icon:SetWidth(14)
+		icon:SetHeight(14)
+		button.icon = icon
+
+		button:SetScript("OnClick",Button_OnClick)
+		button:SetScript("OnDoubleClick", Button_OnDoubleClick)
+		button:SetScript("OnEnter",Button_OnEnter)
+		button:SetScript("OnLeave",Button_OnLeave)
+
+		button.toggle.button = button
+		button.toggle:SetScript("OnClick",Expand_OnClick)
+
+		button.text:SetHeight(14) -- Prevents text wrapping
+
+		return button
+	end,
+
+	["SetStatusTable"] = function(self, status)
+		assert(type(status) == "table")
+		self.status = status
+		if not status.groups then
+			status.groups = {}
+		end
+		if not status.scrollvalue then
+			status.scrollvalue = 0
+		end
+		if not status.treewidth then
+			status.treewidth = DEFAULT_TREE_WIDTH
+		end
+		if status.treesizable == nil then
+			status.treesizable = DEFAULT_TREE_SIZABLE
+		end
+		self:SetTreeWidth(status.treewidth,status.treesizable)
+		self:RefreshTree()
+	end,
+
+	--sets the tree to be displayed
+	["SetTree"] = function(self, tree, filter)
+		self.filter = filter
+		if tree then
+			assert(type(tree) == "table")
+		end
+		self.tree = tree
+		self:RefreshTree()
+	end,
+
+	["BuildLevel"] = function(self, tree, level, parent)
+		local groups = (self.status or self.localstatus).groups
+		local hasChildren = self.hasChildren
+
+		for i, v in ipairs(tree) do
+			if v.children then
+				if not self.filter or ShouldDisplayLevel(v.children) then
+					local line = addLine(self, v, tree, level, parent)
+					if groups[line.uniquevalue] then
+						self:BuildLevel(v.children, level+1, line)
+					end
+				end
+			elseif v.visible ~= false or not self.filter then
+				addLine(self, v, tree, level, parent)
+			end
+		end
+	end,
+
+	["RefreshTree"] = function(self,scrollToSelection,fromOnUpdate)
+		local buttons = self.buttons
+		local lines = self.lines
+
+		for i, v in ipairs(buttons) do
+			v:Hide()
+		end
+		while lines[1] do
+			local t = tremove(lines)
+			for k in pairs(t) do
+				t[k] = nil
+			end
+			del(t)
+		end
+
+		if not self.tree then return end
+		--Build the list of visible entries from the tree and status tables
+		local status = self.status or self.localstatus
+		local groupstatus = status.groups
+		local tree = self.tree
+
+		local treeframe = self.treeframe
+
+		status.scrollToSelection = status.scrollToSelection or scrollToSelection	-- needs to be cached in case the control hasn't been drawn yet (code bails out below)
+
+		self:BuildLevel(tree, 1)
+
+		local numlines = #lines
+
+		local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
+		if maxlines <= 0 then return end
+
+		-- workaround for lag spikes on WoW 8.0
+		if WoW80 and self.frame:GetParent() == UIParent and not fromOnUpdate then
+			self.frame:SetScript("OnUpdate", FirstFrameUpdate)
+			return
+		end
+
+		local first, last
+
+		scrollToSelection = status.scrollToSelection
+		status.scrollToSelection = nil
+
+		if numlines <= maxlines then
+			--the whole tree fits in the frame
+			status.scrollvalue = 0
+			self:ShowScroll(false)
+			first, last = 1, numlines
+		else
+			self:ShowScroll(true)
+			--scrolling will be needed
+			self.noupdate = true
+			self.scrollbar:SetMinMaxValues(0, numlines - maxlines)
+			--check if we are scrolled down too far
+			if numlines - status.scrollvalue < maxlines then
+				status.scrollvalue = numlines - maxlines
+			end
+			self.noupdate = nil
+			first, last = status.scrollvalue+1, status.scrollvalue + maxlines
+			--show selection?
+			if scrollToSelection and status.selected then
+				local show
+				for i,line in ipairs(lines) do	-- find the line number
+					if line.uniquevalue==status.selected then
+						show=i
+					end
+				end
+				if not show then
+					-- selection was deleted or something?
+				elseif show>=first and show<=last then
+					-- all good
+				else
+					-- scrolling needed!
+					if show<first then
+						status.scrollvalue = show-1
+					else
+						status.scrollvalue = show-maxlines
+					end
+					first, last = status.scrollvalue+1, status.scrollvalue + maxlines
+				end
+			end
+			if self.scrollbar:GetValue() ~= status.scrollvalue then
+				self.scrollbar:SetValue(status.scrollvalue)
+			end
+		end
+
+		local buttonnum = 1
+		for i = first, last do
+			local line = lines[i]
+			local button = buttons[buttonnum]
+			if not button then
+				button = self:CreateButton()
+
+				buttons[buttonnum] = button
+				button:SetParent(treeframe)
+				button:SetFrameLevel(treeframe:GetFrameLevel()+1)
+				button:ClearAllPoints()
+				if buttonnum == 1 then
+					if self.showscroll then
+						button:SetPoint("TOPRIGHT", -22, -10)
+						button:SetPoint("TOPLEFT", 0, -10)
+					else
+						button:SetPoint("TOPRIGHT", 0, -10)
+						button:SetPoint("TOPLEFT", 0, -10)
+					end
+				else
+					button:SetPoint("TOPRIGHT", buttons[buttonnum-1], "BOTTOMRIGHT",0,0)
+					button:SetPoint("TOPLEFT", buttons[buttonnum-1], "BOTTOMLEFT",0,0)
+				end
+			end
+
+			UpdateButton(button, line, status.selected == line.uniquevalue, line.hasChildren, groupstatus[line.uniquevalue] )
+			button:Show()
+			buttonnum = buttonnum + 1
+		end
+
+	end,
+
+	["SetSelected"] = function(self, value)
+		local status = self.status or self.localstatus
+		if status.selected ~= value then
+			status.selected = value
+			self:Fire("OnGroupSelected", value)
+		end
+	end,
+
+	["Select"] = function(self, uniquevalue, ...)
+		self.filter = false
+		local status = self.status or self.localstatus
+		local groups = status.groups
+		local path = {...}
+		for i = 1, #path do
+			groups[tconcat(path, "\001", 1, i)] = true
+		end
+		status.selected = uniquevalue
+		self:RefreshTree(true)
+		self:Fire("OnGroupSelected", uniquevalue)
+	end,
+
+	["SelectByPath"] = function(self, ...)
+		self:Select(BuildUniqueValue(...), ...)
+	end,
+
+	["SelectByValue"] = function(self, uniquevalue)
+		self:Select(uniquevalue, ("\001"):split(uniquevalue))
+	end,
+
+	["ShowScroll"] = function(self, show)
+		self.showscroll = show
+		if show then
+			self.scrollbar:Show()
+			if self.buttons[1] then
+				self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",-22,-10)
+			end
+		else
+			self.scrollbar:Hide()
+			if self.buttons[1] then
+				self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",0,-10)
+			end
+		end
+	end,
+
+	["OnWidthSet"] = function(self, width)
+		local content = self.content
+		local treeframe = self.treeframe
+		local status = self.status or self.localstatus
+		status.fullwidth = width
+
+		local contentwidth = width - status.treewidth - 20
+		if contentwidth < 0 then
+			contentwidth = 0
+		end
+		content:SetWidth(contentwidth)
+		content.width = contentwidth
+
+		local maxtreewidth = math_min(400, width - 50)
+
+		if maxtreewidth > 100 and status.treewidth > maxtreewidth then
+			self:SetTreeWidth(maxtreewidth, status.treesizable)
+		end
+		treeframe:SetMaxResize(maxtreewidth, 1600)
+	end,
+
+	["OnHeightSet"] = function(self, height)
+		local content = self.content
+		local contentheight = height - 20
+		if contentheight < 0 then
+			contentheight = 0
+		end
+		content:SetHeight(contentheight)
+		content.height = contentheight
+	end,
+
+	["SetTreeWidth"] = function(self, treewidth, resizable)
+		if not resizable then
+			if type(treewidth) == 'number' then
+				resizable = false
+			elseif type(treewidth) == 'boolean' then
+				resizable = treewidth
+				treewidth = DEFAULT_TREE_WIDTH
+			else
+				resizable = false
+				treewidth = DEFAULT_TREE_WIDTH
+			end
+		end
+		self.treeframe:SetWidth(treewidth)
+		self.dragger:EnableMouse(resizable)
+
+		local status = self.status or self.localstatus
+		status.treewidth = treewidth
+		status.treesizable = resizable
+
+		-- recalculate the content width
+		if status.fullwidth then
+			self:OnWidthSet(status.fullwidth)
+		end
+	end,
+
+	["GetTreeWidth"] = function(self)
+		local status = self.status or self.localstatus
+		return status.treewidth or DEFAULT_TREE_WIDTH
+	end,
+
+	["LayoutFinished"] = function(self, width, height)
+		if self.noAutoHeight then return end
+		self:SetHeight((height or 0) + 20)
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local PaneBackdrop  = {
+	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+	tile = true, tileSize = 16, edgeSize = 16,
+	insets = { left = 3, right = 3, top = 5, bottom = 3 }
+}
+
+local DraggerBackdrop  = {
+	bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
+	edgeFile = nil,
+	tile = true, tileSize = 16, edgeSize = 0,
+	insets = { left = 3, right = 3, top = 7, bottom = 7 }
+}
+
+local function Constructor()
+	local num = AceGUI:GetNextWidgetNum(Type)
+	local frame = CreateFrame("Frame", nil, UIParent)
+
+	local treeframe = CreateFrame("Frame", nil, frame)
+	treeframe:SetPoint("TOPLEFT")
+	treeframe:SetPoint("BOTTOMLEFT")
+	treeframe:SetWidth(DEFAULT_TREE_WIDTH)
+	treeframe:EnableMouseWheel(true)
+	treeframe:SetBackdrop(PaneBackdrop)
+	treeframe:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
+	treeframe:SetBackdropBorderColor(0.4, 0.4, 0.4)
+	treeframe:SetResizable(true)
+	treeframe:SetMinResize(100, 1)
+	treeframe:SetMaxResize(400, 1600)
+	treeframe:SetScript("OnUpdate", FirstFrameUpdate)
+	treeframe:SetScript("OnSizeChanged", Tree_OnSizeChanged)
+	treeframe:SetScript("OnMouseWheel", Tree_OnMouseWheel)
+
+	local dragger = CreateFrame("Frame", nil, treeframe)
+	dragger:SetWidth(8)
+	dragger:SetPoint("TOP", treeframe, "TOPRIGHT")
+	dragger:SetPoint("BOTTOM", treeframe, "BOTTOMRIGHT")
+	dragger:SetBackdrop(DraggerBackdrop)
+	dragger:SetBackdropColor(1, 1, 1, 0)
+	dragger:SetScript("OnEnter", Dragger_OnEnter)
+	dragger:SetScript("OnLeave", Dragger_OnLeave)
+	dragger:SetScript("OnMouseDown", Dragger_OnMouseDown)
+	dragger:SetScript("OnMouseUp", Dragger_OnMouseUp)
+
+	local scrollbar = CreateFrame("Slider", ("AceConfigDialogTreeGroup%dScrollBar"):format(num), treeframe, "UIPanelScrollBarTemplate")
+	scrollbar:SetScript("OnValueChanged", nil)
+	scrollbar:SetPoint("TOPRIGHT", -10, -26)
+	scrollbar:SetPoint("BOTTOMRIGHT", -10, 26)
+	scrollbar:SetMinMaxValues(0,0)
+	scrollbar:SetValueStep(1)
+	scrollbar:SetValue(0)
+	scrollbar:SetWidth(16)
+	scrollbar:SetScript("OnValueChanged", OnScrollValueChanged)
+
+	local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
+	scrollbg:SetAllPoints(scrollbar)
+	scrollbg:SetColorTexture(0,0,0,0.4)
+
+	local border = CreateFrame("Frame",nil,frame)
+	border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
+	border:SetPoint("BOTTOMRIGHT")
+	border:SetBackdrop(PaneBackdrop)
+	border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
+	border:SetBackdropBorderColor(0.4, 0.4, 0.4)
+
+	--Container Support
+	local content = CreateFrame("Frame", nil, border)
+	content:SetPoint("TOPLEFT", 10, -10)
+	content:SetPoint("BOTTOMRIGHT", -10, 10)
+
+	local widget = {
+		frame        = frame,
+		lines        = {},
+		levels       = {},
+		buttons      = {},
+		hasChildren  = {},
+		localstatus  = { groups = {}, scrollvalue = 0 },
+		filter       = false,
+		treeframe    = treeframe,
+		dragger      = dragger,
+		scrollbar    = scrollbar,
+		border       = border,
+		content      = content,
+		type         = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	treeframe.obj, dragger.obj, scrollbar.obj = widget, widget, widget
+
+	return AceGUI:RegisterAsContainer(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
new file mode 100644
index 0000000..6825420
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
@@ -0,0 +1,336 @@
+local AceGUI = LibStub("AceGUI-3.0")
+
+-- Lua APIs
+local pairs, assert, type = pairs, assert, type
+
+-- WoW APIs
+local PlaySound = PlaySound
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: GameFontNormal
+
+----------------
+-- Main Frame --
+----------------
+--[[
+	Events :
+		OnClose
+
+]]
+do
+	local Type = "Window"
+	local Version = 6
+
+	local function frameOnShow(this)
+		this.obj:Fire("OnShow")
+	end
+
+	local function frameOnClose(this)
+		this.obj:Fire("OnClose")
+	end
+
+	local function closeOnClick(this)
+		PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
+		this.obj:Hide()
+	end
+
+	local function frameOnMouseDown(this)
+		AceGUI:ClearFocus()
+	end
+
+	local function titleOnMouseDown(this)
+		this:GetParent():StartMoving()
+		AceGUI:ClearFocus()
+	end
+
+	local function frameOnMouseUp(this)
+		local frame = this:GetParent()
+		frame:StopMovingOrSizing()
+		local self = frame.obj
+		local status = self.status or self.localstatus
+		status.width = frame:GetWidth()
+		status.height = frame:GetHeight()
+		status.top = frame:GetTop()
+		status.left = frame:GetLeft()
+	end
+
+	local function sizerseOnMouseDown(this)
+		this:GetParent():StartSizing("BOTTOMRIGHT")
+		AceGUI:ClearFocus()
+	end
+
+	local function sizersOnMouseDown(this)
+		this:GetParent():StartSizing("BOTTOM")
+		AceGUI:ClearFocus()
+	end
+
+	local function sizereOnMouseDown(this)
+		this:GetParent():StartSizing("RIGHT")
+		AceGUI:ClearFocus()
+	end
+
+	local function sizerOnMouseUp(this)
+		this:GetParent():StopMovingOrSizing()
+	end
+
+	local function SetTitle(self,title)
+		self.titletext:SetText(title)
+	end
+
+	local function SetStatusText(self,text)
+		-- self.statustext:SetText(text)
+	end
+
+	local function Hide(self)
+		self.frame:Hide()
+	end
+
+	local function Show(self)
+		self.frame:Show()
+	end
+
+	local function OnAcquire(self)
+		self.frame:SetParent(UIParent)
+		self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
+		self:ApplyStatus()
+		self:EnableResize(true)
+		self:Show()
+	end
+
+	local function OnRelease(self)
+		self.status = nil
+		for k in pairs(self.localstatus) do
+			self.localstatus[k] = nil
+		end
+	end
+
+	-- called to set an external table to store status in
+	local function SetStatusTable(self, status)
+		assert(type(status) == "table")
+		self.status = status
+		self:ApplyStatus()
+	end
+
+	local function ApplyStatus(self)
+		local status = self.status or self.localstatus
+		local frame = self.frame
+		self:SetWidth(status.width or 700)
+		self:SetHeight(status.height or 500)
+		if status.top and status.left then
+			frame:SetPoint("TOP",UIParent,"BOTTOM",0,status.top)
+			frame:SetPoint("LEFT",UIParent,"LEFT",status.left,0)
+		else
+			frame:SetPoint("CENTER",UIParent,"CENTER")
+		end
+	end
+
+	local function OnWidthSet(self, width)
+		local content = self.content
+		local contentwidth = width - 34
+		if contentwidth < 0 then
+			contentwidth = 0
+		end
+		content:SetWidth(contentwidth)
+		content.width = contentwidth
+	end
+
+
+	local function OnHeightSet(self, height)
+		local content = self.content
+		local contentheight = height - 57
+		if contentheight < 0 then
+			contentheight = 0
+		end
+		content:SetHeight(contentheight)
+		content.height = contentheight
+	end
+
+	local function EnableResize(self, state)
+		local func = state and "Show" or "Hide"
+		self.sizer_se[func](self.sizer_se)
+		self.sizer_s[func](self.sizer_s)
+		self.sizer_e[func](self.sizer_e)
+	end
+
+	local function Constructor()
+		local frame = CreateFrame("Frame",nil,UIParent)
+		local self = {}
+		self.type = "Window"
+
+		self.Hide = Hide
+		self.Show = Show
+		self.SetTitle =  SetTitle
+		self.OnRelease = OnRelease
+		self.OnAcquire = OnAcquire
+		self.SetStatusText = SetStatusText
+		self.SetStatusTable = SetStatusTable
+		self.ApplyStatus = ApplyStatus
+		self.OnWidthSet = OnWidthSet
+		self.OnHeightSet = OnHeightSet
+		self.EnableResize = EnableResize
+
+		self.localstatus = {}
+
+		self.frame = frame
+		frame.obj = self
+		frame:SetWidth(700)
+		frame:SetHeight(500)
+		frame:SetPoint("CENTER",UIParent,"CENTER",0,0)
+		frame:EnableMouse()
+		frame:SetMovable(true)
+		frame:SetResizable(true)
+		frame:SetFrameStrata("FULLSCREEN_DIALOG")
+		frame:SetScript("OnMouseDown", frameOnMouseDown)
+
+		frame:SetScript("OnShow",frameOnShow)
+		frame:SetScript("OnHide",frameOnClose)
+		frame:SetMinResize(240,240)
+		frame:SetToplevel(true)
+
+		local titlebg = frame:CreateTexture(nil, "BACKGROUND")
+		titlebg:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Title-Background]])
+		titlebg:SetPoint("TOPLEFT", 9, -6)
+		titlebg:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", -28, -24)
+
+		local dialogbg = frame:CreateTexture(nil, "BACKGROUND")
+		dialogbg:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
+		dialogbg:SetPoint("TOPLEFT", 8, -24)
+		dialogbg:SetPoint("BOTTOMRIGHT", -6, 8)
+		dialogbg:SetVertexColor(0, 0, 0, .75)
+
+		local topleft = frame:CreateTexture(nil, "BORDER")
+		topleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
+		topleft:SetWidth(64)
+		topleft:SetHeight(64)
+		topleft:SetPoint("TOPLEFT")
+		topleft:SetTexCoord(0.501953125, 0.625, 0, 1)
+
+		local topright = frame:CreateTexture(nil, "BORDER")
+		topright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
+		topright:SetWidth(64)
+		topright:SetHeight(64)
+		topright:SetPoint("TOPRIGHT")
+		topright:SetTexCoord(0.625, 0.75, 0, 1)
+
+		local top = frame:CreateTexture(nil, "BORDER")
+		top:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
+		top:SetHeight(64)
+		top:SetPoint("TOPLEFT", topleft, "TOPRIGHT")
+		top:SetPoint("TOPRIGHT", topright, "TOPLEFT")
+		top:SetTexCoord(0.25, 0.369140625, 0, 1)
+
+		local bottomleft = frame:CreateTexture(nil, "BORDER")
+		bottomleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
+		bottomleft:SetWidth(64)
+		bottomleft:SetHeight(64)
+		bottomleft:SetPoint("BOTTOMLEFT")
+		bottomleft:SetTexCoord(0.751953125, 0.875, 0, 1)
+
+		local bottomright = frame:CreateTexture(nil, "BORDER")
+		bottomright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
+		bottomright:SetWidth(64)
+		bottomright:SetHeight(64)
+		bottomright:SetPoint("BOTTOMRIGHT")
+		bottomright:SetTexCoord(0.875, 1, 0, 1)
+
+		local bottom = frame:CreateTexture(nil, "BORDER")
+		bottom:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
+		bottom:SetHeight(64)
+		bottom:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMRIGHT")
+		bottom:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMLEFT")
+		bottom:SetTexCoord(0.376953125, 0.498046875, 0, 1)
+
+		local left = frame:CreateTexture(nil, "BORDER")
+		left:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
+		left:SetWidth(64)
+		left:SetPoint("TOPLEFT", topleft, "BOTTOMLEFT")
+		left:SetPoint("BOTTOMLEFT", bottomleft, "TOPLEFT")
+		left:SetTexCoord(0.001953125, 0.125, 0, 1)
+
+		local right = frame:CreateTexture(nil, "BORDER")
+		right:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
+		right:SetWidth(64)
+		right:SetPoint("TOPRIGHT", topright, "BOTTOMRIGHT")
+		right:SetPoint("BOTTOMRIGHT", bottomright, "TOPRIGHT")
+		right:SetTexCoord(0.1171875, 0.2421875, 0, 1)
+
+		local close = CreateFrame("Button", nil, frame, "UIPanelCloseButton")
+		close:SetPoint("TOPRIGHT", 2, 1)
+		close:SetScript("OnClick", closeOnClick)
+		self.closebutton = close
+		close.obj = self
+
+		local titletext = frame:CreateFontString(nil, "ARTWORK")
+		titletext:SetFontObject(GameFontNormal)
+		titletext:SetPoint("TOPLEFT", 12, -8)
+		titletext:SetPoint("TOPRIGHT", -32, -8)
+		self.titletext = titletext
+
+		local title = CreateFrame("Button", nil, frame)
+		title:SetPoint("TOPLEFT", titlebg)
+		title:SetPoint("BOTTOMRIGHT", titlebg)
+		title:EnableMouse()
+		title:SetScript("OnMouseDown",titleOnMouseDown)
+		title:SetScript("OnMouseUp", frameOnMouseUp)
+		self.title = title
+
+		local sizer_se = CreateFrame("Frame",nil,frame)
+		sizer_se:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
+		sizer_se:SetWidth(25)
+		sizer_se:SetHeight(25)
+		sizer_se:EnableMouse()
+		sizer_se:SetScript("OnMouseDown",sizerseOnMouseDown)
+		sizer_se:SetScript("OnMouseUp", sizerOnMouseUp)
+		self.sizer_se = sizer_se
+
+		local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
+		self.line1 = line1
+		line1:SetWidth(14)
+		line1:SetHeight(14)
+		line1:SetPoint("BOTTOMRIGHT", -8, 8)
+		line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
+		local x = 0.1 * 14/17
+		line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
+
+		local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
+		self.line2 = line2
+		line2:SetWidth(8)
+		line2:SetHeight(8)
+		line2:SetPoint("BOTTOMRIGHT", -8, 8)
+		line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
+		local x = 0.1 * 8/17
+		line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
+
+		local sizer_s = CreateFrame("Frame",nil,frame)
+		sizer_s:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-25,0)
+		sizer_s:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0)
+		sizer_s:SetHeight(25)
+		sizer_s:EnableMouse()
+		sizer_s:SetScript("OnMouseDown",sizersOnMouseDown)
+		sizer_s:SetScript("OnMouseUp", sizerOnMouseUp)
+		self.sizer_s = sizer_s
+
+		local sizer_e = CreateFrame("Frame",nil,frame)
+		sizer_e:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,25)
+		sizer_e:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
+		sizer_e:SetWidth(25)
+		sizer_e:EnableMouse()
+		sizer_e:SetScript("OnMouseDown",sizereOnMouseDown)
+		sizer_e:SetScript("OnMouseUp", sizerOnMouseUp)
+		self.sizer_e = sizer_e
+
+		--Container Support
+		local content = CreateFrame("Frame",nil,frame)
+		self.content = content
+		content.obj = self
+		content:SetPoint("TOPLEFT",frame,"TOPLEFT",12,-32)
+		content:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-12,13)
+
+		AceGUI:RegisterAsContainer(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(Type,Constructor,Version)
+end
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
new file mode 100644
index 0000000..0a23be4
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
@@ -0,0 +1,103 @@
+--[[-----------------------------------------------------------------------------
+Button Widget
+Graphical Button.
+-------------------------------------------------------------------------------]]
+local Type, Version = "Button", 24
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs = pairs
+
+-- WoW APIs
+local _G = _G
+local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Button_OnClick(frame, ...)
+	AceGUI:ClearFocus()
+	PlaySound(852) -- SOUNDKIT.IG_MAINMENU_OPTION
+	frame.obj:Fire("OnClick", ...)
+end
+
+local function Control_OnEnter(frame)
+	frame.obj:Fire("OnEnter")
+end
+
+local function Control_OnLeave(frame)
+	frame.obj:Fire("OnLeave")
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		-- restore default values
+		self:SetHeight(24)
+		self:SetWidth(200)
+		self:SetDisabled(false)
+		self:SetAutoWidth(false)
+		self:SetText()
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["SetText"] = function(self, text)
+		self.text:SetText(text)
+		if self.autoWidth then
+			self:SetWidth(self.text:GetStringWidth() + 30)
+		end
+	end,
+
+	["SetAutoWidth"] = function(self, autoWidth)
+		self.autoWidth = autoWidth
+		if self.autoWidth then
+			self:SetWidth(self.text:GetStringWidth() + 30)
+		end
+	end,
+
+	["SetDisabled"] = function(self, disabled)
+		self.disabled = disabled
+		if disabled then
+			self.frame:Disable()
+		else
+			self.frame:Enable()
+		end
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
+	local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate")
+	frame:Hide()
+
+	frame:EnableMouse(true)
+	frame:SetScript("OnClick", Button_OnClick)
+	frame:SetScript("OnEnter", Control_OnEnter)
+	frame:SetScript("OnLeave", Control_OnLeave)
+
+	local text = frame:GetFontString()
+	text:ClearAllPoints()
+	text:SetPoint("TOPLEFT", 15, -1)
+	text:SetPoint("BOTTOMRIGHT", -15, 1)
+	text:SetJustifyV("MIDDLE")
+
+	local widget = {
+		text  = text,
+		frame = frame,
+		type  = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
new file mode 100644
index 0000000..44cab23
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
@@ -0,0 +1,296 @@
+--[[-----------------------------------------------------------------------------
+Checkbox Widget
+-------------------------------------------------------------------------------]]
+local Type, Version = "CheckBox", 24
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local select, pairs = select, pairs
+
+-- WoW APIs
+local PlaySound = PlaySound
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: SetDesaturation, GameFontHighlight
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+local function AlignImage(self)
+	local img = self.image:GetTexture()
+	self.text:ClearAllPoints()
+	if not img then
+		self.text:SetPoint("LEFT", self.checkbg, "RIGHT")
+		self.text:SetPoint("RIGHT")
+	else
+		self.text:SetPoint("LEFT", self.checkbg, "RIGHT", self.image:GetWidth() + 2, 0)
+		self.text:SetPoint("RIGHT")
+	end
+end
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Control_OnEnter(frame)
+	frame.obj:Fire("OnEnter")
+end
+
+local function Control_OnLeave(frame)
+	frame.obj:Fire("OnLeave")
+end
+
+local function CheckBox_OnMouseDown(frame)
+	local self = frame.obj
+	if not self.disabled then
+		if self.image:GetTexture() then
+			self.text:SetPoint("LEFT", self.image,"RIGHT", 2, -1)
+		else
+			self.text:SetPoint("LEFT", self.checkbg, "RIGHT", 1, -1)
+		end
+	end
+	AceGUI:ClearFocus()
+end
+
+local function CheckBox_OnMouseUp(frame)
+	local self = frame.obj
+	if not self.disabled then
+		self:ToggleChecked()
+
+		if self.checked then
+			PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
+		else -- for both nil and false (tristate)
+			PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
+		end
+
+		self:Fire("OnValueChanged", self.checked)
+		AlignImage(self)
+	end
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetType()
+		self:SetValue(false)
+		self:SetTriState(nil)
+		-- height is calculated from the width and required space for the description
+		self:SetWidth(200)
+		self:SetImage()
+		self:SetDisabled(nil)
+		self:SetDescription(nil)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["OnWidthSet"] = function(self, width)
+		if self.desc then
+			self.desc:SetWidth(width - 30)
+			if self.desc:GetText() and self.desc:GetText() ~= "" then
+				self:SetHeight(28 + self.desc:GetHeight())
+			end
+		end
+	end,
+
+	["SetDisabled"] = function(self, disabled)
+		self.disabled = disabled
+		if disabled then
+			self.frame:Disable()
+			self.text:SetTextColor(0.5, 0.5, 0.5)
+			SetDesaturation(self.check, true)
+			if self.desc then
+				self.desc:SetTextColor(0.5, 0.5, 0.5)
+			end
+		else
+			self.frame:Enable()
+			self.text:SetTextColor(1, 1, 1)
+			if self.tristate and self.checked == nil then
+				SetDesaturation(self.check, true)
+			else
+				SetDesaturation(self.check, false)
+			end
+			if self.desc then
+				self.desc:SetTextColor(1, 1, 1)
+			end
+		end
+	end,
+
+	["SetValue"] = function(self,value)
+		local check = self.check
+		self.checked = value
+		if value then
+			SetDesaturation(self.check, false)
+			self.check:Show()
+		else
+			--Nil is the unknown tristate value
+			if self.tristate and value == nil then
+				SetDesaturation(self.check, true)
+				self.check:Show()
+			else
+				SetDesaturation(self.check, false)
+				self.check:Hide()
+			end
+		end
+		self:SetDisabled(self.disabled)
+	end,
+
+	["GetValue"] = function(self)
+		return self.checked
+	end,
+
+	["SetTriState"] = function(self, enabled)
+		self.tristate = enabled
+		self:SetValue(self:GetValue())
+	end,
+
+	["SetType"] = function(self, type)
+		local checkbg = self.checkbg
+		local check = self.check
+		local highlight = self.highlight
+
+		local size
+		if type == "radio" then
+			size = 16
+			checkbg:SetTexture("Interface\\Buttons\\UI-RadioButton")
+			checkbg:SetTexCoord(0, 0.25, 0, 1)
+			check:SetTexture("Interface\\Buttons\\UI-RadioButton")
+			check:SetTexCoord(0.25, 0.5, 0, 1)
+			check:SetBlendMode("ADD")
+			highlight:SetTexture("Interface\\Buttons\\UI-RadioButton")
+			highlight:SetTexCoord(0.5, 0.75, 0, 1)
+		else
+			size = 24
+			checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up")
+			checkbg:SetTexCoord(0, 1, 0, 1)
+			check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+			check:SetTexCoord(0, 1, 0, 1)
+			check:SetBlendMode("BLEND")
+			highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight")
+			highlight:SetTexCoord(0, 1, 0, 1)
+		end
+		checkbg:SetHeight(size)
+		checkbg:SetWidth(size)
+	end,
+
+	["ToggleChecked"] = function(self)
+		local value = self:GetValue()
+		if self.tristate then
+			--cycle in true, nil, false order
+			if value then
+				self:SetValue(nil)
+			elseif value == nil then
+				self:SetValue(false)
+			else
+				self:SetValue(true)
+			end
+		else
+			self:SetValue(not self:GetValue())
+		end
+	end,
+
+	["SetLabel"] = function(self, label)
+		self.text:SetText(label)
+	end,
+
+	["SetDescription"] = function(self, desc)
+		if desc then
+			if not self.desc then
+				local desc = self.frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
+				desc:ClearAllPoints()
+				desc:SetPoint("TOPLEFT", self.checkbg, "TOPRIGHT", 5, -21)
+				desc:SetWidth(self.frame.width - 30)
+				desc:SetPoint("RIGHT", self.frame, "RIGHT", -30, 0)
+				desc:SetJustifyH("LEFT")
+				desc:SetJustifyV("TOP")
+				self.desc = desc
+			end
+			self.desc:Show()
+			--self.text:SetFontObject(GameFontNormal)
+			self.desc:SetText(desc)
+			self:SetHeight(28 + self.desc:GetHeight())
+		else
+			if self.desc then
+				self.desc:SetText("")
+				self.desc:Hide()
+			end
+			--self.text:SetFontObject(GameFontHighlight)
+			self:SetHeight(24)
+		end
+	end,
+
+	["SetImage"] = function(self, path, ...)
+		local image = self.image
+		image:SetTexture(path)
+
+		if image:GetTexture() then
+			local n = select("#", ...)
+			if n == 4 or n == 8 then
+				image:SetTexCoord(...)
+			else
+				image:SetTexCoord(0, 1, 0, 1)
+			end
+		end
+		AlignImage(self)
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local frame = CreateFrame("Button", nil, UIParent)
+	frame:Hide()
+
+	frame:EnableMouse(true)
+	frame:SetScript("OnEnter", Control_OnEnter)
+	frame:SetScript("OnLeave", Control_OnLeave)
+	frame:SetScript("OnMouseDown", CheckBox_OnMouseDown)
+	frame:SetScript("OnMouseUp", CheckBox_OnMouseUp)
+
+	local checkbg = frame:CreateTexture(nil, "ARTWORK")
+	checkbg:SetWidth(24)
+	checkbg:SetHeight(24)
+	checkbg:SetPoint("TOPLEFT")
+	checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up")
+
+	local check = frame:CreateTexture(nil, "OVERLAY")
+	check:SetAllPoints(checkbg)
+	check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+
+	local text = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
+	text:SetJustifyH("LEFT")
+	text:SetHeight(18)
+	text:SetPoint("LEFT", checkbg, "RIGHT")
+	text:SetPoint("RIGHT")
+
+	local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
+	highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight")
+	highlight:SetBlendMode("ADD")
+	highlight:SetAllPoints(checkbg)
+
+	local image = frame:CreateTexture(nil, "OVERLAY")
+	image:SetHeight(16)
+	image:SetWidth(16)
+	image:SetPoint("LEFT", checkbg, "RIGHT", 1, 0)
+
+	local widget = {
+		checkbg   = checkbg,
+		check     = check,
+		text      = text,
+		highlight = highlight,
+		image     = image,
+		frame     = frame,
+		type      = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
new file mode 100644
index 0000000..05e2b57
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
@@ -0,0 +1,188 @@
+--[[-----------------------------------------------------------------------------
+ColorPicker Widget
+-------------------------------------------------------------------------------]]
+local Type, Version = "ColorPicker", 23
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs = pairs
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: ShowUIPanel, HideUIPanel, ColorPickerFrame, OpacitySliderFrame
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+local function ColorCallback(self, r, g, b, a, isAlpha)
+	if not self.HasAlpha then
+		a = 1
+	end
+	self:SetColor(r, g, b, a)
+	if ColorPickerFrame:IsVisible() then
+		--colorpicker is still open
+		self:Fire("OnValueChanged", r, g, b, a)
+	else
+		--colorpicker is closed, color callback is first, ignore it,
+		--alpha callback is the final call after it closes so confirm now
+		if isAlpha then
+			self:Fire("OnValueConfirmed", r, g, b, a)
+		end
+	end
+end
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Control_OnEnter(frame)
+	frame.obj:Fire("OnEnter")
+end
+
+local function Control_OnLeave(frame)
+	frame.obj:Fire("OnLeave")
+end
+
+local function ColorSwatch_OnClick(frame)
+	HideUIPanel(ColorPickerFrame)
+	local self = frame.obj
+	if not self.disabled then
+		ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
+		ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10)
+		ColorPickerFrame:SetClampedToScreen(true)
+
+		ColorPickerFrame.func = function()
+			local r, g, b = ColorPickerFrame:GetColorRGB()
+			local a = 1 - OpacitySliderFrame:GetValue()
+			ColorCallback(self, r, g, b, a)
+		end
+
+		ColorPickerFrame.hasOpacity = self.HasAlpha
+		ColorPickerFrame.opacityFunc = function()
+			local r, g, b = ColorPickerFrame:GetColorRGB()
+			local a = 1 - OpacitySliderFrame:GetValue()
+			ColorCallback(self, r, g, b, a, true)
+		end
+
+		local r, g, b, a = self.r, self.g, self.b, self.a
+		if self.HasAlpha then
+			ColorPickerFrame.opacity = 1 - (a or 0)
+		end
+		ColorPickerFrame:SetColorRGB(r, g, b)
+
+		ColorPickerFrame.cancelFunc = function()
+			ColorCallback(self, r, g, b, a, true)
+		end
+
+		ShowUIPanel(ColorPickerFrame)
+	end
+	AceGUI:ClearFocus()
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetHeight(24)
+		self:SetWidth(200)
+		self:SetHasAlpha(false)
+		self:SetColor(0, 0, 0, 1)
+		self:SetDisabled(nil)
+		self:SetLabel(nil)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["SetLabel"] = function(self, text)
+		self.text:SetText(text)
+	end,
+
+	["SetColor"] = function(self, r, g, b, a)
+		self.r = r
+		self.g = g
+		self.b = b
+		self.a = a or 1
+		self.colorSwatch:SetVertexColor(r, g, b, a)
+	end,
+
+	["SetHasAlpha"] = function(self, HasAlpha)
+		self.HasAlpha = HasAlpha
+	end,
+
+	["SetDisabled"] = function(self, disabled)
+		self.disabled = disabled
+		if self.disabled then
+			self.frame:Disable()
+			self.text:SetTextColor(0.5, 0.5, 0.5)
+		else
+			self.frame:Enable()
+			self.text:SetTextColor(1, 1, 1)
+		end
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local frame = CreateFrame("Button", nil, UIParent)
+	frame:Hide()
+
+	frame:EnableMouse(true)
+	frame:SetScript("OnEnter", Control_OnEnter)
+	frame:SetScript("OnLeave", Control_OnLeave)
+	frame:SetScript("OnClick", ColorSwatch_OnClick)
+
+	local colorSwatch = frame:CreateTexture(nil, "OVERLAY")
+	colorSwatch:SetWidth(19)
+	colorSwatch:SetHeight(19)
+	colorSwatch:SetTexture("Interface\\ChatFrame\\ChatFrameColorSwatch")
+	colorSwatch:SetPoint("LEFT")
+
+	local texture = frame:CreateTexture(nil, "BACKGROUND")
+	texture:SetWidth(16)
+	texture:SetHeight(16)
+	texture:SetColorTexture(1, 1, 1)
+	texture:SetPoint("CENTER", colorSwatch)
+	texture:Show()
+
+	local checkers = frame:CreateTexture(nil, "BACKGROUND")
+	checkers:SetWidth(14)
+	checkers:SetHeight(14)
+	checkers:SetTexture("Tileset\\Generic\\Checkers")
+	checkers:SetTexCoord(.25, 0, 0.5, .25)
+	checkers:SetDesaturated(true)
+	checkers:SetVertexColor(1, 1, 1, 0.75)
+	checkers:SetPoint("CENTER", colorSwatch)
+	checkers:Show()
+
+	local text = frame:CreateFontString(nil,"OVERLAY","GameFontHighlight")
+	text:SetHeight(24)
+	text:SetJustifyH("LEFT")
+	text:SetTextColor(1, 1, 1)
+	text:SetPoint("LEFT", colorSwatch, "RIGHT", 2, 0)
+	text:SetPoint("RIGHT")
+
+	--local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
+	--highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
+	--highlight:SetBlendMode("ADD")
+	--highlight:SetAllPoints(frame)
+
+	local widget = {
+		colorSwatch = colorSwatch,
+		text        = text,
+		frame       = frame,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
new file mode 100644
index 0000000..5748e4f
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
@@ -0,0 +1,471 @@
+--[[ $Id: AceGUIWidget-DropDown-Items.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]--
+
+local AceGUI = LibStub("AceGUI-3.0")
+
+-- Lua APIs
+local select, assert = select, assert
+
+-- WoW APIs
+local PlaySound = PlaySound
+local CreateFrame = CreateFrame
+
+local function fixlevels(parent,...)
+	local i = 1
+	local child = select(i, ...)
+	while child do
+		child:SetFrameLevel(parent:GetFrameLevel()+1)
+		fixlevels(child, child:GetChildren())
+		i = i + 1
+		child = select(i, ...)
+	end
+end
+
+local function fixstrata(strata, parent, ...)
+	local i = 1
+	local child = select(i, ...)
+	parent:SetFrameStrata(strata)
+	while child do
+		fixstrata(strata, child, child:GetChildren())
+		i = i + 1
+		child = select(i, ...)
+	end
+end
+
+-- ItemBase is the base "class" for all dropdown items.
+-- Each item has to use ItemBase.Create(widgetType) to
+-- create an initial 'self' value.
+-- ItemBase will add common functions and ui event handlers.
+-- Be sure to keep basic usage when you override functions.
+
+local ItemBase = {
+	-- NOTE: The ItemBase version is added to each item's version number
+	--       to ensure proper updates on ItemBase changes.
+	--       Use at least 1000er steps.
+	version = 1000,
+	counter = 0,
+}
+
+function ItemBase.Frame_OnEnter(this)
+	local self = this.obj
+
+	if self.useHighlight then
+		self.highlight:Show()
+	end
+	self:Fire("OnEnter")
+
+	if self.specialOnEnter then
+		self.specialOnEnter(self)
+	end
+end
+
+function ItemBase.Frame_OnLeave(this)
+	local self = this.obj
+
+	self.highlight:Hide()
+	self:Fire("OnLeave")
+
+	if self.specialOnLeave then
+		self.specialOnLeave(self)
+	end
+end
+
+-- exported, AceGUI callback
+function ItemBase.OnAcquire(self)
+	self.frame:SetToplevel(true)
+	self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
+end
+
+-- exported, AceGUI callback
+function ItemBase.OnRelease(self)
+	self:SetDisabled(false)
+	self.pullout = nil
+	self.frame:SetParent(nil)
+	self.frame:ClearAllPoints()
+	self.frame:Hide()
+end
+
+-- exported
+-- NOTE: this is called by a Dropdown-Pullout.
+--       Do not call this method directly
+function ItemBase.SetPullout(self, pullout)
+	self.pullout = pullout
+
+	self.frame:SetParent(nil)
+	self.frame:SetParent(pullout.itemFrame)
+	self.parent = pullout.itemFrame
+	fixlevels(pullout.itemFrame, pullout.itemFrame:GetChildren())
+end
+
+-- exported
+function ItemBase.SetText(self, text)
+	self.text:SetText(text or "")
+end
+
+-- exported
+function ItemBase.GetText(self)
+	return self.text:GetText()
+end
+
+-- exported
+function ItemBase.SetPoint(self, ...)
+	self.frame:SetPoint(...)
+end
+
+-- exported
+function ItemBase.Show(self)
+	self.frame:Show()
+end
+
+-- exported
+function ItemBase.Hide(self)
+	self.frame:Hide()
+end
+
+-- exported
+function ItemBase.SetDisabled(self, disabled)
+	self.disabled = disabled
+	if disabled then
+		self.useHighlight = false
+		self.text:SetTextColor(.5, .5, .5)
+	else
+		self.useHighlight = true
+		self.text:SetTextColor(1, 1, 1)
+	end
+end
+
+-- exported
+-- NOTE: this is called by a Dropdown-Pullout.
+--       Do not call this method directly
+function ItemBase.SetOnLeave(self, func)
+	self.specialOnLeave = func
+end
+
+-- exported
+-- NOTE: this is called by a Dropdown-Pullout.
+--       Do not call this method directly
+function ItemBase.SetOnEnter(self, func)
+	self.specialOnEnter = func
+end
+
+function ItemBase.Create(type)
+	-- NOTE: Most of the following code is copied from AceGUI-3.0/Dropdown widget
+	local count = AceGUI:GetNextWidgetNum(type)
+	local frame = CreateFrame("Button", "AceGUI30DropDownItem"..count)
+	local self = {}
+	self.frame = frame
+	frame.obj = self
+	self.type = type
+
+	self.useHighlight = true
+
+	frame:SetHeight(17)
+	frame:SetFrameStrata("FULLSCREEN_DIALOG")
+
+	local text = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
+	text:SetTextColor(1,1,1)
+	text:SetJustifyH("LEFT")
+	text:SetPoint("TOPLEFT",frame,"TOPLEFT",18,0)
+	text:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-8,0)
+	self.text = text
+
+	local highlight = frame:CreateTexture(nil, "OVERLAY")
+	highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
+	highlight:SetBlendMode("ADD")
+	highlight:SetHeight(14)
+	highlight:ClearAllPoints()
+	highlight:SetPoint("RIGHT",frame,"RIGHT",-3,0)
+	highlight:SetPoint("LEFT",frame,"LEFT",5,0)
+	highlight:Hide()
+	self.highlight = highlight
+
+	local check = frame:CreateTexture("OVERLAY")
+	check:SetWidth(16)
+	check:SetHeight(16)
+	check:SetPoint("LEFT",frame,"LEFT",3,-1)
+	check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+	check:Hide()
+	self.check = check
+
+	local sub = frame:CreateTexture("OVERLAY")
+	sub:SetWidth(16)
+	sub:SetHeight(16)
+	sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
+	sub:SetTexture("Interface\\ChatFrame\\ChatFrameExpandArrow")
+	sub:Hide()
+	self.sub = sub
+
+	frame:SetScript("OnEnter", ItemBase.Frame_OnEnter)
+	frame:SetScript("OnLeave", ItemBase.Frame_OnLeave)
+
+	self.OnAcquire = ItemBase.OnAcquire
+	self.OnRelease = ItemBase.OnRelease
+
+	self.SetPullout = ItemBase.SetPullout
+	self.GetText    = ItemBase.GetText
+	self.SetText    = ItemBase.SetText
+	self.SetDisabled = ItemBase.SetDisabled
+
+	self.SetPoint   = ItemBase.SetPoint
+	self.Show       = ItemBase.Show
+	self.Hide       = ItemBase.Hide
+
+	self.SetOnLeave = ItemBase.SetOnLeave
+	self.SetOnEnter = ItemBase.SetOnEnter
+
+	return self
+end
+
+-- Register a dummy LibStub library to retrieve the ItemBase, so other addons can use it.
+local IBLib = LibStub:NewLibrary("AceGUI-3.0-DropDown-ItemBase", ItemBase.version)
+if IBLib then
+	IBLib.GetItemBase = function() return ItemBase end
+end
+
+--[[
+	Template for items:
+
+-- Item:
+--
+do
+	local widgetType = "Dropdown-Item-"
+	local widgetVersion = 1
+
+	local function Constructor()
+		local self = ItemBase.Create(widgetType)
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
+end
+--]]
+
+-- Item: Header
+-- A single text entry.
+-- Special: Different text color and no highlight
+do
+	local widgetType = "Dropdown-Item-Header"
+	local widgetVersion = 1
+
+	local function OnEnter(this)
+		local self = this.obj
+		self:Fire("OnEnter")
+
+		if self.specialOnEnter then
+			self.specialOnEnter(self)
+		end
+	end
+
+	local function OnLeave(this)
+		local self = this.obj
+		self:Fire("OnLeave")
+
+		if self.specialOnLeave then
+			self.specialOnLeave(self)
+		end
+	end
+
+	-- exported, override
+	local function SetDisabled(self, disabled)
+		ItemBase.SetDisabled(self, disabled)
+		if not disabled then
+			self.text:SetTextColor(1, 1, 0)
+		end
+	end
+
+	local function Constructor()
+		local self = ItemBase.Create(widgetType)
+
+		self.SetDisabled = SetDisabled
+
+		self.frame:SetScript("OnEnter", OnEnter)
+		self.frame:SetScript("OnLeave", OnLeave)
+
+		self.text:SetTextColor(1, 1, 0)
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
+end
+
+-- Item: Execute
+-- A simple button
+do
+	local widgetType = "Dropdown-Item-Execute"
+	local widgetVersion = 1
+
+	local function Frame_OnClick(this, button)
+		local self = this.obj
+		if self.disabled then return end
+		self:Fire("OnClick")
+		if self.pullout then
+			self.pullout:Close()
+		end
+	end
+
+	local function Constructor()
+		local self = ItemBase.Create(widgetType)
+
+		self.frame:SetScript("OnClick", Frame_OnClick)
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
+end
+
+-- Item: Toggle
+-- Some sort of checkbox for dropdown menus.
+-- Does not close the pullout on click.
+do
+	local widgetType = "Dropdown-Item-Toggle"
+	local widgetVersion = 4
+
+	local function UpdateToggle(self)
+		if self.value then
+			self.check:Show()
+		else
+			self.check:Hide()
+		end
+	end
+
+	local function OnRelease(self)
+		ItemBase.OnRelease(self)
+		self:SetValue(nil)
+	end
+
+	local function Frame_OnClick(this, button)
+		local self = this.obj
+		if self.disabled then return end
+		self.value = not self.value
+		if self.value then
+			PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
+		else
+			PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
+		end
+		UpdateToggle(self)
+		self:Fire("OnValueChanged", self.value)
+	end
+
+	-- exported
+	local function SetValue(self, value)
+		self.value = value
+		UpdateToggle(self)
+	end
+
+	-- exported
+	local function GetValue(self)
+		return self.value
+	end
+
+	local function Constructor()
+		local self = ItemBase.Create(widgetType)
+
+		self.frame:SetScript("OnClick", Frame_OnClick)
+
+		self.SetValue = SetValue
+		self.GetValue = GetValue
+		self.OnRelease = OnRelease
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
+end
+
+-- Item: Menu
+-- Shows a submenu on mouse over
+-- Does not close the pullout on click
+do
+	local widgetType = "Dropdown-Item-Menu"
+	local widgetVersion = 2
+
+	local function OnEnter(this)
+		local self = this.obj
+		self:Fire("OnEnter")
+
+		if self.specialOnEnter then
+			self.specialOnEnter(self)
+		end
+
+		self.highlight:Show()
+
+		if not self.disabled and self.submenu then
+			self.submenu:Open("TOPLEFT", self.frame, "TOPRIGHT", self.pullout:GetRightBorderWidth(), 0, self.frame:GetFrameLevel() + 100)
+		end
+	end
+
+	local function OnHide(this)
+		local self = this.obj
+		if self.submenu then
+			self.submenu:Close()
+		end
+	end
+
+	-- exported
+	local function SetMenu(self, menu)
+		assert(menu.type == "Dropdown-Pullout")
+		self.submenu = menu
+	end
+
+	-- exported
+	local function CloseMenu(self)
+		self.submenu:Close()
+	end
+
+	local function Constructor()
+		local self = ItemBase.Create(widgetType)
+
+		self.sub:Show()
+
+		self.frame:SetScript("OnEnter", OnEnter)
+		self.frame:SetScript("OnHide", OnHide)
+
+		self.SetMenu   = SetMenu
+		self.CloseMenu = CloseMenu
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
+end
+
+-- Item: Separator
+-- A single line to separate items
+do
+	local widgetType = "Dropdown-Item-Separator"
+	local widgetVersion = 2
+
+	-- exported, override
+	local function SetDisabled(self, disabled)
+		ItemBase.SetDisabled(self, disabled)
+		self.useHighlight = false
+	end
+
+	local function Constructor()
+		local self = ItemBase.Create(widgetType)
+
+		self.SetDisabled = SetDisabled
+
+		local line = self.frame:CreateTexture(nil, "OVERLAY")
+		line:SetHeight(1)
+		line:SetColorTexture(.5, .5, .5)
+		line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
+		line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0)
+
+		self.text:Hide()
+
+		self.useHighlight = false
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
+end
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
new file mode 100644
index 0000000..cf0b0aa
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
@@ -0,0 +1,737 @@
+--[[ $Id: AceGUIWidget-DropDown.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]--
+local AceGUI = LibStub("AceGUI-3.0")
+
+-- Lua APIs
+local min, max, floor = math.min, math.max, math.floor
+local select, pairs, ipairs, type = select, pairs, ipairs, type
+local tsort = table.sort
+
+-- WoW APIs
+local PlaySound = PlaySound
+local UIParent, CreateFrame = UIParent, CreateFrame
+local _G = _G
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: CLOSE
+
+local function fixlevels(parent,...)
+	local i = 1
+	local child = select(i, ...)
+	while child do
+		child:SetFrameLevel(parent:GetFrameLevel()+1)
+		fixlevels(child, child:GetChildren())
+		i = i + 1
+		child = select(i, ...)
+	end
+end
+
+local function fixstrata(strata, parent, ...)
+	local i = 1
+	local child = select(i, ...)
+	parent:SetFrameStrata(strata)
+	while child do
+		fixstrata(strata, child, child:GetChildren())
+		i = i + 1
+		child = select(i, ...)
+	end
+end
+
+do
+	local widgetType = "Dropdown-Pullout"
+	local widgetVersion = 3
+
+	--[[ Static data ]]--
+
+	local backdrop = {
+		bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+		edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
+		edgeSize = 32,
+		tileSize = 32,
+		tile = true,
+		insets = { left = 11, right = 12, top = 12, bottom = 11 },
+	}
+	local sliderBackdrop  = {
+		bgFile = "Interface\\Buttons\\UI-SliderBar-Background",
+		edgeFile = "Interface\\Buttons\\UI-SliderBar-Border",
+		tile = true, tileSize = 8, edgeSize = 8,
+		insets = { left = 3, right = 3, top = 3, bottom = 3 }
+	}
+
+	local defaultWidth = 200
+	local defaultMaxHeight = 600
+
+	--[[ UI Event Handlers ]]--
+
+	-- HACK: This should be no part of the pullout, but there
+	--       is no other 'clean' way to response to any item-OnEnter
+	--       Used to close Submenus when an other item is entered
+	local function OnEnter(item)
+		local self = item.pullout
+		for k, v in ipairs(self.items) do
+			if v.CloseMenu and v ~= item then
+				v:CloseMenu()
+			end
+		end
+	end
+
+	-- See the note in Constructor() for each scroll related function
+	local function OnMouseWheel(this, value)
+		this.obj:MoveScroll(value)
+	end
+
+	local function OnScrollValueChanged(this, value)
+		this.obj:SetScroll(value)
+	end
+
+	local function OnSizeChanged(this)
+		this.obj:FixScroll()
+	end
+
+	--[[ Exported methods ]]--
+
+	-- exported
+	local function SetScroll(self, value)
+		local status = self.scrollStatus
+		local frame, child = self.scrollFrame, self.itemFrame
+		local height, viewheight = frame:GetHeight(), child:GetHeight()
+
+		local offset
+		if height > viewheight then
+			offset = 0
+		else
+			offset = floor((viewheight - height) / 1000 * value)
+		end
+		child:ClearAllPoints()
+		child:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, offset)
+		child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", self.slider:IsShown() and -12 or 0, offset)
+		status.offset = offset
+		status.scrollvalue = value
+	end
+
+	-- exported
+	local function MoveScroll(self, value)
+		local status = self.scrollStatus
+		local frame, child = self.scrollFrame, self.itemFrame
+		local height, viewheight = frame:GetHeight(), child:GetHeight()
+
+		if height > viewheight then
+			self.slider:Hide()
+		else
+			self.slider:Show()
+			local diff = height - viewheight
+			local delta = 1
+			if value < 0 then
+				delta = -1
+			end
+			self.slider:SetValue(min(max(status.scrollvalue + delta*(1000/(diff/45)),0), 1000))
+		end
+	end
+
+	-- exported
+	local function FixScroll(self)
+		local status = self.scrollStatus
+		local frame, child = self.scrollFrame, self.itemFrame
+		local height, viewheight = frame:GetHeight(), child:GetHeight()
+		local offset = status.offset or 0
+
+		if viewheight < height then
+			self.slider:Hide()
+			child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, offset)
+			self.slider:SetValue(0)
+		else
+			self.slider:Show()
+			local value = (offset / (viewheight - height) * 1000)
+			if value > 1000 then value = 1000 end
+			self.slider:SetValue(value)
+			self:SetScroll(value)
+			if value < 1000 then
+				child:ClearAllPoints()
+				child:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, offset)
+				child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -12, offset)
+				status.offset = offset
+			end
+		end
+	end
+
+	-- exported, AceGUI callback
+	local function OnAcquire(self)
+		self.frame:SetParent(UIParent)
+		--self.itemFrame:SetToplevel(true)
+	end
+
+	-- exported, AceGUI callback
+	local function OnRelease(self)
+		self:Clear()
+		self.frame:ClearAllPoints()
+		self.frame:Hide()
+	end
+
+	-- exported
+	local function AddItem(self, item)
+		self.items[#self.items + 1] = item
+
+		local h = #self.items * 16
+		self.itemFrame:SetHeight(h)
+		self.frame:SetHeight(min(h + 34, self.maxHeight)) -- +34: 20 for scrollFrame placement (10 offset) and +14 for item placement
+
+		item.frame:SetPoint("LEFT", self.itemFrame, "LEFT")
+		item.frame:SetPoint("RIGHT", self.itemFrame, "RIGHT")
+
+		item:SetPullout(self)
+		item:SetOnEnter(OnEnter)
+	end
+
+	-- exported
+	local function Open(self, point, relFrame, relPoint, x, y)
+		local items = self.items
+		local frame = self.frame
+		local itemFrame = self.itemFrame
+
+		frame:SetPoint(point, relFrame, relPoint, x, y)
+
+
+		local height = 8
+		for i, item in pairs(items) do
+			if i == 1 then
+				item:SetPoint("TOP", itemFrame, "TOP", 0, -2)
+			else
+				item:SetPoint("TOP", items[i-1].frame, "BOTTOM", 0, 1)
+			end
+
+			item:Show()
+
+			height = height + 16
+		end
+		itemFrame:SetHeight(height)
+		fixstrata("TOOLTIP", frame, frame:GetChildren())
+		frame:Show()
+		self:Fire("OnOpen")
+	end
+
+	-- exported
+	local function Close(self)
+		self.frame:Hide()
+		self:Fire("OnClose")
+	end
+
+	-- exported
+	local function Clear(self)
+		local items = self.items
+		for i, item in pairs(items) do
+			AceGUI:Release(item)
+			items[i] = nil
+		end
+	end
+
+	-- exported
+	local function IterateItems(self)
+		return ipairs(self.items)
+	end
+
+	-- exported
+	local function SetHideOnLeave(self, val)
+		self.hideOnLeave = val
+	end
+
+	-- exported
+	local function SetMaxHeight(self, height)
+		self.maxHeight = height or defaultMaxHeight
+		if self.frame:GetHeight() > height then
+			self.frame:SetHeight(height)
+		elseif (self.itemFrame:GetHeight() + 34) < height then
+			self.frame:SetHeight(self.itemFrame:GetHeight() + 34) -- see :AddItem
+		end
+	end
+
+	-- exported
+	local function GetRightBorderWidth(self)
+		return 6 + (self.slider:IsShown() and 12 or 0)
+	end
+
+	-- exported
+	local function GetLeftBorderWidth(self)
+		return 6
+	end
+
+	--[[ Constructor ]]--
+
+	local function Constructor()
+		local count = AceGUI:GetNextWidgetNum(widgetType)
+		local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent)
+		local self = {}
+		self.count = count
+		self.type = widgetType
+		self.frame = frame
+		frame.obj = self
+
+		self.OnAcquire = OnAcquire
+		self.OnRelease = OnRelease
+
+		self.AddItem = AddItem
+		self.Open    = Open
+		self.Close   = Close
+		self.Clear   = Clear
+		self.IterateItems = IterateItems
+		self.SetHideOnLeave = SetHideOnLeave
+
+		self.SetScroll  = SetScroll
+		self.MoveScroll = MoveScroll
+		self.FixScroll  = FixScroll
+
+		self.SetMaxHeight = SetMaxHeight
+		self.GetRightBorderWidth = GetRightBorderWidth
+		self.GetLeftBorderWidth = GetLeftBorderWidth
+
+		self.items = {}
+
+		self.scrollStatus = {
+			scrollvalue = 0,
+		}
+
+		self.maxHeight = defaultMaxHeight
+
+		frame:SetBackdrop(backdrop)
+		frame:SetBackdropColor(0, 0, 0)
+		frame:SetFrameStrata("FULLSCREEN_DIALOG")
+		frame:SetClampedToScreen(true)
+		frame:SetWidth(defaultWidth)
+		frame:SetHeight(self.maxHeight)
+		--frame:SetToplevel(true)
+
+		-- NOTE: The whole scroll frame code is copied from the AceGUI-3.0 widget ScrollFrame
+		local scrollFrame = CreateFrame("ScrollFrame", nil, frame)
+		local itemFrame = CreateFrame("Frame", nil, scrollFrame)
+
+		self.scrollFrame = scrollFrame
+		self.itemFrame = itemFrame
+
+		scrollFrame.obj = self
+		itemFrame.obj = self
+
+		local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame)
+		slider:SetOrientation("VERTICAL")
+		slider:SetHitRectInsets(0, 0, -10, 0)
+		slider:SetBackdrop(sliderBackdrop)
+		slider:SetWidth(8)
+		slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Vertical")
+		slider:SetFrameStrata("FULLSCREEN_DIALOG")
+		self.slider = slider
+		slider.obj = self
+
+		scrollFrame:SetScrollChild(itemFrame)
+		scrollFrame:SetPoint("TOPLEFT", frame, "TOPLEFT", 6, -12)
+		scrollFrame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -6, 12)
+		scrollFrame:EnableMouseWheel(true)
+		scrollFrame:SetScript("OnMouseWheel", OnMouseWheel)
+		scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
+		scrollFrame:SetToplevel(true)
+		scrollFrame:SetFrameStrata("FULLSCREEN_DIALOG")
+
+		itemFrame:SetPoint("TOPLEFT", scrollFrame, "TOPLEFT", 0, 0)
+		itemFrame:SetPoint("TOPRIGHT", scrollFrame, "TOPRIGHT", -12, 0)
+		itemFrame:SetHeight(400)
+		itemFrame:SetToplevel(true)
+		itemFrame:SetFrameStrata("FULLSCREEN_DIALOG")
+
+		slider:SetPoint("TOPLEFT", scrollFrame, "TOPRIGHT", -16, 0)
+		slider:SetPoint("BOTTOMLEFT", scrollFrame, "BOTTOMRIGHT", -16, 0)
+		slider:SetScript("OnValueChanged", OnScrollValueChanged)
+		slider:SetMinMaxValues(0, 1000)
+		slider:SetValueStep(1)
+		slider:SetValue(0)
+
+		scrollFrame:Show()
+		itemFrame:Show()
+		slider:Hide()
+
+		self:FixScroll()
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+end
+
+do
+	local widgetType = "Dropdown"
+	local widgetVersion = 31
+
+	--[[ Static data ]]--
+
+	--[[ UI event handler ]]--
+
+	local function Control_OnEnter(this)
+		this.obj.button:LockHighlight()
+		this.obj:Fire("OnEnter")
+	end
+
+	local function Control_OnLeave(this)
+		this.obj.button:UnlockHighlight()
+		this.obj:Fire("OnLeave")
+	end
+
+	local function Dropdown_OnHide(this)
+		local self = this.obj
+		if self.open then
+			self.pullout:Close()
+		end
+	end
+
+	local function Dropdown_TogglePullout(this)
+		local self = this.obj
+		PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
+		if self.open then
+			self.open = nil
+			self.pullout:Close()
+			AceGUI:ClearFocus()
+		else
+			self.open = true
+			self.pullout:SetWidth(self.pulloutWidth or self.frame:GetWidth())
+			self.pullout:Open("TOPLEFT", self.frame, "BOTTOMLEFT", 0, self.label:IsShown() and -2 or 0)
+			AceGUI:SetFocus(self)
+		end
+	end
+
+	local function OnPulloutOpen(this)
+		local self = this.userdata.obj
+		local value = self.value
+
+		if not self.multiselect then
+			for i, item in this:IterateItems() do
+				item:SetValue(item.userdata.value == value)
+			end
+		end
+
+		self.open = true
+		self:Fire("OnOpened")
+	end
+
+	local function OnPulloutClose(this)
+		local self = this.userdata.obj
+		self.open = nil
+		self:Fire("OnClosed")
+	end
+
+	local function ShowMultiText(self)
+		local text
+		for i, widget in self.pullout:IterateItems() do
+			if widget.type == "Dropdown-Item-Toggle" then
+				if widget:GetValue() then
+					if text then
+						text = text..", "..widget:GetText()
+					else
+						text = widget:GetText()
+					end
+				end
+			end
+		end
+		self:SetText(text)
+	end
+
+	local function OnItemValueChanged(this, event, checked)
+		local self = this.userdata.obj
+
+		if self.multiselect then
+			self:Fire("OnValueChanged", this.userdata.value, checked)
+			ShowMultiText(self)
+		else
+			if checked then
+				self:SetValue(this.userdata.value)
+				self:Fire("OnValueChanged", this.userdata.value)
+			else
+				this:SetValue(true)
+			end
+			if self.open then
+				self.pullout:Close()
+			end
+		end
+	end
+
+	--[[ Exported methods ]]--
+
+	-- exported, AceGUI callback
+	local function OnAcquire(self)
+		local pullout = AceGUI:Create("Dropdown-Pullout")
+		self.pullout = pullout
+		pullout.userdata.obj = self
+		pullout:SetCallback("OnClose", OnPulloutClose)
+		pullout:SetCallback("OnOpen", OnPulloutOpen)
+		self.pullout.frame:SetFrameLevel(self.frame:GetFrameLevel() + 1)
+		fixlevels(self.pullout.frame, self.pullout.frame:GetChildren())
+
+		self:SetHeight(44)
+		self:SetWidth(200)
+		self:SetLabel()
+		self:SetPulloutWidth(nil)
+	end
+
+	-- exported, AceGUI callback
+	local function OnRelease(self)
+		if self.open then
+			self.pullout:Close()
+		end
+		AceGUI:Release(self.pullout)
+		self.pullout = nil
+
+		self:SetText("")
+		self:SetDisabled(false)
+		self:SetMultiselect(false)
+
+		self.value = nil
+		self.list = nil
+		self.open = nil
+		self.hasClose = nil
+
+		self.frame:ClearAllPoints()
+		self.frame:Hide()
+	end
+
+	-- exported
+	local function SetDisabled(self, disabled)
+		self.disabled = disabled
+		if disabled then
+			self.text:SetTextColor(0.5,0.5,0.5)
+			self.button:Disable()
+			self.button_cover:Disable()
+			self.label:SetTextColor(0.5,0.5,0.5)
+		else
+			self.button:Enable()
+			self.button_cover:Enable()
+			self.label:SetTextColor(1,.82,0)
+			self.text:SetTextColor(1,1,1)
+		end
+	end
+
+	-- exported
+	local function ClearFocus(self)
+		if self.open then
+			self.pullout:Close()
+		end
+	end
+
+	-- exported
+	local function SetText(self, text)
+		self.text:SetText(text or "")
+	end
+
+	-- exported
+	local function SetLabel(self, text)
+		if text and text ~= "" then
+			self.label:SetText(text)
+			self.label:Show()
+			self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-14)
+			self:SetHeight(40)
+			self.alignoffset = 26
+		else
+			self.label:SetText("")
+			self.label:Hide()
+			self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,0)
+			self:SetHeight(26)
+			self.alignoffset = 12
+		end
+	end
+
+	-- exported
+	local function SetValue(self, value)
+		if self.list then
+			self:SetText(self.list[value] or "")
+		end
+		self.value = value
+	end
+
+	-- exported
+	local function GetValue(self)
+		return self.value
+	end
+
+	-- exported
+	local function SetItemValue(self, item, value)
+		if not self.multiselect then return end
+		for i, widget in self.pullout:IterateItems() do
+			if widget.userdata.value == item then
+				if widget.SetValue then
+					widget:SetValue(value)
+				end
+			end
+		end
+		ShowMultiText(self)
+	end
+
+	-- exported
+	local function SetItemDisabled(self, item, disabled)
+		for i, widget in self.pullout:IterateItems() do
+			if widget.userdata.value == item then
+				widget:SetDisabled(disabled)
+			end
+		end
+	end
+
+	local function AddListItem(self, value, text, itemType)
+		if not itemType then itemType = "Dropdown-Item-Toggle" end
+		local exists = AceGUI:GetWidgetVersion(itemType)
+		if not exists then error(("The given item type, %q, does not exist within AceGUI-3.0"):format(tostring(itemType)), 2) end
+
+		local item = AceGUI:Create(itemType)
+		item:SetText(text)
+		item.userdata.obj = self
+		item.userdata.value = value
+		item:SetCallback("OnValueChanged", OnItemValueChanged)
+		self.pullout:AddItem(item)
+	end
+
+	local function AddCloseButton(self)
+		if not self.hasClose then
+			local close = AceGUI:Create("Dropdown-Item-Execute")
+			close:SetText(CLOSE)
+			self.pullout:AddItem(close)
+			self.hasClose = true
+		end
+	end
+
+	-- exported
+	local sortlist = {}
+	local function SetList(self, list, order, itemType)
+		self.list = list
+		self.pullout:Clear()
+		self.hasClose = nil
+		if not list then return end
+
+		if type(order) ~= "table" then
+			for v in pairs(list) do
+				sortlist[#sortlist + 1] = v
+			end
+			tsort(sortlist)
+
+			for i, key in ipairs(sortlist) do
+				AddListItem(self, key, list[key], itemType)
+				sortlist[i] = nil
+			end
+		else
+			for i, key in ipairs(order) do
+				AddListItem(self, key, list[key], itemType)
+			end
+		end
+		if self.multiselect then
+			ShowMultiText(self)
+			AddCloseButton(self)
+		end
+	end
+
+	-- exported
+	local function AddItem(self, value, text, itemType)
+		if self.list then
+			self.list[value] = text
+			AddListItem(self, value, text, itemType)
+		end
+	end
+
+	-- exported
+	local function SetMultiselect(self, multi)
+		self.multiselect = multi
+		if multi then
+			ShowMultiText(self)
+			AddCloseButton(self)
+		end
+	end
+
+	-- exported
+	local function GetMultiselect(self)
+		return self.multiselect
+	end
+
+	local function SetPulloutWidth(self, width)
+		self.pulloutWidth = width
+	end
+
+	--[[ Constructor ]]--
+
+	local function Constructor()
+		local count = AceGUI:GetNextWidgetNum(widgetType)
+		local frame = CreateFrame("Frame", nil, UIParent)
+		local dropdown = CreateFrame("Frame", "AceGUI30DropDown"..count, frame, "UIDropDownMenuTemplate")
+
+		local self = {}
+		self.type = widgetType
+		self.frame = frame
+		self.dropdown = dropdown
+		self.count = count
+		frame.obj = self
+		dropdown.obj = self
+
+		self.OnRelease   = OnRelease
+		self.OnAcquire   = OnAcquire
+
+		self.ClearFocus  = ClearFocus
+
+		self.SetText     = SetText
+		self.SetValue    = SetValue
+		self.GetValue    = GetValue
+		self.SetList     = SetList
+		self.SetLabel    = SetLabel
+		self.SetDisabled = SetDisabled
+		self.AddItem     = AddItem
+		self.SetMultiselect = SetMultiselect
+		self.GetMultiselect = GetMultiselect
+		self.SetItemValue = SetItemValue
+		self.SetItemDisabled = SetItemDisabled
+		self.SetPulloutWidth = SetPulloutWidth
+
+		self.alignoffset = 26
+
+		frame:SetScript("OnHide",Dropdown_OnHide)
+
+		dropdown:ClearAllPoints()
+		dropdown:SetPoint("TOPLEFT",frame,"TOPLEFT",-15,0)
+		dropdown:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",17,0)
+		dropdown:SetScript("OnHide", nil)
+
+		local left = _G[dropdown:GetName() .. "Left"]
+		local middle = _G[dropdown:GetName() .. "Middle"]
+		local right = _G[dropdown:GetName() .. "Right"]
+
+		middle:ClearAllPoints()
+		right:ClearAllPoints()
+
+		middle:SetPoint("LEFT", left, "RIGHT", 0, 0)
+		middle:SetPoint("RIGHT", right, "LEFT", 0, 0)
+		right:SetPoint("TOPRIGHT", dropdown, "TOPRIGHT", 0, 17)
+
+		local button = _G[dropdown:GetName() .. "Button"]
+		self.button = button
+		button.obj = self
+		button:SetScript("OnEnter",Control_OnEnter)
+		button:SetScript("OnLeave",Control_OnLeave)
+		button:SetScript("OnClick",Dropdown_TogglePullout)
+
+		local button_cover = CreateFrame("BUTTON",nil,self.frame)
+		self.button_cover = button_cover
+		button_cover.obj = self
+		button_cover:SetPoint("TOPLEFT",self.frame,"BOTTOMLEFT",0,25)
+		button_cover:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT")
+		button_cover:SetScript("OnEnter",Control_OnEnter)
+		button_cover:SetScript("OnLeave",Control_OnLeave)
+		button_cover:SetScript("OnClick",Dropdown_TogglePullout)
+
+		local text = _G[dropdown:GetName() .. "Text"]
+		self.text = text
+		text.obj = self
+		text:ClearAllPoints()
+		text:SetPoint("RIGHT", right, "RIGHT" ,-43, 2)
+		text:SetPoint("LEFT", left, "LEFT", 25, 2)
+
+		local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
+		label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
+		label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
+		label:SetJustifyH("LEFT")
+		label:SetHeight(18)
+		label:Hide()
+		self.label = label
+
+		AceGUI:RegisterAsWidget(self)
+		return self
+	end
+
+	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+end
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
new file mode 100644
index 0000000..29f7e00
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
@@ -0,0 +1,263 @@
+--[[-----------------------------------------------------------------------------
+EditBox Widget
+-------------------------------------------------------------------------------]]
+local Type, Version = "EditBox", 28
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local tostring, pairs = tostring, pairs
+
+-- WoW APIs
+local PlaySound = PlaySound
+local GetCursorInfo, ClearCursor, GetSpellInfo = GetCursorInfo, ClearCursor, GetSpellInfo
+local CreateFrame, UIParent = CreateFrame, UIParent
+local _G = _G
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: AceGUIEditBoxInsertLink, ChatFontNormal, OKAY
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+if not AceGUIEditBoxInsertLink then
+	-- upgradeable hook
+	hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIEditBoxInsertLink(...) end)
+end
+
+function _G.AceGUIEditBoxInsertLink(text)
+	for i = 1, AceGUI:GetWidgetCount(Type) do
+		local editbox = _G["AceGUI-3.0EditBox"..i]
+		if editbox and editbox:IsVisible() and editbox:HasFocus() then
+			editbox:Insert(text)
+			return true
+		end
+	end
+end
+
+local function ShowButton(self)
+	if not self.disablebutton then
+		self.button:Show()
+		self.editbox:SetTextInsets(0, 20, 3, 3)
+	end
+end
+
+local function HideButton(self)
+	self.button:Hide()
+	self.editbox:SetTextInsets(0, 0, 3, 3)
+end
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Control_OnEnter(frame)
+	frame.obj:Fire("OnEnter")
+end
+
+local function Control_OnLeave(frame)
+	frame.obj:Fire("OnLeave")
+end
+
+local function Frame_OnShowFocus(frame)
+	frame.obj.editbox:SetFocus()
+	frame:SetScript("OnShow", nil)
+end
+
+local function EditBox_OnEscapePressed(frame)
+	AceGUI:ClearFocus()
+end
+
+local function EditBox_OnEnterPressed(frame)
+	local self = frame.obj
+	local value = frame:GetText()
+	local cancel = self:Fire("OnEnterPressed", value)
+	if not cancel then
+		PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
+		HideButton(self)
+	end
+end
+
+local function EditBox_OnReceiveDrag(frame)
+	local self = frame.obj
+	local type, id, info = GetCursorInfo()
+	local name
+	if type == "item" then
+		name = info
+	elseif type == "spell" then
+		name = GetSpellInfo(id, info)
+	elseif type == "macro" then
+		name = GetMacroInfo(id)
+	end
+	if name then
+		self:SetText(name)
+		self:Fire("OnEnterPressed", name)
+		ClearCursor()
+		HideButton(self)
+		AceGUI:ClearFocus()
+	end
+end
+
+local function EditBox_OnTextChanged(frame)
+	local self = frame.obj
+	local value = frame:GetText()
+	if tostring(value) ~= tostring(self.lasttext) then
+		self:Fire("OnTextChanged", value)
+		self.lasttext = value
+		ShowButton(self)
+	end
+end
+
+local function EditBox_OnFocusGained(frame)
+	AceGUI:SetFocus(frame.obj)
+end
+
+local function Button_OnClick(frame)
+	local editbox = frame.obj.editbox
+	editbox:ClearFocus()
+	EditBox_OnEnterPressed(editbox)
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		-- height is controlled by SetLabel
+		self:SetWidth(200)
+		self:SetDisabled(false)
+		self:SetLabel()
+		self:SetText()
+		self:DisableButton(false)
+		self:SetMaxLetters(0)
+	end,
+
+	["OnRelease"] = function(self)
+		self:ClearFocus()
+	end,
+
+	["SetDisabled"] = function(self, disabled)
+		self.disabled = disabled
+		if disabled then
+			self.editbox:EnableMouse(false)
+			self.editbox:ClearFocus()
+			self.editbox:SetTextColor(0.5,0.5,0.5)
+			self.label:SetTextColor(0.5,0.5,0.5)
+		else
+			self.editbox:EnableMouse(true)
+			self.editbox:SetTextColor(1,1,1)
+			self.label:SetTextColor(1,.82,0)
+		end
+	end,
+
+	["SetText"] = function(self, text)
+		self.lasttext = text or ""
+		self.editbox:SetText(text or "")
+		self.editbox:SetCursorPosition(0)
+		HideButton(self)
+	end,
+
+	["GetText"] = function(self, text)
+		return self.editbox:GetText()
+	end,
+
+	["SetLabel"] = function(self, text)
+		if text and text ~= "" then
+			self.label:SetText(text)
+			self.label:Show()
+			self.editbox:SetPoint("TOPLEFT",self.frame,"TOPLEFT",7,-18)
+			self:SetHeight(44)
+			self.alignoffset = 30
+		else
+			self.label:SetText("")
+			self.label:Hide()
+			self.editbox:SetPoint("TOPLEFT",self.frame,"TOPLEFT",7,0)
+			self:SetHeight(26)
+			self.alignoffset = 12
+		end
+	end,
+
+	["DisableButton"] = function(self, disabled)
+		self.disablebutton = disabled
+		if disabled then
+			HideButton(self)
+		end
+	end,
+
+	["SetMaxLetters"] = function (self, num)
+		self.editbox:SetMaxLetters(num or 0)
+	end,
+
+	["ClearFocus"] = function(self)
+		self.editbox:ClearFocus()
+		self.frame:SetScript("OnShow", nil)
+	end,
+
+	["SetFocus"] = function(self)
+		self.editbox:SetFocus()
+		if not self.frame:IsShown() then
+			self.frame:SetScript("OnShow", Frame_OnShowFocus)
+		end
+	end,
+
+	["HighlightText"] = function(self, from, to)
+		self.editbox:HighlightText(from, to)
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local num  = AceGUI:GetNextWidgetNum(Type)
+	local frame = CreateFrame("Frame", nil, UIParent)
+	frame:Hide()
+
+	local editbox = CreateFrame("EditBox", "AceGUI-3.0EditBox"..num, frame, "InputBoxTemplate")
+	editbox:SetAutoFocus(false)
+	editbox:SetFontObject(ChatFontNormal)
+	editbox:SetScript("OnEnter", Control_OnEnter)
+	editbox:SetScript("OnLeave", Control_OnLeave)
+	editbox:SetScript("OnEscapePressed", EditBox_OnEscapePressed)
+	editbox:SetScript("OnEnterPressed", EditBox_OnEnterPressed)
+	editbox:SetScript("OnTextChanged", EditBox_OnTextChanged)
+	editbox:SetScript("OnReceiveDrag", EditBox_OnReceiveDrag)
+	editbox:SetScript("OnMouseDown", EditBox_OnReceiveDrag)
+	editbox:SetScript("OnEditFocusGained", EditBox_OnFocusGained)
+	editbox:SetTextInsets(0, 0, 3, 3)
+	editbox:SetMaxLetters(256)
+	editbox:SetPoint("BOTTOMLEFT", 6, 0)
+	editbox:SetPoint("BOTTOMRIGHT")
+	editbox:SetHeight(19)
+
+	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
+	label:SetPoint("TOPLEFT", 0, -2)
+	label:SetPoint("TOPRIGHT", 0, -2)
+	label:SetJustifyH("LEFT")
+	label:SetHeight(18)
+
+	local button = CreateFrame("Button", nil, editbox, "UIPanelButtonTemplate")
+	button:SetWidth(40)
+	button:SetHeight(20)
+	button:SetPoint("RIGHT", -2, 0)
+	button:SetText(OKAY)
+	button:SetScript("OnClick", Button_OnClick)
+	button:Hide()
+
+	local widget = {
+		alignoffset = 30,
+		editbox     = editbox,
+		label       = label,
+		button      = button,
+		frame       = frame,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	editbox.obj, button.obj = widget, widget
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
new file mode 100644
index 0000000..1aaf3f5
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
@@ -0,0 +1,78 @@
+--[[-----------------------------------------------------------------------------
+Heading Widget
+-------------------------------------------------------------------------------]]
+local Type, Version = "Heading", 20
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs = pairs
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetText()
+		self:SetFullWidth()
+		self:SetHeight(18)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["SetText"] = function(self, text)
+		self.label:SetText(text or "")
+		if text and text ~= "" then
+			self.left:SetPoint("RIGHT", self.label, "LEFT", -5, 0)
+			self.right:Show()
+		else
+			self.left:SetPoint("RIGHT", -3, 0)
+			self.right:Hide()
+		end
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local frame = CreateFrame("Frame", nil, UIParent)
+	frame:Hide()
+
+	local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
+	label:SetPoint("TOP")
+	label:SetPoint("BOTTOM")
+	label:SetJustifyH("CENTER")
+
+	local left = frame:CreateTexture(nil, "BACKGROUND")
+	left:SetHeight(8)
+	left:SetPoint("LEFT", 3, 0)
+	left:SetPoint("RIGHT", label, "LEFT", -5, 0)
+	left:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
+	left:SetTexCoord(0.81, 0.94, 0.5, 1)
+
+	local right = frame:CreateTexture(nil, "BACKGROUND")
+	right:SetHeight(8)
+	right:SetPoint("RIGHT", -3, 0)
+	right:SetPoint("LEFT", label, "RIGHT", 5, 0)
+	right:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
+	right:SetTexCoord(0.81, 0.94, 0.5, 1)
+
+	local widget = {
+		label = label,
+		left  = left,
+		right = right,
+		frame = frame,
+		type  = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
new file mode 100644
index 0000000..561da73
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
@@ -0,0 +1,140 @@
+--[[-----------------------------------------------------------------------------
+Icon Widget
+-------------------------------------------------------------------------------]]
+local Type, Version = "Icon", 21
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local select, pairs, print = select, pairs, print
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Control_OnEnter(frame)
+	frame.obj:Fire("OnEnter")
+end
+
+local function Control_OnLeave(frame)
+	frame.obj:Fire("OnLeave")
+end
+
+local function Button_OnClick(frame, button)
+	frame.obj:Fire("OnClick", button)
+	AceGUI:ClearFocus()
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetHeight(110)
+		self:SetWidth(110)
+		self:SetLabel()
+		self:SetImage(nil)
+		self:SetImageSize(64, 64)
+		self:SetDisabled(false)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["SetLabel"] = function(self, text)
+		if text and text ~= "" then
+			self.label:Show()
+			self.label:SetText(text)
+			self:SetHeight(self.image:GetHeight() + 25)
+		else
+			self.label:Hide()
+			self:SetHeight(self.image:GetHeight() + 10)
+		end
+	end,
+
+	["SetImage"] = function(self, path, ...)
+		local image = self.image
+		image:SetTexture(path)
+
+		if image:GetTexture() then
+			local n = select("#", ...)
+			if n == 4 or n == 8 then
+				image:SetTexCoord(...)
+			else
+				image:SetTexCoord(0, 1, 0, 1)
+			end
+		end
+	end,
+
+	["SetImageSize"] = function(self, width, height)
+		self.image:SetWidth(width)
+		self.image:SetHeight(height)
+		--self.frame:SetWidth(width + 30)
+		if self.label:IsShown() then
+			self:SetHeight(height + 25)
+		else
+			self:SetHeight(height + 10)
+		end
+	end,
+
+	["SetDisabled"] = function(self, disabled)
+		self.disabled = disabled
+		if disabled then
+			self.frame:Disable()
+			self.label:SetTextColor(0.5, 0.5, 0.5)
+			self.image:SetVertexColor(0.5, 0.5, 0.5, 0.5)
+		else
+			self.frame:Enable()
+			self.label:SetTextColor(1, 1, 1)
+			self.image:SetVertexColor(1, 1, 1, 1)
+		end
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local frame = CreateFrame("Button", nil, UIParent)
+	frame:Hide()
+
+	frame:EnableMouse(true)
+	frame:SetScript("OnEnter", Control_OnEnter)
+	frame:SetScript("OnLeave", Control_OnLeave)
+	frame:SetScript("OnClick", Button_OnClick)
+
+	local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlight")
+	label:SetPoint("BOTTOMLEFT")
+	label:SetPoint("BOTTOMRIGHT")
+	label:SetJustifyH("CENTER")
+	label:SetJustifyV("TOP")
+	label:SetHeight(18)
+
+	local image = frame:CreateTexture(nil, "BACKGROUND")
+	image:SetWidth(64)
+	image:SetHeight(64)
+	image:SetPoint("TOP", 0, -5)
+
+	local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
+	highlight:SetAllPoints(image)
+	highlight:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight")
+	highlight:SetTexCoord(0, 1, 0.23, 0.77)
+	highlight:SetBlendMode("ADD")
+
+	local widget = {
+		label = label,
+		image = image,
+		frame = frame,
+		type  = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	widget.SetText = function(self, ...) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(...) end
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua
new file mode 100644
index 0000000..036efee
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua
@@ -0,0 +1,101 @@
+--[[-----------------------------------------------------------------------------
+InteractiveLabel Widget
+-------------------------------------------------------------------------------]]
+local Type, Version = "InteractiveLabel", 21
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local select, pairs = select, pairs
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: GameFontHighlightSmall
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Control_OnEnter(frame)
+	frame.obj:Fire("OnEnter")
+end
+
+local function Control_OnLeave(frame)
+	frame.obj:Fire("OnLeave")
+end
+
+local function Label_OnClick(frame, button)
+	frame.obj:Fire("OnClick", button)
+	AceGUI:ClearFocus()
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:LabelOnAcquire()
+		self:SetHighlight()
+		self:SetHighlightTexCoord()
+		self:SetDisabled(false)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["SetHighlight"] = function(self, ...)
+		self.highlight:SetTexture(...)
+	end,
+
+	["SetHighlightTexCoord"] = function(self, ...)
+		local c = select("#", ...)
+		if c == 4 or c == 8 then
+			self.highlight:SetTexCoord(...)
+		else
+			self.highlight:SetTexCoord(0, 1, 0, 1)
+		end
+	end,
+
+	["SetDisabled"] = function(self,disabled)
+		self.disabled = disabled
+		if disabled then
+			self.frame:EnableMouse(false)
+			self.label:SetTextColor(0.5, 0.5, 0.5)
+		else
+			self.frame:EnableMouse(true)
+			self.label:SetTextColor(1, 1, 1)
+		end
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	-- create a Label type that we will hijack
+	local label = AceGUI:Create("Label")
+
+	local frame = label.frame
+	frame:EnableMouse(true)
+	frame:SetScript("OnEnter", Control_OnEnter)
+	frame:SetScript("OnLeave", Control_OnLeave)
+	frame:SetScript("OnMouseDown", Label_OnClick)
+
+	local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
+	highlight:SetTexture(nil)
+	highlight:SetAllPoints()
+	highlight:SetBlendMode("ADD")
+
+	label.highlight = highlight
+	label.type = Type
+	label.LabelOnAcquire = label.OnAcquire
+	for method, func in pairs(methods) do
+		label[method] = func
+	end
+
+	return label
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
+
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
new file mode 100644
index 0000000..ec4cead
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
@@ -0,0 +1,249 @@
+--[[-----------------------------------------------------------------------------
+Keybinding Widget
+Set Keybindings in the Config UI.
+-------------------------------------------------------------------------------]]
+local Type, Version = "Keybinding", 25
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs = pairs
+
+-- WoW APIs
+local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: NOT_BOUND
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+
+local function Control_OnEnter(frame)
+	frame.obj:Fire("OnEnter")
+end
+
+local function Control_OnLeave(frame)
+	frame.obj:Fire("OnLeave")
+end
+
+local function Keybinding_OnClick(frame, button)
+	if button == "LeftButton" or button == "RightButton" then
+		local self = frame.obj
+		if self.waitingForKey then
+			frame:EnableKeyboard(false)
+			frame:EnableMouseWheel(false)
+			self.msgframe:Hide()
+			frame:UnlockHighlight()
+			self.waitingForKey = nil
+		else
+			frame:EnableKeyboard(true)
+			frame:EnableMouseWheel(true)
+			self.msgframe:Show()
+			frame:LockHighlight()
+			self.waitingForKey = true
+		end
+	end
+	AceGUI:ClearFocus()
+end
+
+local ignoreKeys = {
+	["BUTTON1"] = true, ["BUTTON2"] = true,
+	["UNKNOWN"] = true,
+	["LSHIFT"] = true, ["LCTRL"] = true, ["LALT"] = true,
+	["RSHIFT"] = true, ["RCTRL"] = true, ["RALT"] = true,
+}
+local function Keybinding_OnKeyDown(frame, key)
+	local self = frame.obj
+	if self.waitingForKey then
+		local keyPressed = key
+		if keyPressed == "ESCAPE" then
+			keyPressed = ""
+		else
+			if ignoreKeys[keyPressed] then return end
+			if IsShiftKeyDown() then
+				keyPressed = "SHIFT-"..keyPressed
+			end
+			if IsControlKeyDown() then
+				keyPressed = "CTRL-"..keyPressed
+			end
+			if IsAltKeyDown() then
+				keyPressed = "ALT-"..keyPressed
+			end
+		end
+
+		frame:EnableKeyboard(false)
+		frame:EnableMouseWheel(false)
+		self.msgframe:Hide()
+		frame:UnlockHighlight()
+		self.waitingForKey = nil
+
+		if not self.disabled then
+			self:SetKey(keyPressed)
+			self:Fire("OnKeyChanged", keyPressed)
+		end
+	end
+end
+
+local function Keybinding_OnMouseDown(frame, button)
+	if button == "LeftButton" or button == "RightButton" then
+		return
+	elseif button == "MiddleButton" then
+		button = "BUTTON3"
+	elseif button == "Button4" then
+		button = "BUTTON4"
+	elseif button == "Button5" then
+		button = "BUTTON5"
+	end
+	Keybinding_OnKeyDown(frame, button)
+end
+
+local function Keybinding_OnMouseWheel(frame, direction)
+	local button
+	if direction >= 0 then
+		button = "MOUSEWHEELUP"
+	else
+		button = "MOUSEWHEELDOWN"
+	end
+	Keybinding_OnKeyDown(frame, button)
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetWidth(200)
+		self:SetLabel("")
+		self:SetKey("")
+		self.waitingForKey = nil
+		self.msgframe:Hide()
+		self:SetDisabled(false)
+		self.button:EnableKeyboard(false)
+		self.button:EnableMouseWheel(false)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["SetDisabled"] = function(self, disabled)
+		self.disabled = disabled
+		if disabled then
+			self.button:Disable()
+			self.label:SetTextColor(0.5,0.5,0.5)
+		else
+			self.button:Enable()
+			self.label:SetTextColor(1,1,1)
+		end
+	end,
+
+	["SetKey"] = function(self, key)
+		if (key or "") == "" then
+			self.button:SetText(NOT_BOUND)
+			self.button:SetNormalFontObject("GameFontNormal")
+		else
+			self.button:SetText(key)
+			self.button:SetNormalFontObject("GameFontHighlight")
+		end
+	end,
+
+	["GetKey"] = function(self)
+		local key = self.button:GetText()
+		if key == NOT_BOUND then
+			key = nil
+		end
+		return key
+	end,
+
+	["SetLabel"] = function(self, label)
+		self.label:SetText(label or "")
+		if (label or "") == "" then
+			self.alignoffset = nil
+			self:SetHeight(24)
+		else
+			self.alignoffset = 30
+			self:SetHeight(44)
+		end
+	end,
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+
+local ControlBackdrop  = {
+	bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
+	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+	tile = true, tileSize = 16, edgeSize = 16,
+	insets = { left = 3, right = 3, top = 3, bottom = 3 }
+}
+
+local function keybindingMsgFixWidth(frame)
+	frame:SetWidth(frame.msg:GetWidth() + 10)
+	frame:SetScript("OnUpdate", nil)
+end
+
+local function Constructor()
+	local name = "AceGUI30KeybindingButton" .. AceGUI:GetNextWidgetNum(Type)
+
+	local frame = CreateFrame("Frame", nil, UIParent)
+	local button = CreateFrame("Button", name, frame, "UIPanelButtonTemplate")
+
+	button:EnableMouse(true)
+	button:EnableMouseWheel(false)
+	button:RegisterForClicks("AnyDown")
+	button:SetScript("OnEnter", Control_OnEnter)
+	button:SetScript("OnLeave", Control_OnLeave)
+	button:SetScript("OnClick", Keybinding_OnClick)
+	button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
+	button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
+	button:SetScript("OnMouseWheel", Keybinding_OnMouseWheel)
+	button:SetPoint("BOTTOMLEFT")
+	button:SetPoint("BOTTOMRIGHT")
+	button:SetHeight(24)
+	button:EnableKeyboard(false)
+
+	local text = button:GetFontString()
+	text:SetPoint("LEFT", 7, 0)
+	text:SetPoint("RIGHT", -7, 0)
+
+	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
+	label:SetPoint("TOPLEFT")
+	label:SetPoint("TOPRIGHT")
+	label:SetJustifyH("CENTER")
+	label:SetHeight(18)
+
+	local msgframe = CreateFrame("Frame", nil, UIParent)
+	msgframe:SetHeight(30)
+	msgframe:SetBackdrop(ControlBackdrop)
+	msgframe:SetBackdropColor(0,0,0)
+	msgframe:SetFrameStrata("FULLSCREEN_DIALOG")
+	msgframe:SetFrameLevel(1000)
+	msgframe:SetToplevel(true)
+
+	local msg = msgframe:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+	msg:SetText("Press a key to bind, ESC to clear the binding or click the button again to cancel.")
+	msgframe.msg = msg
+	msg:SetPoint("TOPLEFT", 5, -5)
+	msgframe:SetScript("OnUpdate", keybindingMsgFixWidth)
+	msgframe:SetPoint("BOTTOM", button, "TOP")
+	msgframe:Hide()
+
+	local widget = {
+		button      = button,
+		label       = label,
+		msgframe    = msgframe,
+		frame       = frame,
+		alignoffset = 30,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	button.obj = widget
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
new file mode 100644
index 0000000..75817a0
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
@@ -0,0 +1,173 @@
+--[[-----------------------------------------------------------------------------
+Label Widget
+Displays text and optionally an icon.
+-------------------------------------------------------------------------------]]
+local Type, Version = "Label", 24
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local max, select, pairs = math.max, select, pairs
+
+-- WoW APIs
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: GameFontHighlightSmall
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+
+local function UpdateImageAnchor(self)
+	if self.resizing then return end
+	local frame = self.frame
+	local width = frame.width or frame:GetWidth() or 0
+	local image = self.image
+	local label = self.label
+	local height
+
+	label:ClearAllPoints()
+	image:ClearAllPoints()
+
+	if self.imageshown then
+		local imagewidth = image:GetWidth()
+		if (width - imagewidth) < 200 or (label:GetText() or "") == "" then
+			-- image goes on top centered when less than 200 width for the text, or if there is no text
+			image:SetPoint("TOP")
+			label:SetPoint("TOP", image, "BOTTOM")
+			label:SetPoint("LEFT")
+			label:SetWidth(width)
+			height = image:GetHeight() + label:GetHeight()
+		else
+			-- image on the left
+			image:SetPoint("TOPLEFT")
+			if image:GetHeight() > label:GetHeight() then
+				label:SetPoint("LEFT", image, "RIGHT", 4, 0)
+			else
+				label:SetPoint("TOPLEFT", image, "TOPRIGHT", 4, 0)
+			end
+			label:SetWidth(width - imagewidth - 4)
+			height = max(image:GetHeight(), label:GetHeight())
+		end
+	else
+		-- no image shown
+		label:SetPoint("TOPLEFT")
+		label:SetWidth(width)
+		height = label:GetHeight()
+	end
+
+	self.resizing = true
+	frame:SetHeight(height)
+	frame.height = height
+	self.resizing = nil
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		-- set the flag to stop constant size updates
+		self.resizing = true
+		-- height is set dynamically by the text and image size
+		self:SetWidth(200)
+		self:SetText()
+		self:SetImage(nil)
+		self:SetImageSize(16, 16)
+		self:SetColor()
+		self:SetFontObject()
+		self:SetJustifyH("LEFT")
+		self:SetJustifyV("TOP")
+
+		-- reset the flag
+		self.resizing = nil
+		-- run the update explicitly
+		UpdateImageAnchor(self)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["OnWidthSet"] = function(self, width)
+		UpdateImageAnchor(self)
+	end,
+
+	["SetText"] = function(self, text)
+		self.label:SetText(text)
+		UpdateImageAnchor(self)
+	end,
+
+	["SetColor"] = function(self, r, g, b)
+		if not (r and g and b) then
+			r, g, b = 1, 1, 1
+		end
+		self.label:SetVertexColor(r, g, b)
+	end,
+
+	["SetImage"] = function(self, path, ...)
+		local image = self.image
+		image:SetTexture(path)
+
+		if image:GetTexture() then
+			self.imageshown = true
+			local n = select("#", ...)
+			if n == 4 or n == 8 then
+				image:SetTexCoord(...)
+			else
+				image:SetTexCoord(0, 1, 0, 1)
+			end
+		else
+			self.imageshown = nil
+		end
+		UpdateImageAnchor(self)
+	end,
+
+	["SetFont"] = function(self, font, height, flags)
+		self.label:SetFont(font, height, flags)
+	end,
+
+	["SetFontObject"] = function(self, font)
+		self:SetFont((font or GameFontHighlightSmall):GetFont())
+	end,
+
+	["SetImageSize"] = function(self, width, height)
+		self.image:SetWidth(width)
+		self.image:SetHeight(height)
+		UpdateImageAnchor(self)
+	end,
+
+	["SetJustifyH"] = function(self, justifyH)
+		self.label:SetJustifyH(justifyH)
+	end,
+
+	["SetJustifyV"] = function(self, justifyV)
+		self.label:SetJustifyV(justifyV)
+	end,
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local function Constructor()
+	local frame = CreateFrame("Frame", nil, UIParent)
+	frame:Hide()
+
+	local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall")
+	local image = frame:CreateTexture(nil, "BACKGROUND")
+
+	-- create widget
+	local widget = {
+		label = label,
+		image = image,
+		frame = frame,
+		type  = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
new file mode 100644
index 0000000..9af4b87
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
@@ -0,0 +1,366 @@
+local Type, Version = "MultiLineEditBox", 28
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local pairs = pairs
+
+-- WoW APIs
+local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor
+local CreateFrame, UIParent = CreateFrame, UIParent
+local _G = _G
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: ACCEPT, ChatFontNormal
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+
+if not AceGUIMultiLineEditBoxInsertLink then
+	-- upgradeable hook
+	hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIMultiLineEditBoxInsertLink(...) end)
+end
+
+function _G.AceGUIMultiLineEditBoxInsertLink(text)
+	for i = 1, AceGUI:GetWidgetCount(Type) do
+		local editbox = _G[("MultiLineEditBox%uEdit"):format(i)]
+		if editbox and editbox:IsVisible() and editbox:HasFocus() then
+			editbox:Insert(text)
+			return true
+		end
+	end
+end
+
+
+local function Layout(self)
+	self:SetHeight(self.numlines * 14 + (self.disablebutton and 19 or 41) + self.labelHeight)
+
+	if self.labelHeight == 0 then
+		self.scrollBar:SetPoint("TOP", self.frame, "TOP", 0, -23)
+	else
+		self.scrollBar:SetPoint("TOP", self.label, "BOTTOM", 0, -19)
+	end
+
+	if self.disablebutton then
+		self.scrollBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 21)
+		self.scrollBG:SetPoint("BOTTOMLEFT", 0, 4)
+	else
+		self.scrollBar:SetPoint("BOTTOM", self.button, "TOP", 0, 18)
+		self.scrollBG:SetPoint("BOTTOMLEFT", self.button, "TOPLEFT")
+	end
+end
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function OnClick(self)                                                     -- Button
+	self = self.obj
+	self.editBox:ClearFocus()
+	if not self:Fire("OnEnterPressed", self.editBox:GetText()) then
+		self.button:Disable()
+	end
+end
+
+local function OnCursorChanged(self, _, y, _, cursorHeight)                      -- EditBox
+	self, y = self.obj.scrollFrame, -y
+	local offset = self:GetVerticalScroll()
+	if y < offset then
+		self:SetVerticalScroll(y)
+	else
+		y = y + cursorHeight - self:GetHeight()
+		if y > offset then
+			self:SetVerticalScroll(y)
+		end
+	end
+end
+
+local function OnEditFocusLost(self)                                             -- EditBox
+	self:HighlightText(0, 0)
+	self.obj:Fire("OnEditFocusLost")
+end
+
+local function OnEnter(self)                                                     -- EditBox / ScrollFrame
+	self = self.obj
+	if not self.entered then
+		self.entered = true
+		self:Fire("OnEnter")
+	end
+end
+
+local function OnLeave(self)                                                     -- EditBox / ScrollFrame
+	self = self.obj
+	if self.entered then
+		self.entered = nil
+		self:Fire("OnLeave")
+	end
+end
+
+local function OnMouseUp(self)                                                   -- ScrollFrame
+	self = self.obj.editBox
+	self:SetFocus()
+	self:SetCursorPosition(self:GetNumLetters())
+end
+
+local function OnReceiveDrag(self)                                               -- EditBox / ScrollFrame
+	local type, id, info = GetCursorInfo()
+	if type == "spell" then
+		info = GetSpellInfo(id, info)
+	elseif type ~= "item" then
+		return
+	end
+	ClearCursor()
+	self = self.obj
+	local editBox = self.editBox
+	if not editBox:HasFocus() then
+		editBox:SetFocus()
+		editBox:SetCursorPosition(editBox:GetNumLetters())
+	end
+	editBox:Insert(info)
+	self.button:Enable()
+end
+
+local function OnSizeChanged(self, width, height)                                -- ScrollFrame
+	self.obj.editBox:SetWidth(width)
+end
+
+local function OnTextChanged(self, userInput)                                    -- EditBox
+	if userInput then
+		self = self.obj
+		self:Fire("OnTextChanged", self.editBox:GetText())
+		self.button:Enable()
+	end
+end
+
+local function OnTextSet(self)                                                   -- EditBox
+	self:HighlightText(0, 0)
+	self:SetCursorPosition(self:GetNumLetters())
+	self:SetCursorPosition(0)
+	self.obj.button:Disable()
+end
+
+local function OnVerticalScroll(self, offset)                                    -- ScrollFrame
+	local editBox = self.obj.editBox
+	editBox:SetHitRectInsets(0, 0, offset, editBox:GetHeight() - offset - self:GetHeight())
+end
+
+local function OnShowFocus(frame)
+	frame.obj.editBox:SetFocus()
+	frame:SetScript("OnShow", nil)
+end
+
+local function OnEditFocusGained(frame)
+	AceGUI:SetFocus(frame.obj)
+	frame.obj:Fire("OnEditFocusGained")
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self.editBox:SetText("")
+		self:SetDisabled(false)
+		self:SetWidth(200)
+		self:DisableButton(false)
+		self:SetNumLines()
+		self.entered = nil
+		self:SetMaxLetters(0)
+	end,
+
+	["OnRelease"] = function(self)
+		self:ClearFocus()
+	end,
+
+	["SetDisabled"] = function(self, disabled)
+		local editBox = self.editBox
+		if disabled then
+			editBox:ClearFocus()
+			editBox:EnableMouse(false)
+			editBox:SetTextColor(0.5, 0.5, 0.5)
+			self.label:SetTextColor(0.5, 0.5, 0.5)
+			self.scrollFrame:EnableMouse(false)
+			self.button:Disable()
+		else
+			editBox:EnableMouse(true)
+			editBox:SetTextColor(1, 1, 1)
+			self.label:SetTextColor(1, 0.82, 0)
+			self.scrollFrame:EnableMouse(true)
+		end
+	end,
+
+	["SetLabel"] = function(self, text)
+		if text and text ~= "" then
+			self.label:SetText(text)
+			if self.labelHeight ~= 10 then
+				self.labelHeight = 10
+				self.label:Show()
+			end
+		elseif self.labelHeight ~= 0 then
+			self.labelHeight = 0
+			self.label:Hide()
+		end
+		Layout(self)
+	end,
+
+	["SetNumLines"] = function(self, value)
+		if not value or value < 4 then
+			value = 4
+		end
+		self.numlines = value
+		Layout(self)
+	end,
+
+	["SetText"] = function(self, text)
+		self.editBox:SetText(text)
+	end,
+
+	["GetText"] = function(self)
+		return self.editBox:GetText()
+	end,
+
+	["SetMaxLetters"] = function (self, num)
+		self.editBox:SetMaxLetters(num or 0)
+	end,
+
+	["DisableButton"] = function(self, disabled)
+		self.disablebutton = disabled
+		if disabled then
+			self.button:Hide()
+		else
+			self.button:Show()
+		end
+		Layout(self)
+	end,
+
+	["ClearFocus"] = function(self)
+		self.editBox:ClearFocus()
+		self.frame:SetScript("OnShow", nil)
+	end,
+
+	["SetFocus"] = function(self)
+		self.editBox:SetFocus()
+		if not self.frame:IsShown() then
+			self.frame:SetScript("OnShow", OnShowFocus)
+		end
+	end,
+
+	["HighlightText"] = function(self, from, to)
+		self.editBox:HighlightText(from, to)
+	end,
+
+	["GetCursorPosition"] = function(self)
+		return self.editBox:GetCursorPosition()
+	end,
+
+	["SetCursorPosition"] = function(self, ...)
+		return self.editBox:SetCursorPosition(...)
+	end,
+
+
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local backdrop = {
+	bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
+	edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], edgeSize = 16,
+	insets = { left = 4, right = 3, top = 4, bottom = 3 }
+}
+
+local function Constructor()
+	local frame = CreateFrame("Frame", nil, UIParent)
+	frame:Hide()
+
+	local widgetNum = AceGUI:GetNextWidgetNum(Type)
+
+	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
+	label:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, -4)
+	label:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, -4)
+	label:SetJustifyH("LEFT")
+	label:SetText(ACCEPT)
+	label:SetHeight(10)
+
+	local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate")
+	button:SetPoint("BOTTOMLEFT", 0, 4)
+	button:SetHeight(22)
+	button:SetWidth(label:GetStringWidth() + 24)
+	button:SetText(ACCEPT)
+	button:SetScript("OnClick", OnClick)
+	button:Disable()
+
+	local text = button:GetFontString()
+	text:ClearAllPoints()
+	text:SetPoint("TOPLEFT", button, "TOPLEFT", 5, -5)
+	text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -5, 1)
+	text:SetJustifyV("MIDDLE")
+
+	local scrollBG = CreateFrame("Frame", nil, frame)
+	scrollBG:SetBackdrop(backdrop)
+	scrollBG:SetBackdropColor(0, 0, 0)
+	scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4)
+
+	local scrollFrame = CreateFrame("ScrollFrame", ("%s%dScrollFrame"):format(Type, widgetNum), frame, "UIPanelScrollFrameTemplate")
+
+	local scrollBar = _G[scrollFrame:GetName() .. "ScrollBar"]
+	scrollBar:ClearAllPoints()
+	scrollBar:SetPoint("TOP", label, "BOTTOM", 0, -19)
+	scrollBar:SetPoint("BOTTOM", button, "TOP", 0, 18)
+	scrollBar:SetPoint("RIGHT", frame, "RIGHT")
+
+	scrollBG:SetPoint("TOPRIGHT", scrollBar, "TOPLEFT", 0, 19)
+	scrollBG:SetPoint("BOTTOMLEFT", button, "TOPLEFT")
+
+	scrollFrame:SetPoint("TOPLEFT", scrollBG, "TOPLEFT", 5, -6)
+	scrollFrame:SetPoint("BOTTOMRIGHT", scrollBG, "BOTTOMRIGHT", -4, 4)
+	scrollFrame:SetScript("OnEnter", OnEnter)
+	scrollFrame:SetScript("OnLeave", OnLeave)
+	scrollFrame:SetScript("OnMouseUp", OnMouseUp)
+	scrollFrame:SetScript("OnReceiveDrag", OnReceiveDrag)
+	scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
+	scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll)
+
+	local editBox = CreateFrame("EditBox", ("%s%dEdit"):format(Type, widgetNum), scrollFrame)
+	editBox:SetAllPoints()
+	editBox:SetFontObject(ChatFontNormal)
+	editBox:SetMultiLine(true)
+	editBox:EnableMouse(true)
+	editBox:SetAutoFocus(false)
+	editBox:SetCountInvisibleLetters(false)
+	editBox:SetScript("OnCursorChanged", OnCursorChanged)
+	editBox:SetScript("OnEditFocusLost", OnEditFocusLost)
+	editBox:SetScript("OnEnter", OnEnter)
+	editBox:SetScript("OnEscapePressed", editBox.ClearFocus)
+	editBox:SetScript("OnLeave", OnLeave)
+	editBox:SetScript("OnMouseDown", OnReceiveDrag)
+	editBox:SetScript("OnReceiveDrag", OnReceiveDrag)
+	editBox:SetScript("OnTextChanged", OnTextChanged)
+	editBox:SetScript("OnTextSet", OnTextSet)
+	editBox:SetScript("OnEditFocusGained", OnEditFocusGained)
+
+
+	scrollFrame:SetScrollChild(editBox)
+
+	local widget = {
+		button      = button,
+		editBox     = editBox,
+		frame       = frame,
+		label       = label,
+		labelHeight = 10,
+		numlines    = 4,
+		scrollBar   = scrollBar,
+		scrollBG    = scrollBG,
+		scrollFrame = scrollFrame,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	button.obj, editBox.obj, scrollFrame.obj = widget, widget, widget
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
new file mode 100644
index 0000000..20d0887
--- /dev/null
+++ b/EMA/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
@@ -0,0 +1,285 @@
+--[[-----------------------------------------------------------------------------
+Slider Widget
+Graphical Slider, like, for Range values.
+-------------------------------------------------------------------------------]]
+local Type, Version = "Slider", 22
+local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
+if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
+
+-- Lua APIs
+local min, max, floor = math.min, math.max, math.floor
+local tonumber, pairs = tonumber, pairs
+
+-- WoW APIs
+local PlaySound = PlaySound
+local CreateFrame, UIParent = CreateFrame, UIParent
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: GameFontHighlightSmall
+
+--[[-----------------------------------------------------------------------------
+Support functions
+-------------------------------------------------------------------------------]]
+local function UpdateText(self)
+	local value = self.value or 0
+	if self.ispercent then
+		self.editbox:SetText(("%s%%"):format(floor(value * 1000 + 0.5) / 10))
+	else
+		self.editbox:SetText(floor(value * 100 + 0.5) / 100)
+	end
+end
+
+local function UpdateLabels(self)
+	local min, max = (self.min or 0), (self.max or 100)
+	if self.ispercent then
+		self.lowtext:SetFormattedText("%s%%", (min * 100))
+		self.hightext:SetFormattedText("%s%%", (max * 100))
+	else
+		self.lowtext:SetText(min)
+		self.hightext:SetText(max)
+	end
+end
+
+--[[-----------------------------------------------------------------------------
+Scripts
+-------------------------------------------------------------------------------]]
+local function Control_OnEnter(frame)
+	frame.obj:Fire("OnEnter")
+end
+
+local function Control_OnLeave(frame)
+	frame.obj:Fire("OnLeave")
+end
+
+local function Frame_OnMouseDown(frame)
+	frame.obj.slider:EnableMouseWheel(true)
+	AceGUI:ClearFocus()
+end
+
+local function Slider_OnValueChanged(frame)
+	local self = frame.obj
+	if not frame.setup then
+		local newvalue = frame:GetValue()
+		if self.step and self.step > 0 then
+			local min_value = self.min or 0
+			newvalue = floor((newvalue - min_value) / self.step + 0.5) * self.step + min_value
+		end
+		if newvalue ~= self.value and not self.disabled then
+			self.value = newvalue
+			self:Fire("OnValueChanged", newvalue)
+		end
+		if self.value then
+			UpdateText(self)
+		end
+	end
+end
+
+local function Slider_OnMouseUp(frame)
+	local self = frame.obj
+	self:Fire("OnMouseUp", self.value)
+end
+
+local function Slider_OnMouseWheel(frame, v)
+	local self = frame.obj
+	if not self.disabled then
+		local value = self.value
+		if v > 0 then
+			value = min(value + (self.step or 1), self.max)
+		else
+			value = max(value - (self.step or 1), self.min)
+		end
+		self.slider:SetValue(value)
+	end
+end
+
+local function EditBox_OnEscapePressed(frame)
+	frame:ClearFocus()
+end
+
+local function EditBox_OnEnterPressed(frame)
+	local self = frame.obj
+	local value = frame:GetText()
+	if self.ispercent then
+		value = value:gsub('%%', '')
+		value = tonumber(value) / 100
+	else
+		value = tonumber(value)
+	end
+
+	if value then
+		PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
+		self.slider:SetValue(value)
+		self:Fire("OnMouseUp", value)
+	end
+end
+
+local function EditBox_OnEnter(frame)
+	frame:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
+end
+
+local function EditBox_OnLeave(frame)
+	frame:SetBackdropBorderColor(0.3, 0.3, 0.3, 0.8)
+end
+
+--[[-----------------------------------------------------------------------------
+Methods
+-------------------------------------------------------------------------------]]
+local methods = {
+	["OnAcquire"] = function(self)
+		self:SetWidth(200)
+		self:SetHeight(44)
+		self:SetDisabled(false)
+		self:SetIsPercent(nil)
+		self:SetSliderValues(0,100,1)
+		self:SetValue(0)
+		self.slider:EnableMouseWheel(false)
+	end,
+
+	-- ["OnRelease"] = nil,
+
+	["SetDisabled"] = function(self, disabled)
+		self.disabled = disabled
+		if disabled then
+			self.slider:EnableMouse(false)
+			self.label:SetTextColor(.5, .5, .5)
+			self.hightext:SetTextColor(.5, .5, .5)
+			self.lowtext:SetTextColor(.5, .5, .5)
+			--self.valuetext:SetTextColor(.5, .5, .5)
+			self.editbox:SetTextColor(.5, .5, .5)
+			self.editbox:EnableMouse(false)
+			self.editbox:ClearFocus()
+		else
+			self.slider:EnableMouse(true)
+			self.label:SetTextColor(1, .82, 0)
+			self.hightext:SetTextColor(1, 1, 1)
+			self.lowtext:SetTextColor(1, 1, 1)
+			--self.valuetext:SetTextColor(1, 1, 1)
+			self.editbox:SetTextColor(1, 1, 1)
+			self.editbox:EnableMouse(true)
+		end
+	end,
+
+	["SetValue"] = function(self, value)
+		self.slider.setup = true
+		self.slider:SetValue(value)
+		self.value = value
+		UpdateText(self)
+		self.slider.setup = nil
+	end,
+
+	["GetValue"] = function(self)
+		return self.value
+	end,
+
+	["SetLabel"] = function(self, text)
+		self.label:SetText(text)
+	end,
+
+	["SetSliderValues"] = function(self, min, max, step)
+		local frame = self.slider
+		frame.setup = true
+		self.min = min
+		self.max = max
+		self.step = step
+		frame:SetMinMaxValues(min or 0,max or 100)
+		UpdateLabels(self)
+		frame:SetValueStep(step or 1)
+		if self.value then
+			frame:SetValue(self.value)
+		end
+		frame.setup = nil
+	end,
+
+	["SetIsPercent"] = function(self, value)
+		self.ispercent = value
+		UpdateLabels(self)
+		UpdateText(self)
+	end
+}
+
+--[[-----------------------------------------------------------------------------
+Constructor
+-------------------------------------------------------------------------------]]
+local SliderBackdrop  = {
+	bgFile = "Interface\\Buttons\\UI-SliderBar-Background",
+	edgeFile = "Interface\\Buttons\\UI-SliderBar-Border",
+	tile = true, tileSize = 8, edgeSize = 8,
+	insets = { left = 3, right = 3, top = 6, bottom = 6 }
+}
+
+local ManualBackdrop = {
+	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+	edgeFile = "Interface\\ChatFrame\\ChatFrameBackground",
+	tile = true, edgeSize = 1, tileSize = 5,
+}
+
+local function Constructor()
+	local frame = CreateFrame("Frame", nil, UIParent)
+
+	frame:EnableMouse(true)
+	frame:SetScript("OnMouseDown", Frame_OnMouseDown)
+
+	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+	label:SetPoint("TOPLEFT")
+	label:SetPoint("TOPRIGHT")
+	label:SetJustifyH("CENTER")
+	label:SetHeight(15)
+
+	local slider = CreateFrame("Slider", nil, frame)
+	slider:SetOrientation("HORIZONTAL")
+	slider:SetHeight(15)
+	slider:SetHitRectInsets(0, 0, -10, 0)
+	slider:SetBackdrop(SliderBackdrop)
+	slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Horizontal")
+	slider:SetPoint("TOP", label, "BOTTOM")
+	slider:SetPoint("LEFT", 3, 0)
+	slider:SetPoint("RIGHT", -3, 0)
+	slider:SetValue(0)
+	slider:SetScript("OnValueChanged",Slider_OnValueChanged)
+	slider:SetScript("OnEnter", Control_OnEnter)
+	slider:SetScript("OnLeave", Control_OnLeave)
+	slider:SetScript("OnMouseUp", Slider_OnMouseUp)
+	slider:SetScript("OnMouseWheel", Slider_OnMouseWheel)
+
+	local lowtext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
+	lowtext:SetPoint("TOPLEFT", slider, "BOTTOMLEFT", 2, 3)
+
+	local hightext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
+	hightext:SetPoint("TOPRIGHT", slider, "BOTTOMRIGHT", -2, 3)
+
+	local editbox = CreateFrame("EditBox", nil, frame)
+	editbox:SetAutoFocus(false)
+	editbox:SetFontObject(GameFontHighlightSmall)
+	editbox:SetPoint("TOP", slider, "BOTTOM")
+	editbox:SetHeight(14)
+	editbox:SetWidth(70)
+	editbox:SetJustifyH("CENTER")
+	editbox:EnableMouse(true)
+	editbox:SetBackdrop(ManualBackdrop)
+	editbox:SetBackdropColor(0, 0, 0, 0.5)
+	editbox:SetBackdropBorderColor(0.3, 0.3, 0.30, 0.80)
+	editbox:SetScript("OnEnter", EditBox_OnEnter)
+	editbox:SetScript("OnLeave", EditBox_OnLeave)
+	editbox:SetScript("OnEnterPressed", EditBox_OnEnterPressed)
+	editbox:SetScript("OnEscapePressed", EditBox_OnEscapePressed)
+
+	local widget = {
+		label       = label,
+		slider      = slider,
+		lowtext     = lowtext,
+		hightext    = hightext,
+		editbox     = editbox,
+		alignoffset = 25,
+		frame       = frame,
+		type        = Type
+	}
+	for method, func in pairs(methods) do
+		widget[method] = func
+	end
+	slider.obj, editbox.obj = widget, widget
+
+	return AceGUI:RegisterAsWidget(widget)
+end
+
+AceGUI:RegisterWidgetType(Type,Constructor,Version)
diff --git a/EMA/Libs/AceHook-3.0/AceHook-3.0.lua b/EMA/Libs/AceHook-3.0/AceHook-3.0.lua
new file mode 100644
index 0000000..8302334
--- /dev/null
+++ b/EMA/Libs/AceHook-3.0/AceHook-3.0.lua
@@ -0,0 +1,511 @@
+--- **AceHook-3.0** offers safe Hooking/Unhooking of functions, methods and frame scripts.
+-- Using AceHook-3.0 is recommended when you need to unhook your hooks again, so the hook chain isn't broken
+-- when you manually restore the original function.
+--
+-- **AceHook-3.0** can be embeded into your addon, either explicitly by calling AceHook:Embed(MyAddon) or by
+-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
+-- and can be accessed directly, without having to explicitly call AceHook itself.\\
+-- It is recommended to embed AceHook, otherwise you'll have to specify a custom `self` on all calls you
+-- make into AceHook.
+-- @class file
+-- @name AceHook-3.0
+-- @release $Id: AceHook-3.0.lua 1118 2014-10-12 08:21:54Z nevcairiel $
+local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 8
+local AceHook, oldminor = LibStub:NewLibrary(ACEHOOK_MAJOR, ACEHOOK_MINOR)
+
+if not AceHook then return end -- No upgrade needed
+
+AceHook.embeded = AceHook.embeded or {}
+AceHook.registry = AceHook.registry or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end })
+AceHook.handlers = AceHook.handlers or {}
+AceHook.actives = AceHook.actives or {}
+AceHook.scripts = AceHook.scripts or {}
+AceHook.onceSecure = AceHook.onceSecure or {}
+AceHook.hooks = AceHook.hooks or {}
+
+-- local upvalues
+local registry = AceHook.registry
+local handlers = AceHook.handlers
+local actives = AceHook.actives
+local scripts = AceHook.scripts
+local onceSecure = AceHook.onceSecure
+
+-- Lua APIs
+local pairs, next, type = pairs, next, type
+local format = string.format
+local assert, error = assert, error
+
+-- WoW APIs
+local issecurevariable, hooksecurefunc = issecurevariable, hooksecurefunc
+local _G = _G
+
+-- functions for later definition
+local donothing, createHook, hook
+
+local protectedScripts = {
+	OnClick = true,
+}
+
+-- upgrading of embeded is done at the bottom of the file
+
+local mixins = {
+	"Hook", "SecureHook",
+	"HookScript", "SecureHookScript",
+	"Unhook", "UnhookAll",
+	"IsHooked",
+	"RawHook", "RawHookScript"
+}
+
+-- AceHook:Embed( target )
+-- target (object) - target object to embed AceHook in
+--
+-- Embeds AceEevent into the target object making the functions from the mixins list available on target:..
+function AceHook:Embed( target )
+	for k, v in pairs( mixins ) do
+		target[v] = self[v]
+	end
+	self.embeded[target] = true
+	-- inject the hooks table safely
+	target.hooks = target.hooks or {}
+	return target
+end
+
+-- AceHook:OnEmbedDisable( target )
+-- target (object) - target object that is being disabled
+--
+-- Unhooks all hooks when the target disables.
+-- this method should be called by the target manually or by an addon framework
+function AceHook:OnEmbedDisable( target )
+	target:UnhookAll()
+end
+
+function createHook(self, handler, orig, secure, failsafe)
+	local uid
+	local method = type(handler) == "string"
+	if failsafe and not secure then
+		-- failsafe hook creation
+		uid = function(...)
+			if actives[uid] then
+				if method then
+					self[handler](self, ...)
+				else
+					handler(...)
+				end
+			end
+			return orig(...)
+		end
+		-- /failsafe hook
+	else
+		-- all other hooks
+		uid = function(...)
+			if actives[uid] then
+				if method then
+					return self[handler](self, ...)
+				else
+					return handler(...)
+				end
+			elseif not secure then -- backup on non secure
+				return orig(...)
+			end
+		end
+		-- /hook
+	end
+	return uid
+end
+
+function donothing() end
+
+function hook(self, obj, method, handler, script, secure, raw, forceSecure, usage)
+	if not handler then handler = method end
+
+	-- These asserts make sure AceHooks's devs play by the rules.
+	assert(not script or type(script) == "boolean")
+	assert(not secure or type(secure) == "boolean")
+	assert(not raw or type(raw) == "boolean")
+	assert(not forceSecure or type(forceSecure) == "boolean")
+	assert(usage)
+
+	-- Error checking Battery!
+	if obj and type(obj) ~= "table" then
+		error(format("%s: 'object' - nil or table expected got %s", usage, type(obj)), 3)
+	end
+	if type(method) ~= "string" then
+		error(format("%s: 'method' - string expected got %s", usage, type(method)), 3)
+	end
+	if type(handler) ~= "string" and type(handler) ~= "function" then
+		error(format("%s: 'handler' - nil, string, or function expected got %s", usage, type(handler)), 3)
+	end
+	if type(handler) == "string" and type(self[handler]) ~= "function" then
+		error(format("%s: 'handler' - Handler specified does not exist at self[handler]", usage), 3)
+	end
+	if script then
+		if not obj or not obj.GetScript or not obj:HasScript(method) then
+			error(format("%s: You can only hook a script on a frame object", usage), 3)
+		end
+		if not secure and obj.IsProtected and obj:IsProtected() and protectedScripts[method] then
+			error(format("Cannot hook secure script %q; Use SecureHookScript(obj, method, [handler]) instead.", method), 3)
+		end
+	else
+		local issecure
+		if obj then
+			issecure = onceSecure[obj] and onceSecure[obj][method] or issecurevariable(obj, method)
+		else
+			issecure = onceSecure[method] or issecurevariable(method)
+		end
+		if issecure then
+			if forceSecure then
+				if obj then
+					onceSecure[obj] = onceSecure[obj] or {}
+					onceSecure[obj][method] = true
+				else
+					onceSecure[method] = true
+				end
+			elseif not secure then
+				error(format("%s: Attempt to hook secure function %s. Use `SecureHook' or add `true' to the argument list to override.", usage, method), 3)
+			end
+		end
+	end
+
+	local uid
+	if obj then
+		uid = registry[self][obj] and registry[self][obj][method]
+	else
+		uid = registry[self][method]
+	end
+
+	if uid then
+		if actives[uid] then
+			-- Only two sane choices exist here.  We either a) error 100% of the time or b) always unhook and then hook
+			-- choice b would likely lead to odd debuging conditions or other mysteries so we're going with a.
+			error(format("Attempting to rehook already active hook %s.", method))
+		end
+
+		if handlers[uid] == handler then -- turn on a decative hook, note enclosures break this ability, small memory leak
+			actives[uid] = true
+			return
+		elseif obj then -- is there any reason not to call unhook instead of doing the following several lines?
+			if self.hooks and self.hooks[obj] then
+				self.hooks[obj][method] = nil
+			end
+			registry[self][obj][method] = nil
+		else
+			if self.hooks then
+				self.hooks[method] = nil
+			end
+			registry[self][method] = nil
+		end
+		handlers[uid], actives[uid], scripts[uid] = nil, nil, nil
+		uid = nil
+	end
+
+	local orig
+	if script then
+		orig = obj:GetScript(method) or donothing
+	elseif obj then
+		orig = obj[method]
+	else
+		orig = _G[method]
+	end
+
+	if not orig then
+		error(format("%s: Attempting to hook a non existing target", usage), 3)
+	end
+
+	uid = createHook(self, handler, orig, secure, not (raw or secure))
+
+	if obj then
+		self.hooks[obj] = self.hooks[obj] or {}
+		registry[self][obj] = registry[self][obj] or {}
+		registry[self][obj][method] = uid
+
+		if not secure then
+			self.hooks[obj][method] = orig
+		end
+
+		if script then
+			if not secure then
+				obj:SetScript(method, uid)
+			else
+				obj:HookScript(method, uid)
+			end
+		else
+			if not secure then
+				obj[method] = uid
+			else
+				hooksecurefunc(obj, method, uid)
+			end
+		end
+	else
+		registry[self][method] = uid
+
+		if not secure then
+			_G[method] = uid
+			self.hooks[method] = orig
+		else
+			hooksecurefunc(method, uid)
+		end
+	end
+
+	actives[uid], handlers[uid], scripts[uid] = true, handler, script and true or nil
+end
+
+--- Hook a function or a method on an object.
+-- The hook created will be a "safe hook", that means that your handler will be called
+-- before the hooked function ("Pre-Hook"), and you don't have to call the original function yourself,
+-- however you cannot stop the execution of the function, or modify any of the arguments/return values.\\
+-- This type of hook is typically used if you need to know if some function got called, and don't want to modify it.
+-- @paramsig [object], method, [handler], [hookSecure]
+-- @param object The object to hook a method from
+-- @param method If object was specified, the name of the method, or the name of the function to hook.
+-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
+-- @param hookSecure If true, AceHook will allow hooking of secure functions.
+-- @usage
+-- -- create an addon with AceHook embeded
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
+--
+-- function MyAddon:OnEnable()
+--   -- Hook ActionButton_UpdateHotkeys, overwriting the secure status
+--   self:Hook("ActionButton_UpdateHotkeys", true)
+-- end
+--
+-- function MyAddon:ActionButton_UpdateHotkeys(button, type)
+--   print(button:GetName() .. " is updating its HotKey")
+-- end
+function AceHook:Hook(object, method, handler, hookSecure)
+	if type(object) == "string" then
+		method, handler, hookSecure, object = object, method, handler, nil
+	end
+
+	if handler == true then
+		handler, hookSecure = nil, true
+	end
+
+	hook(self, object, method, handler, false, false, false, hookSecure or false, "Usage: Hook([object], method, [handler], [hookSecure])")
+end
+
+--- RawHook a function or a method on an object.
+-- The hook created will be a "raw hook", that means that your handler will completly replace
+-- the original function, and your handler has to call the original function (or not, depending on your intentions).\\
+-- The original function will be stored in `self.hooks[object][method]` or `self.hooks[functionName]` respectively.\\
+-- This type of hook can be used for all purposes, and is usually the most common case when you need to modify arguments
+-- or want to control execution of the original function.
+-- @paramsig [object], method, [handler], [hookSecure]
+-- @param object The object to hook a method from
+-- @param method If object was specified, the name of the method, or the name of the function to hook.
+-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
+-- @param hookSecure If true, AceHook will allow hooking of secure functions.
+-- @usage
+-- -- create an addon with AceHook embeded
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
+--
+-- function MyAddon:OnEnable()
+--   -- Hook ActionButton_UpdateHotkeys, overwriting the secure status
+--   self:RawHook("ActionButton_UpdateHotkeys", true)
+-- end
+--
+-- function MyAddon:ActionButton_UpdateHotkeys(button, type)
+--   if button:GetName() == "MyButton" then
+--     -- do stuff here
+--   else
+--     self.hooks.ActionButton_UpdateHotkeys(button, type)
+--   end
+-- end
+function AceHook:RawHook(object, method, handler, hookSecure)
+	if type(object) == "string" then
+		method, handler, hookSecure, object = object, method, handler, nil
+	end
+
+	if handler == true then
+		handler, hookSecure = nil, true
+	end
+
+	hook(self, object, method, handler, false, false, true, hookSecure or false,  "Usage: RawHook([object], method, [handler], [hookSecure])")
+end
+
+--- SecureHook a function or a method on an object.
+-- This function is a wrapper around the `hooksecurefunc` function in the WoW API. Using AceHook
+-- extends the functionality of secure hooks, and adds the ability to unhook once the hook isn't
+-- required anymore, or the addon is being disabled.\\
+-- Secure Hooks should be used if the secure-status of the function is vital to its function,
+-- and taint would block execution. Secure Hooks are always called after the original function was called
+-- ("Post Hook"), and you cannot modify the arguments, return values or control the execution.
+-- @paramsig [object], method, [handler]
+-- @param object The object to hook a method from
+-- @param method If object was specified, the name of the method, or the name of the function to hook.
+-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
+function AceHook:SecureHook(object, method, handler)
+	if type(object) == "string" then
+		method, handler, object = object, method, nil
+	end
+
+	hook(self, object, method, handler, false, true, false, false,  "Usage: SecureHook([object], method, [handler])")
+end
+
+--- Hook a script handler on a frame.
+-- The hook created will be a "safe hook", that means that your handler will be called
+-- before the hooked script ("Pre-Hook"), and you don't have to call the original function yourself,
+-- however you cannot stop the execution of the function, or modify any of the arguments/return values.\\
+-- This is the frame script equivalent of the :Hook safe-hook. It would typically be used to be notified
+-- when a certain event happens to a frame.
+-- @paramsig frame, script, [handler]
+-- @param frame The Frame to hook the script on
+-- @param script The script to hook
+-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
+-- @usage
+-- -- create an addon with AceHook embeded
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
+--
+-- function MyAddon:OnEnable()
+--   -- Hook the OnShow of FriendsFrame
+--   self:HookScript(FriendsFrame, "OnShow", "FriendsFrameOnShow")
+-- end
+--
+-- function MyAddon:FriendsFrameOnShow(frame)
+--   print("The FriendsFrame was shown!")
+-- end
+function AceHook:HookScript(frame, script, handler)
+	hook(self, frame, script, handler, true, false, false, false,  "Usage: HookScript(object, method, [handler])")
+end
+
+--- RawHook a script handler on a frame.
+-- The hook created will be a "raw hook", that means that your handler will completly replace
+-- the original script, and your handler has to call the original script (or not, depending on your intentions).\\
+-- The original script will be stored in `self.hooks[frame][script]`.\\
+-- This type of hook can be used for all purposes, and is usually the most common case when you need to modify arguments
+-- or want to control execution of the original script.
+-- @paramsig frame, script, [handler]
+-- @param frame The Frame to hook the script on
+-- @param script The script to hook
+-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
+-- @usage
+-- -- create an addon with AceHook embeded
+-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
+--
+-- function MyAddon:OnEnable()
+--   -- Hook the OnShow of FriendsFrame
+--   self:RawHookScript(FriendsFrame, "OnShow", "FriendsFrameOnShow")
+-- end
+--
+-- function MyAddon:FriendsFrameOnShow(frame)
+--   -- Call the original function
+--   self.hooks[frame].OnShow(frame)
+--   -- Do our processing
+--   -- .. stuff
+-- end
+function AceHook:RawHookScript(frame, script, handler)
+	hook(self, frame, script, handler, true, false, true, false, "Usage: RawHookScript(object, method, [handler])")
+end
+
+--- SecureHook a script handler on a frame.
+-- This function is a wrapper around the `frame:HookScript` function in the WoW API. Using AceHook
+-- extends the functionality of secure hooks, and adds the ability to unhook once the hook isn't
+-- required anymore, or the addon is being disabled.\\
+-- Secure Hooks should be used if the secure-status of the function is vital to its function,
+-- and taint would block execution. Secure Hooks are always called after the original function was called
+-- ("Post Hook"), and you cannot modify the arguments, return values or control the execution.
+-- @paramsig frame, script, [handler]
+-- @param frame The Frame to hook the script on
+-- @param script The script to hook
+-- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
+function AceHook:SecureHookScript(frame, script, handler)
+	hook(self, frame, script, handler, true, true, false, false, "Usage: SecureHookScript(object, method, [handler])")
+end
+
+--- Unhook from the specified function, method or script.
+-- @paramsig [obj], method
+-- @param obj The object or frame to unhook from
+-- @param method The name of the method, function or script to unhook from.
+function AceHook:Unhook(obj, method)
+	local usage = "Usage: Unhook([obj], method)"
+	if type(obj) == "string" then
+		method, obj = obj, nil
+	end
+
+	if obj and type(obj) ~= "table" then
+		error(format("%s: 'obj' - expecting nil or table got %s", usage, type(obj)), 2)
+	end
+	if type(method) ~= "string" then
+		error(format("%s: 'method' - expeting string got %s", usage, type(method)), 2)
+	end
+
+	local uid
+	if obj then
+		uid = registry[self][obj] and registry[self][obj][method]
+	else
+		uid = registry[self][method]
+	end
+
+	if not uid or not actives[uid] then
+		-- Declining to error on an unneeded unhook since the end effect is the same and this would just be annoying.
+		return false
+	end
+
+	actives[uid], handlers[uid] = nil, nil
+
+	if obj then
+		registry[self][obj][method] = nil
+		registry[self][obj] = next(registry[self][obj]) and registry[self][obj] or nil
+
+		-- if the hook reference doesnt exist, then its a secure hook, just bail out and dont do any unhooking
+		if not self.hooks[obj] or not self.hooks[obj][method] then return true end
+
+		if scripts[uid] and obj:GetScript(method) == uid then  -- unhooks scripts
+			obj:SetScript(method, self.hooks[obj][method] ~= donothing and self.hooks[obj][method] or nil)
+			scripts[uid] = nil
+		elseif obj and self.hooks[obj] and self.hooks[obj][method] and obj[method] == uid then -- unhooks methods
+			obj[method] = self.hooks[obj][method]
+		end
+
+		self.hooks[obj][method] = nil
+		self.hooks[obj] = next(self.hooks[obj]) and self.hooks[obj] or nil
+	else
+		registry[self][method] = nil
+
+		-- if self.hooks[method] doesn't exist, then this is a SecureHook, just bail out
+		if not self.hooks[method] then return true end
+
+		if self.hooks[method] and _G[method] == uid then -- unhooks functions
+			_G[method] = self.hooks[method]
+		end
+
+		self.hooks[method] = nil
+	end
+	return true
+end
+
+--- Unhook all existing hooks for this addon.
+function AceHook:UnhookAll()
+	for key, value in pairs(registry[self]) do
+		if type(key) == "table" then
+			for method in pairs(value) do
+				self:Unhook(key, method)
+			end
+		else
+			self:Unhook(key)
+		end
+	end
+end
+
+--- Check if the specific function, method or script is already hooked.
+-- @paramsig [obj], method
+-- @param obj The object or frame to unhook from
+-- @param method The name of the method, function or script to unhook from.
+function AceHook:IsHooked(obj, method)
+	-- we don't check if registry[self] exists, this is done by evil magicks in the metatable
+	if type(obj) == "string" then
+		if registry[self][obj] and actives[registry[self][obj]] then
+			return true, handlers[registry[self][obj]]
+		end
+	else
+		if registry[self][obj] and registry[self][obj][method] and actives[registry[self][obj][method]] then
+			return true, handlers[registry[self][obj][method]]
+		end
+	end
+
+	return false, nil
+end
+
+--- Upgrade our old embeded
+for target, v in pairs( AceHook.embeded ) do
+	AceHook:Embed( target )
+end
diff --git a/EMA/Libs/AceHook-3.0/AceHook-3.0.xml b/EMA/Libs/AceHook-3.0/AceHook-3.0.xml
new file mode 100644
index 0000000..fe51336
--- /dev/null
+++ b/EMA/Libs/AceHook-3.0/AceHook-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceHook-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceLocale-3.0/AceLocale-3.0.lua b/EMA/Libs/AceLocale-3.0/AceLocale-3.0.lua
new file mode 100644
index 0000000..e133781
--- /dev/null
+++ b/EMA/Libs/AceLocale-3.0/AceLocale-3.0.lua
@@ -0,0 +1,137 @@
+--- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings.
+-- @class file
+-- @name AceLocale-3.0
+-- @release $Id: AceLocale-3.0.lua 1035 2011-07-09 03:20:13Z kaelten $
+local MAJOR,MINOR = "AceLocale-3.0", 6
+
+local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceLocale then return end -- no upgrade needed
+
+-- Lua APIs
+local assert, tostring, error = assert, tostring, error
+local getmetatable, setmetatable, rawset, rawget = getmetatable, setmetatable, rawset, rawget
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: GAME_LOCALE, geterrorhandler
+
+local gameLocale = GetLocale()
+if gameLocale == "enGB" then
+	gameLocale = "enUS"
+end
+
+AceLocale.apps = AceLocale.apps or {}          -- array of ["AppName"]=localetableref
+AceLocale.appnames = AceLocale.appnames or {}  -- array of [localetableref]="AppName"
+
+-- This metatable is used on all tables returned from GetLocale
+local readmeta = {
+	__index = function(self, key) -- requesting totally unknown entries: fire off a nonbreaking error and return key
+		rawset(self, key, key)      -- only need to see the warning once, really
+		geterrorhandler()(MAJOR..": "..tostring(AceLocale.appnames[self])..": Missing entry for '"..tostring(key).."'")
+		return key
+	end
+}
+
+-- This metatable is used on all tables returned from GetLocale if the silent flag is true, it does not issue a warning on unknown keys
+local readmetasilent = {
+	__index = function(self, key) -- requesting totally unknown entries: return key
+		rawset(self, key, key)      -- only need to invoke this function once
+		return key
+	end
+}
+
+-- Remember the locale table being registered right now (it gets set by :NewLocale())
+-- NOTE: Do never try to register 2 locale tables at once and mix their definition.
+local registering
+
+-- local assert false function
+local assertfalse = function() assert(false) end
+
+-- This metatable proxy is used when registering nondefault locales
+local writeproxy = setmetatable({}, {
+	__newindex = function(self, key, value)
+		rawset(registering, key, value == true and key or value) -- assigning values: replace 'true' with key string
+	end,
+	__index = assertfalse
+})
+
+-- This metatable proxy is used when registering the default locale.
+-- It refuses to overwrite existing values
+-- Reason 1: Allows loading locales in any order
+-- Reason 2: If 2 modules have the same string, but only the first one to be
+--           loaded has a translation for the current locale, the translation
+--           doesn't get overwritten.
+--
+local writedefaultproxy = setmetatable({}, {
+	__newindex = function(self, key, value)
+		if not rawget(registering, key) then
+			rawset(registering, key, value == true and key or value)
+		end
+	end,
+	__index = assertfalse
+})
+
+--- Register a new locale (or extend an existing one) for the specified application.
+-- :NewLocale will return a table you can fill your locale into, or nil if the locale isn't needed for the players
+-- game locale.
+-- @paramsig application, locale[, isDefault[, silent]]
+-- @param application Unique name of addon / module
+-- @param locale Name of the locale to register, e.g. "enUS", "deDE", etc.
+-- @param isDefault If this is the default locale being registered (your addon is written in this language, generally enUS)
+-- @param silent If true, the locale will not issue warnings for missing keys. Must be set on the first locale registered. If set to "raw", nils will be returned for unknown keys (no metatable used).
+-- @usage
+-- -- enUS.lua
+-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "enUS", true)
+-- L["string1"] = true
+--
+-- -- deDE.lua
+-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "deDE")
+-- if not L then return end
+-- L["string1"] = "Zeichenkette1"
+-- @return Locale Table to add localizations to, or nil if the current locale is not required.
+function AceLocale:NewLocale(application, locale, isDefault, silent)
+
+	-- GAME_LOCALE allows translators to test translations of addons without having that wow client installed
+	local gameLocale = GAME_LOCALE or gameLocale
+
+	local app = AceLocale.apps[application]
+
+	if silent and app and getmetatable(app) ~= readmetasilent then
+		geterrorhandler()("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' must be specified for the first locale registered")
+	end
+
+	if not app then
+		if silent=="raw" then
+			app = {}
+		else
+			app = setmetatable({}, silent and readmetasilent or readmeta)
+		end
+		AceLocale.apps[application] = app
+		AceLocale.appnames[app] = application
+	end
+
+	if locale ~= gameLocale and not isDefault then
+		return -- nop, we don't need these translations
+	end
+
+	registering = app -- remember globally for writeproxy and writedefaultproxy
+
+	if isDefault then
+		return writedefaultproxy
+	end
+
+	return writeproxy
+end
+
+--- Returns localizations for the current locale (or default locale if translations are missing).
+-- Errors if nothing is registered (spank developer, not just a missing translation)
+-- @param application Unique name of addon / module
+-- @param silent If true, the locale is optional, silently return nil if it's not found (defaults to false, optional)
+-- @return The locale table for the current language.
+function AceLocale:GetLocale(application, silent)
+	if not silent and not AceLocale.apps[application] then
+		error("Usage: GetLocale(application[, silent]): 'application' - No locales registered for '"..tostring(application).."'", 2)
+	end
+	return AceLocale.apps[application]
+end
diff --git a/EMA/Libs/AceLocale-3.0/AceLocale-3.0.xml b/EMA/Libs/AceLocale-3.0/AceLocale-3.0.xml
new file mode 100644
index 0000000..bf023f0
--- /dev/null
+++ b/EMA/Libs/AceLocale-3.0/AceLocale-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceLocale-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceSerializer-3.0/AceSerializer-3.0.lua b/EMA/Libs/AceSerializer-3.0/AceSerializer-3.0.lua
new file mode 100644
index 0000000..0b19e08
--- /dev/null
+++ b/EMA/Libs/AceSerializer-3.0/AceSerializer-3.0.lua
@@ -0,0 +1,287 @@
+--- **AceSerializer-3.0** can serialize any variable (except functions or userdata) into a string format,
+-- that can be send over the addon comm channel. AceSerializer was designed to keep all data intact, especially
+-- very large numbers or floating point numbers, and table structures. The only caveat currently is, that multiple
+-- references to the same table will be send individually.
+--
+-- **AceSerializer-3.0** can be embeded into your addon, either explicitly by calling AceSerializer:Embed(MyAddon) or by
+-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
+-- and can be accessed directly, without having to explicitly call AceSerializer itself.\\
+-- It is recommended to embed AceSerializer, otherwise you'll have to specify a custom `self` on all calls you
+-- make into AceSerializer.
+-- @class file
+-- @name AceSerializer-3.0
+-- @release $Id: AceSerializer-3.0.lua 1135 2015-09-19 20:39:16Z nevcairiel $
+local MAJOR,MINOR = "AceSerializer-3.0", 5
+local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceSerializer then return end
+
+-- Lua APIs
+local strbyte, strchar, gsub, gmatch, format = string.byte, string.char, string.gsub, string.gmatch, string.format
+local assert, error, pcall = assert, error, pcall
+local type, tostring, tonumber = type, tostring, tonumber
+local pairs, select, frexp = pairs, select, math.frexp
+local tconcat = table.concat
+
+-- quick copies of string representations of wonky numbers
+local inf = math.huge
+
+local serNaN  -- can't do this in 4.3, see ace3 ticket 268
+local serInf, serInfMac = "1.#INF", "inf"
+local serNegInf, serNegInfMac = "-1.#INF", "-inf"
+
+
+-- Serialization functions
+
+local function SerializeStringHelper(ch)	-- Used by SerializeValue for strings
+	-- We use \126 ("~") as an escape character for all nonprints plus a few more
+	local n = strbyte(ch)
+	if n==30 then           -- v3 / ticket 115: catch a nonprint that ends up being "~^" when encoded... DOH
+		return "\126\122"
+	elseif n<=32 then 			-- nonprint + space
+		return "\126"..strchar(n+64)
+	elseif n==94 then		-- value separator
+		return "\126\125"
+	elseif n==126 then		-- our own escape character
+		return "\126\124"
+	elseif n==127 then		-- nonprint (DEL)
+		return "\126\123"
+	else
+		assert(false)	-- can't be reached if caller uses a sane regex
+	end
+end
+
+local function SerializeValue(v, res, nres)
+	-- We use "^" as a value separator, followed by one byte for type indicator
+	local t=type(v)
+
+	if t=="string" then		-- ^S = string (escaped to remove nonprints, "^"s, etc)
+		res[nres+1] = "^S"
+		res[nres+2] = gsub(v,"[%c \94\126\127]", SerializeStringHelper)
+		nres=nres+2
+
+	elseif t=="number" then	-- ^N = number (just tostring()ed) or ^F (float components)
+		local str = tostring(v)
+		if tonumber(str)==v  --[[not in 4.3 or str==serNaN]] then
+			-- translates just fine, transmit as-is
+			res[nres+1] = "^N"
+			res[nres+2] = str
+			nres=nres+2
+		elseif v == inf or v == -inf then
+			res[nres+1] = "^N"
+			res[nres+2] = v == inf and serInf or serNegInf
+			nres=nres+2
+		else
+			local m,e = frexp(v)
+			res[nres+1] = "^F"
+			res[nres+2] = format("%.0f",m*2^53)	-- force mantissa to become integer (it's originally 0.5--0.9999)
+			res[nres+3] = "^f"
+			res[nres+4] = tostring(e-53)	-- adjust exponent to counteract mantissa manipulation
+			nres=nres+4
+		end
+
+	elseif t=="table" then	-- ^T...^t = table (list of key,value pairs)
+		nres=nres+1
+		res[nres] = "^T"
+		for k,v in pairs(v) do
+			nres = SerializeValue(k, res, nres)
+			nres = SerializeValue(v, res, nres)
+		end
+		nres=nres+1
+		res[nres] = "^t"
+
+	elseif t=="boolean" then	-- ^B = true, ^b = false
+		nres=nres+1
+		if v then
+			res[nres] = "^B"	-- true
+		else
+			res[nres] = "^b"	-- false
+		end
+
+	elseif t=="nil" then		-- ^Z = nil (zero, "N" was taken :P)
+		nres=nres+1
+		res[nres] = "^Z"
+
+	else
+		error(MAJOR..": Cannot serialize a value of type '"..t.."'")	-- can't produce error on right level, this is wildly recursive
+	end
+
+	return nres
+end
+
+
+
+local serializeTbl = { "^1" }	-- "^1" = Hi, I'm data serialized by AceSerializer protocol rev 1
+
+--- Serialize the data passed into the function.
+-- Takes a list of values (strings, numbers, booleans, nils, tables)
+-- and returns it in serialized form (a string).\\
+-- May throw errors on invalid data types.
+-- @param ... List of values to serialize
+-- @return The data in its serialized form (string)
+function AceSerializer:Serialize(...)
+	local nres = 1
+
+	for i=1,select("#", ...) do
+		local v = select(i, ...)
+		nres = SerializeValue(v, serializeTbl, nres)
+	end
+
+	serializeTbl[nres+1] = "^^"	-- "^^" = End of serialized data
+
+	return tconcat(serializeTbl, "", 1, nres+1)
+end
+
+-- Deserialization functions
+local function DeserializeStringHelper(escape)
+	if escape<"~\122" then
+		return strchar(strbyte(escape,2,2)-64)
+	elseif escape=="~\122" then	-- v3 / ticket 115: special case encode since 30+64=94 ("^") - OOPS.
+		return "\030"
+	elseif escape=="~\123" then
+		return "\127"
+	elseif escape=="~\124" then
+		return "\126"
+	elseif escape=="~\125" then
+		return "\94"
+	end
+	error("DeserializeStringHelper got called for '"..escape.."'?!?")  -- can't be reached unless regex is screwed up
+end
+
+local function DeserializeNumberHelper(number)
+	--[[ not in 4.3 if number == serNaN then
+		return 0/0
+	else]]if number == serNegInf or number == serNegInfMac then
+		return -inf
+	elseif number == serInf or number == serInfMac then
+		return inf
+	else
+		return tonumber(number)
+	end
+end
+
+-- DeserializeValue: worker function for :Deserialize()
+-- It works in two modes:
+--   Main (top-level) mode: Deserialize a list of values and return them all
+--   Recursive (table) mode: Deserialize only a single value (_may_ of course be another table with lots of subvalues in it)
+--
+-- The function _always_ works recursively due to having to build a list of values to return
+--
+-- Callers are expected to pcall(DeserializeValue) to trap errors
+
+local function DeserializeValue(iter,single,ctl,data)
+
+	if not single then
+		ctl,data = iter()
+	end
+
+	if not ctl then
+		error("Supplied data misses AceSerializer terminator ('^^')")
+	end
+
+	if ctl=="^^" then
+		-- ignore extraneous data
+		return
+	end
+
+	local res
+
+	if ctl=="^S" then
+		res = gsub(data, "~.", DeserializeStringHelper)
+	elseif ctl=="^N" then
+		res = DeserializeNumberHelper(data)
+		if not res then
+			error("Invalid serialized number: '"..tostring(data).."'")
+		end
+	elseif ctl=="^F" then     -- ^F<mantissa>^f<exponent>
+		local ctl2,e = iter()
+		if ctl2~="^f" then
+			error("Invalid serialized floating-point number, expected '^f', not '"..tostring(ctl2).."'")
+		end
+		local m=tonumber(data)
+		e=tonumber(e)
+		if not (m and e) then
+			error("Invalid serialized floating-point number, expected mantissa and exponent, got '"..tostring(m).."' and '"..tostring(e).."'")
+		end
+		res = m*(2^e)
+	elseif ctl=="^B" then	-- yeah yeah ignore data portion
+		res = true
+	elseif ctl=="^b" then   -- yeah yeah ignore data portion
+		res = false
+	elseif ctl=="^Z" then	-- yeah yeah ignore data portion
+		res = nil
+	elseif ctl=="^T" then
+		-- ignore ^T's data, future extensibility?
+		res = {}
+		local k,v
+		while true do
+			ctl,data = iter()
+			if ctl=="^t" then break end	-- ignore ^t's data
+			k = DeserializeValue(iter,true,ctl,data)
+			if k==nil then
+				error("Invalid AceSerializer table format (no table end marker)")
+			end
+			ctl,data = iter()
+			v = DeserializeValue(iter,true,ctl,data)
+			if v==nil then
+				error("Invalid AceSerializer table format (no table end marker)")
+			end
+			res[k]=v
+		end
+	else
+		error("Invalid AceSerializer control code '"..ctl.."'")
+	end
+
+	if not single then
+		return res,DeserializeValue(iter)
+	else
+		return res
+	end
+end
+
+--- Deserializes the data into its original values.
+-- Accepts serialized data, ignoring all control characters and whitespace.
+-- @param str The serialized data (from :Serialize)
+-- @return true followed by a list of values, OR false followed by an error message
+function AceSerializer:Deserialize(str)
+	str = gsub(str, "[%c ]", "")	-- ignore all control characters; nice for embedding in email and stuff
+
+	local iter = gmatch(str, "(^.)([^^]*)")	-- Any ^x followed by string of non-^
+	local ctl,data = iter()
+	if not ctl or ctl~="^1" then
+		-- we purposefully ignore the data portion of the start code, it can be used as an extension mechanism
+		return false, "Supplied data is not AceSerializer data (rev 1)"
+	end
+
+	return pcall(DeserializeValue, iter)
+end
+
+
+----------------------------------------
+-- Base library stuff
+----------------------------------------
+
+AceSerializer.internals = {	-- for test scripts
+	SerializeValue = SerializeValue,
+	SerializeStringHelper = SerializeStringHelper,
+}
+
+local mixins = {
+	"Serialize",
+	"Deserialize",
+}
+
+AceSerializer.embeds = AceSerializer.embeds or {}
+
+function AceSerializer:Embed(target)
+	for k, v in pairs(mixins) do
+		target[v] = self[v]
+	end
+	self.embeds[target] = true
+	return target
+end
+
+-- Update embeds
+for target, v in pairs(AceSerializer.embeds) do
+	AceSerializer:Embed(target)
+end
diff --git a/EMA/Libs/AceSerializer-3.0/AceSerializer-3.0.xml b/EMA/Libs/AceSerializer-3.0/AceSerializer-3.0.xml
new file mode 100644
index 0000000..677d08e
--- /dev/null
+++ b/EMA/Libs/AceSerializer-3.0/AceSerializer-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceSerializer-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceTab-3.0/AceTab-3.0.lua b/EMA/Libs/AceTab-3.0/AceTab-3.0.lua
new file mode 100644
index 0000000..b7c64db
--- /dev/null
+++ b/EMA/Libs/AceTab-3.0/AceTab-3.0.lua
@@ -0,0 +1,446 @@
+--- AceTab-3.0 provides support for tab-completion.
+-- Note: This library is not yet finalized.
+-- @class file
+-- @name AceTab-3.0
+-- @release $Id: AceTab-3.0.lua 1148 2016-07-18 09:13:02Z nevcairiel $
+
+local ACETAB_MAJOR, ACETAB_MINOR = 'AceTab-3.0', 9
+local AceTab, oldminor = LibStub:NewLibrary(ACETAB_MAJOR, ACETAB_MINOR)
+
+if not AceTab then return end -- No upgrade needed
+
+AceTab.registry = AceTab.registry or {}
+
+-- local upvalues
+local _G = _G
+local pairs = pairs
+local ipairs = ipairs
+local type = type
+local registry = AceTab.registry
+
+local strfind = string.find
+local strsub = string.sub
+local strlower = string.lower
+local strformat = string.format
+local strmatch = string.match
+
+local function printf(...)
+	DEFAULT_CHAT_FRAME:AddMessage(strformat(...))
+end
+
+local function getTextBeforeCursor(this, start)
+	return strsub(this:GetText(), start or 1, this:GetCursorPosition())
+end
+
+-- Hook OnTabPressed and OnTextChanged for the frame, give it an empty matches table, and set its curMatch to 0, if we haven't done so already.
+local function hookFrame(f)
+	if f.hookedByAceTab3 then return end
+	f.hookedByAceTab3 = true
+	if f == ChatEdit_GetActiveWindow() then
+		local origCTP = ChatEdit_CustomTabPressed
+		function ChatEdit_CustomTabPressed(...)
+			if AceTab:OnTabPressed(f) then
+				return origCTP(...)
+			else
+				return true
+			end
+		end
+	else
+		local origOTP = f:GetScript('OnTabPressed')
+		if type(origOTP) ~= 'function' then
+			origOTP = function() end
+		end
+		f:SetScript('OnTabPressed', function(...)
+			if AceTab:OnTabPressed(f) then
+				return origOTP(...)
+			end
+		end)
+	end
+	f.at3curMatch = 0
+	f.at3matches = {}
+end
+
+local firstPMLength
+
+local fallbacks, notfallbacks = {}, {}  -- classifies completions into those which have preconditions and those which do not.  Those without preconditions are only considered if no other completions have matches.
+local pmolengths = {}  -- holds the number of characters to overwrite according to pmoverwrite and the current prematch
+-- ------------------------------------------------------------------------------
+-- RegisterTabCompletion( descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite )
+-- See http://www.wowace.com/wiki/AceTab-2.0 for detailed API documentation
+--
+-- descriptor	string					Unique identifier for this tab completion set
+--
+-- prematches	string|table|nil		String match(es) AFTER which this tab completion will apply.
+--										AceTab will ignore tabs NOT preceded by the string(s).
+--										If no value is passed, will check all tabs pressed in the specified editframe(s) UNLESS a more-specific tab complete applies.
+--
+-- wordlist		function|table			Function that will be passed a table into which it will insert strings corresponding to all possible completions, or an equivalent table.
+--										The text in the editbox, the position of the start of the word to be completed, and the uncompleted partial word
+--										are passed as second, third, and fourth arguments, to facilitate pre-filtering or conditional formatting, if desired.
+--
+-- usagefunc	function|boolean|nil	Usage statement function.  Defaults to the wordlist, one per line.  A boolean true squelches usage output.
+--
+-- listenframes	string|table|nil		EditFrames to monitor.  Defaults to ChatFrameEditBox.
+--
+-- postfunc		function|nil			Post-processing function.  If supplied, matches will be passed through this function after they've been identified as a match.
+--
+-- pmoverwrite	boolean|number|nil		Offset the beginning of the completion string in the editbox when making a completion.  Passing a boolean true indicates that we want to overwrite
+--										the entire prematch string, and passing a number will overwrite that many characters prior to the cursor.
+--										This is useful when you want to use the prematch as an indicator character, but ultimately do not want it as part of the text, itself.
+--
+-- no return
+-- ------------------------------------------------------------------------------
+function AceTab:RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite)
+	-- Arg checks
+	if type(descriptor) ~= 'string' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'descriptor' - string expected.", 3) end
+	if prematches and type(prematches) ~= 'string' and type(prematches) ~= 'table' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'prematches' - string, table, or nil expected.", 3) end
+	if type(wordlist) ~= 'function' and type(wordlist) ~= 'table' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'wordlist' - function or table expected.", 3) end
+	if usagefunc and type(usagefunc) ~= 'function' and type(usagefunc) ~= 'boolean' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'usagefunc' - function or boolean expected.", 3) end
+	if listenframes and type(listenframes) ~= 'string' and type(listenframes) ~= 'table' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'listenframes' - string or table expected.", 3) end
+	if postfunc and type(postfunc) ~= 'function' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'postfunc' - function expected.", 3) end
+	if pmoverwrite and type(pmoverwrite) ~= 'boolean' and type(pmoverwrite) ~= 'number' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'pmoverwrite' - boolean or number expected.", 3) end
+
+	local pmtable
+
+	if type(prematches) == 'table' then
+		pmtable = prematches
+		notfallbacks[descriptor] = true
+	else
+		pmtable = {}
+		-- Mark this group as a fallback group if no value was passed.
+		if not prematches then
+			pmtable[1] = ""
+			fallbacks[descriptor] = true
+		-- Make prematches into a one-element table if it was passed as a string.
+		elseif type(prematches) == 'string' then
+			pmtable[1] = prematches
+			if prematches == "" then
+				fallbacks[descriptor] = true
+			else
+				notfallbacks[descriptor] = true
+			end
+		end
+	end
+
+	-- Make listenframes into a one-element table if it was not passed a table of frames.
+	if not listenframes then  -- default
+		listenframes = {}
+		for i = 1, NUM_CHAT_WINDOWS do
+			listenframes[i] = _G["ChatFrame"..i.."EditBox"]
+		end
+	elseif type(listenframes) ~= 'table' or type(listenframes[0]) == 'userdata' and type(listenframes.IsObjectType) == 'function' then  -- single frame or framename
+		listenframes = { listenframes }
+	end
+
+	-- Hook each registered listenframe and give it a matches table.
+	for _, f in pairs(listenframes) do
+		if type(f) == 'string' then
+			f = _G[f]
+		end
+		if type(f) ~= 'table' or type(f[0]) ~= 'userdata' or type(f.IsObjectType) ~= 'function' then
+			error(format(ACETAB_MAJOR..": Cannot register frame %q; it does not exist", f:GetName()))
+		end
+		if f then
+			if f:GetObjectType() ~= 'EditBox' then
+				error(format(ACETAB_MAJOR..": Cannot register frame %q; it is not an EditBox", f:GetName()))
+			else
+				hookFrame(f)
+			end
+		end
+	end
+
+	-- Everything checks out; register this completion.
+	if not registry[descriptor] then
+		registry[descriptor] = { prematches = pmtable, wordlist = wordlist, usagefunc = usagefunc, listenframes = listenframes, postfunc = postfunc, pmoverwrite = pmoverwrite }
+	end
+end
+
+function AceTab:IsTabCompletionRegistered(descriptor)
+	return registry and registry[descriptor]
+end
+
+function AceTab:UnregisterTabCompletion(descriptor)
+	registry[descriptor] = nil
+	pmolengths[descriptor] = nil
+	fallbacks[descriptor] = nil
+	notfallbacks[descriptor] = nil
+end
+
+-- ------------------------------------------------------------------------------
+-- gcbs( s1, s2 )
+--
+-- s1		string		First string to be compared
+--
+-- s2		string		Second string to be compared
+--
+-- returns the greatest common substring beginning s1 and s2
+-- ------------------------------------------------------------------------------
+local function gcbs(s1, s2)
+	if not s1 and not s2 then return end
+	if not s1 then s1 = s2 end
+	if not s2 then s2 = s1 end
+	if #s2 < #s1 then
+		s1, s2 = s2, s1
+	end
+	if strfind(strlower(s2), "^"..strlower(s1)) then
+		return s1
+	else
+		return gcbs(strsub(s1, 1, -2), s2)
+	end
+end
+
+local cursor  -- Holds cursor position.  Set in :OnTabPressed().
+-- ------------------------------------------------------------------------------
+-- cycleTab()
+-- For when a tab press has multiple possible completions, we need to allow the user to press tab repeatedly to cycle through them.
+-- If we have multiple possible completions, all tab presses after the first will call this function to cycle through and insert the different possible matches.
+-- This function will stop being called after OnTextChanged() is triggered by something other than AceTab (i.e. the user inputs a character).
+-- ------------------------------------------------------------------------------
+local previousLength, cMatch, matched, postmatch
+local function cycleTab(this)
+	cMatch = 0  -- Counter across all sets.  The pseudo-index relevant to this value and corresponding to the current match is held in this.at3curMatch
+	matched = false
+
+	-- Check each completion group registered to this frame.
+	for desc, compgrp in pairs(this.at3matches) do
+
+		-- Loop through the valid completions for this set.
+		for m, pm in pairs(compgrp) do
+			cMatch = cMatch + 1
+			if cMatch == this.at3curMatch then  -- we're back to where we left off last time through the combined list
+				this.at3lastMatch = m
+				this.at3lastWord = pm
+				this.at3curMatch = cMatch + 1 -- save the new cMatch index
+				matched = true
+				break
+			end
+		end
+		if matched then break end
+	end
+
+	-- If our index is beyond the end of the list, reset the original uncompleted substring and let the cycle start over next time tab is pressed.
+	if not matched then
+		this.at3lastMatch = this.at3origMatch
+		this.at3lastWord = this.at3origWord
+		this.at3curMatch = 1
+	end
+
+	-- Insert the completion.
+	this:HighlightText(this.at3matchStart-1, cursor)
+	this:Insert(this.at3lastWord or '')
+	this.at3_last_precursor = getTextBeforeCursor(this) or ''
+end
+
+local IsSecureCmd = IsSecureCmd
+
+local cands, candUsage = {}, {}
+local numMatches = 0
+local firstMatch, hasNonFallback, allGCBS, setGCBS, usage
+local text_precursor, text_all, text_pmendToCursor
+local matches, usagefunc  -- convenience locals
+
+-- Fill the this.at3matches[descriptor] tables with matching completion pairs for each entry, based on
+-- the partial string preceding the cursor position and using the corresponding registered wordlist.
+--
+-- The entries of the matches tables are of the format raw_match = formatted_match, where raw_match is the plaintext completion and
+-- formatted_match is the match after being formatted/altered/processed by the registered postfunc.
+-- If no postfunc exists, then the formatted and raw matches are the same.
+local pms, pme, pmt, prematchStart, prematchEnd, text_prematch, entry
+local function fillMatches(this, desc, fallback)
+	entry = registry[desc]
+	-- See what frames are registered for this completion group.  If the frame in which we pressed tab is one of them, then we start building matches.
+	for _, f in ipairs(entry.listenframes) do
+		if f == this then
+
+			-- Try each precondition string registered for this completion group.
+			for _, prematch in ipairs(entry.prematches) do
+
+				-- Test if our prematch string is satisfied.
+				-- If it is, then we find its last occurence prior to the cursor, calculate and store its pmoverwrite value (if applicable), and start considering completions.
+				if fallback then prematch = "%s" end
+
+				-- Find the last occurence of the prematch before the cursor.
+				pms, pme, pmt = nil, 1, ''
+				text_prematch, prematchEnd, prematchStart = nil, nil, nil
+				while true do
+					pms, pme, pmt = strfind(text_precursor, "("..prematch..")", pme)
+					if pms then
+						prematchStart, prematchEnd, text_prematch = pms, pme, pmt
+						pme = pme + 1
+					else
+						break
+					end
+				end
+
+				if not prematchStart and fallback then
+					prematchStart, prematchEnd, text_prematch = 0, 0, ''
+				end
+				if prematchStart then
+					-- text_pmendToCursor should be the sub-word/phrase to be completed.
+					text_pmendToCursor = strsub(text_precursor, prematchEnd + 1)
+
+					-- How many characters should we eliminate before the completion before writing it in.
+					pmolengths[desc] = entry.pmoverwrite == true and #text_prematch or entry.pmoverwrite or 0
+
+					-- This is where we will insert completions, taking the prematch overwrite into account.
+					this.at3matchStart = prematchEnd + 1 - (pmolengths[desc] or 0)
+
+					-- We're either a non-fallback set or all completions thus far have been fallback sets, and the precondition matches.
+					-- Create cands from the registered wordlist, filling it with all potential (unfiltered) completion strings.
+					local wordlist = entry.wordlist
+					local cands = type(wordlist) == 'table' and wordlist or {}
+					if type(wordlist) == 'function' then
+						wordlist(cands, text_all, prematchEnd + 1, text_pmendToCursor)
+					end
+					if cands ~= false then
+						matches = this.at3matches[desc] or {}
+						for i in pairs(matches) do matches[i] = nil end
+
+						-- Check each of the entries in cands to see if it completes the word before the cursor.
+						-- Finally, increment our match count and set firstMatch, if appropriate.
+						for _, m in ipairs(cands) do
+							if strfind(strlower(m), strlower(text_pmendToCursor), 1, 1) == 1 then  -- we have a matching completion!
+								hasNonFallback = hasNonFallback or (not fallback)
+								matches[m] = entry.postfunc and entry.postfunc(m, prematchEnd + 1, text_all) or m
+								numMatches = numMatches + 1
+								if numMatches == 1 then
+									firstMatch = matches[m]
+									firstPMLength = pmolengths[desc] or 0
+								end
+							end
+						end
+						this.at3matches[desc] = numMatches > 0 and matches or nil
+					end
+				end
+			end
+		end
+	end
+end
+
+function AceTab:OnTabPressed(this)
+	if this:GetText() == '' then return true end
+
+	-- allow Blizzard to handle slash commands, themselves
+	if this == ChatEdit_GetActiveWindow() then
+		local command = this:GetText()
+		if strfind(command, "^/[%a%d_]+$") then
+			return true
+		end
+		local cmd = strmatch(command, "^/[%a%d_]+")
+		if cmd and IsSecureCmd(cmd) then
+			return true
+		end
+	end
+
+	cursor = this:GetCursorPosition()
+
+	text_all = this:GetText()
+	text_precursor = getTextBeforeCursor(this) or ''
+
+	-- If we've already found some matches and haven't done anything since the last tab press, then (continue) cycling matches.
+	-- Otherwise, reset this frame's matches and proceed to creating our list of possible completions.
+	this.at3lastMatch = this.at3curMatch > 0 and (this.at3lastMatch or this.at3origWord)
+	-- Detects if we've made any edits since the last tab press.  If not, continue cycling completions.
+	if text_precursor == this.at3_last_precursor then
+		return cycleTab(this)
+	else
+		for i in pairs(this.at3matches) do this.at3matches[i] = nil end
+		this.at3curMatch = 0
+		this.at3origWord = nil
+		this.at3origMatch = nil
+		this.at3lastWord = nil
+		this.at3lastMatch = nil
+		this.at3_last_precursor = text_precursor
+	end
+
+	numMatches = 0
+	firstMatch = nil
+	firstPMLength = 0
+	hasNonFallback = false
+	for i in pairs(pmolengths) do pmolengths[i] = nil end
+
+	for desc in pairs(notfallbacks) do
+		fillMatches(this, desc)
+	end
+	if not hasNonFallback then
+		for desc in pairs(fallbacks) do
+			fillMatches(this, desc, true)
+		end
+	end
+
+	if not firstMatch then
+		this.at3_last_precursor = "\0"
+		return true
+	end
+
+	-- We want to replace the entire word with our completion, so highlight it up to the cursor.
+	-- If only one match exists, then stick it in there and append a space.
+	if numMatches == 1 then
+		-- HighlightText takes the value AFTER which the highlighting starts, so we have to subtract 1 to have it start before the first character.
+		this:HighlightText(this.at3matchStart-1, cursor)
+
+		this:Insert(firstMatch)
+		this:Insert(" ")
+	else
+		-- Otherwise, we want to begin cycling through the valid completions.
+		-- Beginning a cycle also causes the usage statement to be printed, if one exists.
+
+		-- Print usage statements for each possible completion (and gather up the GCBS of all matches while we're walking the tables).
+		allGCBS = nil
+		for desc, matches in pairs(this.at3matches) do
+			-- Don't print usage statements for fallback completion groups if we have 'real' completion groups with matches.
+			if hasNonFallback and fallbacks[desc] then break end
+
+			-- Use the group's description as a heading for its usage statements.
+			DEFAULT_CHAT_FRAME:AddMessage(desc..":")
+
+			usagefunc = registry[desc].usagefunc
+			if not usagefunc then
+				-- No special usage processing; just print a list of the (formatted) matches.
+				for m, fm in pairs(matches) do
+					DEFAULT_CHAT_FRAME:AddMessage(fm)
+					allGCBS = gcbs(allGCBS, m)
+				end
+			else
+				-- Print a usage statement based on the corresponding registered usagefunc.
+				-- candUsage is the table passed to usagefunc to be filled with candidate = usage_statement pairs.
+				if type(usagefunc) == 'function' then
+					for i in pairs(candUsage) do candUsage[i] = nil end
+
+					-- usagefunc takes the greatest common substring of valid matches as one of its args, so let's find that now.
+					-- TODO: Make the GCBS function accept a vararg or table, after which we can just pass in the list of matches.
+					setGCBS = nil
+					for m in pairs(matches) do
+						setGCBS = gcbs(setGCBS, m)
+					end
+					allGCBS = gcbs(allGCBS, setGCBS)
+					usage = usagefunc(candUsage, matches, setGCBS, strsub(text_precursor, 1, prematchEnd))
+
+					-- If the usagefunc returns a string, then the entire usage statement has been taken care of by usagefunc, and we need only to print it...
+					if type(usage) == 'string' then
+						DEFAULT_CHAT_FRAME:AddMessage(usage)
+
+					-- ...otherwise, it should have filled candUsage with candidate-usage statement pairs, and we need to print the matching ones.
+					elseif next(candUsage) and numMatches > 0 then
+						for m, fm in pairs(matches) do
+							if candUsage[m] then DEFAULT_CHAT_FRAME:AddMessage(strformat("%s - %s", fm, candUsage[m])) end
+						end
+					end
+				end
+			end
+
+			if next(matches) then
+				-- Replace the original string with the greatest common substring of all valid completions.
+				this.at3curMatch = 1
+				this.at3origWord = strsub(text_precursor, this.at3matchStart, this.at3matchStart + pmolengths[desc] - 1) .. allGCBS or ""
+				this.at3origMatch = allGCBS or ""
+				this.at3lastWord = this.at3origWord
+				this.at3lastMatch = this.at3origMatch
+
+				this:HighlightText(this.at3matchStart-1, cursor)
+				this:Insert(this.at3origWord)
+				this.at3_last_precursor = getTextBeforeCursor(this) or ''
+			end
+		end
+	end
+end
diff --git a/EMA/Libs/AceTab-3.0/AceTab-3.0.xml b/EMA/Libs/AceTab-3.0/AceTab-3.0.xml
new file mode 100644
index 0000000..2e50904
--- /dev/null
+++ b/EMA/Libs/AceTab-3.0/AceTab-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceTab-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/AceTimer-3.0/AceTimer-3.0.lua b/EMA/Libs/AceTimer-3.0/AceTimer-3.0.lua
new file mode 100644
index 0000000..336864b
--- /dev/null
+++ b/EMA/Libs/AceTimer-3.0/AceTimer-3.0.lua
@@ -0,0 +1,278 @@
+--- **AceTimer-3.0** provides a central facility for registering timers.
+-- AceTimer supports one-shot timers and repeating timers. All timers are stored in an efficient
+-- data structure that allows easy dispatching and fast rescheduling. Timers can be registered
+-- or canceled at any time, even from within a running timer, without conflict or large overhead.\\
+-- AceTimer is currently limited to firing timers at a frequency of 0.01s as this is what the WoW timer API
+-- restricts us to.
+--
+-- All `:Schedule` functions will return a handle to the current timer, which you will need to store if you
+-- need to cancel the timer you just registered.
+--
+-- **AceTimer-3.0** can be embeded into your addon, either explicitly by calling AceTimer:Embed(MyAddon) or by
+-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
+-- and can be accessed directly, without having to explicitly call AceTimer itself.\\
+-- It is recommended to embed AceTimer, otherwise you'll have to specify a custom `self` on all calls you
+-- make into AceTimer.
+-- @class file
+-- @name AceTimer-3.0
+-- @release $Id: AceTimer-3.0.lua 1170 2018-03-29 17:38:58Z funkydude $
+
+local MAJOR, MINOR = "AceTimer-3.0", 17 -- Bump minor on changes
+local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not AceTimer then return end -- No upgrade needed
+AceTimer.activeTimers = AceTimer.activeTimers or {} -- Active timer list
+local activeTimers = AceTimer.activeTimers -- Upvalue our private data
+
+-- Lua APIs
+local type, unpack, next, error, select = type, unpack, next, error, select
+-- WoW APIs
+local GetTime, C_TimerAfter = GetTime, C_Timer.After
+
+local function new(self, loop, func, delay, ...)
+	if delay < 0.01 then
+		delay = 0.01 -- Restrict to the lowest time that the C_Timer API allows us
+	end
+
+	local timer = {
+		object = self,
+		func = func,
+		looping = loop,
+		argsCount = select("#", ...),
+		delay = delay,
+		ends = GetTime() + delay,
+		...
+	}
+
+	activeTimers[timer] = timer
+
+	-- Create new timer closure to wrap the "timer" object
+	timer.callback = function()
+		if not timer.cancelled then
+			if type(timer.func) == "string" then
+				-- We manually set the unpack count to prevent issues with an arg set that contains nil and ends with nil
+				-- e.g. local t = {1, 2, nil, 3, nil} print(#t) will result in 2, instead of 5. This fixes said issue.
+				timer.object[timer.func](timer.object, unpack(timer, 1, timer.argsCount))
+			else
+				timer.func(unpack(timer, 1, timer.argsCount))
+			end
+
+			if timer.looping and not timer.cancelled then
+				-- Compensate delay to get a perfect average delay, even if individual times don't match up perfectly
+				-- due to fps differences
+				local time = GetTime()
+				local delay = timer.delay - (time - timer.ends)
+				-- Ensure the delay doesn't go below the threshold
+				if delay < 0.01 then delay = 0.01 end
+				C_TimerAfter(delay, timer.callback)
+				timer.ends = time + delay
+			else
+				activeTimers[timer.handle or timer] = nil
+			end
+		end
+	end
+
+	C_TimerAfter(delay, timer.callback)
+	return timer
+end
+
+--- Schedule a new one-shot timer.
+-- The timer will fire once in `delay` seconds, unless canceled before.
+-- @param callback Callback function for the timer pulse (funcref or method name).
+-- @param delay Delay for the timer, in seconds.
+-- @param ... An optional, unlimited amount of arguments to pass to the callback function.
+-- @usage
+-- MyAddOn = LibStub("AceAddon-3.0"):NewAddon("MyAddOn", "AceTimer-3.0")
+--
+-- function MyAddOn:OnEnable()
+--   self:ScheduleTimer("TimerFeedback", 5)
+-- end
+--
+-- function MyAddOn:TimerFeedback()
+--   print("5 seconds passed")
+-- end
+function AceTimer:ScheduleTimer(func, delay, ...)
+	if not func or not delay then
+		error(MAJOR..": ScheduleTimer(callback, delay, args...): 'callback' and 'delay' must have set values.", 2)
+	end
+	if type(func) == "string" then
+		if type(self) ~= "table" then
+			error(MAJOR..": ScheduleTimer(callback, delay, args...): 'self' - must be a table.", 2)
+		elseif not self[func] then
+			error(MAJOR..": ScheduleTimer(callback, delay, args...): Tried to register '"..func.."' as the callback, but it doesn't exist in the module.", 2)
+		end
+	end
+	return new(self, nil, func, delay, ...)
+end
+
+--- Schedule a repeating timer.
+-- The timer will fire every `delay` seconds, until canceled.
+-- @param callback Callback function for the timer pulse (funcref or method name).
+-- @param delay Delay for the timer, in seconds.
+-- @param ... An optional, unlimited amount of arguments to pass to the callback function.
+-- @usage
+-- MyAddOn = LibStub("AceAddon-3.0"):NewAddon("MyAddOn", "AceTimer-3.0")
+--
+-- function MyAddOn:OnEnable()
+--   self.timerCount = 0
+--   self.testTimer = self:ScheduleRepeatingTimer("TimerFeedback", 5)
+-- end
+--
+-- function MyAddOn:TimerFeedback()
+--   self.timerCount = self.timerCount + 1
+--   print(("%d seconds passed"):format(5 * self.timerCount))
+--   -- run 30 seconds in total
+--   if self.timerCount == 6 then
+--     self:CancelTimer(self.testTimer)
+--   end
+-- end
+function AceTimer:ScheduleRepeatingTimer(func, delay, ...)
+	if not func or not delay then
+		error(MAJOR..": ScheduleRepeatingTimer(callback, delay, args...): 'callback' and 'delay' must have set values.", 2)
+	end
+	if type(func) == "string" then
+		if type(self) ~= "table" then
+			error(MAJOR..": ScheduleRepeatingTimer(callback, delay, args...): 'self' - must be a table.", 2)
+		elseif not self[func] then
+			error(MAJOR..": ScheduleRepeatingTimer(callback, delay, args...): Tried to register '"..func.."' as the callback, but it doesn't exist in the module.", 2)
+		end
+	end
+	return new(self, true, func, delay, ...)
+end
+
+--- Cancels a timer with the given id, registered by the same addon object as used for `:ScheduleTimer`
+-- Both one-shot and repeating timers can be canceled with this function, as long as the `id` is valid
+-- and the timer has not fired yet or was canceled before.
+-- @param id The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
+function AceTimer:CancelTimer(id)
+	local timer = activeTimers[id]
+
+	if not timer then
+		return false
+	else
+		timer.cancelled = true
+		activeTimers[id] = nil
+		return true
+	end
+end
+
+--- Cancels all timers registered to the current addon object ('self')
+function AceTimer:CancelAllTimers()
+	for k,v in next, activeTimers do
+		if v.object == self then
+			AceTimer.CancelTimer(self, k)
+		end
+	end
+end
+
+--- Returns the time left for a timer with the given id, registered by the current addon object ('self').
+-- This function will return 0 when the id is invalid.
+-- @param id The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
+-- @return The time left on the timer.
+function AceTimer:TimeLeft(id)
+	local timer = activeTimers[id]
+	if not timer then
+		return 0
+	else
+		return timer.ends - GetTime()
+	end
+end
+
+
+-- ---------------------------------------------------------------------
+-- Upgrading
+
+-- Upgrade from old hash-bucket based timers to C_Timer.After timers.
+if oldminor and oldminor < 10 then
+	-- disable old timer logic
+	AceTimer.frame:SetScript("OnUpdate", nil)
+	AceTimer.frame:SetScript("OnEvent", nil)
+	AceTimer.frame:UnregisterAllEvents()
+	-- convert timers
+	for object,timers in next, AceTimer.selfs do
+		for handle,timer in next, timers do
+			if type(timer) == "table" and timer.callback then
+				local newTimer
+				if timer.delay then
+					newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.callback, timer.delay, timer.arg)
+				else
+					newTimer = AceTimer.ScheduleTimer(timer.object, timer.callback, timer.when - GetTime(), timer.arg)
+				end
+				-- Use the old handle for old timers
+				activeTimers[newTimer] = nil
+				activeTimers[handle] = newTimer
+				newTimer.handle = handle
+			end
+		end
+	end
+	AceTimer.selfs = nil
+	AceTimer.hash = nil
+	AceTimer.debug = nil
+elseif oldminor and oldminor < 17 then
+	-- Upgrade from old animation based timers to C_Timer.After timers.
+	AceTimer.inactiveTimers = nil
+	AceTimer.frame = nil
+	local oldTimers = AceTimer.activeTimers
+	-- Clear old timer table and update upvalue
+	AceTimer.activeTimers = {}
+	activeTimers = AceTimer.activeTimers
+	for handle, timer in next, oldTimers do
+		local newTimer
+		-- Stop the old timer animation
+		local duration, elapsed = timer:GetDuration(), timer:GetElapsed()
+		timer:GetParent():Stop()
+		if timer.looping then
+			newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.func, duration, unpack(timer.args, 1, timer.argsCount))
+		else
+			newTimer = AceTimer.ScheduleTimer(timer.object, timer.func, duration - elapsed, unpack(timer.args, 1, timer.argsCount))
+		end
+		-- Use the old handle for old timers
+		activeTimers[newTimer] = nil
+		activeTimers[handle] = newTimer
+		newTimer.handle = handle
+	end
+
+	-- Migrate transitional handles
+	if oldminor < 13 and AceTimer.hashCompatTable then
+		for handle, id in next, AceTimer.hashCompatTable do
+			local t = activeTimers[id]
+			if t then
+				activeTimers[id] = nil
+				activeTimers[handle] = t
+				t.handle = handle
+			end
+		end
+		AceTimer.hashCompatTable = nil
+	end
+end
+
+-- ---------------------------------------------------------------------
+-- Embed handling
+
+AceTimer.embeds = AceTimer.embeds or {}
+
+local mixins = {
+	"ScheduleTimer", "ScheduleRepeatingTimer",
+	"CancelTimer", "CancelAllTimers",
+	"TimeLeft"
+}
+
+function AceTimer:Embed(target)
+	AceTimer.embeds[target] = true
+	for _,v in next, mixins do
+		target[v] = AceTimer[v]
+	end
+	return target
+end
+
+-- AceTimer:OnEmbedDisable(target)
+-- target (object) - target object that AceTimer is embedded in.
+--
+-- cancel all timers registered for the object
+function AceTimer:OnEmbedDisable(target)
+	target:CancelAllTimers()
+end
+
+for addon in next, AceTimer.embeds do
+	AceTimer:Embed(addon)
+end
diff --git a/EMA/Libs/AceTimer-3.0/AceTimer-3.0.xml b/EMA/Libs/AceTimer-3.0/AceTimer-3.0.xml
new file mode 100644
index 0000000..d5aee81
--- /dev/null
+++ b/EMA/Libs/AceTimer-3.0/AceTimer-3.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="AceTimer-3.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua b/EMA/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
new file mode 100644
index 0000000..675d7b0
--- /dev/null
+++ b/EMA/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
@@ -0,0 +1,238 @@
+--[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]]
+local MAJOR, MINOR = "CallbackHandler-1.0", 6
+local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not CallbackHandler then return end -- No upgrade needed
+
+local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
+
+-- Lua APIs
+local tconcat = table.concat
+local assert, error, loadstring = assert, error, loadstring
+local setmetatable, rawset, rawget = setmetatable, rawset, rawget
+local next, select, pairs, type, tostring = next, select, pairs, type, tostring
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- GLOBALS: geterrorhandler
+
+local xpcall = xpcall
+
+local function errorhandler(err)
+	return geterrorhandler()(err)
+end
+
+local function CreateDispatcher(argCount)
+	local code = [[
+	local next, xpcall, eh = ...
+
+	local method, ARGS
+	local function call() method(ARGS) end
+
+	local function dispatch(handlers, ...)
+		local index
+		index, method = next(handlers)
+		if not method then return end
+		local OLD_ARGS = ARGS
+		ARGS = ...
+		repeat
+			xpcall(call, eh)
+			index, method = next(handlers, index)
+		until not method
+		ARGS = OLD_ARGS
+	end
+
+	return dispatch
+	]]
+
+	local ARGS, OLD_ARGS = {}, {}
+	for i = 1, argCount do ARGS[i], OLD_ARGS[i] = "arg"..i, "old_arg"..i end
+	code = code:gsub("OLD_ARGS", tconcat(OLD_ARGS, ", ")):gsub("ARGS", tconcat(ARGS, ", "))
+	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(next, xpcall, errorhandler)
+end
+
+local Dispatchers = setmetatable({}, {__index=function(self, argCount)
+	local dispatcher = CreateDispatcher(argCount)
+	rawset(self, argCount, dispatcher)
+	return dispatcher
+end})
+
+--------------------------------------------------------------------------
+-- CallbackHandler:New
+--
+--   target            - target object to embed public APIs in
+--   RegisterName      - name of the callback registration API, default "RegisterCallback"
+--   UnregisterName    - name of the callback unregistration API, default "UnregisterCallback"
+--   UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
+
+function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName)
+
+	RegisterName = RegisterName or "RegisterCallback"
+	UnregisterName = UnregisterName or "UnregisterCallback"
+	if UnregisterAllName==nil then	-- false is used to indicate "don't want this method"
+		UnregisterAllName = "UnregisterAllCallbacks"
+	end
+
+	-- we declare all objects and exported APIs inside this closure to quickly gain access
+	-- to e.g. function names, the "target" parameter, etc
+
+
+	-- Create the registry object
+	local events = setmetatable({}, meta)
+	local registry = { recurse=0, events=events }
+
+	-- registry:Fire() - fires the given event/message into the registry
+	function registry:Fire(eventname, ...)
+		if not rawget(events, eventname) or not next(events[eventname]) then return end
+		local oldrecurse = registry.recurse
+		registry.recurse = oldrecurse + 1
+
+		Dispatchers[select('#', ...) + 1](events[eventname], eventname, ...)
+
+		registry.recurse = oldrecurse
+
+		if registry.insertQueue and oldrecurse==0 then
+			-- Something in one of our callbacks wanted to register more callbacks; they got queued
+			for eventname,callbacks in pairs(registry.insertQueue) do
+				local first = not rawget(events, eventname) or not next(events[eventname])	-- test for empty before. not test for one member after. that one member may have been overwritten.
+				for self,func in pairs(callbacks) do
+					events[eventname][self] = func
+					-- fire OnUsed callback?
+					if first and registry.OnUsed then
+						registry.OnUsed(registry, target, eventname)
+						first = nil
+					end
+				end
+			end
+			registry.insertQueue = nil
+		end
+	end
+
+	-- Registration of a callback, handles:
+	--   self["method"], leads to self["method"](self, ...)
+	--   self with function ref, leads to functionref(...)
+	--   "addonId" (instead of self) with function ref, leads to functionref(...)
+	-- all with an optional arg, which, if present, gets passed as first argument (after self if present)
+	target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]])
+		if type(eventname) ~= "string" then
+			error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2)
+		end
+
+		method = method or eventname
+
+		local first = not rawget(events, eventname) or not next(events[eventname])	-- test for empty before. not test for one member after. that one member may have been overwritten.
+
+		if type(method) ~= "string" and type(method) ~= "function" then
+			error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2)
+		end
+
+		local regfunc
+
+		if type(method) == "string" then
+			-- self["method"] calling style
+			if type(self) ~= "table" then
+				error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2)
+			elseif self==target then
+				error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2)
+			elseif type(self[method]) ~= "function" then
+				error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2)
+			end
+
+			if select("#",...)>=1 then	-- this is not the same as testing for arg==nil!
+				local arg=select(1,...)
+				regfunc = function(...) self[method](self,arg,...) end
+			else
+				regfunc = function(...) self[method](self,...) end
+			end
+		else
+			-- function ref with self=object or self="addonId" or self=thread
+			if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
+				error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
+			end
+
+			if select("#",...)>=1 then	-- this is not the same as testing for arg==nil!
+				local arg=select(1,...)
+				regfunc = function(...) method(arg,...) end
+			else
+				regfunc = method
+			end
+		end
+
+
+		if events[eventname][self] or registry.recurse<1 then
+		-- if registry.recurse<1 then
+			-- we're overwriting an existing entry, or not currently recursing. just set it.
+			events[eventname][self] = regfunc
+			-- fire OnUsed callback?
+			if registry.OnUsed and first then
+				registry.OnUsed(registry, target, eventname)
+			end
+		else
+			-- we're currently processing a callback in this registry, so delay the registration of this new entry!
+			-- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency
+			registry.insertQueue = registry.insertQueue or setmetatable({},meta)
+			registry.insertQueue[eventname][self] = regfunc
+		end
+	end
+
+	-- Unregister a callback
+	target[UnregisterName] = function(self, eventname)
+		if not self or self==target then
+			error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2)
+		end
+		if type(eventname) ~= "string" then
+			error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2)
+		end
+		if rawget(events, eventname) and events[eventname][self] then
+			events[eventname][self] = nil
+			-- Fire OnUnused callback?
+			if registry.OnUnused and not next(events[eventname]) then
+				registry.OnUnused(registry, target, eventname)
+			end
+		end
+		if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then
+			registry.insertQueue[eventname][self] = nil
+		end
+	end
+
+	-- OPTIONAL: Unregister all callbacks for given selfs/addonIds
+	if UnregisterAllName then
+		target[UnregisterAllName] = function(...)
+			if select("#",...)<1 then
+				error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2)
+			end
+			if select("#",...)==1 and ...==target then
+				error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2)
+			end
+
+
+			for i=1,select("#",...) do
+				local self = select(i,...)
+				if registry.insertQueue then
+					for eventname, callbacks in pairs(registry.insertQueue) do
+						if callbacks[self] then
+							callbacks[self] = nil
+						end
+					end
+				end
+				for eventname, callbacks in pairs(events) do
+					if callbacks[self] then
+						callbacks[self] = nil
+						-- Fire OnUnused callback?
+						if registry.OnUnused and not next(callbacks) then
+							registry.OnUnused(registry, target, eventname)
+						end
+					end
+				end
+			end
+		end
+	end
+
+	return registry
+end
+
+
+-- CallbackHandler purposefully does NOT do explicit embedding. Nor does it
+-- try to upgrade old implicit embeds since the system is selfcontained and
+-- relies on closures to work.
+
diff --git a/EMA/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml b/EMA/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
new file mode 100644
index 0000000..c107f88
--- /dev/null
+++ b/EMA/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="CallbackHandler-1.0.lua"/>
+</Ui>
diff --git a/EMA/Libs/Changelog-Ace3-Release-r1151.txt b/EMA/Libs/Changelog-Ace3-Release-r1151.txt
new file mode 100644
index 0000000..c78dc9d
--- /dev/null
+++ b/EMA/Libs/Changelog-Ace3-Release-r1151.txt
@@ -0,0 +1,92 @@
+------------------------------------------------------------------------
+r1151 | nevcairiel | 2016-07-18 17:03:29 +0000 (Mon, 18 Jul 2016) | 1 line
+Changed paths:
+   A /tags/Release-r1151 (from /trunk:1150)
+
+Tag as Release-r1151
+------------------------------------------------------------------------
+r1150 | nevcairiel | 2016-07-18 17:02:20 +0000 (Mon, 18 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/changelog.txt
+
+Update changelog
+------------------------------------------------------------------------
+r1149 | nevcairiel | 2016-07-18 17:02:10 +0000 (Mon, 18 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/Ace3.toc
+
+Update TOC for 7.0
+------------------------------------------------------------------------
+r1148 | nevcairiel | 2016-07-18 09:13:02 +0000 (Mon, 18 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
+   M /trunk/AceTab-3.0/AceTab-3.0.lua
+
+Remove remaining compat code for ancient WoW versions
+------------------------------------------------------------------------
+r1147 | nevcairiel | 2016-07-18 09:10:10 +0000 (Mon, 18 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
+   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
+   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
+
+Remove pre-MoP compat code from AceGUI widgets
+------------------------------------------------------------------------
+r1146 | nevcairiel | 2016-07-18 09:07:16 +0000 (Mon, 18 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
+
+Fix global leak
+------------------------------------------------------------------------
+r1145 | nevcairiel | 2016-07-18 08:32:42 +0000 (Mon, 18 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
+
+AceGUI-3.0: Keybinding: Support mousewheel up/down bindings (Ticket #372)
+------------------------------------------------------------------------
+r1144 | nevcairiel | 2016-07-11 09:04:48 +0000 (Mon, 11 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/changelog.txt
+
+Re-format changelog to be consistent with older entries
+------------------------------------------------------------------------
+r1143 | nevcairiel | 2016-07-11 08:52:03 +0000 (Mon, 11 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/AceConsole-3.0/AceConsole-3.0.lua
+
+AceConsole-3.0: Fix a typo in the LuaDoc function signature
+------------------------------------------------------------------------
+r1142 | nevcairiel | 2016-07-11 08:36:19 +0000 (Mon, 11 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/AceDB-3.0/AceDB-3.0.lua
+
+AceDB-3.0: Add the "locale" profile key to the LuaDoc (Ticket #344)
+------------------------------------------------------------------------
+r1141 | nevcairiel | 2016-07-11 08:32:23 +0000 (Mon, 11 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
+   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
+
+AceGUI-3.0: Expose the HighlightText API for EditBox and MultiLineEditBox Widgets (Ticket #378)
+------------------------------------------------------------------------
+r1140 | nevcairiel | 2016-07-03 07:53:29 +0000 (Sun, 03 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/AceDBOptions-3.0/AceDBOptions-3.0.lua
+
+AceDBOptions-3.0: Update localization from the WoWAce Localization system
+------------------------------------------------------------------------
+r1139 | nevcairiel | 2016-07-03 07:43:51 +0000 (Sun, 03 Jul 2016) | 1 line
+Changed paths:
+   M /trunk/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
+   M /trunk/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
+
+AceConfig-3.0: Allow specifying images using the numeric fileID (Ticket #389)
+------------------------------------------------------------------------
+r1138 | nevcairiel | 2016-06-01 10:17:04 +0000 (Wed, 01 Jun 2016) | 3 lines
+Changed paths:
+   M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
+
+AceGUI-3.0: TreeGroup: Refresh the tree in an OnUpdate once after Acquire, not only after creation
+
+The widget creation and acquire can be on different code paths, this ensures the tree height is always known and the tree populated properly.
+------------------------------------------------------------------------
diff --git a/EMA/Libs/Changelog-Ace3-r1130.txt b/EMA/Libs/Changelog-Ace3-r1130.txt
new file mode 100644
index 0000000..b2c12d6
--- /dev/null
+++ b/EMA/Libs/Changelog-Ace3-r1130.txt
@@ -0,0 +1,27 @@
+------------------------------------------------------------------------
+r1130 | funkydude | 2015-03-11 14:02:46 +0000 (Wed, 11 Mar 2015) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
+
+AceGUIContainer-TreeGroup: Use :SetHeight for preventing word wrap. Same fix different method.
+------------------------------------------------------------------------
+r1129 | nevcairiel | 2015-03-11 10:36:23 +0000 (Wed, 11 Mar 2015) | 1 line
+Changed paths:
+   M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
+
+AceGUI-3.0: TreeGroup: Prevent word wrap in the tree elements
+------------------------------------------------------------------------
+r1127 | nevcairiel | 2015-02-24 14:26:09 +0000 (Tue, 24 Feb 2015) | 1 line
+Changed paths:
+   M /trunk/Ace3.toc
+   M /trunk/changelog.txt
+
+Update changelog, bump TOC
+------------------------------------------------------------------------
+r1126 | nevcairiel | 2014-11-10 06:38:01 +0000 (Mon, 10 Nov 2014) | 1 line
+Changed paths:
+   M /trunk/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
+   M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
+
+Use true/false in GameTooltip:SetText/AddLine instead of 1/0
+------------------------------------------------------------------------
diff --git a/EMA/Libs/EMALibActionButton-1.0.lua b/EMA/Libs/EMALibActionButton-1.0.lua
new file mode 100644
index 0000000..e687cf7
--- /dev/null
+++ b/EMA/Libs/EMALibActionButton-1.0.lua
@@ -0,0 +1,1635 @@
+--[[
+Copyright (c) 2010-2018, Hendrik "nevcairiel" Leppkes <h.leppkes@gmail.com>
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of the developer nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+the file was edit for Ema by Jennifer cally 2016-2018
+
+]]
+local MAJOR_VERSION = "EMALibActionButton-1.0"
+local MINOR_VERSION = 74
+
+if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
+local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
+if not lib then return end
+
+-- Lua functions
+local _G = _G
+local type, error, tostring, tonumber, assert, select = type, error, tostring, tonumber, assert, select
+local setmetatable, wipe, unpack, pairs, next = setmetatable, wipe, unpack, pairs, next
+local str_match, format, tinsert, tremove = string.match, format, tinsert, tremove
+
+-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
+-- List them here for Mikk's FindGlobals script
+-- Note: No WoW API function get upvalued to allow proper interaction with any addons that try to hook them.
+-- GLOBALS: LibStub, CreateFrame, InCombatLockdown, ClearCursor, GetCursorInfo, GameTooltip, GameTooltip_SetDefaultAnchor
+-- GLOBALS: GetBindingKey, GetBindingText, SetBinding, SetBindingClick, GetCVar, GetMacroInfo
+-- GLOBALS: PickupAction, PickupItem, PickupMacro, PickupPetAction, PickupSpell, PickupCompanion, PickupEquipmentSet
+-- GLOBALS: CooldownFrame_SetTimer, UIParent, IsSpellOverlayed, SpellFlyout, GetMouseFocus, SetClampedTextureRotation
+-- GLOBALS: GetActionInfo, GetActionTexture, HasAction, GetActionText, GetActionCount, GetActionCooldown, IsAttackAction
+-- GLOBALS: IsAutoRepeatAction, IsEquippedAction, IsCurrentAction, IsConsumableAction, IsUsableAction, IsStackableAction, IsActionInRange
+-- GLOBALS: GetSpellLink, GetMacroSpell, GetSpellTexture, GetSpellCount, GetSpellCooldown, IsAttackSpell, IsCurrentSpell
+-- GLOBALS: FindSpellBookSlotBySpellID, IsUsableSpell, IsConsumableSpell, IsSpellInRange, IsAutoRepeatSpell
+-- GLOBALS: GetItemIcon, GetItemCount, GetItemCooldown, IsEquippedItem, IsCurrentItem, IsUsableItem, IsConsumableItem, IsItemInRange
+-- GLOBALS: GetActionCharges, IsItemAction, GetSpellCharges
+-- GLOBALS: RANGE_INDICATOR, ATTACK_BUTTON_FLASH_TIME, TOOLTIP_UPDATE_TIME
+-- GLOBALS: ZoneAbilityFrame, HasZoneAbility, GetLastZoneAbilitySpellTexture
+
+local KeyBound = LibStub("LibKeyBound-1.0", true)
+local CBH = LibStub("CallbackHandler-1.0")
+local LBG = LibStub("LibButtonGlow-1.0", true)
+local Masque = LibStub("Masque", true)
+
+lib.eventFrame = lib.eventFrame or CreateFrame("Frame")
+lib.eventFrame:UnregisterAllEvents()
+
+lib.buttonRegistry = lib.buttonRegistry or {}
+lib.activeButtons = lib.activeButtons or {}
+lib.actionButtons = lib.actionButtons or {}
+lib.nonActionButtons = lib.nonActionButtons or {}
+
+lib.ChargeCooldowns = lib.ChargeCooldowns or {}
+lib.NumChargeCooldowns = lib.NumChargeCooldowns or 0
+
+lib.ACTION_HIGHLIGHT_MARKS = lib.ACTION_HIGHLIGHT_MARKS or setmetatable({}, { __index = ACTION_HIGHLIGHT_MARKS })
+
+lib.callbacks = lib.callbacks or CBH:New(lib)
+
+local Generic = CreateFrame("CheckButton")
+local Generic_MT = {__index = Generic}
+
+local Action = setmetatable({}, {__index = Generic})
+local Action_MT = {__index = Action}
+
+local PetAction = setmetatable({}, {__index = Generic})
+local PetAction_MT = {__index = PetAction}
+
+local Spell = setmetatable({}, {__index = Generic})
+local Spell_MT = {__index = Spell}
+
+local Item = setmetatable({}, {__index = Generic})
+local Item_MT = {__index = Item}
+
+local Macro = setmetatable({}, {__index = Generic})
+local Macro_MT = {__index = Macro}
+
+local Custom = setmetatable({}, {__index = Generic})
+local Custom_MT = {__index = Custom}
+
+local type_meta_map = {
+	empty  = Generic_MT,
+	action = Action_MT,
+	--pet    = PetAction_MT,
+	spell  = Spell_MT,
+	item   = Item_MT,
+	macro  = Macro_MT,
+	custom = Custom_MT
+}
+
+local ButtonRegistry, ActiveButtons, ActionButtons, NonActionButtons = lib.buttonRegistry, lib.activeButtons, lib.actionButtons, lib.nonActionButtons
+
+local Update, UpdateButtonState, UpdateUsable, UpdateCount, UpdateCooldown, UpdateTooltip, UpdateNewAction, ClearNewActionHighlight
+local StartFlash, StopFlash, UpdateFlash, UpdateHotkeys, UpdateRangeTimer, UpdateOverlayGlow
+local UpdateFlyout, ShowGrid, HideGrid, UpdateGrid, SetupSecureSnippets, WrapOnClick
+local ShowOverlayGlow, HideOverlayGlow
+local EndChargeCooldown
+
+local InitializeEventHandler, OnEvent, ForAllButtons, OnUpdate
+
+local function GameTooltip_GetOwnerForbidden()
+	if GameTooltip:IsForbidden() then
+		return nil
+	end
+	return GameTooltip:GetOwner()
+end
+
+local DefaultConfig = {
+	outOfRangeColoring = "button",
+	tooltip = "enabled",
+	showGrid = false,
+	colors = {
+		range = { 0.8, 0.1, 0.1 },
+		mana = { 0.5, 0.5, 1.0 }
+	},
+	hideElements = {
+		macro = false,
+		hotkey = false,
+		equipped = false,
+	},
+	keyBoundTarget = false,
+	clickOnDown = false,
+	flyoutDirection = "UP",
+}
+
+--- Create a new action button.
+-- @param id Internal id of the button (not used by LibActionButton-1.0, only for tracking inside the calling addon)
+-- @param name Name of the button frame to be created (not used by LibActionButton-1.0 aside from naming the frame)
+-- @param header Header that drives these action buttons (if any)
+function lib:CreateButton(id, name, header, config)
+	if type(name) ~= "string" then
+		error("Usage: CreateButton(id, name. header): Buttons must have a valid name!", 2)
+	end
+	if not header then
+		error("Usage: CreateButton(id, name, header): Buttons without a secure header are not yet supported!", 2)
+	end
+
+	if not KeyBound then
+		KeyBound = LibStub("LibKeyBound-1.0", true)
+	end
+
+	local button = setmetatable(CreateFrame("CheckButton", name, header, "SecureActionButtonTemplate, ActionButtonTemplate"), Generic_MT)
+	button:RegisterForDrag("LeftButton", "RightButton")
+	button:RegisterForClicks("AnyUp")
+
+	-- Frame Scripts
+	button:SetScript("OnEnter", Generic.OnEnter)
+	button:SetScript("OnLeave", Generic.OnLeave)
+	button:SetScript("PreClick", Generic.PreClick)
+	button:SetScript("PostClick", Generic.PostClick)
+
+	button.id = id
+	button.header = header
+	-- Mapping of state -> action
+	button.state_types = {}
+	button.state_actions = {}
+
+	-- Store the LAB Version that created this button for debugging
+	button.__LAB_Version = MINOR_VERSION
+
+	-- just in case we're not run by a header, default to state 0
+	button:SetAttribute("state", 0)
+
+	SetupSecureSnippets(button)
+	WrapOnClick(button)
+
+	-- adjust hotkey style for better readability
+	button.HotKey:SetFont(button.HotKey:GetFont(), 13, "OUTLINE")
+	button.HotKey:SetVertexColor(0.75, 0.75, 0.75)
+
+	-- adjust count/stack size
+	button.Count:SetFont(button.Count:GetFont(), 14, "OUTLINE")
+
+	-- Store the button in the registry, needed for event and OnUpdate handling
+	if not next(ButtonRegistry) then
+		InitializeEventHandler()
+	end
+	ButtonRegistry[button] = true
+
+	button:UpdateConfig(config)
+
+	-- run an initial update
+	button:UpdateAction()
+	UpdateHotkeys(button)
+
+	-- somewhat of a hack for the Flyout buttons to not error.
+	button.action = 0
+
+	lib.callbacks:Fire("OnButtonCreated", button)
+
+	return button
+end
+
+function SetupSecureSnippets(button)
+	button:SetAttribute("_custom", Custom.RunCustom)
+	-- secure UpdateState(self, state)
+	-- update the type and action of the button based on the state
+	button:SetAttribute("UpdateState", [[
+		local state = ...
+		self:SetAttribute("state", state)
+		local type, action = (self:GetAttribute(format("labtype-%s", state)) or "empty"), self:GetAttribute(format("labaction-%s", state))
+
+		self:SetAttribute("type", type)
+		if type ~= "empty" and type ~= "custom" then
+			local action_field = (type == "pet") and "action" or type
+			self:SetAttribute(action_field, action)
+			self:SetAttribute("action_field", action_field)
+		end
+		local onStateChanged = self:GetAttribute("OnStateChanged")
+		if onStateChanged then
+			self:Run(onStateChanged, state, type, action)
+		end
+	]])
+
+	-- this function is invoked by the header when the state changes
+	button:SetAttribute("_childupdate-state", [[
+		self:RunAttribute("UpdateState", message)
+		self:CallMethod("UpdateAction")
+	]])
+
+	-- secure PickupButton(self, kind, value, ...)
+	-- utility function to place a object on the cursor
+	button:SetAttribute("PickupButton", [[
+		local kind, value = ...
+		if kind == "empty" then
+			return "clear"
+		elseif kind == "action" or kind == "pet" then
+			local actionType = (kind == "pet") and "petaction" or kind
+			return actionType, value
+		elseif kind == "spell" or kind == "item" or kind == "macro" then
+			return "clear", kind, value
+		else
+			print("LibActionButton-1.0: Unknown type: " .. tostring(kind))
+			return false
+		end
+	]])
+
+	button:SetAttribute("OnDragStart", [[
+		if (self:GetAttribute("buttonlock") and not IsModifiedClick("PICKUPACTION")) or self:GetAttribute("LABdisableDragNDrop") then return false end
+		local state = self:GetAttribute("state")
+		local type = self:GetAttribute("type")
+		-- if the button is empty, we can't drag anything off it
+		if type == "empty" or type == "custom" then
+			return false
+		end
+		-- Get the value for the action attribute
+		local action_field = self:GetAttribute("action_field")
+		local action = self:GetAttribute(action_field)
+
+		-- non-action fields need to change their type to empty
+		if type ~= "action" and type ~= "pet" then
+			self:SetAttribute(format("labtype-%s", state), "empty")
+			self:SetAttribute(format("labaction-%s", state), nil)
+			-- update internal state
+			self:RunAttribute("UpdateState", state)
+			-- send a notification to the insecure code
+			self:CallMethod("ButtonContentsChanged", state, "empty", nil)
+		end
+		-- return the button contents for pickup
+		return self:RunAttribute("PickupButton", type, action)
+	]])
+
+	button:SetAttribute("OnReceiveDrag", [[
+		if self:GetAttribute("LABdisableDragNDrop") then return false end
+		local kind, value, subtype, extra = ...
+		if not kind or not value then return false end
+		local state = self:GetAttribute("state")
+		local buttonType, buttonAction = self:GetAttribute("type"), nil
+		if buttonType == "custom" then return false end
+		-- action buttons can do their magic themself
+		-- for all other buttons, we'll need to update the content now
+		if buttonType ~= "action" and buttonType ~= "pet" then
+			-- with "spell" types, the 4th value contains the actual spell id
+			if kind == "spell" then
+				if extra then
+					value = extra
+				else
+					print("no spell id?", ...)
+				end
+			elseif kind == "item" and value then
+				value = format("item:%d", value)
+			end
+
+			-- Get the action that was on the button before
+			if buttonType ~= "empty" then
+				buttonAction = self:GetAttribute(self:GetAttribute("action_field"))
+			end
+
+			-- TODO: validate what kind of action is being fed in here
+			-- We can only use a handful of the possible things on the cursor
+			-- return false for all those we can't put on buttons
+
+			self:SetAttribute(format("labtype-%s", state), kind)
+			self:SetAttribute(format("labaction-%s", state), value)
+			-- update internal state
+			self:RunAttribute("UpdateState", state)
+			-- send a notification to the insecure code
+			self:CallMethod("ButtonContentsChanged", state, kind, value)
+		else
+			-- get the action for (pet-)action buttons
+			buttonAction = self:GetAttribute("action")
+		end
+		return self:RunAttribute("PickupButton", buttonType, buttonAction)
+	]])
+
+	button:SetScript("OnDragStart", nil)
+	-- Wrapped OnDragStart(self, button, kind, value, ...)
+	button.header:WrapScript(button, "OnDragStart", [[
+		return self:RunAttribute("OnDragStart")
+	]])
+	-- Wrap twice, because the post-script is not run when the pre-script causes a pickup (doh)
+	-- we also need some phony message, or it won't work =/
+	button.header:WrapScript(button, "OnDragStart", [[
+		return "message", "update"
+	]], [[
+		self:RunAttribute("UpdateState", self:GetAttribute("state"))
+	]])
+
+	button:SetScript("OnReceiveDrag", nil)
+	-- Wrapped OnReceiveDrag(self, button, kind, value, ...)
+	button.header:WrapScript(button, "OnReceiveDrag", [[
+		return self:RunAttribute("OnReceiveDrag", kind, value, ...)
+	]])
+	-- Wrap twice, because the post-script is not run when the pre-script causes a pickup (doh)
+	-- we also need some phony message, or it won't work =/
+	button.header:WrapScript(button, "OnReceiveDrag", [[
+		return "message", "update"
+	]], [[
+		self:RunAttribute("UpdateState", self:GetAttribute("state"))
+	]])
+end
+
+function WrapOnClick(button)
+	-- Wrap OnClick, to catch changes to actions that are applied with a click on the button.
+	button.header:WrapScript(button, "OnClick", [[
+		if self:GetAttribute("type") == "action" then
+			local type, action = GetActionInfo(self:GetAttribute("action"))
+			return nil, format("%s|%s", tostring(type), tostring(action))
+		end
+	]], [[
+		local type, action = GetActionInfo(self:GetAttribute("action"))
+		if message ~= format("%s|%s", tostring(type), tostring(action)) then
+			self:RunAttribute("UpdateState", self:GetAttribute("state"))
+		end
+	]])
+end
+
+-----------------------------------------------------------
+--- utility
+
+function lib:GetAllButtons()
+	local buttons = {}
+	for button in next, ButtonRegistry do
+		buttons[button] = true
+	end
+	return buttons
+end
+
+function Generic:ClearSetPoint(...)
+	self:ClearAllPoints()
+	self:SetPoint(...)
+end
+
+function Generic:NewHeader(header)
+	self.header = header
+	self:SetParent(header)
+	SetupSecureSnippets(self)
+	WrapOnClick(self)
+end
+
+
+-----------------------------------------------------------
+--- state management
+
+function Generic:ClearStates()
+	for state in pairs(self.state_types) do
+		self:SetAttribute(format("labtype-%s", state), nil)
+		self:SetAttribute(format("labaction-%s", state), nil)
+	end
+	wipe(self.state_types)
+	wipe(self.state_actions)
+end
+
+function Generic:SetState(state, kind, action)
+	if not state then state = self:GetAttribute("state") end
+	state = tostring(state)
+	-- we allow a nil kind for setting a empty state
+	if not kind then kind = "empty" end
+	if not type_meta_map[kind] then
+		error("SetStateAction: unknown action type: " .. tostring(kind), 2)
+	end
+	if kind ~= "empty" and action == nil then
+		error("SetStateAction: an action is required for non-empty states", 2)
+	end
+	if kind ~= "custom" and action ~= nil and type(action) ~= "number" and type(action) ~= "string" or (kind == "custom" and type(action) ~= "table") then
+		error("SetStateAction: invalid action data type, only strings and numbers allowed", 2)
+	end
+
+	if kind == "item" then
+		if tonumber(action) then
+			action = format("item:%s", action)
+		else
+			local itemString = str_match(action, "^|c%x+|H(item[%d:]+)|h%[")
+			if itemString then
+				action = itemString
+			end
+		end
+	end
+
+	self.state_types[state] = kind
+	self.state_actions[state] = action
+	self:UpdateState(state)
+end
+
+function Generic:UpdateState(state)
+	if not state then state = self:GetAttribute("state") end
+	state = tostring(state)
+	self:SetAttribute(format("labtype-%s", state), self.state_types[state])
+	self:SetAttribute(format("labaction-%s", state), self.state_actions[state])
+	if state ~= tostring(self:GetAttribute("state")) then return end
+	if self.header then
+		self.header:SetFrameRef("updateButton", self)
+		self.header:Execute([[
+			local frame = self:GetFrameRef("updateButton")
+			control:RunFor(frame, frame:GetAttribute("UpdateState"), frame:GetAttribute("state"))
+		]])
+	else
+	-- TODO
+	end
+	self:UpdateAction()
+end
+
+function Generic:GetAction(state)
+	if not state then state = self:GetAttribute("state") end
+	state = tostring(state)
+	return self.state_types[state] or "empty", self.state_actions[state]
+end
+
+function Generic:UpdateAllStates()
+	for state in pairs(self.state_types) do
+		self:UpdateState(state)
+	end
+end
+
+function Generic:ButtonContentsChanged(state, kind, value)
+	state = tostring(state)
+	self.state_types[state] = kind or "empty"
+	self.state_actions[state] = value
+	lib.callbacks:Fire("OnButtonContentsChanged", self, state, self.state_types[state], self.state_actions[state])
+	self:UpdateAction(self)
+end
+
+function Generic:DisableDragNDrop(flag)
+	if InCombatLockdown() then
+		error("LibActionButton-1.0: You can only toggle DragNDrop out of combat!", 2)
+	end
+	if flag then
+		self:SetAttribute("LABdisableDragNDrop", true)
+	else
+		self:SetAttribute("LABdisableDragNDrop", nil)
+	end
+end
+
+function Generic:AddToButtonFacade(group)
+	if type(group) ~= "table" or type(group.AddButton) ~= "function" then
+		error("LibActionButton-1.0:AddToButtonFacade: You need to supply a proper group to use!", 2)
+	end
+	group:AddButton(self)
+	self.LBFSkinned = true
+end
+
+function Generic:AddToMasque(group)
+	if type(group) ~= "table" or type(group.AddButton) ~= "function" then
+		error("LibActionButton-1.0:AddToMasque: You need to supply a proper group to use!", 2)
+	end
+	group:AddButton(self)
+	self.MasqueSkinned = true
+end
+
+function Generic:UpdateAlpha()
+	UpdateCooldown(self)
+end
+
+-----------------------------------------------------------
+--- frame scripts
+
+-- copied (and adjusted) from SecureHandlers.lua
+local function PickupAny(kind, target, detail, ...)
+	if kind == "clear" then
+		ClearCursor()
+		kind, target, detail = target, detail, ...
+	end
+	if kind == 'action' then
+		PickupAction(target)
+	elseif kind == 'item' then
+		PickupItem(target)
+	elseif kind == 'macro' then
+		PickupMacro(target)
+	elseif kind == 'petaction' then
+		PickupPetAction(target)
+	elseif kind == 'spell' then
+		PickupSpell(target)
+	elseif kind == 'companion' then
+		PickupCompanion(target, detail)
+	elseif kind == 'equipmentset' then
+		PickupEquipmentSet(target)
+	end
+end
+
+function Generic:OnEnter()
+	if self.config.tooltip ~= "disabled" and (self.config.tooltip ~= "nocombat" or not InCombatLockdown()) then
+		UpdateTooltip(self)
+	end
+	if KeyBound then
+		KeyBound:Set(self)
+	end
+
+	if self._state_type == "action" and self.NewActionTexture then
+		ClearNewActionHighlight(self._state_action, false, false)
+		UpdateNewAction(self)
+	end
+end
+
+function Generic:OnLeave()
+	if GameTooltip:IsForbidden() then return end
+	GameTooltip:Hide()
+end
+
+-- Insecure drag handler to allow clicking on the button with an action on the cursor
+-- to place it on the button. Like action buttons work.
+function Generic:PreClick()
+	if self._state_type == "action" or self._state_type == "pet"
+	   or InCombatLockdown() or self:GetAttribute("LABdisableDragNDrop")
+	then
+		return
+	end
+	-- check if there is actually something on the cursor
+	local kind, value, subtype = GetCursorInfo()
+	if not (kind and value) then return end
+	self._old_type = self._state_type
+	if self._state_type and self._state_type ~= "empty" then
+		self._old_type = self._state_type
+		self:SetAttribute("type", "empty")
+		--self:SetState(nil, "empty", nil)
+	end
+	self._receiving_drag = true
+end
+
+local function formatHelper(input)
+	if type(input) == "string" then
+		return format("%q", input)
+	else
+		return tostring(input)
+	end
+end
+
+function Generic:PostClick()
+	UpdateButtonState(self)
+	if self._receiving_drag and not InCombatLockdown() then
+		if self._old_type then
+			self:SetAttribute("type", self._old_type)
+			self._old_type = nil
+		end
+		local oldType, oldAction = self._state_type, self._state_action
+		local kind, data, subtype, extra = GetCursorInfo()
+		self.header:SetFrameRef("updateButton", self)
+		self.header:Execute(format([[
+			local frame = self:GetFrameRef("updateButton")
+			control:RunFor(frame, frame:GetAttribute("OnReceiveDrag"), %s, %s, %s, %s)
+			control:RunFor(frame, frame:GetAttribute("UpdateState"), %s)
+		]], formatHelper(kind), formatHelper(data), formatHelper(subtype), formatHelper(extra), formatHelper(self:GetAttribute("state"))))
+		PickupAny("clear", oldType, oldAction)
+	end
+	self._receiving_drag = nil
+
+	if self._state_type == "action" and lib.ACTION_HIGHLIGHT_MARKS[self._state_action] then
+		ClearNewActionHighlight(self._state_action, false, false)
+	end
+end
+
+-----------------------------------------------------------
+--- configuration
+
+local function merge(target, source, default)
+	for k,v in pairs(default) do
+		if type(v) ~= "table" then
+			if source and source[k] ~= nil then
+				target[k] = source[k]
+			else
+				target[k] = v
+			end
+		else
+			if type(target[k]) ~= "table" then target[k] = {} else wipe(target[k]) end
+			merge(target[k], type(source) == "table" and source[k], v)
+		end
+	end
+	return target
+end
+
+function Generic:UpdateConfig(config)
+	if config and type(config) ~= "table" then
+		error("LibActionButton-1.0: UpdateConfig requires a valid configuration!", 2)
+	end
+	local oldconfig = self.config
+	if not self.config then self.config = {} end
+	-- merge the two configs
+	merge(self.config, config, DefaultConfig)
+
+	if self.config.outOfRangeColoring == "button" or (oldconfig and oldconfig.outOfRangeColoring == "button") then
+		UpdateUsable(self)
+	end
+	if self.config.outOfRangeColoring == "hotkey" then
+		self.outOfRange = nil
+	elseif oldconfig and oldconfig.outOfRangeColoring == "hotkey" then
+		self.HotKey:SetVertexColor(0.75, 0.75, 0.75)
+	end
+
+	if self.config.hideElements.macro then
+		self.Name:Hide()
+	else
+		self.Name:Show()
+	end
+
+	self:SetAttribute("flyoutDirection", self.config.flyoutDirection)
+
+	UpdateHotkeys(self)
+	UpdateGrid(self)
+	Update(self)
+	self:RegisterForClicks(self.config.clickOnDown and "AnyDown" or "AnyUp")
+end
+
+-----------------------------------------------------------
+--- event handler
+
+function ForAllButtons(method, onlyWithAction)
+	assert(type(method) == "function")
+	for button in next, (onlyWithAction and ActiveButtons or ButtonRegistry) do
+		method(button)
+	end
+end
+
+function InitializeEventHandler()
+	lib.eventFrame:SetScript("OnEvent", OnEvent)
+	lib.eventFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
+	lib.eventFrame:RegisterEvent("ACTIONBAR_SHOWGRID")
+	lib.eventFrame:RegisterEvent("ACTIONBAR_HIDEGRID")
+	--lib.eventFrame:RegisterEvent("ACTIONBAR_PAGE_CHANGED")
+	--lib.eventFrame:RegisterEvent("UPDATE_BONUS_ACTIONBAR")
+	lib.eventFrame:RegisterEvent("ACTIONBAR_SLOT_CHANGED")
+	lib.eventFrame:RegisterEvent("UPDATE_BINDINGS")
+	lib.eventFrame:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
+	lib.eventFrame:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR")
+	lib.eventFrame:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED")
+
+	lib.eventFrame:RegisterEvent("ACTIONBAR_UPDATE_STATE")
+	lib.eventFrame:RegisterEvent("ACTIONBAR_UPDATE_USABLE")
+	lib.eventFrame:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN")
+	lib.eventFrame:RegisterEvent("PLAYER_TARGET_CHANGED")
+	lib.eventFrame:RegisterEvent("TRADE_SKILL_SHOW")
+	lib.eventFrame:RegisterEvent("TRADE_SKILL_CLOSE")
+	lib.eventFrame:RegisterEvent("ARCHAEOLOGY_CLOSED")
+	lib.eventFrame:RegisterEvent("PLAYER_ENTER_COMBAT")
+	lib.eventFrame:RegisterEvent("PLAYER_LEAVE_COMBAT")
+	lib.eventFrame:RegisterEvent("START_AUTOREPEAT_SPELL")
+	lib.eventFrame:RegisterEvent("STOP_AUTOREPEAT_SPELL")
+	lib.eventFrame:RegisterEvent("UNIT_ENTERED_VEHICLE")
+	lib.eventFrame:RegisterEvent("UNIT_EXITED_VEHICLE")
+	lib.eventFrame:RegisterEvent("COMPANION_UPDATE")
+	lib.eventFrame:RegisterEvent("UNIT_INVENTORY_CHANGED")
+	lib.eventFrame:RegisterEvent("LEARNED_SPELL_IN_TAB")
+	lib.eventFrame:RegisterEvent("PET_STABLE_UPDATE")
+	lib.eventFrame:RegisterEvent("PET_STABLE_SHOW")
+	lib.eventFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW")
+	lib.eventFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE")
+	lib.eventFrame:RegisterEvent("SPELL_UPDATE_CHARGES")
+	lib.eventFrame:RegisterEvent("UPDATE_SUMMONPETS_ACTION")
+	lib.eventFrame:RegisterEvent("SPELL_UPDATE_ICON")
+
+	-- With those two, do we still need the ACTIONBAR equivalents of them?
+	lib.eventFrame:RegisterEvent("SPELL_UPDATE_COOLDOWN")
+	lib.eventFrame:RegisterEvent("SPELL_UPDATE_USABLE")
+	lib.eventFrame:RegisterEvent("PLAYER_EQUIPMENT_CHANGED")
+	lib.eventFrame:RegisterEvent("BAG_UPDATE_DELAYED")
+
+	lib.eventFrame:RegisterEvent("LOSS_OF_CONTROL_ADDED")
+	lib.eventFrame:RegisterEvent("LOSS_OF_CONTROL_UPDATE")
+
+	lib.eventFrame:Show()
+	lib.eventFrame:SetScript("OnUpdate", OnUpdate)
+end
+
+function OnEvent(frame, event, arg1, ...)
+	if (event == "UNIT_INVENTORY_CHANGED" and arg1 == "player") or event == "LEARNED_SPELL_IN_TAB" then
+		local tooltipOwner = GameTooltip_GetOwnerForbidden()
+		if tooltipOwner and ButtonRegistry[tooltipOwner] then
+			tooltipOwner:SetTooltip()
+		end
+	elseif event == "ACTIONBAR_SLOT_CHANGED" then
+		for button in next, ButtonRegistry do
+			if button._state_type == "action" and (arg1 == 0 or arg1 == tonumber(button._state_action)) then
+				ClearNewActionHighlight(button._state_action, true, false)
+				Update(button)
+			end
+		end
+	elseif event == "PLAYER_ENTERING_WORLD" or event == "UPDATE_SHAPESHIFT_FORM" or event == "UPDATE_VEHICLE_ACTIONBAR" then
+		ForAllButtons(Update)
+	elseif event == "ACTIONBAR_PAGE_CHANGED" or event == "UPDATE_BONUS_ACTIONBAR" then
+		-- TODO: Are these even needed?
+	elseif event == "ACTIONBAR_SHOWGRID" then
+		ShowGrid()
+	elseif event == "ACTIONBAR_HIDEGRID" then
+		HideGrid()
+	elseif event == "UPDATE_BINDINGS" then
+		ForAllButtons(UpdateHotkeys)
+	elseif event == "PLAYER_TARGET_CHANGED" then
+		UpdateRangeTimer()
+	elseif (event == "ACTIONBAR_UPDATE_STATE") or
+		((event == "UNIT_ENTERED_VEHICLE" or event == "UNIT_EXITED_VEHICLE") and (arg1 == "player")) or
+		((event == "COMPANION_UPDATE") and (arg1 == "MOUNT")) then
+		ForAllButtons(UpdateButtonState, true)
+	elseif event == "ACTIONBAR_UPDATE_USABLE" then
+		for button in next, ActionButtons do
+			UpdateUsable(button)
+		end
+	elseif event == "SPELL_UPDATE_USABLE" then
+		for button in next, NonActionButtons do
+			UpdateUsable(button)
+		end
+	elseif event == "PLAYER_MOUNT_DISPLAY_CHANGED" then
+		for button in next, ActiveButtons do
+			UpdateUsable(button)
+		end
+	elseif event == "ACTIONBAR_UPDATE_COOLDOWN" then
+		for button in next, ActionButtons do
+			UpdateCooldown(button)
+			if GameTooltip:GetOwner() == button then
+				UpdateTooltip(button)
+			end
+		end
+	elseif event == "SPELL_UPDATE_COOLDOWN" then
+		for button in next, NonActionButtons do
+			UpdateCooldown(button)
+			if GameTooltip_GetOwnerForbidden() == button then
+				UpdateTooltip(button)
+			end
+		end
+	elseif event == "LOSS_OF_CONTROL_ADDED" then
+		for button in next, ActiveButtons do
+			UpdateCooldown(button)
+			if GameTooltip_GetOwnerForbidden() == button then
+				UpdateTooltip(button)
+			end
+		end
+	elseif event == "LOSS_OF_CONTROL_UPDATE" then
+		for button in next, ActiveButtons do
+			UpdateCooldown(button)
+		end
+	elseif event == "TRADE_SKILL_SHOW" or event == "TRADE_SKILL_CLOSE"  or event == "ARCHAEOLOGY_CLOSED" then
+		ForAllButtons(UpdateButtonState, true)
+	elseif event == "PLAYER_ENTER_COMBAT" then
+		for button in next, ActiveButtons do
+			if button:IsAttack() then
+				StartFlash(button)
+			end
+		end
+	elseif event == "PLAYER_LEAVE_COMBAT" then
+		for button in next, ActiveButtons do
+			if button:IsAttack() then
+				StopFlash(button)
+			end
+		end
+	elseif event == "START_AUTOREPEAT_SPELL" then
+		for button in next, ActiveButtons do
+			if button:IsAutoRepeat() then
+				StartFlash(button)
+			end
+		end
+	elseif event == "STOP_AUTOREPEAT_SPELL" then
+		for button in next, ActiveButtons do
+			if button.flashing == 1 and not button:IsAttack() then
+				StopFlash(button)
+			end
+		end
+	elseif event == "PET_STABLE_UPDATE" or event == "PET_STABLE_SHOW" then
+		ForAllButtons(Update)
+	elseif event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW" then
+		for button in next, ActiveButtons do
+			local spellId = button:GetSpellId()
+			if spellId and spellId == arg1 then
+				ShowOverlayGlow(button)
+			else
+				if button._state_type == "action" then
+					local actionType, id = GetActionInfo(button._state_action)
+					if actionType == "flyout" and FlyoutHasSpell(id, arg1) then
+						ShowOverlayGlow(button)
+					end
+				end
+			end
+		end
+	elseif event == "SPELL_ACTIVATION_OVERLAY_GLOW_HIDE" then
+		for button in next, ActiveButtons do
+			local spellId = button:GetSpellId()
+			if spellId and spellId == arg1 then
+				HideOverlayGlow(button)
+			else
+				if button._state_type == "action" then
+					local actionType, id = GetActionInfo(button._state_action)
+					if actionType == "flyout" and FlyoutHasSpell(id, arg1) then
+						HideOverlayGlow(button)
+					end
+				end
+			end
+		end
+	elseif event == "PLAYER_EQUIPMENT_CHANGED" then
+		for button in next, ActiveButtons do
+			if button._state_type == "item" then
+				Update(button)
+			end
+		end
+	elseif  event == "BAG_UPDATE_DELAYED" then
+		for button in next, ActiveButtons do
+			if button._state_type == "item" then
+				Update(button)
+			end
+		end
+	elseif event == "SPELL_UPDATE_CHARGES" then
+		ForAllButtons(UpdateCount, true)
+	elseif event == "UPDATE_SUMMONPETS_ACTION" then
+		for button in next, ActiveButtons do
+			if button._state_type == "action" then
+				local actionType, id = GetActionInfo(button._state_action)
+				if actionType == "summonpet" then
+					local texture = GetActionTexture(button._state_action)
+					if texture then
+						button.icon:SetTexture(texture)
+					end
+				end
+			end
+		end
+	elseif event == "SPELL_UPDATE_ICON" then
+		ForAllButtons(Update, true)
+	end
+end
+
+local flashTime = 0
+local rangeTimer = -1
+function OnUpdate(_, elapsed)
+	flashTime = flashTime - elapsed
+	rangeTimer = rangeTimer - elapsed
+	-- Run the loop only when there is something to update
+	if rangeTimer <= 0 or flashTime <= 0 then
+		for button in next, ActiveButtons do
+			-- Flashing
+			if button.flashing == 1 and flashTime <= 0 then
+				if button.Flash:IsShown() then
+					button.Flash:Hide()
+				else
+					button.Flash:Show()
+				end
+			end
+
+			-- Range
+			if rangeTimer <= 0 then
+				local inRange = button:IsInRange()
+				local oldRange = button.outOfRange
+				button.outOfRange = (inRange == false)
+				if oldRange ~= button.outOfRange then
+					if button.config.outOfRangeColoring == "button" then
+						UpdateUsable(button)
+					elseif button.config.outOfRangeColoring == "hotkey" then
+						local hotkey = button.HotKey
+						if hotkey:GetText() == RANGE_INDICATOR then
+							if inRange == false then
+								hotkey:Show()
+							else
+								hotkey:Hide()
+							end
+						end
+						if inRange == false then
+							hotkey:SetVertexColor(unpack(button.config.colors.range))
+						else
+							hotkey:SetVertexColor(0.75, 0.75, 0.75)
+						end
+					end
+				end
+			end
+		end
+
+		-- Update values
+		if flashTime <= 0 then
+			flashTime = flashTime + ATTACK_BUTTON_FLASH_TIME
+		end
+		if rangeTimer <= 0 then
+			rangeTimer = TOOLTIP_UPDATE_TIME
+		end
+	end
+end
+
+local gridCounter = 0
+function ShowGrid()
+	gridCounter = gridCounter + 1
+	if gridCounter >= 1 then
+		for button in next, ButtonRegistry do
+			if button:IsShown() then
+				button:SetAlpha(1.0)
+			end
+		end
+	end
+end
+
+function HideGrid()
+	if gridCounter > 0 then
+		gridCounter = gridCounter - 1
+	end
+	if gridCounter == 0 then
+		for button in next, ButtonRegistry do
+			if button:IsShown() and not button:HasAction() and not button.config.showGrid then
+				button:SetAlpha(0.0)
+			end
+		end
+	end
+end
+
+function UpdateGrid(self)
+	if self.config.showGrid then
+		self:SetAlpha(1.0)
+	elseif gridCounter == 0 and self:IsShown() and not self:HasAction() then
+		self:SetAlpha(0.0)
+	end
+end
+
+-----------------------------------------------------------
+--- KeyBound integration
+
+function Generic:GetBindingAction()
+	return self.config.keyBoundTarget or "CLICK "..self:GetName()..":LeftButton"
+end
+
+function Generic:GetHotkey()
+	local name = "CLICK "..self:GetName()..":LeftButton"
+	local key = GetBindingKey(self.config.keyBoundTarget or name)
+	if not key and self.config.keyBoundTarget then
+		key = GetBindingKey(name)
+	end
+	if key then
+		return KeyBound and KeyBound:ToShortKey(key) or key
+	end
+end
+
+local function getKeys(binding, keys)
+	keys = keys or ""
+	for i = 1, select("#", GetBindingKey(binding)) do
+		local hotKey = select(i, GetBindingKey(binding))
+		if keys ~= "" then
+			keys = keys .. ", "
+		end
+		keys = keys .. GetBindingText(hotKey)
+	end
+	return keys
+end
+
+function Generic:GetBindings()
+	local keys
+
+	if self.config.keyBoundTarget then
+		keys = getKeys(self.config.keyBoundTarget)
+	end
+
+	keys = getKeys("CLICK "..self:GetName()..":LeftButton", keys)
+
+	return keys
+end
+
+function Generic:SetKey(key)
+	if self.config.keyBoundTarget then
+		SetBinding(key, self.config.keyBoundTarget)
+	else
+		SetBindingClick(key, self:GetName(), "LeftButton")
+	end
+	lib.callbacks:Fire("OnKeybindingChanged", self, key)
+end
+
+local function clearBindings(binding)
+	while GetBindingKey(binding) do
+		SetBinding(GetBindingKey(binding), nil)
+	end
+end
+
+function Generic:ClearBindings()
+	if self.config.keyBoundTarget then
+		clearBindings(self.config.keyBoundTarget)
+	end
+	clearBindings("CLICK "..self:GetName()..":LeftButton")
+	lib.callbacks:Fire("OnKeybindingChanged", self, nil)
+end
+
+-----------------------------------------------------------
+--- button management
+
+function Generic:UpdateAction(force)
+	local type, action = self:GetAction()
+	if force or type ~= self._state_type or action ~= self._state_action then
+		-- type changed, update the metatable
+		if force or self._state_type ~= type then
+			local meta = type_meta_map[type] or type_meta_map.empty
+			setmetatable(self, meta)
+			self._state_type = type
+		end
+		self._state_action = action
+		Update(self)
+	end
+end
+
+function lib:UpdateAllButtons()
+	for button in next, ActiveButtons do
+		if button._state_type == "item" then
+			Update(button)
+		end
+	end
+end
+
+function Update(self)
+	if self:HasAction() then
+		ActiveButtons[self] = true
+		if self._state_type == "action" then
+			ActionButtons[self] = true
+			NonActionButtons[self] = nil
+		else
+			ActionButtons[self] = nil
+			NonActionButtons[self] = true
+		end
+		self:SetAlpha(1.0)
+		UpdateButtonState(self)
+		UpdateUsable(self)
+		UpdateCooldown(self)
+		UpdateFlash(self)
+	else
+		ActiveButtons[self] = nil
+		ActionButtons[self] = nil
+		NonActionButtons[self] = nil
+		if gridCounter == 0 and not self.config.showGrid then
+			self:SetAlpha(0.0)
+		end
+		self.cooldown:Hide()
+		self:SetChecked(false)
+
+		if self.chargeCooldown then
+			EndChargeCooldown(self.chargeCooldown)
+		end
+	end
+
+	-- Add a green border if button is an equipped item
+	if self:IsEquipped() and not self.config.hideElements.equipped then
+		self.Border:SetVertexColor(0, 1.0, 0, 0.35)
+		self.Border:Show()
+	else
+		self.Border:Hide()
+	end
+
+	-- Update Action Text
+	if not self:IsConsumableOrStackable() then
+		self.Name:SetText(self:GetActionText())
+	else
+		self.Name:SetText("")
+	end
+
+	-- Update icon and hotkey
+	local texture = self:GetTexture()
+
+	-- Zone ability button handling
+	self.zoneAbilityDisabled = false
+	self.icon:SetDesaturated(false)
+	if self._state_type == "action" then
+		local action_type, id = GetActionInfo(self._state_action)
+		if ((action_type == "spell" or action_type == "companion") and ZoneAbilityFrame and ZoneAbilityFrame.baseName and not HasZoneAbility()) then
+			local name = GetSpellInfo(ZoneAbilityFrame.baseName)
+			local abilityName = GetSpellInfo(id)
+			if name == abilityName then
+				texture = GetLastZoneAbilitySpellTexture()
+				self.zoneAbilityDisabled = true
+				self.icon:SetDesaturated(true)
+			end
+		end
+	end
+
+	if texture then
+		self.icon:SetTexture(texture)
+		self.icon:Show()
+		self.rangeTimer = - 1
+		self:SetNormalTexture("Interface\\Buttons\\UI-Quickslot2")
+		if not self.LBFSkinned and not self.MasqueSkinned then
+			self.NormalTexture:SetTexCoord(0, 0, 0, 0)
+		end
+	else
+		self.icon:Hide()
+		self.cooldown:Hide()
+		self.rangeTimer = nil
+		self:SetNormalTexture("Interface\\Buttons\\UI-Quickslot")
+		if self.HotKey:GetText() == RANGE_INDICATOR then
+			self.HotKey:Hide()
+		else
+			self.HotKey:SetVertexColor(0.75, 0.75, 0.75)
+		end
+		if not self.LBFSkinned and not self.MasqueSkinned then
+			self.NormalTexture:SetTexCoord(-0.15, 1.15, -0.15, 1.17)
+		end
+	end
+
+	self:UpdateLocal()
+
+	UpdateCount(self)
+
+	UpdateFlyout(self)
+
+	UpdateOverlayGlow(self)
+
+	UpdateNewAction(self)
+
+	if GameTooltip_GetOwnerForbidden() == self then
+		UpdateTooltip(self)
+	end
+
+	-- this could've been a spec change, need to call OnStateChanged for action buttons, if present
+	if not InCombatLockdown() and self._state_type == "action" then
+		local onStateChanged = self:GetAttribute("OnStateChanged")
+		if onStateChanged then
+			self.header:SetFrameRef("updateButton", self)
+			self.header:Execute(([[
+				local frame = self:GetFrameRef("updateButton")
+				control:RunFor(frame, frame:GetAttribute("OnStateChanged"), %s, %s, %s)
+			]]):format(formatHelper(self:GetAttribute("state")), formatHelper(self._state_type), formatHelper(self._state_action)))
+		end
+	end
+	lib.callbacks:Fire("OnButtonUpdate", self)
+end
+
+function Generic:UpdateLocal()
+-- dummy function the other button types can override for special updating
+end
+
+function UpdateButtonState(self)
+	if self:IsCurrentlyActive() or self:IsAutoRepeat() then
+		self:SetChecked(true)
+	else
+		self:SetChecked(false)
+	end
+	lib.callbacks:Fire("OnButtonState", self)
+end
+
+function UpdateUsable(self)
+	-- TODO: make the colors configurable
+	-- TODO: allow disabling of the whole recoloring
+	if self.config.outOfRangeColoring == "button" and self.outOfRange then
+		self.icon:SetVertexColor(unpack(self.config.colors.range))
+	else
+		local isUsable, notEnoughMana = self:IsUsable()
+		if isUsable then
+			self.icon:SetVertexColor(1.0, 1.0, 1.0)
+			--self.NormalTexture:SetVertexColor(1.0, 1.0, 1.0)
+		elseif notEnoughMana then
+			self.icon:SetVertexColor(unpack(self.config.colors.mana))
+			--self.NormalTexture:SetVertexColor(0.5, 0.5, 1.0)
+		else
+			self.icon:SetVertexColor(0.4, 0.4, 0.4)
+			--self.NormalTexture:SetVertexColor(1.0, 1.0, 1.0)
+		end
+	end
+	lib.callbacks:Fire("OnButtonUsable", self)
+end
+
+function UpdateCount(self)
+	--print("libtest", self:GetCount() )
+	if not self:HasAction() then
+		self.Count:SetText("")
+		return
+	end
+	if self:IsConsumableOrStackable() then
+		local count = self:GetCount()
+		if count ~= 0 then
+			if count > (self.maxDisplayCount or 999) then
+				--TODO: Relly this should show digits then * if over 999
+				self.Count:SetText("*")
+			else
+				self.Count:SetText(count)
+			end
+		else
+			self.Count:SetText("")
+		end
+	else
+		local charges, maxCharges, chargeStart, chargeDuration = self:GetCharges()
+		if charges and maxCharges and maxCharges > 1 then
+			self.Count:SetText(charges)
+		else
+			self.Count:SetText("")
+		end
+	end
+end
+
+function EndChargeCooldown(self)
+	self:Hide()
+	self:SetParent(UIParent)
+	self.parent.chargeCooldown = nil
+	self.parent = nil
+	tinsert(lib.ChargeCooldowns, self)
+end
+
+local function StartChargeCooldown(parent, chargeStart, chargeDuration, chargeModRate)
+	if not parent.chargeCooldown then
+		local cooldown = tremove(lib.ChargeCooldowns)
+		if not cooldown then
+			lib.NumChargeCooldowns = lib.NumChargeCooldowns + 1
+			cooldown = CreateFrame("Cooldown", "LAB10ChargeCooldown"..lib.NumChargeCooldowns, parent, "CooldownFrameTemplate");
+			cooldown:SetScript("OnCooldownDone", EndChargeCooldown)
+			cooldown:SetHideCountdownNumbers(true)
+			cooldown:SetDrawSwipe(false)
+		end
+		cooldown:SetParent(parent)
+		cooldown:SetAllPoints(parent)
+		cooldown:SetFrameStrata("TOOLTIP")
+		cooldown:Show()
+		parent.chargeCooldown = cooldown
+		cooldown.parent = parent
+	end
+	-- set cooldown
+	parent.chargeCooldown:SetDrawBling(parent.chargeCooldown:GetEffectiveAlpha() > 0.5)
+	CooldownFrame_Set(parent.chargeCooldown, chargeStart, chargeDuration, true, true, chargeModRate)
+
+	-- update charge cooldown skin when masque is used
+	if Masque and Masque.UpdateCharge then
+		Masque:UpdateCharge(parent)
+	end
+
+	if not chargeStart or chargeStart == 0 then
+		EndChargeCooldown(parent.chargeCooldown)
+	end
+end
+
+local function OnCooldownDone(self)
+	self:SetScript("OnCooldownDone", nil)
+	UpdateCooldown(self:GetParent())
+end
+
+function UpdateCooldown(self)
+	local locStart, locDuration = self:GetLossOfControlCooldown()
+	local start, duration, enable, modRate = self:GetCooldown()
+	local charges, maxCharges, chargeStart, chargeDuration, chargeModRate = self:GetCharges()
+
+	self.cooldown:SetDrawBling(self.cooldown:GetEffectiveAlpha() > 0.5)
+
+	if (locStart + locDuration) > (start + duration) then
+		if self.cooldown.currentCooldownType ~= COOLDOWN_TYPE_LOSS_OF_CONTROL then
+			self.cooldown:SetEdgeTexture("Interface\\Cooldown\\edge-LoC")
+			self.cooldown:SetSwipeColor(0.17, 0, 0)
+			self.cooldown:SetHideCountdownNumbers(true)
+			self.cooldown.currentCooldownType = COOLDOWN_TYPE_LOSS_OF_CONTROL
+		end
+		CooldownFrame_Set(self.cooldown, locStart, locDuration, true, true, modRate)
+	else
+		if self.cooldown.currentCooldownType ~= COOLDOWN_TYPE_NORMAL then
+			self.cooldown:SetEdgeTexture("Interface\\Cooldown\\edge")
+			self.cooldown:SetSwipeColor(0, 0, 0)
+			self.cooldown:SetHideCountdownNumbers(false)
+			self.cooldown.currentCooldownType = COOLDOWN_TYPE_NORMAL
+		end
+		if locStart > 0 then
+			self.cooldown:SetScript("OnCooldownDone", OnCooldownDone)
+		end
+
+		if charges and maxCharges and charges > 0 and charges < maxCharges then
+			StartChargeCooldown(self, chargeStart, chargeDuration, chargeModRate)
+		elseif self.chargeCooldown then
+			EndChargeCooldown(self.chargeCooldown)
+		end
+		CooldownFrame_Set(self.cooldown, start, duration, enable, false, modRate)
+	end
+end
+
+function StartFlash(self)
+	self.flashing = 1
+	flashTime = 0
+	UpdateButtonState(self)
+end
+
+function StopFlash(self)
+	self.flashing = 0
+	self.Flash:Hide()
+	UpdateButtonState(self)
+end
+
+function UpdateFlash(self)
+	if (self:IsAttack() and self:IsCurrentlyActive()) or self:IsAutoRepeat() then
+		StartFlash(self)
+	else
+		StopFlash(self)
+	end
+end
+
+function UpdateTooltip(self)
+	if GameTooltip:IsForbidden() then return end
+	if (GetCVar("UberTooltips") == "1") then
+		--for i,n in pairs(GameTooltip) do print(i,n) end
+		--print("lib", GameTooltip, self)
+		GameTooltip_SetDefaultAnchor(GameTooltip, self);
+	else
+		GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
+	end
+	if self:SetTooltip() then
+		self.UpdateTooltip = UpdateTooltip
+	else
+		self.UpdateTooltip = nil
+	end
+end
+
+function UpdateHotkeys(self)
+	local key = self:GetHotkey()
+	if not key or key == "" or self.config.hideElements.hotkey then
+		self.HotKey:SetText(RANGE_INDICATOR)
+		self.HotKey:SetPoint("TOPLEFT", self, "TOPLEFT", 1, - 2)
+		self.HotKey:Hide()
+	else
+		self.HotKey:SetText(key)
+		self.HotKey:SetPoint("TOPLEFT", self, "TOPLEFT", - 2, - 2)
+		self.HotKey:Show()
+	end
+end
+
+function ShowOverlayGlow(self)
+	if LBG then
+		LBG.ShowOverlayGlow(self)
+	end
+end
+
+function HideOverlayGlow(self)
+	if LBG then
+		LBG.HideOverlayGlow(self)
+	end
+end
+
+function UpdateOverlayGlow(self)
+	local spellId = self:GetSpellId()
+	if spellId and IsSpellOverlayed(spellId) then
+		ShowOverlayGlow(self)
+	else
+		HideOverlayGlow(self)
+	end
+end
+
+function ClearNewActionHighlight(action, preventIdenticalActionsFromClearing, value)
+	lib.ACTION_HIGHLIGHT_MARKS[action] = value
+
+	for button in next, ButtonRegistry do
+		if button._state_type == "action" and action == tonumber(button._state_action) then
+			UpdateNewAction(button)
+		end
+	end
+
+	if preventIdenticalActionsFromClearing then
+		return
+	end
+
+	-- iterate through actions and unmark all that are the same type
+	local unmarkedType, unmarkedID = GetActionInfo(action)
+	for actionKey, markValue in pairs(lib.ACTION_HIGHLIGHT_MARKS) do
+		if markValue then
+			local actionType, actionID = GetActionInfo(actionKey)
+			if actionType == unmarkedType and actionID == unmarkedID then
+				ClearNewActionHighlight(actionKey, true, value)
+			end
+		end
+	end
+end
+
+hooksecurefunc("MarkNewActionHighlight", function(action)
+	lib.ACTION_HIGHLIGHT_MARKS[action] = true
+	for button in next, ButtonRegistry do
+		if button._state_type == "action" and action == tonumber(button._state_action) then
+			UpdateNewAction(button)
+		end
+	end
+end)
+
+hooksecurefunc("ClearNewActionHighlight", function(action, preventIdenticalActionsFromClearing)
+	ClearNewActionHighlight(action, preventIdenticalActionsFromClearing, nil)
+end)
+
+function UpdateNewAction(self)
+	-- special handling for "New Action" markers
+	if self.NewActionTexture then
+		if self._state_type == "action" and lib.ACTION_HIGHLIGHT_MARKS[self._state_action] then
+			self.NewActionTexture:Show()
+		else
+			self.NewActionTexture:Hide()
+		end
+	end
+end
+
+-- Hook UpdateFlyout so we can use the blizzy templates
+hooksecurefunc("ActionButton_UpdateFlyout", function(self, ...)
+	if ButtonRegistry[self] then
+		UpdateFlyout(self)
+	end
+end)
+
+function UpdateFlyout(self)
+	-- disabled FlyoutBorder/BorderShadow, those are not handled by LBF and look terrible
+	self.FlyoutBorder:Hide()
+	self.FlyoutBorderShadow:Hide()
+	if self._state_type == "action" then
+		-- based on ActionButton_UpdateFlyout in ActionButton.lua
+		local actionType = GetActionInfo(self._state_action)
+		if actionType == "flyout" then
+			-- Update border and determine arrow position
+			local arrowDistance
+			if (SpellFlyout and SpellFlyout:IsShown() and SpellFlyout:GetParent() == self) or GetMouseFocus() == self then
+				arrowDistance = 5
+			else
+				arrowDistance = 2
+			end
+
+			-- Update arrow
+			self.FlyoutArrow:Show()
+			self.FlyoutArrow:ClearAllPoints()
+			local direction = self:GetAttribute("flyoutDirection");
+			if direction == "LEFT" then
+				self.FlyoutArrow:SetPoint("LEFT", self, "LEFT", -arrowDistance, 0)
+				SetClampedTextureRotation(self.FlyoutArrow, 270)
+			elseif direction == "RIGHT" then
+				self.FlyoutArrow:SetPoint("RIGHT", self, "RIGHT", arrowDistance, 0)
+				SetClampedTextureRotation(self.FlyoutArrow, 90)
+			elseif direction == "DOWN" then
+				self.FlyoutArrow:SetPoint("BOTTOM", self, "BOTTOM", 0, -arrowDistance)
+				SetClampedTextureRotation(self.FlyoutArrow, 180)
+			else
+				self.FlyoutArrow:SetPoint("TOP", self, "TOP", 0, arrowDistance)
+				SetClampedTextureRotation(self.FlyoutArrow, 0)
+			end
+
+			-- return here, otherwise flyout is hidden
+			return
+		end
+	end
+	self.FlyoutArrow:Hide()
+end
+
+function UpdateRangeTimer()
+	rangeTimer = -1
+end
+
+-----------------------------------------------------------
+--- WoW API mapping
+--- Generic Button
+Generic.HasAction               = function(self) return nil end
+Generic.GetActionText           = function(self) return "" end
+Generic.GetTexture              = function(self) return nil end
+Generic.GetCharges              = function(self) return nil end
+Generic.GetCount                = function(self) return 0 end
+Generic.GetCooldown             = function(self) return 0, 0, 0 end
+Generic.IsAttack                = function(self) return nil end
+Generic.IsEquipped              = function(self) return nil end
+Generic.IsCurrentlyActive       = function(self) return nil end
+Generic.IsAutoRepeat            = function(self) return nil end
+Generic.IsUsable                = function(self) return nil end
+Generic.IsConsumableOrStackable = function(self) return nil end
+Generic.IsUnitInRange           = function(self, unit) return nil end
+Generic.IsInRange               = function(self)
+	local unit = self:GetAttribute("unit")
+	if unit == "player" then
+		unit = nil
+	end
+	local val = self:IsUnitInRange(unit)
+	-- map 1/0 to true false, since the return values are inconsistent between actions and spells
+	if val == 1 then val = true elseif val == 0 then val = false end
+	return val
+end
+Generic.SetTooltip              = function(self) return nil end
+Generic.GetSpellId              = function(self) return nil end
+Generic.GetLossOfControlCooldown = function(self) return 0, 0 end
+
+-----------------------------------------------------------
+--- Action Button
+Action.HasAction               = function(self) return HasAction(self._state_action) end
+Action.GetActionText           = function(self) return GetActionText(self._state_action) end
+Action.GetTexture              = function(self) return GetActionTexture(self._state_action) end
+Action.GetCharges              = function(self) return GetActionCharges(self._state_action) end
+Action.GetCount                = function(self) return GetActionCount(self._state_action) end
+Action.GetCooldown             = function(self) return GetActionCooldown(self._state_action) end
+Action.IsAttack                = function(self) return IsAttackAction(self._state_action) end
+Action.IsEquipped              = function(self) return IsEquippedAction(self._state_action) end
+Action.IsCurrentlyActive       = function(self) return IsCurrentAction(self._state_action) end
+Action.IsAutoRepeat            = function(self) return IsAutoRepeatAction(self._state_action) end
+Action.IsUsable                = function(self) return IsUsableAction(self._state_action) end
+Action.IsConsumableOrStackable = function(self) return IsConsumableAction(self._state_action) or IsStackableAction(self._state_action) or (not IsItemAction(self._state_action) and GetActionCount(self._state_action) > 0) end
+Action.IsUnitInRange           = function(self, unit) return IsActionInRange(self._state_action, unit) end
+Action.SetTooltip              = function(self) return GameTooltip:SetAction(self._state_action) end
+Action.GetSpellId              = function(self)
+	local actionType, id, subType = GetActionInfo(self._state_action)
+	if actionType == "spell" then
+		return id
+	elseif actionType == "macro" then
+		return (GetMacroSpell(id))
+	  --[[
+		local _, _, spellId = GetMacroSpell(id)
+		return spellId
+   ]]
+	end
+end
+Action.GetLossOfControlCooldown = function(self) return GetActionLossOfControlCooldown(self._state_action) end
+
+-----------------------------------------------------------
+--- Spell Button
+Spell.HasAction               = function(self) return true end
+Spell.GetActionText           = function(self) return "" end
+Spell.GetTexture              = function(self) return GetSpellTexture(self._state_action) end
+Spell.GetCharges              = function(self) return GetSpellCharges(self._state_action) end
+Spell.GetCount                = function(self) return GetSpellCount(self._state_action) end
+Spell.GetCooldown             = function(self) return GetSpellCooldown(self._state_action) end
+Spell.IsAttack                = function(self) return IsAttackSpell(FindSpellBookSlotBySpellID(self._state_action), "spell") end -- needs spell book id as of 4.0.1.13066
+Spell.IsEquipped              = function(self) return nil end
+Spell.IsCurrentlyActive       = function(self) return IsCurrentSpell(self._state_action) end
+Spell.IsAutoRepeat            = function(self) return IsAutoRepeatSpell(FindSpellBookSlotBySpellID(self._state_action), "spell") end -- needs spell book id as of 4.0.1.13066
+Spell.IsUsable                = function(self) return IsUsableSpell(self._state_action) end
+Spell.IsConsumableOrStackable = function(self) return IsConsumableSpell(self._state_action) end
+Spell.IsUnitInRange           = function(self, unit) return IsSpellInRange(FindSpellBookSlotBySpellID(self._state_action), "spell", unit) end -- needs spell book id as of 4.0.1.13066
+Spell.SetTooltip              = function(self) return GameTooltip:SetSpellByID(self._state_action) end
+Spell.GetSpellId              = function(self) return self._state_action end
+
+-----------------------------------------------------------
+--- Item Button
+local function getItemId(input)
+	return input:match("^item:(%d+)")
+end
+
+Item.HasAction               = function(self) return true end
+--Item.HasAction               = function(self) return false end
+Item.GetActionText           = function(self) return "" end
+Item.GetTexture              = function(self) return GetItemIcon(self._state_action) end
+Item.GetCharges              = function(self) return nil end
+--Item.GetCount                = function(self) return GetItemCount(self._state_action, nil, true) end
+-- Ebony changes for Ema-EE to count the stacks all chars and display in the bar!
+Item.GetCount                = function(self) return EMAApi.GetMaxItemCountFromItemID( self._state_action ) end
+Item.GetCooldown             = function(self) return GetItemCooldown(getItemId(self._state_action)) end
+Item.IsAttack                = function(self) return nil end
+Item.IsEquipped              = function(self) return IsEquippedItem(self._state_action) end
+Item.IsCurrentlyActive       = function(self) return IsCurrentItem(self._state_action) end
+Item.IsAutoRepeat            = function(self) return nil end
+Item.IsUsable                = function(self) return IsUsableItem(self._state_action) end
+-- Ebony this seems to always return false! and will not show the stacks on the bar!
+-- i always want to show even if there is just want item so return true.
+--Item.IsConsumableOrStackable = function(self) return IsConsumableItem(self._state_action) end
+Item.IsConsumableOrStackable = function(self) return true end
+Item.IsUnitInRange           = function(self, unit) return IsItemInRange(self._state_action, unit) end
+Item.SetTooltip              = function(self) return GameTooltip:SetHyperlink(self._state_action)  end
+Item.GetSpellId              = function(self) return nil end
+
+-----------------------------------------------------------
+--- Macro Button
+-- TODO: map results of GetMacroSpell/GetMacroItem to proper results
+Macro.HasAction               = function(self) return true end
+Macro.GetActionText           = function(self) return (GetMacroInfo(self._state_action)) end
+Macro.GetTexture              = function(self) return (select(2, GetMacroInfo(self._state_action))) end
+Macro.GetCharges              = function(self) return nil end
+Macro.GetCount                = function(self) return 0 end
+Macro.GetCooldown             = function(self) return 0, 0, 0 end
+Macro.IsAttack                = function(self) return nil end
+Macro.IsEquipped              = function(self) return nil end
+Macro.IsCurrentlyActive       = function(self) return nil end
+Macro.IsAutoRepeat            = function(self) return nil end
+Macro.IsUsable                = function(self) return nil end
+Macro.IsConsumableOrStackable = function(self) return nil end
+Macro.IsUnitInRange           = function(self, unit) return nil end
+Macro.SetTooltip              = function(self) return nil end
+Macro.GetSpellId              = function(self) return nil end
+
+-----------------------------------------------------------
+--- Custom Button
+Custom.HasAction               = function(self) return true end
+Custom.GetActionText           = function(self) return "" end
+Custom.GetTexture              = function(self) return self._state_action.texture end
+Custom.GetCharges              = function(self) return nil end
+Custom.GetCount                = function(self) return 0 end
+Custom.GetCooldown             = function(self) return 0, 0, 0 end
+Custom.IsAttack                = function(self) return nil end
+Custom.IsEquipped              = function(self) return nil end
+Custom.IsCurrentlyActive       = function(self) return nil end
+Custom.IsAutoRepeat            = function(self) return nil end
+Custom.IsUsable                = function(self) return true end
+Custom.IsConsumableOrStackable = function(self) return nil end
+Custom.IsUnitInRange           = function(self, unit) return nil end
+Custom.SetTooltip              = function(self) return GameTooltip:SetText(self._state_action.tooltip) end
+Custom.GetSpellId              = function(self) return nil end
+Custom.RunCustom               = function(self, unit, button) return self._state_action.func(self, unit, button) end
+
+-----------------------------------------------------------
+--- Update old Buttons
+if oldversion and next(lib.buttonRegistry) then
+	InitializeEventHandler()
+	for button in next, lib.buttonRegistry do
+		-- this refreshes the metatable on the button
+		Generic.UpdateAction(button, true)
+		SetupSecureSnippets(button)
+		if oldversion < 12 then
+			WrapOnClick(button)
+		end
+		if oldversion < 23 then
+			if button.overlay then
+				button.overlay:Hide()
+				ActionButton_HideOverlayGlow(button)
+				button.overlay = nil
+				UpdateOverlayGlow(button)
+			end
+		end
+	end
+end
diff --git a/EMA/Libs/LICENSE.txt b/EMA/Libs/LICENSE.txt
new file mode 100644
index 0000000..866fc34
--- /dev/null
+++ b/EMA/Libs/LICENSE.txt
@@ -0,0 +1,29 @@
+Copyright (c) 2007, Ace3 Development Team
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Redistribution of a stand alone version is strictly prohibited without
+      prior written authorization from the Lead of the Ace3 Development Team.
+    * Neither the name of the Ace3 Development Team nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/EMA/Libs/LibAuras/CHANGES.txt b/EMA/Libs/LibAuras/CHANGES.txt
new file mode 100644
index 0000000..5095c93
--- /dev/null
+++ b/EMA/Libs/LibAuras/CHANGES.txt
@@ -0,0 +1,6 @@
+commit f0d8147915161ab9973ed4f38b3015c220326712
+Author: John Camp <jjcamp@gmail.com>
+Date:   Thu Apr 26 21:45:16 2018 -0500
+
+    Initial commit
+
diff --git a/EMA/Libs/LibAuras/LibAuras.lua b/EMA/Libs/LibAuras/LibAuras.lua
new file mode 100644
index 0000000..384a25f
--- /dev/null
+++ b/EMA/Libs/LibAuras/LibAuras.lua
@@ -0,0 +1,195 @@
+local lib = LibStub:NewLibrary("LibAuras", 1)
+
+if not lib then return end
+
+if not lib.frame then
+    lib.frame = CreateFrame("Frame")
+end
+
+lib.AURAS = lib.AURAS or {}
+
+local FILTERS, getGuidAndCheckAuras, getBuff, getDebuff, getAura, nameToSpellId, getAurasForUnit, addBuff, addDebuff, addAura
+
+
+lib.frame:RegisterEvent("UNIT_AURA")
+lib.frame:SetScript("OnEvent", function(self, event)
+    if event == "UNIT_AURA" then lib.AURAS = {} end
+end)
+
+function lib:UnitBuff(unitId, spellIdOrName, filter)
+    local guid = getGuidAndCheckAuras(unitId)
+    if not guid then return end
+
+    return getBuff(guid, spellIdOrName, filter or "")
+end
+
+function lib:UnitDebuff(unitId, spellIdOrName, filter)
+    local guid = getGuidAndCheckAuras(unitId)
+    if not guid then return end
+
+    return getDebuff(guid, spellIdOrName, filter or "")
+end
+
+function lib:UnitAura(unitId, spellIdOrName, filter)
+    local guid = getGuidAndCheckAuras(unitId)
+    if not guid then return end
+
+    local result = getBuff(guid, spellIdOrName, filter or "")
+    if not result then
+        return getDebuff(guid, spellIdOrName, filter or "")
+    end
+    return result
+end
+
+local FILTERS = {
+    HELPFUL = false,
+    HARMFUL = false,
+    PLAYER = false,
+    RAID = false,
+    CANCELABLE = false,
+    NOTCANCELABLE = false
+}
+
+getGuidAndCheckAuras = function(unitId)
+    local guid = UnitGUID(unitId)
+    if not guid then return nil end
+    if not lib.AURAS[guid] then
+        getAurasForUnit(unitId, guid)
+    end
+    return guid
+end
+
+getBuff = function(guid, spellIdOrName, filter)
+    return getAura(guid, spellIdOrName, "HELPFUL " .. filter)
+end
+
+getDebuff = function(guid, spellIdOrName, filter)
+    return getAura(guid, spellIdOrName, "HARMFUL " .. filter)
+end
+
+getAura = function(guid, spellIdOrName, filter)
+    local filters = {}
+    for k in pairs(FILTERS) do filters[k] = FILTERS[k] end
+    for s in filter:gmatch("%a+") do
+        if filters[s:upper()] ~= nil then
+            filters[s:upper()] = true
+        end
+    end
+
+    local auraType = "BUFF"
+    if not filters["HELPFUL"] and not filters["HARMFUL"] then
+        error("filter must contain either \"HELPFUL\" or \"HARMFUL\"")
+    elseif filters["HELPFUL"] and filters["HARMFUL"] then
+        return
+    elseif filters["HARMFUL"] then
+        auraType = "DEBUFF"
+    end
+
+    local spellId = nameToSpellId(spellIdOrName, guid, auraType)
+    local aura = lib.AURAS[guid][auraType][spellId]
+    if not aura then return
+    elseif filters["PLAYER"] and aura.unitCaster ~= "player" then return
+    end
+    return aura.name, aura.icon, aura.count, aura.debuffType, aura.duration, aura.expirationTime, aura.unitCaster, aura.canStealOrPurge, aura.nameplateShowPersonal, spellId, aura.canApplyAura, aura.isBossDebuff, aura.isCastByPlayer, aura.nameplateShowAll, aura.timeMod, aura.value1, aura.value2, aura.value3
+end
+
+nameToSpellId = function(spellIdOrName, guid, auraType)
+    if type(spellIdOrName) == "number" then
+        return spellIdOrName
+    elseif type(spellIdOrName) == "string" then
+        local spellId = lib.AURAS[guid][auraType].NAMES[spellIdOrName]
+        if not spellId then return nil end
+        return spellId
+    end
+    return nil
+end
+
+getAurasForUnit = function(unitId, guid)
+    lib.AURAS[guid] = {}
+    lib.AURAS[guid]["BUFF"] = {}
+    lib.AURAS[guid]["BUFF"].NAMES = {}
+    lib.AURAS[guid]["DEBUFF"] = {}
+    lib.AURAS[guid]["DEBUFF"].NAMES = {}
+    for i = 1, 40 do
+        if not addBuff(unitId, guid, i) then break end
+    end
+    for i = 1, 40 do
+        if not addDebuff(unitId, guid, i) then break end
+    end
+end
+
+addBuff = function(unitId, guid, index)
+    return addAura(unitId, guid, index, "BUFF")
+end
+
+addDebuff = function(unitId, guid, index)
+    return addAura(unitId, guid, index, "DEBUFF")
+end
+
+addAura = function(unitId, guid, index, type)
+    local filter = nil
+    if type == "BUFF" then filter = "HELPFUL" end
+    if type == "DEBUFF" then filter = "HARMFUL" end
+    if not filter then return end
+    local name, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll, timeMod, value1, value2, value3 = UnitAura(unitId, index, filter)
+    if not name then
+        return false
+    end
+    lib.AURAS[guid][type][spellId] = {}
+    lib.AURAS[guid][type][spellId].name = name
+    lib.AURAS[guid][type][spellId].icon = icon
+    lib.AURAS[guid][type][spellId].count = count
+    lib.AURAS[guid][type][spellId].debuffType = debuffType
+    lib.AURAS[guid][type][spellId].duration = duration
+    lib.AURAS[guid][type][spellId].expirationTime = expirationTime
+    lib.AURAS[guid][type][spellId].unitCaster = unitCaster
+    lib.AURAS[guid][type][spellId].canStealOrPurge = canStealOrPurge
+    lib.AURAS[guid][type][spellId].nameplateShowPersonal = nameplateShowPersonal
+    lib.AURAS[guid][type][spellId].canApplyAura = canApplyAura
+    lib.AURAS[guid][type][spellId].isBossDebuff = isBossDebuff
+    lib.AURAS[guid][type][spellId].isCastByPlayer = isCastByPlayer
+    lib.AURAS[guid][type][spellId].nameplateShowAll = nameplateShowAll
+    lib.AURAS[guid][type][spellId].timeMod = timeMod
+    lib.AURAS[guid][type][spellId].value1 = value1
+    lib.AURAS[guid][type][spellId].value2 = value2
+    lib.AURAS[guid][type][spellId].value3 = value3
+    if not lib.AURAS[guid][type].NAMES[name] then
+        lib.AURAS[guid][type].NAMES[name] = spellId
+    end
+    return true
+end
+
+-- DEBUG stuff
+--[[
+function libAurasTest()
+    print("Starting Tests")
+    LA = LibStub:GetLibrary("LibAuras")
+    print(":UnitAura(\"player\", 186406) (Sign of the Critter)")
+    print(LA:UnitAura("player", 186406))
+    print(":UnitBuff(\"pet\", \"Dire Frenzy\"")
+    print(LA:UnitBuff("pet", "Dire Frenzy"))
+    print(":UnitDeuff(\"target\", \"Growl\"")
+    print(LA:UnitDebuff("target", "Growl"))
+    LA:printAurasTable()
+end
+
+function lib:printAurasTable()
+    print(".AURAS")
+    for k in pairs(self.AURAS) do
+        print(k)
+        lib:printTable(self.AURAS[k], "  ")
+    end
+end
+
+function lib:printTable(table, prefix)
+    if not table then return end
+    for k in pairs(table) do
+        if type(table[k]) ~= "table" then
+            print(prefix .. k .. " = " .. tostring(table[k]))
+        else
+            print(prefix .. tostring(k))
+            lib:printTable(table[k], prefix .. "  ")
+        end
+    end
+end
+]]
diff --git a/EMA/Libs/LibAuras/LibAuras.toc b/EMA/Libs/LibAuras/LibAuras.toc
new file mode 100644
index 0000000..c457a4e
--- /dev/null
+++ b/EMA/Libs/LibAuras/LibAuras.toc
@@ -0,0 +1,9 @@
+## Interface: 80000
+## Title: LibAuras
+## Notes: Buff/Debuff Library
+## Author: Kibster
+#@no-lib-strip@
+Libs\libs.xml
+#@end-no-lib-strip@
+
+LibAuras.lua
diff --git a/EMA/Libs/LibAuras/Libs/LibStub/LibStub.lua b/EMA/Libs/LibAuras/Libs/LibStub/LibStub.lua
new file mode 100644
index 0000000..7e9b5cd
--- /dev/null
+++ b/EMA/Libs/LibAuras/Libs/LibStub/LibStub.lua
@@ -0,0 +1,51 @@
+-- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $
+-- LibStub is a simple versioning stub meant for use in Libraries.  http://www.wowace.com/addons/libstub/ for more info
+-- LibStub is hereby placed in the Public Domain
+-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
+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]
+
+-- Check to see is this version of the stub is obsolete
+if not LibStub or LibStub.minor < LIBSTUB_MINOR then
+	LibStub = LibStub or {libs = {}, minors = {} }
+	_G[LIBSTUB_MAJOR] = LibStub
+	LibStub.minor = LIBSTUB_MINOR
+
+	-- LibStub:NewLibrary(major, minor)
+	-- major (string) - the major version of the library
+	-- minor (string or number ) - the minor version of the library
+	--
+	-- returns nil if a newer or same version of the lib is already present
+	-- returns empty library object or old library object if upgrade is needed
+	function LibStub:NewLibrary(major, minor)
+		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
+		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
+
+		local oldminor = self.minors[major]
+		if oldminor and oldminor >= minor then return nil end
+		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
+		return self.libs[major], oldminor
+	end
+
+	-- LibStub:GetLibrary(major, [silent])
+	-- major (string) - the major version of the library
+	-- silent (boolean) - if true, library is optional, silently return nil if its not found
+	--
+	-- throws an error if the library can not be found (except silent is set)
+	-- returns the library object if found
+	function LibStub:GetLibrary(major, silent)
+		if not self.libs[major] and not silent then
+			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
+		end
+		return self.libs[major], self.minors[major]
+	end
+
+	-- LibStub:IterateLibraries()
+	--
+	-- Returns an iterator for the currently registered libraries
+	function LibStub:IterateLibraries()
+		return pairs(self.libs)
+	end
+
+	setmetatable(LibStub, { __call = LibStub.GetLibrary })
+end
diff --git a/EMA/Libs/LibAuras/Libs/LibStub/LibStub.toc b/EMA/Libs/LibAuras/Libs/LibStub/LibStub.toc
new file mode 100644
index 0000000..0b7ade3
--- /dev/null
+++ b/EMA/Libs/LibAuras/Libs/LibStub/LibStub.toc
@@ -0,0 +1,9 @@
+## Interface: 70200
+## Title: Lib: LibStub
+## Notes: Universal Library Stub
+## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
+## X-Website: http://www.wowace.com/addons/libstub/
+## X-Category: Library
+## X-License: Public Domain
+
+LibStub.lua
diff --git a/EMA/Libs/LibAuras/Libs/LibStub/tests/test.lua b/EMA/Libs/LibAuras/Libs/LibStub/tests/test.lua
new file mode 100644
index 0000000..338bcf4
--- /dev/null
+++ b/EMA/Libs/LibAuras/Libs/LibStub/tests/test.lua
@@ -0,0 +1,41 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+local lib, oldMinor = LibStub:NewLibrary("Pants", 1) -- make a new thingy
+assert(lib) -- should return the library table
+assert(not oldMinor) -- should not return the old minor, since it didn't exist
+
+-- the following is to create data and then be able to check if the same data exists after the fact
+function lib:MyMethod()
+end
+local MyMethod = lib.MyMethod
+lib.MyTable = {}
+local MyTable = lib.MyTable
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 1) -- try to register a library with the same version, should silently fail
+assert(not newLib) -- should not return since out of date
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 0) -- try to register a library with a previous, should silently fail
+assert(not newLib) -- should not return since out of date
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 2) -- register a new version
+assert(newLib) -- library table
+assert(rawequal(newLib, lib)) -- should be the same reference as the previous
+assert(newOldMinor == 1) -- should return the minor version of the previous version
+
+assert(rawequal(lib.MyMethod, MyMethod)) -- verify that values were saved
+assert(rawequal(lib.MyTable, MyTable)) -- verify that values were saved
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 3 Blah") -- register a new version with a string minor version (instead of a number)
+assert(newLib) -- library table
+assert(newOldMinor == 2) -- previous version was 2
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 4 and please ignore 15 Blah") -- register a new version with a string minor version (instead of a number)
+assert(newLib)
+assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string)
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
+assert(newLib)
+assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
diff --git a/EMA/Libs/LibAuras/Libs/LibStub/tests/test2.lua b/EMA/Libs/LibAuras/Libs/LibStub/tests/test2.lua
new file mode 100644
index 0000000..eae7172
--- /dev/null
+++ b/EMA/Libs/LibAuras/Libs/LibStub/tests/test2.lua
@@ -0,0 +1,27 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+for major, library in LibStub:IterateLibraries() do
+	-- check that MyLib doesn't exist yet, by iterating through all the libraries
+	assert(major ~= "MyLib")
+end
+
+assert(not LibStub:GetLibrary("MyLib", true)) -- check that MyLib doesn't exist yet by direct checking
+assert(not pcall(LibStub.GetLibrary, LibStub, "MyLib")) -- don't silently fail, thus it should raise an error.
+local lib = LibStub:NewLibrary("MyLib", 1) -- create the lib
+assert(lib) -- check it exists
+assert(rawequal(LibStub:GetLibrary("MyLib"), lib)) -- verify that :GetLibrary("MyLib") properly equals the lib reference
+
+assert(LibStub:NewLibrary("MyLib", 2))	-- create a new version
+
+local count=0
+for major, library in LibStub:IterateLibraries() do
+	-- check that MyLib exists somewhere in the libraries, by iterating through all the libraries
+	if major == "MyLib" then -- we found it!
+		count = count +1
+		assert(rawequal(library, lib)) -- verify that the references are equal
+	end
+end
+assert(count == 1) -- verify that we actually found it, and only once
diff --git a/EMA/Libs/LibAuras/Libs/LibStub/tests/test3.lua b/EMA/Libs/LibAuras/Libs/LibStub/tests/test3.lua
new file mode 100644
index 0000000..21bda2b
--- /dev/null
+++ b/EMA/Libs/LibAuras/Libs/LibStub/tests/test3.lua
@@ -0,0 +1,14 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+local proxy = newproxy() -- non-string
+
+assert(not pcall(LibStub.NewLibrary, LibStub, proxy, 1)) -- should error, proxy is not a string, it's userdata
+local success, ret = pcall(LibStub.GetLibrary, proxy, true)
+assert(not success or not ret) -- either error because proxy is not a string or because it's not actually registered.
+
+assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
+
+assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
diff --git a/EMA/Libs/LibAuras/Libs/LibStub/tests/test4.lua b/EMA/Libs/LibAuras/Libs/LibStub/tests/test4.lua
new file mode 100644
index 0000000..4735246
--- /dev/null
+++ b/EMA/Libs/LibAuras/Libs/LibStub/tests/test4.lua
@@ -0,0 +1,41 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+
+-- Pretend like loaded libstub is old and doesn't have :IterateLibraries
+assert(LibStub.minor)
+LibStub.minor = LibStub.minor - 0.0001
+LibStub.IterateLibraries = nil
+
+loadfile("../LibStub.lua")()
+
+assert(type(LibStub.IterateLibraries)=="function")
+
+
+-- Now pretend that we're the same version -- :IterateLibraries should NOT be re-created
+LibStub.IterateLibraries = 123
+
+loadfile("../LibStub.lua")()
+
+assert(LibStub.IterateLibraries == 123)
+
+
+-- Now pretend that a newer version is loaded -- :IterateLibraries should NOT be re-created
+LibStub.minor = LibStub.minor + 0.0001
+
+loadfile("../LibStub.lua")()
+
+assert(LibStub.IterateLibraries == 123)
+
+
+-- Again with a huge number
+LibStub.minor = LibStub.minor + 1234567890
+
+loadfile("../LibStub.lua")()
+
+assert(LibStub.IterateLibraries == 123)
+
+
+print("OK")
diff --git a/EMA/Libs/LibAuras/Libs/libs.xml b/EMA/Libs/LibAuras/Libs/libs.xml
new file mode 100644
index 0000000..2d8db5b
--- /dev/null
+++ b/EMA/Libs/LibAuras/Libs/libs.xml
@@ -0,0 +1,3 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
+	<Script file="LibStub\LibStub.lua"/>
+</Ui>
diff --git a/EMA/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua b/EMA/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua
new file mode 100644
index 0000000..55aa35f
--- /dev/null
+++ b/EMA/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua
@@ -0,0 +1,599 @@
+local MAJOR,MINOR = "LibBagUtils-1.0", tonumber(("$Revision: 35 $"):match("%d+"))
+local lib = LibStub:NewLibrary(MAJOR,MINOR)
+
+--
+-- LibBagUtils
+--
+-- Several useful bag related APIs that you wish were built into the WoW API:
+--   :PutItem()
+--   :Iterate()
+--   :LinkIsItem() - which amongst other things handles the 3.2 wotlk randomstat item madness (changing while in AH/mail/gbank)
+--   :GetNumFreeSlots()
+--   .. and more!
+--
+-- Pains have been taken to make sure to use as much FrameXML data and constants as possible,
+-- which should let the library (and dependant addons) keep functioning if Blizzard desides
+-- to add more bags, or reorder them.
+--
+-- Read the well-commented "API" function headers for each function below for usage and descriptions.
+--
+
+
+
+if not lib then return end -- no upgrade needed
+
+local strmatch=string.match
+local gsub=string.gsub
+local floor=math.floor
+local tconcat = table.concat
+local band=bit.band
+local pairs,select,type,next,tonumber,tostring=pairs,select,type,next,tonumber,tostring
+local GetTime=GetTime
+local GetContainerNumSlots, GetContainerNumFreeSlots = GetContainerNumSlots, GetContainerNumFreeSlots
+local GetContainerItemLink,GetContainerItemInfo = GetContainerItemLink,GetContainerItemInfo
+local GetItemInfo, GetItemFamily = GetItemInfo, GetItemFamily
+-- GLOBALS: error, geterrorhandler, PickupContainerItem
+-- GLOBALS: CursorHasItem, ClearCursor, GetCursorInfo
+-- GLOBALS: DEFAULT_CHAT_FRAME, SELECTED_CHAT_FRAME
+
+local BANK_CONTAINER = BANK_CONTAINER
+-- local KEYRING_CONTAINER = KEYRING_CONTAINER
+local NUM_BANKBAGSLOTS = NUM_BANKBAGSLOTS
+local NUM_BAG_SLOTS = NUM_BAG_SLOTS
+local REAGENTBANK_CONTAINER = REAGENTBANK_CONTAINER
+
+-- no longer used: lib.frame = lib.frame or CreateFrame("frame", string.gsub(MAJOR,"[^%w]", "_").."_Frame")
+if lib.frame then
+	lib.frame:Hide()
+	lib.frame:UnregisterAllEvents()
+end
+
+-----------------------------------------------------------------------
+-- General-purpose utilities:
+
+local t = {}
+local function print(...)
+   local msg
+   if select("#",...)>1 then
+      for k=1,select("#",...) do
+         t[k]=tostring(select(k,...))
+      end
+      msg = tconcat(t, " ", 1, select("#",...))
+   else
+      msg = ...
+   end
+	msg = gsub(msg, "\124", "\\124");
+	(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(MAJOR..": "..msg)
+end
+
+local function escapePatterns(str)
+	return ( gsub(str, "([-+.?*%%%[%]%(%)])", "%%%1") )
+end
+
+
+
+-----------------------------------------------------------------------
+-- makeLinkComparator()
+-- Take an itemnumber, name, itemstring, or full link, and return a (funcref,arg2,arg3) tuple that can be used to test against several itemlinks
+
+local floor=math.floor
+local function compareFuzzySuffix(link, pattern, uniq16)
+	local uniq = strmatch(link, pattern)
+	if not uniq then	-- first 8 params didn't match
+		return false
+	end
+	return floor(tonumber(uniq)/65536)==uniq16
+end
+
+local function makeLinkComparator(lookingfor)
+	if type(lookingfor)=="number" then
+		-- "item:-12345" -> "item:%-12345[:|]"
+		return strmatch, "|Hitem:"..escapePatterns(lookingfor).."[:|]",nil
+
+	elseif type(lookingfor)=="string" then
+
+		if strmatch(lookingfor, "^item:") or strmatch(lookingfor, "|H") then
+			-- (convert to itemstring) and ensure there's no level info in it (9th param)
+			local str = strmatch(lookingfor, "(item:.-:.-:.-:.-:.-:.-:.-:.-)[:|]")
+			if not str then
+				str = strmatch(lookingfor, "(item:[-0-9:]+)")
+			else
+				-- hokay, we have an itemstring. now we need to check for wobbly suffix factors thanks to 3.2 madness
+				-- see http://www.wowwiki.com/ItemString#3.2_wotlk_randomstat_items_changing_their_suffix_factors
+				local firsteight,uniq = strmatch(str, "(item:.-:.-:.-:.-:.-:.-:%-.-:)([-0-9]+)")
+
+				if uniq then
+					-- suffix was negative, so suffix factors can wobble (really only with wotlk items, not BC ones, but meh)
+					return compareFuzzySuffix,
+						"|H"..escapePatterns(firsteight).."([-0-9]+)[:|]",
+						floor(tonumber(uniq)/65536)
+				else
+					-- unwobbly item, we're done, fall through
+				end
+			end
+			if not str then
+				error(MAJOR..": MakeLinkComparator(): '"..tostring(lookingfor).."' does not appear to be a valid itemstring / itemlink", 3)
+			end
+			return strmatch, "|H" .. escapePatterns(str) .. "[:|]",nil
+
+		else	-- put "|h[" and "]|h" around a name
+			return strmatch, "|h%["..escapePatterns(lookingfor).."%]|h",nil
+		end
+	end
+
+	error(MAJOR..": MakeLinkComparator(): Expected number or string", 3)
+end
+
+
+
+
+
+
+-----------------------------------------------------------------------
+-- Internal slot locking utilities - unfortunately slots where we just dropped an item arent considered locked by the API until the server processes it and returns a bag update event, so we consider them locked for 2 seconds ourselves
+
+lib.slotLocks = {}
+
+local GetTime = GetTime
+
+local function lockSlot(bag,slot)
+	local slots = lib.slotLocks[bag] or {}
+	if not lib.slotLocks[bag] then
+		lib.slotLocks[bag] = slots
+	end
+	slots[slot] = GetTime()
+end
+
+local function isLocked(bag,slot)
+	local slots = lib.slotLocks[bag]
+	if not slots then return false end
+	return GetTime() - (slots[slot] or 0) < 2
+end
+
+
+
+-----------------------------------------------------------------------
+-- Own family/freeslots handling
+-- Pre 4.2: This was to handle the goddamn keyring that doesn't behave like anything else,
+-- but i'm keeping these functions in in case blizzard adds something new that behaves badly (tabard rack anyone?)
+
+local function GetContainerFamily(bag)
+--[[ pre 4.2
+	if bag==KEYRING_CONTAINER then
+		return 256
+	end
+]]
+	local free,fam = GetContainerNumFreeSlots(bag)
+	return fam
+end
+
+function lib:GetContainerFamily(bag)
+	return GetContainerFamily(bag)
+end
+
+
+local function myGetContainerNumFreeSlots(bag)
+--[[ pre 4.2
+	if bag==KEYRING_CONTAINER then
+		local free=0
+		for slot=1,GetContainerNumSlots(bag) do
+			if not GetContainerItemLink(bag,slot) then
+				free=free+1
+			end
+		end
+		return free,256
+	end
+]]
+	return GetContainerNumFreeSlots(bag)
+end
+
+function lib:GetContainerNumFreeSlots(bag)
+	return myGetContainerNumFreeSlots(bag)
+end
+
+
+
+
+
+-----------------------------------------------------------------------
+-- API :MakeLinkComparator("itemstring" or "itemLink" or "itemName" or itemId)
+--
+-- Returns a comparator function and two arguments, that can be used to
+-- rapidly compare several itemlinks to a set search pattern.
+--
+-- This comparator will
+--   1) Ignore the 9th "level" parameter introduced in 3.0
+--   2) Correctly match items with changing stats in inventory vs AH/Mail/GBank
+--      see http://www.wowwiki.com/ItemString#3.2_wotlk_randomstat_items_changing_their_suffix_factors--
+--   3) Pick the smartest way to compare available
+--
+-- local comparator,arg1,arg2 = LBU:MakeLinkComparator(myItemString)
+-- for _,itemLink in pairs(myItems) do
+--   if comparator(itemLink, arg1,arg2) then
+--     print(itemLink, "matches", myItemString)
+--
+
+function lib:MakeLinkComparator(lookingfor)
+	return makeLinkComparator(lookingfor)
+end
+
+
+
+-----------------------------------------------------------------------
+-- API :IterateBags("which", itemFamily)
+--
+-- which       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
+-- itemFamily  - number: bitmasked itemFamily; will accept combinations
+--                       0: will only iterate regular bags
+--               nil: will iterate all bags (including possible future special bags!)
+--
+-- Returns an iterator that can be used in a for loop, e.g.:
+--   for bag in LBU:IterateBags("BAGS") do  -- loop all carried bags (including backpack & possible future special bags)
+
+local bags = {
+	BAGS = {},
+	BANK = {},
+	BAGSBANK = {},
+	REAGENTBANK = {},
+}
+
+-- Carried bags
+for i=1,NUM_BAG_SLOTS do
+	bags.BAGS[i]=i
+end
+bags.BAGS[BACKPACK_CONTAINER]=BACKPACK_CONTAINER
+-- bags.BAGS[KEYRING_CONTAINER]=KEYRING_CONTAINER
+
+-- Bank bags
+for i=NUM_BAG_SLOTS+1,NUM_BAG_SLOTS+NUM_BANKBAGSLOTS do
+	bags.BANK[i]=i
+end
+bags.BANK[BANK_CONTAINER]=BANK_CONTAINER
+
+-- Both
+for k,v in pairs(bags.BAGS) do
+	bags.BAGSBANK[k]=v
+end
+for k,v in pairs(bags.BANK) do
+	bags.BAGSBANK[k]=v
+end
+
+-- Reagent Bank
+bags.REAGENTBANK[REAGENTBANK_CONTAINER] = REAGENTBANK_CONTAINER
+
+local function iterbags(tab, cur)
+	cur = next(tab, cur)
+	while cur do
+		if GetContainerFamily(cur) then
+			return cur
+		end
+		cur = next(tab, cur)
+	end
+end
+
+local function iterbagsfam0(tab, cur)
+	cur = next(tab, cur)
+	while cur do
+		local free,fam = GetContainerNumFreeSlots(cur)
+		if fam==0 then
+			return cur
+		end
+		cur = next(tab, cur)
+	end
+end
+
+function lib:IterateBags(which, itemFamily)
+
+	local baglist=bags[which]
+	if not baglist then
+		error([[Usage: LibBagUtils:IterateBags("which"[, itemFamily])]], 2)
+	end
+
+	if which == "REAGENTBANK" and not IsReagentBankUnlocked() then return function() end, baglist end
+
+	if not itemFamily then
+		return iterbags, baglist
+	elseif itemFamily==0 then
+		return iterbagsfam0, baglist
+	else
+		return function(tab, cur)
+			cur = next(tab, cur)
+			while cur do
+				local fam = GetContainerFamily(cur)
+				if fam and band(itemFamily,fam)~=0 then
+					return cur
+				end
+				cur = next(tab, cur)
+			end
+		end, baglist
+	end
+end
+
+
+-----------------------------------------------------------------------
+-- API: CountSlots(which, itemFamily)
+--
+-- which       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
+-- itemFamily  - bitmasked itemFamily; see :IterateBags
+--
+-- Returns: numFreeSlots, numTotalSlots
+--          BANK is considered to have 0 slots if bank window is not open
+
+function lib:CountSlots(which, itemFamily)
+	local baglist=bags[which]
+	if not baglist then
+		error([[Usage: LibBagUtils:IterateBags("which"[, itemFamily])]], 2)
+	end
+
+	local free,tot=0,0
+	if which == "REAGENTBANK" and not IsReagentBankUnlocked() then return free,tot end
+
+	if not itemFamily then
+		for bag in pairs(baglist) do
+			free = free + myGetContainerNumFreeSlots(bag)
+			tot = tot + GetContainerNumSlots(bag)
+		end
+	elseif itemFamily==0 then
+		for bag in pairs(baglist) do
+			local f,bagFamily = GetContainerNumFreeSlots(bag)
+			if bagFamily==0 then
+				free = free + f
+				tot = tot + GetContainerNumSlots(bag)
+			end
+		end
+	else
+		for bag in pairs(baglist) do
+			local f,bagFamily = myGetContainerNumFreeSlots(bag)
+			if bagFamily and band(itemFamily,bagFamily)~=0 then
+				free = free + f
+				tot = tot + GetContainerNumSlots(bag)
+			end
+		end
+	end
+	return free,tot
+end
+
+
+-----------------------------------------------------------------------
+-- API :IsBank(bag)
+--
+-- bag        - number: bag number
+--
+-- Returns true if the given bag is a bank bag
+
+function lib:IsBank(bag, incReagentBank)
+	return bag==BANK_CONTAINER or
+		(bag>=NUM_BAG_SLOTS+1 and bag<=NUM_BAG_SLOTS+NUM_BANKBAGSLOTS) or (incReagentBank and lib:IsReagentBank(bag))
+end
+
+-----------------------------------------------------------------------
+-- API :IsReagentBank(bag)
+--
+-- bag        - number: bag number
+--
+-- Returns true if the given bag is the reagent bank "bag"
+
+function lib:IsReagentBank(bag)
+	return IsReagentBankUnlocked() and (bag==REAGENTBANK_CONTAINER and true or nil) or nil
+end
+
+-----------------------------------------------------------------------
+-- API :Iterate("which"[, "lookingfor"])
+--
+-- which       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
+-- lookingfor  - OPTIONAL: itemLink, itemName, itemString or itemId(number)
+--
+-- Returns an iterator that can be used in a for loop, e.g.:
+--   for bag,slot,link in LBU:Iterate("BAGS") do   -- loop all slots in carried bags (including backpack & keyring)
+--   for bag,slot,link in LBU:Iterate("BAGSBANK", 29434) do  -- find all badges of justice
+
+function lib:Iterate(which, lookingfor)
+	if which == "REAGENTBANK" and not IsReagentBankUnlocked() then return function() end end
+
+	local baglist=bags[which]
+	if not baglist then
+		error([[Usage: LibBagUtils:Iterate(which [, item])]], 2)
+	end
+
+	local bag,slot,curbagsize=nil,0,0
+	local function iterator()
+		while slot>=curbagsize do
+			bag = iterbags(baglist, bag)
+			if not bag then return nil end
+			curbagsize=GetContainerNumSlots(bag) or 0
+			slot=0
+		end
+
+		slot=slot+1
+		return bag,slot,GetContainerItemLink(bag,slot)
+	end
+
+	if lookingfor==nil then
+		return iterator
+	else
+		local comparator,arg1,arg2 = makeLinkComparator(lookingfor)
+		return function()
+			for bag,slot,link in iterator do
+				if link and comparator(link, arg1,arg2) then
+					return bag,slot,link
+				end
+			end
+		end
+	end
+
+end
+
+
+-----------------------------------------------------------------------
+-- API :Find("where", "lookingfor", findLocked])
+--
+-- where       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
+-- lookingfor  - itemLink, itemName, itemString or itemId(number)
+-- findLocked   - OPTIONAL: if true, will also return locked slots
+--
+-- Returns:  bag,slot,link    or nil on failure
+
+function lib:Find(where,lookingfor,findLocked)
+	if where == "REAGENTBANK" and not IsReagentBankUnlocked() then return nil end
+
+	for bag,slot,link in lib:Iterate(where,lookingfor) do
+		local _, itemCount, locked, _, _ = GetContainerItemInfo(bag,slot)
+		if findLocked or not locked then
+			return bag,slot,link
+		end
+	end
+end
+
+
+-----------------------------------------------------------------------
+-- API :FindSmallestStack("where", "lookingfor"[, findLocked])
+--
+-- where       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
+-- lookingfor  - itemLink, itemName, itemString or itemId(number)
+-- findLocked   - OPTIONAL: if true, will also return locked slots
+--
+-- Returns:  bag,slot,size    or nil on failure
+
+function lib:FindSmallestStack(where,lookingfor,findLocked)
+	if where == "REAGENTBANK" and not IsReagentBankUnlocked() then return nil end
+
+	local smallest=9e9
+	local smbag,smslot
+	for bag,slot in lib:Iterate(where,lookingfor) do
+		local _, itemCount, locked, _, _ = GetContainerItemInfo(bag,slot)
+		if itemCount and itemCount<smallest and (findLocked or not locked) then
+			smbag=bag
+			smslot=slot
+			smallest=itemCount
+		end
+	end
+	if smbag then
+		return smbag,smslot,smallest
+	end
+end
+
+
+-----------------------------------------------------------------------
+-- API :PutItem("where"[, dontClearOnFail[, count]])
+--
+-- Put the item currently held by the cursor in the most suitable bag
+-- (considering specialty bags, already-existing stacks..)
+--
+-- where           - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
+-- count           - OPTIONAL: number: if given, PutItem() will attempt to stack the item on top of another suitable stack. This is not possible without knowing the count.
+-- dontClearOnFail - OPTIONAL: boolean: If the put operation fails due to no room, do NOT clear the cursor. (Note that some other wow client errors WILL clear the cursor)
+--
+-- Returns:  bag,slot    or false for out-of-room
+--           0,0 will be returned if the function is called without an item in the cursor
+--           nil         when which is REAGENTBANK and the ReagentBank has not been unlocked
+
+local function putinbag(destbag)
+	if where == "REAGENTBANK" and not IsReagentBankUnlocked() then return nil end
+
+	for slot=1,GetContainerNumSlots(destbag) do
+		if (not GetContainerItemInfo(destbag,slot)) and (not isLocked(destbag,slot)) then	-- empty!
+			PickupContainerItem(destbag,slot)
+			if not CursorHasItem() then -- success!
+				lockSlot(destbag,slot)
+				return slot
+			end
+			-- If we get here, something is probably severely broken. But we keep looping hoping for the best.
+		end
+	end
+end
+
+function lib:PutItem(where, count, dontClearOnFail)
+	if where == "REAGENTBANK" and not IsReagentBankUnlocked() then return nil end
+
+	local cursorType,itemId,itemLink = GetCursorInfo()
+	if cursorType~="item" then
+		geterrorhandler()(MAJOR..": PutItem(): There was no item in the cursor.")
+		return 0,0	-- we consider nothing-at-all successfully disposed of (0,0 contains nil)
+	end
+
+	local baglist=bags[where]
+	if not baglist then
+		error("Usage: LibBagUtils:PutItem(where[, count[, dontClearOnFail]])", 2)
+	end
+
+	-- FIRST: if we have a known count, and the item is stackable, we try putting it on top of something else (look for the BIGGEST stack to put it on top of for max packing!)
+	if count and count>=1 then
+		local _, _, _, _, _, _, _, itemStackCount = GetItemInfo(itemLink)
+		if itemStackCount>1 and count<itemStackCount then
+			local bestsize,bestbag,bestslot=0
+			for bag,slot in lib:Iterate(where, itemId) do -- Only look for itemId, not the full string; we assume everything of the same itemId is stackable. Looking at the full itemstring is futile since everything has unique IDs these days.
+				local _, ciCount, ciLocked, _, _ = GetContainerItemInfo(bag,slot)
+				if ciLocked then
+					-- nope!
+				elseif isLocked(bag,slot) then
+					-- nope!
+				elseif ciCount+count<=itemStackCount and ciCount>bestsize then
+					bestsize=ciCount
+					bestbag=bag
+					bestslot=slot
+				end
+			end
+			if bestbag then	-- Place it!
+				PickupContainerItem(bestbag,bestslot)
+				if not CursorHasItem() then	-- success!
+
+					lockSlot(bestbag,bestslot)
+					local _, ciCount, ciLocked, _, _ = GetContainerItemInfo(bestbag,bestslot)
+					return bestbag,bestslot
+				end
+				-- if we got here, the item couldn't be placed on top of the other for some reason, possibly because our assumption about equal itemids being wrong
+				-- either way, we fall down and continue looking for somewhere to put it
+			end
+			-- Fall down and look for empty slots instead
+		end
+	end
+
+	-- Put the item in the first empty slot that it CAN be put in!
+	local itemFam = GetItemFamily(itemLink)
+	if itemFam~=0 and select(9,GetItemInfo(itemLink))=="INVTYPE_BAG" then
+		itemFam = 0	-- Ouch, it was a bag. Bags are always family 0 for purposes of trying to PUT them somewhere.
+	end
+
+	-- If this is a specialty item, we try specialty bags first
+	if itemFam~=0 then
+		for bag in iterbags, baglist do
+			local bagFree, bagFam = myGetContainerNumFreeSlots(bag)
+			if bagFam~=0 and band(itemFam,bagFam)~=0 then
+				local slot = putinbag(bag)
+				if slot then
+					return bag,slot
+				end
+			end
+		end
+	end
+
+	-- If we couldn't put it in a special bag, try normal bags
+	for bag in iterbagsfam0, baglist do
+		if GetContainerNumFreeSlots(bag)>0 then
+			local slot = putinbag(bag)
+			if slot then
+				return bag,slot
+			end
+		end
+	end
+
+
+	-- Set sail on the failboat!
+	if not dontClearOnFail then
+		ClearCursor()
+	end
+	return false	-- no room for it!
+end
+
+
+
+-----------------------------------------------------------------------
+-- API :LinkIsItem(fullLink, lookingfor)
+--
+-- See if "lookingfor" equals the full link given. "lookingfor" can be any kind of item identifier.
+-- Level information is always ignored. Wobbly 3.2 randomstats are compensated for.
+
+function lib:LinkIsItem(fullLink, lookingfor)
+	local comparator,arg1,arg2 = makeLinkComparator(lookingfor)
+	return comparator(fullLink, arg1,arg2)
+end
diff --git a/EMA/Libs/LibBagUtils-1.0/LibBagUtils-1.0.xml b/EMA/Libs/LibBagUtils-1.0/LibBagUtils-1.0.xml
new file mode 100644
index 0000000..493de1c
--- /dev/null
+++ b/EMA/Libs/LibBagUtils-1.0/LibBagUtils-1.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="LibBagUtils-1.0.lua"/>
+</Ui>
\ No newline at end of file
diff --git a/EMA/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua b/EMA/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua
new file mode 100644
index 0000000..2d7dcef
--- /dev/null
+++ b/EMA/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua
@@ -0,0 +1,244 @@
+--[[
+Copyright (c) 2015-2017, Hendrik "nevcairiel" Leppkes <h.leppkes@gmail.com>
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of the developer nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+]]
+local MAJOR_VERSION = "LibButtonGlow-1.0"
+local MINOR_VERSION = 6
+
+if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
+local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
+if not lib then return end
+
+local Masque = LibStub("Masque", true)
+
+lib.unusedOverlays = lib.unusedOverlays or {}
+lib.numOverlays = lib.numOverlays or 0
+
+local tinsert, tremove, tostring = table.insert, table.remove, tostring
+
+local function OverlayGlowAnimOutFinished(animGroup)
+	local overlay = animGroup:GetParent()
+	local frame = overlay:GetParent()
+	overlay:Hide()
+	tinsert(lib.unusedOverlays, overlay)
+	frame.__LBGoverlay = nil
+end
+
+local function OverlayGlow_OnHide(self)
+	if self.animOut:IsPlaying() then
+		self.animOut:Stop()
+		OverlayGlowAnimOutFinished(self.animOut)
+	end
+end
+
+local function CreateScaleAnim(group, target, order, duration, x, y, delay)
+	local scale = group:CreateAnimation("Scale")
+	scale:SetTarget(target:GetName())
+	scale:SetOrder(order)
+	scale:SetDuration(duration)
+	scale:SetScale(x, y)
+
+	if delay then
+		scale:SetStartDelay(delay)
+	end
+end
+
+local function CreateAlphaAnim(group, target, order, duration, fromAlpha, toAlpha, delay)
+	local alpha = group:CreateAnimation("Alpha")
+	alpha:SetTarget(target:GetName())
+	alpha:SetOrder(order)
+	alpha:SetDuration(duration)
+	alpha:SetFromAlpha(fromAlpha)
+	alpha:SetToAlpha(toAlpha)
+
+	if delay then
+		alpha:SetStartDelay(delay)
+	end
+end
+
+local function AnimIn_OnPlay(group)
+	local frame = group:GetParent()
+	local frameWidth, frameHeight = frame:GetSize()
+	frame.spark:SetSize(frameWidth, frameHeight)
+	frame.spark:SetAlpha(0.3)
+	frame.innerGlow:SetSize(frameWidth / 2, frameHeight / 2)
+	frame.innerGlow:SetAlpha(1.0)
+	frame.innerGlowOver:SetAlpha(1.0)
+	frame.outerGlow:SetSize(frameWidth * 2, frameHeight * 2)
+	frame.outerGlow:SetAlpha(1.0)
+	frame.outerGlowOver:SetAlpha(1.0)
+	frame.ants:SetSize(frameWidth * 0.85, frameHeight * 0.85)
+	frame.ants:SetAlpha(0)
+	frame:Show()
+end
+
+local function AnimIn_OnFinished(group)
+	local frame = group:GetParent()
+	local frameWidth, frameHeight = frame:GetSize()
+	frame.spark:SetAlpha(0)
+	frame.innerGlow:SetAlpha(0)
+	frame.innerGlow:SetSize(frameWidth, frameHeight)
+	frame.innerGlowOver:SetAlpha(0.0)
+	frame.outerGlow:SetSize(frameWidth, frameHeight)
+	frame.outerGlowOver:SetAlpha(0.0)
+	frame.outerGlowOver:SetSize(frameWidth, frameHeight)
+	frame.ants:SetAlpha(1.0)
+end
+
+local function CreateOverlayGlow()
+	lib.numOverlays = lib.numOverlays + 1
+
+	-- create frame and textures
+	local name = "ButtonGlowOverlay" .. tostring(lib.numOverlays)
+	local overlay = CreateFrame("Frame", name, UIParent)
+
+	-- spark
+	overlay.spark = overlay:CreateTexture(name .. "Spark", "BACKGROUND")
+	overlay.spark:SetPoint("CENTER")
+	overlay.spark:SetAlpha(0)
+	overlay.spark:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
+	overlay.spark:SetTexCoord(0.00781250, 0.61718750, 0.00390625, 0.26953125)
+
+	-- inner glow
+	overlay.innerGlow = overlay:CreateTexture(name .. "InnerGlow", "ARTWORK")
+	overlay.innerGlow:SetPoint("CENTER")
+	overlay.innerGlow:SetAlpha(0)
+	overlay.innerGlow:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
+	overlay.innerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375)
+
+	-- inner glow over
+	overlay.innerGlowOver = overlay:CreateTexture(name .. "InnerGlowOver", "ARTWORK")
+	overlay.innerGlowOver:SetPoint("TOPLEFT", overlay.innerGlow, "TOPLEFT")
+	overlay.innerGlowOver:SetPoint("BOTTOMRIGHT", overlay.innerGlow, "BOTTOMRIGHT")
+	overlay.innerGlowOver:SetAlpha(0)
+	overlay.innerGlowOver:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
+	overlay.innerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625)
+
+	-- outer glow
+	overlay.outerGlow = overlay:CreateTexture(name .. "OuterGlow", "ARTWORK")
+	overlay.outerGlow:SetPoint("CENTER")
+	overlay.outerGlow:SetAlpha(0)
+	overlay.outerGlow:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
+	overlay.outerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375)
+
+	-- outer glow over
+	overlay.outerGlowOver = overlay:CreateTexture(name .. "OuterGlowOver", "ARTWORK")
+	overlay.outerGlowOver:SetPoint("TOPLEFT", overlay.outerGlow, "TOPLEFT")
+	overlay.outerGlowOver:SetPoint("BOTTOMRIGHT", overlay.outerGlow, "BOTTOMRIGHT")
+	overlay.outerGlowOver:SetAlpha(0)
+	overlay.outerGlowOver:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
+	overlay.outerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625)
+
+	-- ants
+	overlay.ants = overlay:CreateTexture(name .. "Ants", "OVERLAY")
+	overlay.ants:SetPoint("CENTER")
+	overlay.ants:SetAlpha(0)
+	overlay.ants:SetTexture([[Interface\SpellActivationOverlay\IconAlertAnts]])
+
+	-- setup antimations
+	overlay.animIn = overlay:CreateAnimationGroup()
+	CreateScaleAnim(overlay.animIn, overlay.spark,          1, 0.2, 1.5, 1.5)
+	CreateAlphaAnim(overlay.animIn, overlay.spark,          1, 0.2, 0, 1)
+	CreateScaleAnim(overlay.animIn, overlay.innerGlow,      1, 0.3, 2, 2)
+	CreateScaleAnim(overlay.animIn, overlay.innerGlowOver,  1, 0.3, 2, 2)
+	CreateAlphaAnim(overlay.animIn, overlay.innerGlowOver,  1, 0.3, 1, 0)
+	CreateScaleAnim(overlay.animIn, overlay.outerGlow,      1, 0.3, 0.5, 0.5)
+	CreateScaleAnim(overlay.animIn, overlay.outerGlowOver,  1, 0.3, 0.5, 0.5)
+	CreateAlphaAnim(overlay.animIn, overlay.outerGlowOver,  1, 0.3, 1, 0)
+	CreateScaleAnim(overlay.animIn, overlay.spark,          1, 0.2, 2/3, 2/3, 0.2)
+	CreateAlphaAnim(overlay.animIn, overlay.spark,          1, 0.2, 1, 0, 0.2)
+	CreateAlphaAnim(overlay.animIn, overlay.innerGlow,      1, 0.2, 1, 0, 0.3)
+	CreateAlphaAnim(overlay.animIn, overlay.ants,           1, 0.2, 0, 1, 0.3)
+	overlay.animIn:SetScript("OnPlay", AnimIn_OnPlay)
+	overlay.animIn:SetScript("OnFinished", AnimIn_OnFinished)
+
+	overlay.animOut = overlay:CreateAnimationGroup()
+	CreateAlphaAnim(overlay.animOut, overlay.outerGlowOver, 1, 0.2, 0, 1)
+	CreateAlphaAnim(overlay.animOut, overlay.ants,          1, 0.2, 1, 0)
+	CreateAlphaAnim(overlay.animOut, overlay.outerGlowOver, 2, 0.2, 1, 0)
+	CreateAlphaAnim(overlay.animOut, overlay.outerGlow,     2, 0.2, 1, 0)
+	overlay.animOut:SetScript("OnFinished", OverlayGlowAnimOutFinished)
+
+	-- scripts
+	overlay:SetScript("OnUpdate", ActionButton_OverlayGlowOnUpdate)
+	overlay:SetScript("OnHide", OverlayGlow_OnHide)
+
+	overlay.__LBGVersion = MINOR_VERSION
+
+	return overlay
+end
+
+local function GetOverlayGlow()
+	local overlay = tremove(lib.unusedOverlays)
+	if not overlay then
+		overlay = CreateOverlayGlow()
+	end
+	return overlay
+end
+
+function lib.ShowOverlayGlow(frame)
+	if frame.__LBGoverlay then
+		if frame.__LBGoverlay.animOut:IsPlaying() then
+			frame.__LBGoverlay.animOut:Stop()
+			frame.__LBGoverlay.animIn:Play()
+		end
+	else
+		local overlay = GetOverlayGlow()
+		local frameWidth, frameHeight = frame:GetSize()
+		overlay:SetParent(frame)
+		overlay:SetFrameLevel(frame:GetFrameLevel() + 5)
+		overlay:ClearAllPoints()
+		--Make the height/width available before the next frame:
+		overlay:SetSize(frameWidth * 1.4, frameHeight * 1.4)
+		overlay:SetPoint("TOPLEFT", frame, "TOPLEFT", -frameWidth * 0.2, frameHeight * 0.2)
+		overlay:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", frameWidth * 0.2, -frameHeight * 0.2)
+		overlay.animIn:Play()
+		frame.__LBGoverlay = overlay
+
+		if Masque and Masque.UpdateSpellAlert and (not frame.overlay or not issecurevariable(frame, "overlay")) then
+			local old_overlay = frame.overlay
+			frame.overlay = overlay
+			Masque:UpdateSpellAlert(frame)
+
+			frame.overlay = old_overlay
+		end
+	end
+end
+
+function lib.HideOverlayGlow(frame)
+	if frame.__LBGoverlay then
+		if frame.__LBGoverlay.animIn:IsPlaying() then
+			frame.__LBGoverlay.animIn:Stop()
+		end
+		if frame:IsVisible() then
+			frame.__LBGoverlay.animOut:Play()
+		else
+			OverlayGlowAnimOutFinished(frame.__LBGoverlay.animOut)
+		end
+	end
+end
diff --git a/EMA/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc b/EMA/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc
new file mode 100644
index 0000000..9a80be3
--- /dev/null
+++ b/EMA/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc
@@ -0,0 +1,14 @@
+## Interface: 70300
+## Title: Lib: ButtonGlow-1.0
+## Notes: Replacement for ActionButton_Show/HideOverlayGlow APIs
+## Author: Nevcairiel
+## X-eMail: h.leppkes@gmail.com
+## X-Category: Library
+## X-License: BSD
+## X-Website: http://www.wowace.com/addons/libbuttonglow-1-0/
+## Version: @project-version@
+## OptionalDeps: Masque
+
+LibStub\LibStub.lua
+
+LibButtonGlow-1.0.lua
diff --git a/EMA/Libs/LibButtonGlow-1.0/LibStub/LibStub.lua b/EMA/Libs/LibButtonGlow-1.0/LibStub/LibStub.lua
new file mode 100644
index 0000000..0a41ac0
--- /dev/null
+++ b/EMA/Libs/LibButtonGlow-1.0/LibStub/LibStub.lua
@@ -0,0 +1,30 @@
+-- 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 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]
+
+if not LibStub or LibStub.minor < LIBSTUB_MINOR then
+	LibStub = LibStub or {libs = {}, minors = {} }
+	_G[LIBSTUB_MAJOR] = LibStub
+	LibStub.minor = LIBSTUB_MINOR
+
+	function LibStub:NewLibrary(major, minor)
+		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
+		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
+
+		local oldminor = self.minors[major]
+		if oldminor and oldminor >= minor then return nil end
+		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
+		return self.libs[major], oldminor
+	end
+
+	function LibStub:GetLibrary(major, silent)
+		if not self.libs[major] and not silent then
+			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
+		end
+		return self.libs[major], self.minors[major]
+	end
+
+	function LibStub:IterateLibraries() return pairs(self.libs) end
+	setmetatable(LibStub, { __call = LibStub.GetLibrary })
+end
diff --git a/EMA/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc b/EMA/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc
new file mode 100644
index 0000000..4d9130c
--- /dev/null
+++ b/EMA/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc
@@ -0,0 +1,9 @@
+## Interface: 20400
+## Title: Lib: LibStub
+## Notes: Universal Library Stub
+## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
+## X-Website: http://jira.wowace.com/browse/LS
+## X-Category: Library
+## X-License: Public Domain
+
+LibStub.lua
diff --git a/EMA/Libs/LibDeformat-3.0/Changelog-LibDeformat-3.0-v1.txt b/EMA/Libs/LibDeformat-3.0/Changelog-LibDeformat-3.0-v1.txt
new file mode 100644
index 0000000..694ebb2
--- /dev/null
+++ b/EMA/Libs/LibDeformat-3.0/Changelog-LibDeformat-3.0-v1.txt
@@ -0,0 +1,16 @@
+tag v1
+0cb38e41ea596a557a070cd7b8157e81d3ef2d0b
+Cameron Knight <ckknight@Cameron-Knights-MacBook-Pro.local>
+2010-01-04 14:45:16 -0600
+
+Tagging as v1
+
+
+--------------------
+
+Cameron Knight:
+	- Fix folder name in .pkgmeta
+	- Add tests to main LibDeformat-3.0.lua, accessible only in debug mode and LibDeformat.Test() must be called to run the tests. Remove other tests, as they're not really useful anymore.
+	- Add some comments and move some code around.
+	- change @example to @usage
+	- Initial commit
diff --git a/EMA/Libs/LibDeformat-3.0/LibDeformat-3.0.lua b/EMA/Libs/LibDeformat-3.0/LibDeformat-3.0.lua
new file mode 100644
index 0000000..6580517
--- /dev/null
+++ b/EMA/Libs/LibDeformat-3.0/LibDeformat-3.0.lua
@@ -0,0 +1,272 @@
+--[[
+Name: LibDeformat-3.0
+Author(s): ckknight (ckknight@gmail.com)
+Website: http://www.wowace.com/projects/libdeformat-3-0/
+Description: A library to convert a post-formatted string back to its original arguments given its format string.
+License: MIT
+]]
+
+local LibDeformat = LibStub:NewLibrary("LibDeformat-3.0", 1)
+
+if not LibDeformat then
+    return
+end
+
+-- this function does nothing and returns nothing
+local function do_nothing()
+end
+
+-- a dictionary of format to match entity
+local FORMAT_SEQUENCES = {
+    ["s"] = ".+",
+    ["c"] = ".",
+    ["%d*d"] = "%%-?%%d+",
+    ["[fg]"] = "%%-?%%d+%%.?%%d*",
+    ["%%%.%d[fg]"] = "%%-?%%d+%%.?%%d*",
+}
+
+-- a set of format sequences that are string-based, i.e. not numbers.
+local STRING_BASED_SEQUENCES = {
+    ["s"] = true,
+    ["c"] = true,
+}
+
+local cache = setmetatable({}, {__mode='k'})
+-- generate the deformat function for the pattern, or fetch from the cache.
+local function get_deformat_function(pattern)
+    local func = cache[pattern]
+    if func then
+        return func
+    end
+
+    -- escape the pattern, so that string.match can use it properly
+    local unpattern = '^' .. pattern:gsub("([%(%)%.%*%+%-%[%]%?%^%$%%])", "%%%1") .. '$'
+
+    -- a dictionary of index-to-boolean representing whether the index is a number rather than a string.
+    local number_indexes = {}
+
+    -- (if the pattern is a numbered format,) a dictionary of index-to-real index.
+    local index_translation = nil
+
+    -- the highest found index, also the number of indexes found.
+	local highest_index
+    if not pattern:find("%%1%$") then
+        -- not a numbered format
+
+        local i = 0
+        while true do
+            i = i + 1
+            local first_index
+            local first_sequence
+            for sequence in pairs(FORMAT_SEQUENCES) do
+                local index = unpattern:find("%%%%" .. sequence)
+                if index and (not first_index or index < first_index) then
+                    first_index = index
+                    first_sequence = sequence
+                end
+            end
+            if not first_index then
+                break
+            end
+            unpattern = unpattern:gsub("%%%%" .. first_sequence, "(" .. FORMAT_SEQUENCES[first_sequence] .. ")", 1)
+            number_indexes[i] = not STRING_BASED_SEQUENCES[first_sequence]
+        end
+
+        highest_index = i - 1
+    else
+        -- a numbered format
+
+        local i = 0
+		while true do
+		    i = i + 1
+			local found_sequence
+            for sequence in pairs(FORMAT_SEQUENCES) do
+				if unpattern:find("%%%%" .. i .. "%%%$" .. sequence) then
+					found_sequence = sequence
+					break
+				end
+			end
+			if not found_sequence then
+				break
+			end
+			unpattern = unpattern:gsub("%%%%" .. i .. "%%%$" .. found_sequence, "(" .. FORMAT_SEQUENCES[found_sequence] .. ")", 1)
+			number_indexes[i] = not STRING_BASED_SEQUENCES[found_sequence]
+		end
+        highest_index = i - 1
+
+		i = 0
+		index_translation = {}
+		pattern:gsub("%%(%d)%$", function(w)
+		    i = i + 1
+		    index_translation[i] = tonumber(w)
+		end)
+    end
+
+    if highest_index == 0 then
+        cache[pattern] = do_nothing
+    else
+        --[=[
+            -- resultant function looks something like this:
+            local unpattern = ...
+            return function(text)
+                local a1, a2 = text:match(unpattern)
+                if not a1 then
+                    return nil, nil
+                end
+                return a1+0, a2
+            end
+
+            -- or if it were a numbered pattern,
+            local unpattern = ...
+            return function(text)
+                local a2, a1 = text:match(unpattern)
+                if not a1 then
+                    return nil, nil
+                end
+                return a1+0, a2
+            end
+        ]=]
+
+        local t = {}
+        t[#t+1] = [=[
+            return function(text)
+                local ]=]
+
+        for i = 1, highest_index do
+            if i ~= 1 then
+                t[#t+1] = ", "
+            end
+            t[#t+1] = "a"
+            if not index_translation then
+                t[#t+1] = i
+            else
+                t[#t+1] = index_translation[i]
+            end
+        end
+
+        t[#t+1] = [=[ = text:match(]=]
+        t[#t+1] = ("%q"):format(unpattern)
+        t[#t+1] = [=[)
+                if not a1 then
+                    return ]=]
+
+        for i = 1, highest_index do
+            if i ~= 1 then
+                t[#t+1] = ", "
+            end
+            t[#t+1] = "nil"
+        end
+
+        t[#t+1] = "\n"
+        t[#t+1] = [=[
+                end
+                ]=]
+
+        t[#t+1] = "return "
+        for i = 1, highest_index do
+            if i ~= 1 then
+                t[#t+1] = ", "
+            end
+            t[#t+1] = "a"
+            t[#t+1] = i
+            if number_indexes[i] then
+                t[#t+1] = "+0"
+            end
+        end
+        t[#t+1] = "\n"
+        t[#t+1] = [=[
+            end
+        ]=]
+
+        t = table.concat(t, "")
+
+        -- print(t)
+
+        cache[pattern] = assert(loadstring(t))()
+    end
+
+    return cache[pattern]
+end
+
+--- Return the arguments of the given format string as found in the text.
+-- @param text The resultant formatted text.
+-- @param pattern The pattern used to create said text.
+-- @return a tuple of values, either strings or numbers, based on the pattern.
+-- @usage LibDeformat.Deformat("Hello, friend", "Hello, %s") == "friend"
+-- @usage LibDeformat.Deformat("Hello, friend", "Hello, %1$s") == "friend"
+-- @usage LibDeformat.Deformat("Cost: $100", "Cost: $%d") == 100
+-- @usage LibDeformat.Deformat("Cost: $100", "Cost: $%1$d") == 100
+-- @usage LibDeformat.Deformat("Alpha, Bravo", "%s, %s") => "Alpha", "Bravo"
+-- @usage LibDeformat.Deformat("Alpha, Bravo", "%1$s, %2$s") => "Alpha", "Bravo"
+-- @usage LibDeformat.Deformat("Alpha, Bravo", "%2$s, %1$s") => "Bravo", "Alpha"
+-- @usage LibDeformat.Deformat("Hello, friend", "Cost: $%d") == nil
+-- @usage LibDeformat("Hello, friend", "Hello, %s") == "friend"
+function LibDeformat.Deformat(text, pattern)
+    if type(text) ~= "string" then
+        error(("Argument #1 to `Deformat' must be a string, got %s (%s)."):format(type(text), text), 2)
+    elseif type(pattern) ~= "string" then
+        error(("Argument #2 to `Deformat' must be a string, got %s (%s)."):format(type(pattern), pattern), 2)
+    end
+
+    return get_deformat_function(pattern)(text)
+end
+
+--[===[@debug@
+function LibDeformat.Test()
+    local function tuple(success, ...)
+        if success then
+            return true, { n = select('#', ...), ... }
+        else
+            return false, ...
+        end
+    end
+
+    local function check(text, pattern, ...)
+        local success, results = tuple(pcall(LibDeformat.Deformat, text, pattern))
+        if not success then
+            return false, results
+        end
+
+        if select('#', ...) ~= results.n then
+            return false, ("Differing number of return values. Expected: %d. Actual: %d."):format(select('#', ...), results.n)
+        end
+
+        for i = 1, results.n do
+            local expected = select(i, ...)
+            local actual = results[i]
+            if type(expected) ~= type(actual) then
+                return false, ("Return #%d differs by type. Expected: %s (%s). Actual: %s (%s)"):format(type(expected), expected, type(actual), actual)
+            elseif expected ~= actual then
+                return false, ("Return #%d differs. Expected: %s. Actual: %s"):format(expected, actual)
+            end
+        end
+
+        return true
+    end
+
+    local function test(text, pattern, ...)
+        local success, problem = check(text, pattern, ...)
+        if not success then
+            print(("Problem with (%q, %q): %s"):format(text, pattern, problem or ""))
+        end
+    end
+
+    test("Hello, friend", "Hello, %s", "friend")
+    test("Hello, friend", "Hello, %1$s", "friend")
+    test("Cost: $100", "Cost: $%d", 100)
+    test("Cost: $100", "Cost: $%1$d", 100)
+    test("Alpha, Bravo", "%s, %s", "Alpha", "Bravo")
+    test("Alpha, Bravo", "%1$s, %2$s", "Alpha", "Bravo")
+    test("Alpha, Bravo", "%2$s, %1$s", "Bravo", "Alpha")
+    test("Alpha, Bravo, Charlie, Delta, Echo", "%s, %s, %s, %s, %s", "Alpha", "Bravo", "Charlie", "Delta", "Echo")
+    test("Alpha, Bravo, Charlie, Delta, Echo", "%1$s, %2$s, %3$s, %4$s, %5$s", "Alpha", "Bravo", "Charlie", "Delta", "Echo")
+    test("Alpha, Bravo, Charlie, Delta, Echo", "%5$s, %4$s, %3$s, %2$s, %1$s", "Echo", "Delta", "Charlie", "Bravo", "Alpha")
+    test("Alpha, Bravo, Charlie, Delta, Echo", "%2$s, %3$s, %4$s, %5$s, %1$s", "Echo", "Alpha", "Bravo", "Charlie", "Delta")
+    test("Alpha, Bravo, Charlie, Delta, Echo", "%3$s, %4$s, %5$s, %1$s, %2$s", "Delta", "Echo", "Alpha", "Bravo", "Charlie")
+    test("Alpha, Bravo, Charlie, Delta", "%s, %s, %s, %s, %s", nil, nil, nil, nil, nil)
+    test("Hello, friend", "Cost: $%d", nil)
+    print("LibDeformat-3.0: Tests completed.")
+end
+--@end-debug@]===]
+
+setmetatable(LibDeformat, { __call = function(self, ...) return self.Deformat(...) end })
\ No newline at end of file
diff --git a/EMA/Libs/LibDeformat-3.0/LibDeformat-3.0.toc b/EMA/Libs/LibDeformat-3.0/LibDeformat-3.0.toc
new file mode 100644
index 0000000..08d34c6
--- /dev/null
+++ b/EMA/Libs/LibDeformat-3.0/LibDeformat-3.0.toc
@@ -0,0 +1,15 @@
+## Interface: 30300
+## Title: Lib: Deformat-3.0
+## Notes: A library to convert a post-formatted string back to its original arguments given its format string.
+## Author: ckknight
+## X-eMail: ckknight@gmail.com
+## X-Category: Library
+## X-License: MIT
+## LoadOnDemand: 1
+## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6
+## X-Curse-Project-Name: Jamba
+## X-Curse-Project-ID: jamba
+## X-Curse-Repository-ID: wow/jamba/mainline
+
+LibStub\LibStub.lua
+lib.xml
diff --git a/EMA/Libs/LibDeformat-3.0/LibStub/LibStub.lua b/EMA/Libs/LibDeformat-3.0/LibStub/LibStub.lua
new file mode 100644
index 0000000..0a41ac0
--- /dev/null
+++ b/EMA/Libs/LibDeformat-3.0/LibStub/LibStub.lua
@@ -0,0 +1,30 @@
+-- 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 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]
+
+if not LibStub or LibStub.minor < LIBSTUB_MINOR then
+	LibStub = LibStub or {libs = {}, minors = {} }
+	_G[LIBSTUB_MAJOR] = LibStub
+	LibStub.minor = LIBSTUB_MINOR
+
+	function LibStub:NewLibrary(major, minor)
+		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
+		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
+
+		local oldminor = self.minors[major]
+		if oldminor and oldminor >= minor then return nil end
+		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
+		return self.libs[major], oldminor
+	end
+
+	function LibStub:GetLibrary(major, silent)
+		if not self.libs[major] and not silent then
+			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
+		end
+		return self.libs[major], self.minors[major]
+	end
+
+	function LibStub:IterateLibraries() return pairs(self.libs) end
+	setmetatable(LibStub, { __call = LibStub.GetLibrary })
+end
diff --git a/EMA/Libs/LibDeformat-3.0/lib.xml b/EMA/Libs/LibDeformat-3.0/lib.xml
new file mode 100644
index 0000000..cf6abae
--- /dev/null
+++ b/EMA/Libs/LibDeformat-3.0/lib.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="LibDeformat-3.0.lua" />
+</Ui>
\ No newline at end of file
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/CHANGES.txt b/EMA/Libs/LibItemUpgradeInfo-1.0/CHANGES.txt
new file mode 100644
index 0000000..340f8e4
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/CHANGES.txt
@@ -0,0 +1,18 @@
+tag 5876ed6c59ef3d2568d88b9bba9ec77682e6074e Release-70200-28
+Author:	Alar of Runetotem <alar@aspide.it>
+Date:	Tue Mar 28 12:21:53 2017 +0200
+
+Toc updated to 70200
+
+commit 7c5485ab35700b2e38a008feb84e4af34b7396f0
+Author: Alar of Runetotem <alar@aspide.it>
+Date:   Tue Mar 28 12:07:53 2017 +0200
+
+    Updated TOC to 70200
+
+commit c4ed50190aad123c1297705da7f38c86f7ab1d10
+Author: Alar of Runetotem <alar@aspide.it>
+Date:   Tue Mar 28 11:30:56 2017 +0200
+
+    toc update
+
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/Core.lua b/EMA/Libs/LibItemUpgradeInfo-1.0/Core.lua
new file mode 100644
index 0000000..422fc3e
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/Core.lua
@@ -0,0 +1,654 @@
+local MAJOR, MINOR = "LibItemUpgradeInfo-1.0", 28
+local type,tonumber,select,strsplit,GetItemInfoFromHyperlink=type,tonumber,select,strsplit,GetItemInfoFromHyperlink
+local library,previous = _G.LibStub:NewLibrary(MAJOR, MINOR)
+local lib=library --#lib Needed to keep Eclipse LDT happy
+if not lib then return end
+local pp=print
+--[===[@debug@
+LoadAddOn("Blizzard_DebugTools")
+LoadAddOn("LibDebug")
+if LibDebug then LibDebug() end
+--@end-debug@]===]
+--@non-debug@
+local print=function() end
+--@end-non-debug@
+--[[
+Caching system
+1	itemName	String	The name of the item.
+2	itemLink	String	The item link of the item.
+3	itemRarity	Number	The quality of the item. The value is 0 to 7, which represents Poor to Heirloom. This appears to include gains from upgrades/bonuses.
+4	itemLevel	Number	The item level of this item, not including item levels gained from upgrades. There is currently no API to get the item level including upgrades/bonuses.
+5	itemMinLevel	Number	The minimum level required to use the item, 0 meaning no level requirement.
+6	itemType	String	The type of the item: Armor, Weapon, Quest, Key, etc. (localized)
+7	itemSubType	String	The sub-type of the item: Enchanting, Cloth, Sword, etc. See itemType. (localized)
+8	itemStackCount	Number	How many of the item per stack: 20 for Runecloth, 1 for weapon, 100 for Alterac Ram Hide, etc.
+9	itemEquipLoc	String	The type of inventory equipment location in which the item may be equipped, or "" if it can't be equippable. The string returned is also the name of a global string variable e.g. if "INVTYPE_WEAPONMAINHAND" is returned, _G["INVTYPE_WEAPONMAINHAND"] will be the localized, displayable name of the location.
+10	iconFileDataID	Number	The FileDataID for the icon texture for the item.
+11	itemSellPrice	Number	The price, in copper, a vendor is willing to pay for this item, 0 for items that cannot be sold.
+12	itemClassID	Number	This is the numerical value that determines the string to display for 'itemType'.
+13	itemSubClassID	Number	This is the numerical value that determines the string to display for 'itemSubType'
+14 ? number
+15 expansionId
+16 ? ?
+17 ? boolean
+--]]
+-- ItemLink Constants
+local i_Name=1
+local i_Link=2
+local i_Rarity=3
+local i_Quality=3
+local i_Level=4
+local i_MinLevel =5
+local i_ClassName=6
+local i_SubClassName=7
+local i_StackCount=8
+local i_EquipLoc=9
+local i_TextureId=10
+local i_SellPrice=11
+local i_ClassID=12
+local i_SubClass_ID=13
+local i_unk1=14
+local i_unk2=15
+local i_unk3=16
+local i_unk4=17
+
+
+do
+local oGetItemInfo=GetItemInfo
+lib.itemcache=lib.itemcache or
+	setmetatable({miss=0,tot=0},{
+		__index=function(table,key)
+			if (not key) then return "" end
+			if (key=="miss") then return 0 end
+			if (key=="tot") then return 0 end
+			local cached={oGetItemInfo(key)}
+			if #cached==0 then return nil end
+			local itemLink=cached[2]
+			if not itemLink then return nil end
+			local itemID=lib:GetItemID(itemLink)
+			local quality=cached[3]
+			local cacheIt=true
+			if quality==LE_ITEM_QUALITY_ARTIFACT then
+				local relic1, relic2, relic3 = select(4,strsplit(':', itemLink))
+				if relic1 and relic1 ~= '' and not oGetItemInfo(relic1) then cacheIt = false end
+				if relic2 and relic2 ~= '' and not oGetItemInfo(relic2) then cacheIt = false end
+				if relic3 and relic3 ~= '' and not oGetItemInfo(relic3) then cacheIt = false end
+			end
+			cached.englishClass=GetItemClassInfo(cached[12])
+			cached.englishSubClass=GetItemSubClassInfo(cached[12],cached[13])
+			if cacheIt then
+				rawset(table,key,cached)
+			end
+			table.miss=table.miss+1
+			return cached
+		end
+
+	})
+end
+local cache,select,unpack=lib.itemcache,select,unpack
+local	function CachedGetItemInfo(key,index)
+	if not key then return nil end
+	index=index or 1
+	cache.tot=cache.tot+1
+	local cached=cache[key]
+	if cached and type(cached)=='table' then
+		return select(index,unpack(cached))
+	else
+		rawset(cache,key,nil) -- voiding broken cache entry
+	end
+end
+
+local upgradeTable = {
+	[  1] = { upgrade = 1, max = 1, ilevel = 8 },
+	[373] = { upgrade = 1, max = 3, ilevel = 4 },
+	[374] = { upgrade = 2, max = 3, ilevel = 8 },
+	[375] = { upgrade = 1, max = 3, ilevel = 4 },
+	[376] = { upgrade = 2, max = 3, ilevel = 4 },
+	[377] = { upgrade = 3, max = 3, ilevel = 4 },
+	[378] = {                       ilevel = 7 },
+	[379] = { upgrade = 1, max = 2, ilevel = 4 },
+	[380] = { upgrade = 2, max = 2, ilevel = 4 },
+	[445] = { upgrade = 0, max = 2, ilevel = 0 },
+	[446] = { upgrade = 1, max = 2, ilevel = 4 },
+	[447] = { upgrade = 2, max = 2, ilevel = 8 },
+	[451] = { upgrade = 0, max = 1, ilevel = 0 },
+	[452] = { upgrade = 1, max = 1, ilevel = 8 },
+	[453] = { upgrade = 0, max = 2, ilevel = 0 },
+	[454] = { upgrade = 1, max = 2, ilevel = 4 },
+	[455] = { upgrade = 2, max = 2, ilevel = 8 },
+	[456] = { upgrade = 0, max = 1, ilevel = 0 },
+	[457] = { upgrade = 1, max = 1, ilevel = 8 },
+	[458] = { upgrade = 0, max = 4, ilevel = 0 },
+	[459] = { upgrade = 1, max = 4, ilevel = 4 },
+	[460] = { upgrade = 2, max = 4, ilevel = 8 },
+	[461] = { upgrade = 3, max = 4, ilevel = 12 },
+	[462] = { upgrade = 4, max = 4, ilevel = 16 },
+	[465] = { upgrade = 0, max = 2, ilevel = 0 },
+	[466] = { upgrade = 1, max = 2, ilevel = 4 },
+	[467] = { upgrade = 2, max = 2, ilevel = 8 },
+	[468] = { upgrade = 0, max = 4, ilevel = 0 },
+	[469] = { upgrade = 1, max = 4, ilevel = 4 },
+	[470] = { upgrade = 2, max = 4, ilevel = 8 },
+	[471] = { upgrade = 3, max = 4, ilevel = 12 },
+	[472] = { upgrade = 4, max = 4, ilevel = 16 },
+	[491] = { upgrade = 0, max = 4, ilevel = 0 },
+	[492] = { upgrade = 1, max = 4, ilevel = 4 },
+	[493] = { upgrade = 2, max = 4, ilevel = 8 },
+	[494] = { upgrade = 0, max = 6, ilevel = 0 },
+	[495] = { upgrade = 1, max = 6, ilevel = 4 },
+	[496] = { upgrade = 2, max = 6, ilevel = 8 },
+	[497] = { upgrade = 3, max = 6, ilevel = 12 },
+	[498] = { upgrade = 4, max = 6, ilevel = 16 },
+	[503] = { upgrade = 3, max = 3, ilevel = 1 },
+	[504] = { upgrade = 3, max = 4, ilevel = 12 },
+	[505] = { upgrade = 4, max = 4, ilevel = 16 },
+	[506] = { upgrade = 5, max = 6, ilevel = 20 },
+	[507] = { upgrade = 6, max = 6, ilevel = 24 },
+	[529] = { upgrade = 0, max = 2, ilevel = 0 },
+	[530] = { upgrade = 1, max = 2, ilevel = 5 },
+	[531] = { upgrade = 2, max = 2, ilevel = 10 },
+	[535] = { upgrade = 1, max = 3, ilevel = 15 },
+	[536] = { upgrade = 2, max = 3, ilevel = 30 },
+	[537] = { upgrade = 3, max = 3, ilevel = 45 },
+	[538] = { upgrade = 0, max = 3, ilevel = 0 },
+
+}
+do
+	local stub = { ilevel = 0 }
+	setmetatable(upgradeTable, { __index = function(t, key)
+		return stub
+	end})
+end
+-- Tooltip Scanning stuff
+local itemLevelPattern = _G.ITEM_LEVEL:gsub("%%d", "(%%d+)")
+local soulboundPattern = _G.ITEM_SOULBOUND
+local boePattern=_G.ITEM_BIND_ON_EQUIP
+local bopPattern=_G.ITEM_BIND_ON_PICKUP
+local boaPattern1=_G.ITEM_BIND_TO_BNETACCOUNT
+local boaPattern2=_G.ITEM_BNETACCOUNTBOUND
+
+local scanningTooltip
+local anchor
+local tipCache = lib.tipCache or setmetatable({},{__index=function(table,key) return {} end})
+local emptytable={}
+
+local function ScanTip(itemLink,itemLevel,show)
+	if type(itemLink)=="number" then
+		itemLink=CachedGetItemInfo(itemLink,2)
+		if not itemLink then return emptytable end
+	end
+	if type(tipCache[itemLink].ilevel)=="nil"then -- or not tipCache[itemLink].cached then
+		local cacheIt=true
+		if not scanningTooltip then
+			anchor=CreateFrame("Frame")
+			anchor:Hide()
+			scanningTooltip = _G.CreateFrame("GameTooltip", "LibItemUpgradeInfoTooltip", nil, "GameTooltipTemplate")
+		end
+		--scanningTooltip:ClearLines()
+		GameTooltip_SetDefaultAnchor(scanningTooltip,anchor)
+		local itemString=itemLink:match("|H(.-)|h")
+		local rc,message=pcall(scanningTooltip.SetHyperlink,scanningTooltip,itemString)
+		if (not rc) then
+			return emptytable
+		end
+		scanningTooltip:Show()
+		local quality,_,_,class,subclass,_,_,_,_,classIndex,subclassIndex=CachedGetItemInfo(itemLink,3)
+
+		-- line 1 is the item name
+		-- line 2 may be the item level, or it may be a modifier like "Heroic"
+		-- check up to line 6 just in case
+		local ilevel,soulbound,bop,boe,boa,heirloom
+		if quality==LE_ITEM_QUALITY_ARTIFACT and itemLevel then
+			local relic1, relic2, relic3 = select(4,strsplit(':', itemLink))
+			if relic1 and relic1 ~= '' and not CachedGetItemInfo(relic1) then cacheIt = false end
+			if relic2 and relic2 ~= '' and not CachedGetItemInfo(relic2) then cacheIt = false end
+			if relic3 and relic3 ~= '' and not CachedGetItemInfo(relic3) then cacheIt = false end
+			ilevel=itemLevel
+		end
+		if show then
+			for i=1,12 do
+				local l, ltext = _G["LibItemUpgradeInfoTooltipTextLeft"..i], nil
+				local r, rtext  = _G["LibItemUpgradeInfoTooltipTextRight"..i], nil
+				ltext=l:GetText()
+				rtext=r:GetText()
+				pp(i,ltext,' - ',rtext)
+			end
+		end
+		for i = 2, 6 do
+			local label, text = _G["LibItemUpgradeInfoTooltipTextLeft"..i], nil
+			if label then text=label:GetText() end
+			if text then
+				if ilevel==nil then ilevel = tonumber(text:match(itemLevelPattern)) end
+				if soulbound==nil then soulbound = text:find(soulboundPattern) end
+				if bop==nil then bop = text:find(bopPattern) end
+				if boe==nil then boe = text:find(boePattern) end
+				if boa==nil then boa = text:find(boaPattern1) end
+				if boa==nil then boa = text:find(boaPattern2) end
+			end
+		end
+		tipCache[itemLink]={
+			ilevel=ilevel or itemLevel,
+			soulbound=soulbound,
+			bop=bop,
+			boe=boe,
+			cached=cacheIt
+		}
+		scanningTooltip:Hide()
+	end
+	return tipCache[itemLink]
+end
+
+
+-- GetUpgradeID(itemString)
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns:
+--   Number - The upgrade ID (possibly 0), or nil if the input is invalid or
+--            does not contain upgrade info
+function lib:GetUpgradeID(itemString)
+	if type(itemString)~="string" then return end
+	local itemString = itemString:match("item[%-?%d:]+") or ""-- Standardize itemlink to itemstring
+	local instaid, _, numBonuses, affixes = select(12, strsplit(":", itemString, 15))
+	instaid=tonumber(instaid) or 7
+	numBonuses=tonumber(numBonuses) or 0
+	if instaid >0 and (instaid-4)%8==0 then
+		return tonumber((select(numBonuses + 1, strsplit(":", affixes))))
+	end
+end
+
+-- GetCurrentUpgrade(id)
+--
+-- Returns the current upgrade level of the item, e.g. 1 for a 1/2 item.
+--
+-- Arguments:
+--   id - Number - The upgrade ID of the item (obtained via GetUpgradeID())
+--
+-- Returns:
+--   Number - The current upgrade level of the item. Returns nil if the item
+--            cannot be upgraded
+function lib:GetCurrentUpgrade(id)
+	return upgradeTable[id].upgrade
+end
+
+-- GetMaximumUpgrade(id)
+--
+-- Returns the maximum upgrade level of the item, e.g. 2 for a 1/2 item.
+--
+-- Arguments:
+--   id - Number - The upgrade ID of the item (obtained via GetUpgradeID())
+--
+-- Returns:
+--   Number - The maximum upgrade level of the item. Returns nil if the item
+--            cannot be upgraded
+function lib:GetMaximumUpgrade(id)
+	return upgradeTable[id].max
+end
+
+-- GetItemLevelUpgrade(id)
+--
+-- Returns the item level increase that this upgrade is worth, e.g. 4 for a
+-- 1/2 item or 8 for a 2/2 item.
+--
+-- Arguments:
+--   id - Number - The upgrade ID of the item (obtained via GetUpgradeID())
+--
+-- Returns:
+--   Number - The item level increase of the item. Returns 0 if the item
+--            cannot be or has not been upgraded
+function lib:GetItemLevelUpgrade(id)
+	return upgradeTable[id].ilevel
+end
+
+-- GetItemUpgradeInfo(itemString)
+--
+-- Returns the current upgrade level, maximum upgrade level, and item level
+-- increase for an item.
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns if the item can be upgraded:
+--   Number - The current upgrade level of the item
+--   Number - The maximum upgrade level of the item
+--   Number - The item level increase of the item
+-- or if the item cannot be upgraded:
+--   nil
+--   nil
+--   0
+-- or if the item is invalid or does not contain upgrade info:
+--   nil
+function lib:GetItemUpgradeInfo(itemString)
+	local id = self:GetUpgradeID(itemString)
+	if id then
+		local cur = self:GetCurrentUpgrade(id)
+		local max = self:GetMaximumUpgrade(id)
+		local delta = self:GetItemLevelUpgrade(id)
+		return cur, max, delta
+	end
+	return nil
+end
+
+-- GetHeirloomTrueLevel(itemString)
+--
+-- Returns the true item level for an heirloom (actually, returns the true level for any adapting item)
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns:
+--   Number, Boolean - The true item level of the item. If the item is not
+--                     an heirloom, or an error occurs when trying to scan the
+--                     item tooltip, the second return value is false. Otherwise
+--                     the second return value is true. If the input is invalid,
+--                     (nil, false) is returned.
+-- Convert the ITEM_LEVEL constant into a pattern for our use
+function lib:GetHeirloomTrueLevel(itemString)
+	if type(itemString) ~= "string" then return nil,false end
+	local _, itemLink, rarity, itemLevel = CachedGetItemInfo(itemString)
+	if (not itemLink) then
+		return nil,false
+	end
+	local rc=ScanTip(itemLink,itemLevel)
+	if rc.ilevel then
+		return rc.ilevel,true
+	end
+	return itemLevel, false
+end
+
+-- GetUpgradedItemLevel(itemString)
+--
+-- Returns the true item level of the item, including upgrades and heirlooms.
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns:
+--   Number - The true item level of the item, or nil if the input is invalid
+function lib:GetUpgradedItemLevel(itemString)
+	-- check for heirlooms first
+	local ilvl, isTrue = self:GetHeirloomTrueLevel(itemString)
+	if isTrue then
+		return ilvl
+	end
+	-- not an heirloom? fall back to the regular item logic
+	local id = self:GetUpgradeID(itemString)
+	if ilvl and id then
+		ilvl = ilvl + self:GetItemLevelUpgrade(id)
+	end
+	return ilvl
+end
+
+-- IsBop(itemString)
+--
+-- Check an item for  Bind On Pickup.
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns:
+--   Boolean - True if Bind On Pickup
+
+function lib:IsBop(itemString)
+	local rc=ScanTip(itemString)
+	return rc.bop
+end
+-- IsBoe(itemString)
+--
+-- Check an item for  Bind On Equip.
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns:
+--   Boolean - True if Bind On Equip
+
+function lib:IsBoe(itemString)
+	local rc=ScanTip(itemString)
+	return rc.boe
+end
+-- IsBoa(itemString)
+--
+-- Check an item for  Bind On Aaccount
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns:
+--   Boolean - True if Bind On Equip
+
+function lib:IsBoa(itemString)
+	local rc=ScanTip(itemString)
+	return rc.boa
+end
+
+-- IsArtifact(itemString)
+--
+-- Check an item for  Heirloom
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns:
+--   Boolean - True if Artifact
+
+function lib:IsArtifact(itemString)
+	return CachedGetItemInfo(itemString,i_Quality)==LE_ITEM_QUALITY_ARTIFACT
+end
+
+-- GetClassInfoIsHeirloom(itemString)
+--
+-- Retrieve class and subclass
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns:
+--   class,subclass
+
+
+function lib:GetClassInfo(itemString)
+	local rc=ScantTip(itemString)
+	return rc.class,rc.subclass
+end
+
+
+-- IsHeirloom(itemString)
+--
+-- Check an item for  Heirloom
+--
+-- Arguments:
+--   itemString - String - An itemLink or itemString denoting the item
+--
+-- Returns:
+--   Boolean - True if Heirloom
+
+function lib:IsHeirloom(itemString)
+	return CachedGetItemInfo(itemString,i_Quality) ==LE_ITEM_QUALITY_HEIRLOOM
+end
+---
+-- Parses an itemlink and returns itemId without calling API again
+-- @param #lib self
+-- @param #string itemlink
+-- @return #number itemId or 0
+function lib:GetItemID(itemlink)
+	if (type(itemlink)=="string") then
+			local itemid,context=GetItemInfoFromHyperlink(itemlink)
+			return tonumber(itemid) or 0
+			--return tonumber(itemlink:match("Hitem:(%d+):")) or 0
+	else
+			return 0
+	end
+end
+
+---
+--
+-- Returns a caching version of GetItemInfo. Can be used to override the original one.
+-- Adds a second parameter to directly retrieving a specific value
+-- (Note: internally uses select so it's actually like calling select(n,GetItemInfo(itemID))
+--
+-- Arguments:
+--   self #lib self
+--
+-- Returns:
+--   #function The new function
+
+--@do-not-package--
+function lib:ScanTip(itemLink)
+	local GameTooltip=LibItemUpgradeInfoTooltip
+	if GameTooltip then
+		GameTooltip_SetDefaultAnchor(GameTooltip, UIParent)
+		GameTooltip:SetHyperlink(itemLink)
+		GameTooltip:Show()
+	end
+	return ScanTip(itemLink,100,true)
+end
+function lib:GetCachingGetItemInfo()
+	return CachedGetItemInfo
+end
+function lib:GetCacheStats()
+	local c=lib.itemcache
+	local h=c.tot-c.miss
+	local perc=( h>0) and h/c.tot*100 or 0
+	return c.miss,h,perc
+end
+function lib:GetCache()
+	return lib.itemcache
+end
+function lib:CleanCache()
+	return wipe(lib.itemcache)
+end
+
+--[===========[ ]===========]
+--[===[ Debug utilities ]===]
+--[===========[ ]===========]
+
+local function compareTables(t1, t2)
+	local seen = {}
+	for k, v1 in pairs(t1) do
+		seen[k] = true
+		local v2 = rawget(t2, k)
+		if not v2 then return false end
+		if type(v1) ~= type(v2) then return false end
+		if type(v1) == "table" then
+			if not compareTables(v1, v2) then return false end
+		elseif v1 ~= v2 then return false end
+	end
+	for k in pairs(t2) do
+		if not seen[k] then return false end
+	end
+	return true
+end
+
+-- prints the table rows in red and green
+-- omits the lead { and the trailing }
+local function printDiffTable(t1, t2)
+	local keys, seen = {}, {}
+	for k in pairs(t1) do
+		keys[#keys+1] = k
+		seen[k] = true
+	end
+	for k in pairs(t2) do
+		if not seen[k] then
+			keys[#keys+1] = k
+		end
+	end
+	table.sort(keys)
+	local function formatTable(t)
+		local comps = {}
+		for k, v in pairs(t) do
+			comps[#comps+1] = ("%s = %d"):format(k, v)
+		end
+		return "{ " .. table.concat(comps, ", ") .. " }"
+	end
+	for _, k in ipairs(keys) do
+		local v1, v2 = rawget(t1, k), rawget(t2, k)
+		local equal
+		if type(v1) == "table" and type(v2) == "table" then equal = compareTables(v1, v2)
+		else equal = v1 == v2 end
+		if not equal then
+			if v1 then
+				pp(("|cffff0000    [%d] = %s,|r"):format(k, formatTable(v1)))
+			end
+			if v2 then
+				pp(("|cff00ff00    [%d] = %s,|r"):format(k, formatTable(v2)))
+			end
+		end
+	end
+end
+
+-- Scans the first 10000 upgrade IDs
+-- Run this with /run LibStub:GetLibrary("LibItemUpgradeInfo-1.0"):_CheckUpgradeTable()
+-- If you don't have Aspirant's Staff of Harmony cached it may error out, just try again.
+do
+	local debugFrame
+	local worker
+	local newTable
+	local debugTooltip
+	function lib:_CheckUpgradeTable(itemLink)
+		if worker then
+			pp("|cffff0000LibItemUpgradeInfo-1.0: upgrade check already in progress")
+			return
+		end
+		if not debugFrame then
+			debugFrame = _G.CreateFrame("frame")
+			debugFrame:Hide()
+			debugFrame:SetScript("OnUpdate", function()
+				local ok, result, count, max = pcall(worker)
+				if not ok or result then
+					debugFrame:Hide()
+					worker = nil
+				end
+				if not ok then
+					pp("|cffff0000LibItemUpgradeInfo-1.0 error: " .. result .. "|r")
+				elseif result then
+					pp("LibItemUpgradeInfo-1.0: scan complete")
+					if compareTables(upgradeTable, newTable) then
+						pp("LibItemUpgradeInfo-1.0: |cff00ff00No changes|r")
+					else
+						pp("LibItemUpgradeInfo-1.0: |cffff0000New table:|r {")
+						printDiffTable(upgradeTable, newTable)
+						pp("}")
+					end
+				else
+					pp("LibItemUpgradeInfo-1.0: scanning " .. count .. "/" .. max)
+				end
+			end)
+		end
+		if not debugTooltip then
+			debugTooltip = _G.CreateFrame("GameTooltip", "LibItemUpgradeInfoDebugTooltip", nil, "GameTooltipTemplate")
+			debugTooltip:SetOwner(_G.WorldFrame, "ANCHOR_NONE")
+		end
+		newTable = {}
+		--local itemLink = "|cff0070dd|Hitem:89551:0:0:0:0:0:0:0:90:253:0:0:1:0|h[Aspirant's Staff of Harmony]|h|r"
+		local itemLink = itemLink or "|cff0070dd|Hitem:89551:0:0:0:0:0:0:0:100:253:4:0:0:0|h[Aspirant's Staff of Harmony]|h|r"
+-- Livello è il 9,upgradeid il 14. Al decimo posto, un valore che deve essere 4 o 4+n *8) per far scattare l'uso dell'upgradeid
+		local itemLevel = select(4, _G.GetItemInfo(itemLink))
+		assert(itemLevel, "Can't find item level for itemLink")
+		local count, max, batchsize = 0, 10000, 200
+		worker = function()
+			for i = count, math.min(max, count+batchsize) do
+				local link = itemLink:gsub("%d+|h", i.."|h")
+				debugTooltip:ClearLines()
+				debugTooltip:SetHyperlink(link)
+				local upgrade, max
+				local curLevel, maxLevel = _G.LibItemUpgradeInfoDebugTooltipTextLeft3:GetText():match("^Upgrade Level: (%d+)/(%d+)")
+				local ilvl = tonumber(_G.LibItemUpgradeInfoDebugTooltipTextLeft2:GetText():match("Item Level (%d+)"))
+				if not ilvl then
+					ilvl = tonumber(_G.LibItemUpgradeInfoDebugTooltipTextLeft3:GetText():match("Item Level (%d+)"))
+				end
+				assert(ilvl ~= nil, "Can't find ItemLevel in tooltip: " .. _G.LibItemUpgradeInfoDebugTooltipTextLeft2:GetText())
+				if curLevel or maxLevel or ilvl ~= itemLevel then
+					newTable[i] = { upgrade = tonumber(curLevel), max = tonumber(maxLevel), ilevel = ilvl - itemLevel }
+				end
+			end
+			count = count + batchsize
+			return (count > max), count, max
+		end
+		debugFrame:Show()
+	end
+end
+--@end-do-not-package--
+
+-- vim: set noet sw=4 ts=4:
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc b/EMA/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc
new file mode 100644
index 0000000..c8552d8
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc
@@ -0,0 +1,9 @@
+## Interface: 70200
+## Title: Lib: ItemUpgradeInfo-1.0
+## Notes: Database of item upgrade IDs
+## Author: eridius
+## Version: Release-70200-28 70200
+## X-Revision: 7c5485a
+## X-Category: Library
+
+LibItemUpgradeInfo-1.0.xml
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.xml b/EMA/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.xml
new file mode 100644
index 0000000..49934ad
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
+	<Script file="LibStub\LibStub.lua"/>
+	<Script file="Core.lua"/>
+</Ui>
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.lua b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.lua
new file mode 100644
index 0000000..ae1900e
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.lua
@@ -0,0 +1,51 @@
+-- $Id: LibStub.lua 76 2007-09-03 01:50:17Z mikk $
+-- 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 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]
+
+-- Check to see is this version of the stub is obsolete
+if not LibStub or LibStub.minor < LIBSTUB_MINOR then
+	LibStub = LibStub or {libs = {}, minors = {} }
+	_G[LIBSTUB_MAJOR] = LibStub
+	LibStub.minor = LIBSTUB_MINOR
+
+	-- LibStub:NewLibrary(major, minor)
+	-- major (string) - the major version of the library
+	-- minor (string or number ) - the minor version of the library
+	--
+	-- returns nil if a newer or same version of the lib is already present
+	-- returns empty library object or old library object if upgrade is needed
+	function LibStub:NewLibrary(major, minor)
+		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
+		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
+
+		local oldminor = self.minors[major]
+		if oldminor and oldminor >= minor then return nil end
+		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
+		return self.libs[major], oldminor
+	end
+
+	-- LibStub:GetLibrary(major, [silent])
+	-- major (string) - the major version of the library
+	-- silent (boolean) - if true, library is optional, silently return nil if its not found
+	--
+	-- throws an error if the library can not be found (except silent is set)
+	-- returns the library object if found
+	function LibStub:GetLibrary(major, silent)
+		if not self.libs[major] and not silent then
+			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
+		end
+		return self.libs[major], self.minors[major]
+	end
+
+	-- LibStub:IterateLibraries()
+	--
+	-- Returns an iterator for the currently registered libraries
+	function LibStub:IterateLibraries()
+		return pairs(self.libs)
+	end
+
+	setmetatable(LibStub, { __call = LibStub.GetLibrary })
+end
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc
new file mode 100644
index 0000000..ef0b412
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc
@@ -0,0 +1,9 @@
+## Interface: 70200
+## Title: Lib: LibStub
+## Notes: Universal Library Stub
+## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
+## X-Website: http://www.wowace.com/addons/libstub/
+## X-Category: Library
+## X-License: Public Domain
+
+LibStub.lua
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua
new file mode 100644
index 0000000..338bcf4
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua
@@ -0,0 +1,41 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+local lib, oldMinor = LibStub:NewLibrary("Pants", 1) -- make a new thingy
+assert(lib) -- should return the library table
+assert(not oldMinor) -- should not return the old minor, since it didn't exist
+
+-- the following is to create data and then be able to check if the same data exists after the fact
+function lib:MyMethod()
+end
+local MyMethod = lib.MyMethod
+lib.MyTable = {}
+local MyTable = lib.MyTable
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 1) -- try to register a library with the same version, should silently fail
+assert(not newLib) -- should not return since out of date
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 0) -- try to register a library with a previous, should silently fail
+assert(not newLib) -- should not return since out of date
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 2) -- register a new version
+assert(newLib) -- library table
+assert(rawequal(newLib, lib)) -- should be the same reference as the previous
+assert(newOldMinor == 1) -- should return the minor version of the previous version
+
+assert(rawequal(lib.MyMethod, MyMethod)) -- verify that values were saved
+assert(rawequal(lib.MyTable, MyTable)) -- verify that values were saved
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 3 Blah") -- register a new version with a string minor version (instead of a number)
+assert(newLib) -- library table
+assert(newOldMinor == 2) -- previous version was 2
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 4 and please ignore 15 Blah") -- register a new version with a string minor version (instead of a number)
+assert(newLib)
+assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string)
+
+local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
+assert(newLib)
+assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test2.lua b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test2.lua
new file mode 100644
index 0000000..eae7172
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test2.lua
@@ -0,0 +1,27 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+for major, library in LibStub:IterateLibraries() do
+	-- check that MyLib doesn't exist yet, by iterating through all the libraries
+	assert(major ~= "MyLib")
+end
+
+assert(not LibStub:GetLibrary("MyLib", true)) -- check that MyLib doesn't exist yet by direct checking
+assert(not pcall(LibStub.GetLibrary, LibStub, "MyLib")) -- don't silently fail, thus it should raise an error.
+local lib = LibStub:NewLibrary("MyLib", 1) -- create the lib
+assert(lib) -- check it exists
+assert(rawequal(LibStub:GetLibrary("MyLib"), lib)) -- verify that :GetLibrary("MyLib") properly equals the lib reference
+
+assert(LibStub:NewLibrary("MyLib", 2))	-- create a new version
+
+local count=0
+for major, library in LibStub:IterateLibraries() do
+	-- check that MyLib exists somewhere in the libraries, by iterating through all the libraries
+	if major == "MyLib" then -- we found it!
+		count = count +1
+		assert(rawequal(library, lib)) -- verify that the references are equal
+	end
+end
+assert(count == 1) -- verify that we actually found it, and only once
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua
new file mode 100644
index 0000000..21bda2b
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua
@@ -0,0 +1,14 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+local proxy = newproxy() -- non-string
+
+assert(not pcall(LibStub.NewLibrary, LibStub, proxy, 1)) -- should error, proxy is not a string, it's userdata
+local success, ret = pcall(LibStub.GetLibrary, proxy, true)
+assert(not success or not ret) -- either error because proxy is not a string or because it's not actually registered.
+
+assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
+
+assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
diff --git a/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua
new file mode 100644
index 0000000..4735246
--- /dev/null
+++ b/EMA/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua
@@ -0,0 +1,41 @@
+debugstack = debug.traceback
+strmatch = string.match
+
+loadfile("../LibStub.lua")()
+
+
+-- Pretend like loaded libstub is old and doesn't have :IterateLibraries
+assert(LibStub.minor)
+LibStub.minor = LibStub.minor - 0.0001
+LibStub.IterateLibraries = nil
+
+loadfile("../LibStub.lua")()
+
+assert(type(LibStub.IterateLibraries)=="function")
+
+
+-- Now pretend that we're the same version -- :IterateLibraries should NOT be re-created
+LibStub.IterateLibraries = 123
+
+loadfile("../LibStub.lua")()
+
+assert(LibStub.IterateLibraries == 123)
+
+
+-- Now pretend that a newer version is loaded -- :IterateLibraries should NOT be re-created
+LibStub.minor = LibStub.minor + 0.0001
+
+loadfile("../LibStub.lua")()
+
+assert(LibStub.IterateLibraries == 123)
+
+
+-- Again with a huge number
+LibStub.minor = LibStub.minor + 1234567890
+
+loadfile("../LibStub.lua")()
+
+assert(LibStub.IterateLibraries == 123)
+
+
+print("OK")
diff --git a/EMA/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua b/EMA/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
new file mode 100644
index 0000000..949db48
--- /dev/null
+++ b/EMA/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
@@ -0,0 +1,274 @@
+--[[
+Name: LibSharedMedia-3.0
+Revision: $Revision: 74 $
+Author: Elkano (elkano@gmx.de)
+Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
+Website: http://www.wowace.com/projects/libsharedmedia-3-0/
+Description: Shared handling of media data (fonts, sounds, textures, ...) between addons.
+Dependencies: LibStub, CallbackHandler-1.0
+License: LGPL v2.1
+]]
+
+local MAJOR, MINOR = "LibSharedMedia-3.0", 5000402 -- 5.0.4 v2 / increase manually on changes
+local lib = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not lib then return end
+
+local _G = getfenv(0)
+
+local pairs		= _G.pairs
+local type		= _G.type
+
+local band			= _G.bit.band
+
+local table_insert	= _G.table.insert
+local table_sort	= _G.table.sort
+
+local locale = GetLocale()
+local locale_is_western
+local LOCALE_MASK = 0
+lib.LOCALE_BIT_koKR		= 1
+lib.LOCALE_BIT_ruRU		= 2
+lib.LOCALE_BIT_zhCN		= 4
+lib.LOCALE_BIT_zhTW		= 8
+lib.LOCALE_BIT_western	= 128
+
+local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
+
+lib.callbacks		= lib.callbacks			or CallbackHandler:New(lib)
+
+lib.DefaultMedia	= lib.DefaultMedia		or {}
+lib.MediaList		= lib.MediaList			or {}
+lib.MediaTable		= lib.MediaTable		or {}
+lib.MediaType		= lib.MediaType			or {}
+lib.OverrideMedia	= lib.OverrideMedia		or {}
+
+local defaultMedia = lib.DefaultMedia
+local mediaList = lib.MediaList
+local mediaTable = lib.MediaTable
+local overrideMedia = lib.OverrideMedia
+
+
+-- create mediatype constants
+lib.MediaType.BACKGROUND	= "background"			-- background textures
+lib.MediaType.BORDER		= "border"				-- border textures
+lib.MediaType.FONT			= "font"				-- fonts
+lib.MediaType.STATUSBAR		= "statusbar"			-- statusbar textures
+lib.MediaType.SOUND			= "sound"				-- sound files
+
+-- populate lib with default Blizzard data
+-- BACKGROUND
+if not lib.MediaTable.background then lib.MediaTable.background = {} end
+lib.MediaTable.background["None"]									= [[]]
+lib.MediaTable.background["Blizzard Dialog Background"]				= [[Interface\DialogFrame\UI-DialogBox-Background]]
+lib.MediaTable.background["Blizzard Dialog Background Dark"]		= [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
+lib.MediaTable.background["Blizzard Dialog Background Gold"]		= [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
+lib.MediaTable.background["Blizzard Low Health"]					= [[Interface\FullScreenTextures\LowHealth]]
+lib.MediaTable.background["Blizzard Marble"]						= [[Interface\FrameGeneral\UI-Background-Marble]]
+lib.MediaTable.background["Blizzard Out of Control"]				= [[Interface\FullScreenTextures\OutOfControl]]
+lib.MediaTable.background["Blizzard Parchment"]						= [[Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal]]
+lib.MediaTable.background["Blizzard Parchment 2"]					= [[Interface\AchievementFrame\UI-GuildAchievement-Parchment-Horizontal]]
+lib.MediaTable.background["Blizzard Rock"]							= [[Interface\FrameGeneral\UI-Background-Rock]]
+lib.MediaTable.background["Blizzard Tabard Background"]				= [[Interface\TabardFrame\TabardFrameBackground]]
+lib.MediaTable.background["Blizzard Tooltip"]						= [[Interface\Tooltips\UI-Tooltip-Background]]
+lib.MediaTable.background["Solid"]									= [[Interface\Buttons\WHITE8X8]]
+lib.DefaultMedia.background = "None"
+
+-- BORDER
+if not lib.MediaTable.border then lib.MediaTable.border = {} end
+lib.MediaTable.border["None"]								= [[]]
+lib.MediaTable.border["Blizzard Achievement Wood"]			= [[Interface\AchievementFrame\UI-Achievement-WoodBorder]]
+lib.MediaTable.border["Blizzard Chat Bubble"]				= [[Interface\Tooltips\ChatBubble-Backdrop]]
+lib.MediaTable.border["Blizzard Dialog"]					= [[Interface\DialogFrame\UI-DialogBox-Border]]
+lib.MediaTable.border["Blizzard Dialog Gold"]				= [[Interface\DialogFrame\UI-DialogBox-Gold-Border]]
+lib.MediaTable.border["Blizzard Party"]						= [[Interface\CHARACTERFRAME\UI-Party-Border]]
+lib.MediaTable.border["Blizzard Tooltip"]					= [[Interface\Tooltips\UI-Tooltip-Border]]
+lib.DefaultMedia.border = "None"
+
+-- FONT
+if not lib.MediaTable.font then lib.MediaTable.font = {} end
+local SML_MT_font = lib.MediaTable.font
+--[[
+file				name							latin	koKR	ruRU	zhCN	zhTW
+2002.ttf			2002							X		X		X		-		-
+2002B.ttf			2002 Bold						X		X		X		-		-
+ARHei.ttf			AR CrystalzcuheiGBK Demibold	X		-		X		X		X
+ARIALN.TTF			Arial Narrow					X		-		X		-		-
+ARKai_C.ttf			AR ZhongkaiGBK Medium (Combat)	X		-		X		X		X
+ARKai_T.ttf			AR ZhongkaiGBK Medium			X		-		X		X		X
+bHEI00M.ttf			AR Heiti2 Medium B5				-		-		-		-		X
+bHEI01B.ttf			AR Heiti2 Bold B5				-		-		-		-		X
+bKAI00M.ttf			AR Kaiti Medium B5				-		-		-		-		X
+bLEI00D.ttf			AR Leisu Demi B5				-		-		-		-		X
+FRIZQT__.TTF		Friz Quadrata TT				X		-		-		-		-
+FRIZQT___CYR.TTF	FrizQuadrataCTT					-		-		X		-		-
+K_Damage.TTF		YDIWingsM						-		X		X		-		-
+K_Pagetext.TTF		MoK								X		X		X		-		-
+MORPHEUS.TTF		Morpheus						X		-		-		-		-
+MORPHEUS_CYR.TTF	Morpheus						X		-		X		-		-
+NIM_____.ttf		Nimrod MT						X		-		X		-		-
+SKURRI.TTF			Skurri							X		-		-		-		-
+SKURRI_CYR.TTF		Skurri							X		-		X		-		-
+]]
+
+if locale == "koKR" then
+	LOCALE_MASK = lib.LOCALE_BIT_koKR
+--
+	SML_MT_font["굵은 글꼴"]		= [[Fonts\2002B.TTF]]
+	SML_MT_font["기본 글꼴"]		= [[Fonts\2002.TTF]]
+	SML_MT_font["데미지 글꼴"]		= [[Fonts\K_Damage.TTF]]
+	SML_MT_font["퀘스트 글꼴"]		= [[Fonts\K_Pagetext.TTF]]
+--
+	lib.DefaultMedia["font"] = "기본 글꼴" -- someone from koKR please adjust if needed
+--
+elseif locale == "zhCN" then
+	LOCALE_MASK = lib.LOCALE_BIT_zhCN
+--
+	SML_MT_font["伤害数字"]		= [[Fonts\ARKai_C.ttf]]
+	SML_MT_font["默认"]			= [[Fonts\ARKai_T.ttf]]
+	SML_MT_font["聊天"]			= [[Fonts\ARHei.ttf]]
+--
+	lib.DefaultMedia["font"] = "默认" -- someone from zhCN please adjust if needed
+--
+elseif locale == "zhTW" then
+	LOCALE_MASK = lib.LOCALE_BIT_zhTW
+--
+	SML_MT_font["提示訊息"]		= [[Fonts\bHEI00M.ttf]]
+	SML_MT_font["聊天"]			= [[Fonts\bHEI01B.ttf]]
+	SML_MT_font["傷害數字"]		= [[Fonts\bKAI00M.ttf]]
+	SML_MT_font["預設"]			= [[Fonts\bLEI00D.ttf]]
+--
+	lib.DefaultMedia["font"] = "預設" -- someone from zhTW please adjust if needed
+
+elseif locale == "ruRU" then
+	LOCALE_MASK = lib.LOCALE_BIT_ruRU
+--
+	SML_MT_font["2002"]								= [[Fonts\2002.TTF]]
+	SML_MT_font["2002 Bold"]						= [[Fonts\2002B.TTF]]
+	SML_MT_font["AR CrystalzcuheiGBK Demibold"]		= [[Fonts\ARHei.TTF]]
+	SML_MT_font["AR ZhongkaiGBK Medium (Combat)"]	= [[Fonts\ARKai_C.TTF]]
+	SML_MT_font["AR ZhongkaiGBK Medium"]			= [[Fonts\ARKai_T.TTF]]
+	SML_MT_font["Arial Narrow"]						= [[Fonts\ARIALN.TTF]]
+	SML_MT_font["Friz Quadrata TT"]					= [[Fonts\FRIZQT___CYR.TTF]]
+	SML_MT_font["MoK"]								= [[Fonts\K_Pagetext.TTF]]
+	SML_MT_font["Morpheus"]							= [[Fonts\MORPHEUS_CYR.TTF]]
+	SML_MT_font["Nimrod MT"]						= [[Fonts\NIM_____.ttf]]
+	SML_MT_font["Skurri"]							= [[Fonts\SKURRI_CYR.TTF]]
+--
+	lib.DefaultMedia.font = "Friz Quadrata TT"
+--
+else
+	LOCALE_MASK = lib.LOCALE_BIT_western
+	locale_is_western = true
+--
+	SML_MT_font["2002"]								= [[Fonts\2002.TTF]]
+	SML_MT_font["2002 Bold"]						= [[Fonts\2002B.TTF]]
+	SML_MT_font["AR CrystalzcuheiGBK Demibold"]		= [[Fonts\ARHei.TTF]]
+	SML_MT_font["AR ZhongkaiGBK Medium (Combat)"]	= [[Fonts\ARKai_C.TTF]]
+	SML_MT_font["AR ZhongkaiGBK Medium"]			= [[Fonts\ARKai_T.TTF]]
+	SML_MT_font["Arial Narrow"]						= [[Fonts\ARIALN.TTF]]
+	SML_MT_font["Friz Quadrata TT"]					= [[Fonts\FRIZQT__.TTF]]
+	SML_MT_font["MoK"]								= [[Fonts\K_Pagetext.TTF]]
+	SML_MT_font["Morpheus"]							= [[Fonts\MORPHEUS_CYR.TTF]]
+	SML_MT_font["Nimrod MT"]						= [[Fonts\NIM_____.ttf]]
+	SML_MT_font["Skurri"]							= [[Fonts\SKURRI_CYR.TTF]]
+--
+	lib.DefaultMedia.font = "Friz Quadrata TT"
+--
+end
+
+-- STATUSBAR
+if not lib.MediaTable.statusbar then lib.MediaTable.statusbar = {} end
+lib.MediaTable.statusbar["Blizzard"]						= [[Interface\TargetingFrame\UI-StatusBar]]
+lib.MediaTable.statusbar["Blizzard Character Skills Bar"]	= [[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]]
+lib.MediaTable.statusbar["Blizzard Raid Bar"]				= [[Interface\RaidFrame\Raid-Bar-Hp-Fill]]
+lib.DefaultMedia.statusbar = "Blizzard"
+
+-- SOUND
+if not lib.MediaTable.sound then lib.MediaTable.sound = {} end
+lib.MediaTable.sound["None"]								= [[Interface\Quiet.ogg]]	-- Relies on the fact that PlaySound[File] doesn't error on non-existing input.
+lib.DefaultMedia.sound = "None"
+
+local function rebuildMediaList(mediatype)
+	local mtable = mediaTable[mediatype]
+	if not mtable then return end
+	if not mediaList[mediatype] then mediaList[mediatype] = {} end
+	local mlist = mediaList[mediatype]
+	-- list can only get larger, so simply overwrite it
+	local i = 0
+	for k in pairs(mtable) do
+		i = i + 1
+		mlist[i] = k
+	end
+	table_sort(mlist)
+end
+
+function lib:Register(mediatype, key, data, langmask)
+	if type(mediatype) ~= "string" then
+		error(MAJOR..":Register(mediatype, key, data, langmask) - mediatype must be string, got "..type(mediatype))
+	end
+	if type(key) ~= "string" then
+		error(MAJOR..":Register(mediatype, key, data, langmask) - key must be string, got "..type(key))
+	end
+	mediatype = mediatype:lower()
+	if mediatype == lib.MediaType.FONT  and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then return false end
+	if not mediaTable[mediatype] then mediaTable[mediatype] = {} end
+	local mtable = mediaTable[mediatype]
+	if mtable[key] then return false end
+
+	mtable[key] = data
+	rebuildMediaList(mediatype)
+	self.callbacks:Fire("LibSharedMedia_Registered", mediatype, key)
+	return true
+end
+
+function lib:Fetch(mediatype, key, noDefault)
+	local mtt = mediaTable[mediatype]
+	local overridekey = overrideMedia[mediatype]
+	local result = mtt and ((overridekey and mtt[overridekey] or mtt[key]) or (not noDefault and defaultMedia[mediatype] and mtt[defaultMedia[mediatype]])) or nil
+	return result ~= "" and result or nil
+end
+
+function lib:IsValid(mediatype, key)
+	return mediaTable[mediatype] and (not key or mediaTable[mediatype][key]) and true or false
+end
+
+function lib:HashTable(mediatype)
+	return mediaTable[mediatype]
+end
+
+function lib:List(mediatype)
+	if not mediaTable[mediatype] then
+		return nil
+	end
+	if not mediaList[mediatype] then
+		rebuildMediaList(mediatype)
+	end
+	return mediaList[mediatype]
+end
+
+function lib:GetGlobal(mediatype)
+	return overrideMedia[mediatype]
+end
+
+function lib:SetGlobal(mediatype, key)
+	if not mediaTable[mediatype] then
+		return false
+	end
+	overrideMedia[mediatype] = (key and mediaTable[mediatype][key]) and key or nil
+	self.callbacks:Fire("LibSharedMedia_SetGlobal", mediatype, overrideMedia[mediatype])
+	return true
+end
+
+function lib:GetDefault(mediatype)
+	return defaultMedia[mediatype]
+end
+
+function lib:SetDefault(mediatype, key)
+	if mediaTable[mediatype] and mediaTable[mediatype][key] and not defaultMedia[mediatype] then
+		defaultMedia[mediatype] = key
+		return true
+	else
+		return false
+	end
+end
diff --git a/EMA/Libs/LibSharedMedia-3.0/lib.xml b/EMA/Libs/LibSharedMedia-3.0/lib.xml
new file mode 100644
index 0000000..34aa874
--- /dev/null
+++ b/EMA/Libs/LibSharedMedia-3.0/lib.xml
@@ -0,0 +1,4 @@
+<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
+..\FrameXML\UI.xsd">
+	<Script file="LibSharedMedia-3.0.lua" />
+</Ui>
\ No newline at end of file
diff --git a/EMA/Libs/LibStub/LibStub.lua b/EMA/Libs/LibStub/LibStub.lua
new file mode 100644
index 0000000..0a41ac0
--- /dev/null
+++ b/EMA/Libs/LibStub/LibStub.lua
@@ -0,0 +1,30 @@
+-- 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 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]
+
+if not LibStub or LibStub.minor < LIBSTUB_MINOR then
+	LibStub = LibStub or {libs = {}, minors = {} }
+	_G[LIBSTUB_MAJOR] = LibStub
+	LibStub.minor = LIBSTUB_MINOR
+
+	function LibStub:NewLibrary(major, minor)
+		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
+		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
+
+		local oldminor = self.minors[major]
+		if oldminor and oldminor >= minor then return nil end
+		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
+		return self.libs[major], oldminor
+	end
+
+	function LibStub:GetLibrary(major, silent)
+		if not self.libs[major] and not silent then
+			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
+		end
+		return self.libs[major], self.minors[major]
+	end
+
+	function LibStub:IterateLibraries() return pairs(self.libs) end
+	setmetatable(LibStub, { __call = LibStub.GetLibrary })
+end
diff --git a/EMA/Libs/LibStub/LibStub.toc b/EMA/Libs/LibStub/LibStub.toc
new file mode 100644
index 0000000..4d9130c
--- /dev/null
+++ b/EMA/Libs/LibStub/LibStub.toc
@@ -0,0 +1,9 @@
+## Interface: 20400
+## Title: Lib: LibStub
+## Notes: Universal Library Stub
+## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
+## X-Website: http://jira.wowace.com/browse/LS
+## X-Category: Library
+## X-License: Public Domain
+
+LibStub.lua
diff --git a/EMA/Libs/UTF8/Changelog-UTF8-v1.1.txt b/EMA/Libs/UTF8/Changelog-UTF8-v1.1.txt
new file mode 100644
index 0000000..da84888
--- /dev/null
+++ b/EMA/Libs/UTF8/Changelog-UTF8-v1.1.txt
@@ -0,0 +1,19 @@
+------------------------------------------------------------------------
+r6 | phanx | 2014-10-28 02:27:07 +0000 (Tue, 28 Oct 2014) | 1 line
+Changed paths:
+   A /tags/v1.1 (from /trunk:5)
+
+Tagging as v1.1
+------------------------------------------------------------------------
+r5 | Phanx | 2014-10-28 02:26:44 +0000 (Tue, 28 Oct 2014) | 1 line
+Changed paths:
+   M /trunk/UTF8.toc
+
+- Update TOC for a new release
+------------------------------------------------------------------------
+r4 | Phanx | 2012-09-07 10:25:33 +0000 (Fri, 07 Sep 2012) | 1 line
+Changed paths:
+   M /trunk/utf8.lua
+
+- Switched from slower x:sub notation to faster upvalued strsub(x)
+------------------------------------------------------------------------
diff --git a/EMA/Libs/UTF8/UTF8.toc b/EMA/Libs/UTF8/UTF8.toc
new file mode 100644
index 0000000..e971b12
--- /dev/null
+++ b/EMA/Libs/UTF8/UTF8.toc
@@ -0,0 +1,15 @@
+## Interface: 60000
+## Version: v1.1
+## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6
+## X-Curse-Project-Name: Jamba
+## X-Curse-Project-ID: jamba
+## X-Curse-Repository-ID: wow/jamba/mainline
+
+## Title: Lib: UTF8
+## Notes: A library for manipulating UTF-8 strings
+## Author: Pastamancer
+## X-License: BSD License
+## X-Website: http://www.wowace.com/addons/utf8/
+
+utf8data.lua
+utf8.lua
\ No newline at end of file
diff --git a/EMA/Libs/UTF8/utf8.lua b/EMA/Libs/UTF8/utf8.lua
new file mode 100644
index 0000000..485582c
--- /dev/null
+++ b/EMA/Libs/UTF8/utf8.lua
@@ -0,0 +1,317 @@
+-- $Id: utf8.lua 179 2009-04-03 18:10:03Z pasta $
+--
+-- Provides UTF-8 aware string functions implemented in pure lua:
+-- * string.utf8len(s)
+-- * string.utf8sub(s, i, j)
+-- * string.utf8reverse(s)
+--
+-- If utf8data.lua (containing the lower<->upper case mappings) is loaded, these
+-- additional functions are available:
+-- * string.utf8upper(s)
+-- * string.utf8lower(s)
+--
+-- All functions behave as their non UTF-8 aware counterparts with the exception
+-- that UTF-8 characters are used instead of bytes for all units.
+
+--[[
+Copyright (c) 2006-2007, Kyle Smith
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the author nor the names of its contributors may be
+      used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+--]]
+
+-- ABNF from RFC 3629
+--
+-- UTF8-octets = *( UTF8-char )
+-- UTF8-char   = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
+-- UTF8-1      = %x00-7F
+-- UTF8-2      = %xC2-DF UTF8-tail
+-- UTF8-3      = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
+--               %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
+-- UTF8-4      = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
+--               %xF4 %x80-8F 2( UTF8-tail )
+-- UTF8-tail   = %x80-BF
+--
+
+local strbyte, strlen, strsub, type = string.byte, string.len, string.sub, type
+
+-- returns the number of bytes used by the UTF-8 character at byte i in s
+-- also doubles as a UTF-8 character validator
+local function utf8charbytes(s, i)
+	-- argument defaults
+	i = i or 1
+
+	-- argument checking
+	if type(s) ~= "string" then
+		error("bad argument #1 to 'utf8charbytes' (string expected, got ".. type(s).. ")")
+	end
+	if type(i) ~= "number" then
+		error("bad argument #2 to 'utf8charbytes' (number expected, got ".. type(i).. ")")
+	end
+
+	local c = strbyte(s, i)
+
+	-- determine bytes needed for character, based on RFC 3629
+	-- validate byte 1
+	if c > 0 and c <= 127 then
+		-- UTF8-1
+		return 1
+
+	elseif c >= 194 and c <= 223 then
+		-- UTF8-2
+		local c2 = strbyte(s, i + 1)
+
+		if not c2 then
+			error("UTF-8 string terminated early")
+		end
+
+		-- validate byte 2
+		if c2 < 128 or c2 > 191 then
+			error("Invalid UTF-8 character")
+		end
+
+		return 2
+
+	elseif c >= 224 and c <= 239 then
+		-- UTF8-3
+		local c2 = strbyte(s, i + 1)
+		local c3 = strbyte(s, i + 2)
+
+		if not c2 or not c3 then
+			error("UTF-8 string terminated early")
+		end
+
+		-- validate byte 2
+		if c == 224 and (c2 < 160 or c2 > 191) then
+			error("Invalid UTF-8 character")
+		elseif c == 237 and (c2 < 128 or c2 > 159) then
+			error("Invalid UTF-8 character")
+		elseif c2 < 128 or c2 > 191 then
+			error("Invalid UTF-8 character")
+		end
+
+		-- validate byte 3
+		if c3 < 128 or c3 > 191 then
+			error("Invalid UTF-8 character")
+		end
+
+		return 3
+
+	elseif c >= 240 and c <= 244 then
+		-- UTF8-4
+		local c2 = strbyte(s, i + 1)
+		local c3 = strbyte(s, i + 2)
+		local c4 = strbyte(s, i + 3)
+
+		if not c2 or not c3 or not c4 then
+			error("UTF-8 string terminated early")
+		end
+
+		-- validate byte 2
+		if c == 240 and (c2 < 144 or c2 > 191) then
+			error("Invalid UTF-8 character")
+		elseif c == 244 and (c2 < 128 or c2 > 143) then
+			error("Invalid UTF-8 character")
+		elseif c2 < 128 or c2 > 191 then
+			error("Invalid UTF-8 character")
+		end
+
+		-- validate byte 3
+		if c3 < 128 or c3 > 191 then
+			error("Invalid UTF-8 character")
+		end
+
+		-- validate byte 4
+		if c4 < 128 or c4 > 191 then
+			error("Invalid UTF-8 character")
+		end
+
+		return 4
+
+	else
+		error("Invalid UTF-8 character")
+	end
+end
+
+-- returns the number of characters in a UTF-8 string
+local function utf8len(s)
+	-- argument checking
+	if type(s) ~= "string" then
+		error("bad argument #1 to 'utf8len' (string expected, got ".. type(s).. ")")
+	end
+
+	local pos = 1
+	local bytes = strlen(s)
+	local len = 0
+
+	while pos <= bytes do
+		len = len + 1
+		pos = pos + utf8charbytes(s, pos)
+	end
+
+	return len
+end
+
+-- install in the string library
+if not string.utf8len then
+	string.utf8len = utf8len
+end
+
+-- functions identically to string.sub except that i and j are UTF-8 characters
+-- instead of bytes
+local function utf8sub(s, i, j)
+	-- argument defaults
+	j = j or -1
+
+	-- argument checking
+	if type(s) ~= "string" then
+		error("bad argument #1 to 'utf8sub' (string expected, got ".. type(s).. ")")
+	end
+	if type(i) ~= "number" then
+		error("bad argument #2 to 'utf8sub' (number expected, got ".. type(i).. ")")
+	end
+	if type(j) ~= "number" then
+		error("bad argument #3 to 'utf8sub' (number expected, got ".. type(j).. ")")
+	end
+
+	local pos = 1
+	local bytes = strlen(s)
+	local len = 0
+
+	-- only set l if i or j is negative
+	local l = (i >= 0 and j >= 0) or utf8len(s)
+	local startChar = (i >= 0) and i or l + i + 1
+	local endChar   = (j >= 0) and j or l + j + 1
+
+	-- can't have start before end!
+	if startChar > endChar then
+		return ""
+	end
+
+	-- byte offsets to pass to string.sub
+	local startByte, endByte = 1, bytes
+
+	while pos <= bytes do
+		len = len + 1
+
+		if len == startChar then
+			startByte = pos
+		end
+
+		pos = pos + utf8charbytes(s, pos)
+
+		if len == endChar then
+			endByte = pos - 1
+			break
+		end
+	end
+
+	return strsub(s, startByte, endByte)
+end
+
+-- install in the string library
+if not string.utf8sub then
+	string.utf8sub = utf8sub
+end
+
+-- replace UTF-8 characters based on a mapping table
+local function utf8replace(s, mapping)
+	-- argument checking
+	if type(s) ~= "string" then
+		error("bad argument #1 to 'utf8replace' (string expected, got ".. type(s).. ")")
+	end
+	if type(mapping) ~= "table" then
+		error("bad argument #2 to 'utf8replace' (table expected, got ".. type(mapping).. ")")
+	end
+
+	local pos = 1
+	local bytes = strlen(s)
+	local charbytes
+	local newstr = ""
+
+	while pos <= bytes do
+		charbytes = utf8charbytes(s, pos)
+		local c = strsub(s, pos, pos + charbytes - 1)
+
+		newstr = newstr .. (mapping[c] or c)
+
+		pos = pos + charbytes
+	end
+
+	return newstr
+end
+
+-- identical to string.upper except it knows about unicode simple case conversions
+local function utf8upper(s)
+	return utf8replace(s, utf8_lc_uc)
+end
+
+-- install in the string library
+if not string.utf8upper and utf8_lc_uc then
+	string.utf8upper = utf8upper
+end
+
+-- identical to string.lower except it knows about unicode simple case conversions
+local function utf8lower(s)
+	return utf8replace(s, utf8_uc_lc)
+end
+
+-- install in the string library
+if not string.utf8lower and utf8_uc_lc then
+	string.utf8lower = utf8lower
+end
+
+-- identical to string.reverse except that it supports UTF-8
+local function utf8reverse(s)
+	-- argument checking
+	if type(s) ~= "string" then
+		error("bad argument #1 to 'utf8reverse' (string expected, got ".. type(s).. ")")
+	end
+
+	local bytes = strlen(s)
+	local pos = bytes
+	local charbytes
+	local newstr = ""
+
+	while pos > 0 do
+		c = strbyte(s, pos)
+		while c >= 128 and c <= 191 do
+			pos = pos - 1
+			c = strbyte(pos)
+		end
+
+		charbytes = utf8charbytes(s, pos)
+
+		newstr = newstr .. strsub(s, pos, pos + charbytes - 1)
+
+		pos = pos - 1
+	end
+
+	return newstr
+end
+
+-- install in the string library
+if not string.utf8reverse then
+	string.utf8reverse = utf8reverse
+end
\ No newline at end of file
diff --git a/EMA/Libs/UTF8/utf8data.lua b/EMA/Libs/UTF8/utf8data.lua
new file mode 100644
index 0000000..655f719
--- /dev/null
+++ b/EMA/Libs/UTF8/utf8data.lua
@@ -0,0 +1,1860 @@
+utf8_lc_uc = {
+	["a"] = "A",
+	["b"] = "B",
+	["c"] = "C",
+	["d"] = "D",
+	["e"] = "E",
+	["f"] = "F",
+	["g"] = "G",
+	["h"] = "H",
+	["i"] = "I",
+	["j"] = "J",
+	["k"] = "K",
+	["l"] = "L",
+	["m"] = "M",
+	["n"] = "N",
+	["o"] = "O",
+	["p"] = "P",
+	["q"] = "Q",
+	["r"] = "R",
+	["s"] = "S",
+	["t"] = "T",
+	["u"] = "U",
+	["v"] = "V",
+	["w"] = "W",
+	["x"] = "X",
+	["y"] = "Y",
+	["z"] = "Z",
+	["µ"] = "Μ",
+	["à"] = "À",
+	["á"] = "Á",
+	["â"] = "Â",
+	["ã"] = "Ã",
+	["ä"] = "Ä",
+	["å"] = "Å",
+	["æ"] = "Æ",
+	["ç"] = "Ç",
+	["è"] = "È",
+	["é"] = "É",
+	["ê"] = "Ê",
+	["ë"] = "Ë",
+	["ì"] = "Ì",
+	["í"] = "Í",
+	["î"] = "Î",
+	["ï"] = "Ï",
+	["ð"] = "Ð",
+	["ñ"] = "Ñ",
+	["ò"] = "Ò",
+	["ó"] = "Ó",
+	["ô"] = "Ô",
+	["õ"] = "Õ",
+	["ö"] = "Ö",
+	["ø"] = "Ø",
+	["ù"] = "Ù",
+	["ú"] = "Ú",
+	["û"] = "Û",
+	["ü"] = "Ü",
+	["ý"] = "Ý",
+	["þ"] = "Þ",
+	["ÿ"] = "Ÿ",
+	["ā"] = "Ā",
+	["ă"] = "Ă",
+	["ą"] = "Ą",
+	["ć"] = "Ć",
+	["ĉ"] = "Ĉ",
+	["ċ"] = "Ċ",
+	["č"] = "Č",
+	["ď"] = "Ď",
+	["đ"] = "Đ",
+	["ē"] = "Ē",
+	["ĕ"] = "Ĕ",
+	["ė"] = "Ė",
+	["ę"] = "Ę",
+	["ě"] = "Ě",
+	["ĝ"] = "Ĝ",
+	["ğ"] = "Ğ",
+	["ġ"] = "Ġ",
+	["ģ"] = "Ģ",
+	["ĥ"] = "Ĥ",
+	["ħ"] = "Ħ",
+	["ĩ"] = "Ĩ",
+	["ī"] = "Ī",
+	["ĭ"] = "Ĭ",
+	["į"] = "Į",
+	["ı"] = "I",
+	["ij"] = "IJ",
+	["ĵ"] = "Ĵ",
+	["ķ"] = "Ķ",
+	["ĺ"] = "Ĺ",
+	["ļ"] = "Ļ",
+	["ľ"] = "Ľ",
+	["ŀ"] = "Ŀ",
+	["ł"] = "Ł",
+	["ń"] = "Ń",
+	["ņ"] = "Ņ",
+	["ň"] = "Ň",
+	["ŋ"] = "Ŋ",
+	["ō"] = "Ō",
+	["ŏ"] = "Ŏ",
+	["ő"] = "Ő",
+	["œ"] = "Œ",
+	["ŕ"] = "Ŕ",
+	["ŗ"] = "Ŗ",
+	["ř"] = "Ř",
+	["ś"] = "Ś",
+	["ŝ"] = "Ŝ",
+	["ş"] = "Ş",
+	["š"] = "Š",
+	["ţ"] = "Ţ",
+	["ť"] = "Ť",
+	["ŧ"] = "Ŧ",
+	["ũ"] = "Ũ",
+	["ū"] = "Ū",
+	["ŭ"] = "Ŭ",
+	["ů"] = "Ů",
+	["ű"] = "Ű",
+	["ų"] = "Ų",
+	["ŵ"] = "Ŵ",
+	["ŷ"] = "Ŷ",
+	["ź"] = "Ź",
+	["ż"] = "Ż",
+	["ž"] = "Ž",
+	["ſ"] = "S",
+	["ƀ"] = "Ƀ",
+	["ƃ"] = "Ƃ",
+	["ƅ"] = "Ƅ",
+	["ƈ"] = "Ƈ",
+	["ƌ"] = "Ƌ",
+	["ƒ"] = "Ƒ",
+	["ƕ"] = "Ƕ",
+	["ƙ"] = "Ƙ",
+	["ƚ"] = "Ƚ",
+	["ƞ"] = "Ƞ",
+	["ơ"] = "Ơ",
+	["ƣ"] = "Ƣ",
+	["ƥ"] = "Ƥ",
+	["ƨ"] = "Ƨ",
+	["ƭ"] = "Ƭ",
+	["ư"] = "Ư",
+	["ƴ"] = "Ƴ",
+	["ƶ"] = "Ƶ",
+	["ƹ"] = "Ƹ",
+	["ƽ"] = "Ƽ",
+	["ƿ"] = "Ƿ",
+	["Dž"] = "DŽ",
+	["dž"] = "DŽ",
+	["Lj"] = "LJ",
+	["lj"] = "LJ",
+	["Nj"] = "NJ",
+	["nj"] = "NJ",
+	["ǎ"] = "Ǎ",
+	["ǐ"] = "Ǐ",
+	["ǒ"] = "Ǒ",
+	["ǔ"] = "Ǔ",
+	["ǖ"] = "Ǖ",
+	["ǘ"] = "Ǘ",
+	["ǚ"] = "Ǚ",
+	["ǜ"] = "Ǜ",
+	["ǝ"] = "Ǝ",
+	["ǟ"] = "Ǟ",
+	["ǡ"] = "Ǡ",
+	["ǣ"] = "Ǣ",
+	["ǥ"] = "Ǥ",
+	["ǧ"] = "Ǧ",
+	["ǩ"] = "Ǩ",
+	["ǫ"] = "Ǫ",
+	["ǭ"] = "Ǭ",
+	["ǯ"] = "Ǯ",
+	["Dz"] = "DZ",
+	["dz"] = "DZ",
+	["ǵ"] = "Ǵ",
+	["ǹ"] = "Ǹ",
+	["ǻ"] = "Ǻ",
+	["ǽ"] = "Ǽ",
+	["ǿ"] = "Ǿ",
+	["ȁ"] = "Ȁ",
+	["ȃ"] = "Ȃ",
+	["ȅ"] = "Ȅ",
+	["ȇ"] = "Ȇ",
+	["ȉ"] = "Ȉ",
+	["ȋ"] = "Ȋ",
+	["ȍ"] = "Ȍ",
+	["ȏ"] = "Ȏ",
+	["ȑ"] = "Ȑ",
+	["ȓ"] = "Ȓ",
+	["ȕ"] = "Ȕ",
+	["ȗ"] = "Ȗ",
+	["ș"] = "Ș",
+	["ț"] = "Ț",
+	["ȝ"] = "Ȝ",
+	["ȟ"] = "Ȟ",
+	["ȣ"] = "Ȣ",
+	["ȥ"] = "Ȥ",
+	["ȧ"] = "Ȧ",
+	["ȩ"] = "Ȩ",
+	["ȫ"] = "Ȫ",
+	["ȭ"] = "Ȭ",
+	["ȯ"] = "Ȯ",
+	["ȱ"] = "Ȱ",
+	["ȳ"] = "Ȳ",
+	["ȼ"] = "Ȼ",
+	["ɂ"] = "Ɂ",
+	["ɇ"] = "Ɇ",
+	["ɉ"] = "Ɉ",
+	["ɋ"] = "Ɋ",
+	["ɍ"] = "Ɍ",
+	["ɏ"] = "Ɏ",
+	["ɓ"] = "Ɓ",
+	["ɔ"] = "Ɔ",
+	["ɖ"] = "Ɖ",
+	["ɗ"] = "Ɗ",
+	["ə"] = "Ə",
+	["ɛ"] = "Ɛ",
+	["ɠ"] = "Ɠ",
+	["ɣ"] = "Ɣ",
+	["ɨ"] = "Ɨ",
+	["ɩ"] = "Ɩ",
+	["ɫ"] = "Ɫ",
+	["ɯ"] = "Ɯ",
+	["ɲ"] = "Ɲ",
+	["ɵ"] = "Ɵ",
+	["ɽ"] = "Ɽ",
+	["ʀ"] = "Ʀ",
+	["ʃ"] = "Ʃ",
+	["ʈ"] = "Ʈ",
+	["ʉ"] = "Ʉ",
+	["ʊ"] = "Ʊ",
+	["ʋ"] = "Ʋ",
+	["ʌ"] = "Ʌ",
+	["ʒ"] = "Ʒ",
+	["ͅ"] = "Ι",
+	["ͻ"] = "Ͻ",
+	["ͼ"] = "Ͼ",
+	["ͽ"] = "Ͽ",
+	["ά"] = "Ά",
+	["έ"] = "Έ",
+	["ή"] = "Ή",
+	["ί"] = "Ί",
+	["α"] = "Α",
+	["β"] = "Β",
+	["γ"] = "Γ",
+	["δ"] = "Δ",
+	["ε"] = "Ε",
+	["ζ"] = "Ζ",
+	["η"] = "Η",
+	["θ"] = "Θ",
+	["ι"] = "Ι",
+	["κ"] = "Κ",
+	["λ"] = "Λ",
+	["μ"] = "Μ",
+	["ν"] = "Ν",
+	["ξ"] = "Ξ",
+	["ο"] = "Ο",
+	["π"] = "Π",
+	["ρ"] = "Ρ",
+	["ς"] = "Σ",
+	["σ"] = "Σ",
+	["τ"] = "Τ",
+	["υ"] = "Υ",
+	["φ"] = "Φ",
+	["χ"] = "Χ",
+	["ψ"] = "Ψ",
+	["ω"] = "Ω",
+	["ϊ"] = "Ϊ",
+	["ϋ"] = "Ϋ",
+	["ό"] = "Ό",
+	["ύ"] = "Ύ",
+	["ώ"] = "Ώ",
+	["ϐ"] = "Β",
+	["ϑ"] = "Θ",
+	["ϕ"] = "Φ",
+	["ϖ"] = "Π",
+	["ϙ"] = "Ϙ",
+	["ϛ"] = "Ϛ",
+	["ϝ"] = "Ϝ",
+	["ϟ"] = "Ϟ",
+	["ϡ"] = "Ϡ",
+	["ϣ"] = "Ϣ",
+	["ϥ"] = "Ϥ",
+	["ϧ"] = "Ϧ",
+	["ϩ"] = "Ϩ",
+	["ϫ"] = "Ϫ",
+	["ϭ"] = "Ϭ",
+	["ϯ"] = "Ϯ",
+	["ϰ"] = "Κ",
+	["ϱ"] = "Ρ",
+	["ϲ"] = "Ϲ",
+	["ϵ"] = "Ε",
+	["ϸ"] = "Ϸ",
+	["ϻ"] = "Ϻ",
+	["а"] = "А",
+	["б"] = "Б",
+	["в"] = "В",
+	["г"] = "Г",
+	["д"] = "Д",
+	["е"] = "Е",
+	["ж"] = "Ж",
+	["з"] = "З",
+	["и"] = "И",
+	["й"] = "Й",
+	["к"] = "К",
+	["л"] = "Л",
+	["м"] = "М",
+	["н"] = "Н",
+	["о"] = "О",
+	["п"] = "П",
+	["р"] = "Р",
+	["с"] = "С",
+	["т"] = "Т",
+	["у"] = "У",
+	["ф"] = "Ф",
+	["х"] = "Х",
+	["ц"] = "Ц",
+	["ч"] = "Ч",
+	["ш"] = "Ш",
+	["щ"] = "Щ",
+	["ъ"] = "Ъ",
+	["ы"] = "Ы",
+	["ь"] = "Ь",
+	["э"] = "Э",
+	["ю"] = "Ю",
+	["я"] = "Я",
+	["ѐ"] = "Ѐ",
+	["ё"] = "Ё",
+	["ђ"] = "Ђ",
+	["ѓ"] = "Ѓ",
+	["є"] = "Є",
+	["ѕ"] = "Ѕ",
+	["і"] = "І",
+	["ї"] = "Ї",
+	["ј"] = "Ј",
+	["љ"] = "Љ",
+	["њ"] = "Њ",
+	["ћ"] = "Ћ",
+	["ќ"] = "Ќ",
+	["ѝ"] = "Ѝ",
+	["ў"] = "Ў",
+	["џ"] = "Џ",
+	["ѡ"] = "Ѡ",
+	["ѣ"] = "Ѣ",
+	["ѥ"] = "Ѥ",
+	["ѧ"] = "Ѧ",
+	["ѩ"] = "Ѩ",
+	["ѫ"] = "Ѫ",
+	["ѭ"] = "Ѭ",
+	["ѯ"] = "Ѯ",
+	["ѱ"] = "Ѱ",
+	["ѳ"] = "Ѳ",
+	["ѵ"] = "Ѵ",
+	["ѷ"] = "Ѷ",
+	["ѹ"] = "Ѹ",
+	["ѻ"] = "Ѻ",
+	["ѽ"] = "Ѽ",
+	["ѿ"] = "Ѿ",
+	["ҁ"] = "Ҁ",
+	["ҋ"] = "Ҋ",
+	["ҍ"] = "Ҍ",
+	["ҏ"] = "Ҏ",
+	["ґ"] = "Ґ",
+	["ғ"] = "Ғ",
+	["ҕ"] = "Ҕ",
+	["җ"] = "Җ",
+	["ҙ"] = "Ҙ",
+	["қ"] = "Қ",
+	["ҝ"] = "Ҝ",
+	["ҟ"] = "Ҟ",
+	["ҡ"] = "Ҡ",
+	["ң"] = "Ң",
+	["ҥ"] = "Ҥ",
+	["ҧ"] = "Ҧ",
+	["ҩ"] = "Ҩ",
+	["ҫ"] = "Ҫ",
+	["ҭ"] = "Ҭ",
+	["ү"] = "Ү",
+	["ұ"] = "Ұ",
+	["ҳ"] = "Ҳ",
+	["ҵ"] = "Ҵ",
+	["ҷ"] = "Ҷ",
+	["ҹ"] = "Ҹ",
+	["һ"] = "Һ",
+	["ҽ"] = "Ҽ",
+	["ҿ"] = "Ҿ",
+	["ӂ"] = "Ӂ",
+	["ӄ"] = "Ӄ",
+	["ӆ"] = "Ӆ",
+	["ӈ"] = "Ӈ",
+	["ӊ"] = "Ӊ",
+	["ӌ"] = "Ӌ",
+	["ӎ"] = "Ӎ",
+	["ӏ"] = "Ӏ",
+	["ӑ"] = "Ӑ",
+	["ӓ"] = "Ӓ",
+	["ӕ"] = "Ӕ",
+	["ӗ"] = "Ӗ",
+	["ә"] = "Ә",
+	["ӛ"] = "Ӛ",
+	["ӝ"] = "Ӝ",
+	["ӟ"] = "Ӟ",
+	["ӡ"] = "Ӡ",
+	["ӣ"] = "Ӣ",
+	["ӥ"] = "Ӥ",
+	["ӧ"] = "Ӧ",
+	["ө"] = "Ө",
+	["ӫ"] = "Ӫ",
+	["ӭ"] = "Ӭ",
+	["ӯ"] = "Ӯ",
+	["ӱ"] = "Ӱ",
+	["ӳ"] = "Ӳ",
+	["ӵ"] = "Ӵ",
+	["ӷ"] = "Ӷ",
+	["ӹ"] = "Ӹ",
+	["ӻ"] = "Ӻ",
+	["ӽ"] = "Ӽ",
+	["ӿ"] = "Ӿ",
+	["ԁ"] = "Ԁ",
+	["ԃ"] = "Ԃ",
+	["ԅ"] = "Ԅ",
+	["ԇ"] = "Ԇ",
+	["ԉ"] = "Ԉ",
+	["ԋ"] = "Ԋ",
+	["ԍ"] = "Ԍ",
+	["ԏ"] = "Ԏ",
+	["ԑ"] = "Ԑ",
+	["ԓ"] = "Ԓ",
+	["ա"] = "Ա",
+	["բ"] = "Բ",
+	["գ"] = "Գ",
+	["դ"] = "Դ",
+	["ե"] = "Ե",
+	["զ"] = "Զ",
+	["է"] = "Է",
+	["ը"] = "Ը",
+	["թ"] = "Թ",
+	["ժ"] = "Ժ",
+	["ի"] = "Ի",
+	["լ"] = "Լ",
+	["խ"] = "Խ",
+	["ծ"] = "Ծ",
+	["կ"] = "Կ",
+	["հ"] = "Հ",
+	["ձ"] = "Ձ",
+	["ղ"] = "Ղ",
+	["ճ"] = "Ճ",
+	["մ"] = "Մ",
+	["յ"] = "Յ",
+	["ն"] = "Ն",
+	["շ"] = "Շ",
+	["ո"] = "Ո",
+	["չ"] = "Չ",
+	["պ"] = "Պ",
+	["ջ"] = "Ջ",
+	["ռ"] = "Ռ",
+	["ս"] = "Ս",
+	["վ"] = "Վ",
+	["տ"] = "Տ",
+	["ր"] = "Ր",
+	["ց"] = "Ց",
+	["ւ"] = "Ւ",
+	["փ"] = "Փ",
+	["ք"] = "Ք",
+	["օ"] = "Օ",
+	["ֆ"] = "Ֆ",
+	["ᵽ"] = "Ᵽ",
+	["ḁ"] = "Ḁ",
+	["ḃ"] = "Ḃ",
+	["ḅ"] = "Ḅ",
+	["ḇ"] = "Ḇ",
+	["ḉ"] = "Ḉ",
+	["ḋ"] = "Ḋ",
+	["ḍ"] = "Ḍ",
+	["ḏ"] = "Ḏ",
+	["ḑ"] = "Ḑ",
+	["ḓ"] = "Ḓ",
+	["ḕ"] = "Ḕ",
+	["ḗ"] = "Ḗ",
+	["ḙ"] = "Ḙ",
+	["ḛ"] = "Ḛ",
+	["ḝ"] = "Ḝ",
+	["ḟ"] = "Ḟ",
+	["ḡ"] = "Ḡ",
+	["ḣ"] = "Ḣ",
+	["ḥ"] = "Ḥ",
+	["ḧ"] = "Ḧ",
+	["ḩ"] = "Ḩ",
+	["ḫ"] = "Ḫ",
+	["ḭ"] = "Ḭ",
+	["ḯ"] = "Ḯ",
+	["ḱ"] = "Ḱ",
+	["ḳ"] = "Ḳ",
+	["ḵ"] = "Ḵ",
+	["ḷ"] = "Ḷ",
+	["ḹ"] = "Ḹ",
+	["ḻ"] = "Ḻ",
+	["ḽ"] = "Ḽ",
+	["ḿ"] = "Ḿ",
+	["ṁ"] = "Ṁ",
+	["ṃ"] = "Ṃ",
+	["ṅ"] = "Ṅ",
+	["ṇ"] = "Ṇ",
+	["ṉ"] = "Ṉ",
+	["ṋ"] = "Ṋ",
+	["ṍ"] = "Ṍ",
+	["ṏ"] = "Ṏ",
+	["ṑ"] = "Ṑ",
+	["ṓ"] = "Ṓ",
+	["ṕ"] = "Ṕ",
+	["ṗ"] = "Ṗ",
+	["ṙ"] = "Ṙ",
+	["ṛ"] = "Ṛ",
+	["ṝ"] = "Ṝ",
+	["ṟ"] = "Ṟ",
+	["ṡ"] = "Ṡ",
+	["ṣ"] = "Ṣ",
+	["ṥ"] = "Ṥ",
+	["ṧ"] = "Ṧ",
+	["ṩ"] = "Ṩ",
+	["ṫ"] = "Ṫ",
+	["ṭ"] = "Ṭ",
+	["ṯ"] = "Ṯ",
+	["ṱ"] = "Ṱ",
+	["ṳ"] = "Ṳ",
+	["ṵ"] = "Ṵ",
+	["ṷ"] = "Ṷ",
+	["ṹ"] = "Ṹ",
+	["ṻ"] = "Ṻ",
+	["ṽ"] = "Ṽ",
+	["ṿ"] = "Ṿ",
+	["ẁ"] = "Ẁ",
+	["ẃ"] = "Ẃ",
+	["ẅ"] = "Ẅ",
+	["ẇ"] = "Ẇ",
+	["ẉ"] = "Ẉ",
+	["ẋ"] = "Ẋ",
+	["ẍ"] = "Ẍ",
+	["ẏ"] = "Ẏ",
+	["ẑ"] = "Ẑ",
+	["ẓ"] = "Ẓ",
+	["ẕ"] = "Ẕ",
+	["ẛ"] = "Ṡ",
+	["ạ"] = "Ạ",
+	["ả"] = "Ả",
+	["ấ"] = "Ấ",
+	["ầ"] = "Ầ",
+	["ẩ"] = "Ẩ",
+	["ẫ"] = "Ẫ",
+	["ậ"] = "Ậ",
+	["ắ"] = "Ắ",
+	["ằ"] = "Ằ",
+	["ẳ"] = "Ẳ",
+	["ẵ"] = "Ẵ",
+	["ặ"] = "Ặ",
+	["ẹ"] = "Ẹ",
+	["ẻ"] = "Ẻ",
+	["ẽ"] = "Ẽ",
+	["ế"] = "Ế",
+	["ề"] = "Ề",
+	["ể"] = "Ể",
+	["ễ"] = "Ễ",
+	["ệ"] = "Ệ",
+	["ỉ"] = "Ỉ",
+	["ị"] = "Ị",
+	["ọ"] = "Ọ",
+	["ỏ"] = "Ỏ",
+	["ố"] = "Ố",
+	["ồ"] = "Ồ",
+	["ổ"] = "Ổ",
+	["ỗ"] = "Ỗ",
+	["ộ"] = "Ộ",
+	["ớ"] = "Ớ",
+	["ờ"] = "Ờ",
+	["ở"] = "Ở",
+	["ỡ"] = "Ỡ",
+	["ợ"] = "Ợ",
+	["ụ"] = "Ụ",
+	["ủ"] = "Ủ",
+	["ứ"] = "Ứ",
+	["ừ"] = "Ừ",
+	["ử"] = "Ử",
+	["ữ"] = "Ữ",
+	["ự"] = "Ự",
+	["ỳ"] = "Ỳ",
+	["ỵ"] = "Ỵ",
+	["ỷ"] = "Ỷ",
+	["ỹ"] = "Ỹ",
+	["ἀ"] = "Ἀ",
+	["ἁ"] = "Ἁ",
+	["ἂ"] = "Ἂ",
+	["ἃ"] = "Ἃ",
+	["ἄ"] = "Ἄ",
+	["ἅ"] = "Ἅ",
+	["ἆ"] = "Ἆ",
+	["ἇ"] = "Ἇ",
+	["ἐ"] = "Ἐ",
+	["ἑ"] = "Ἑ",
+	["ἒ"] = "Ἒ",
+	["ἓ"] = "Ἓ",
+	["ἔ"] = "Ἔ",
+	["ἕ"] = "Ἕ",
+	["ἠ"] = "Ἠ",
+	["ἡ"] = "Ἡ",
+	["ἢ"] = "Ἢ",
+	["ἣ"] = "Ἣ",
+	["ἤ"] = "Ἤ",
+	["ἥ"] = "Ἥ",
+	["ἦ"] = "Ἦ",
+	["ἧ"] = "Ἧ",
+	["ἰ"] = "Ἰ",
+	["ἱ"] = "Ἱ",
+	["ἲ"] = "Ἲ",
+	["ἳ"] = "Ἳ",
+	["ἴ"] = "Ἴ",
+	["ἵ"] = "Ἵ",
+	["ἶ"] = "Ἶ",
+	["ἷ"] = "Ἷ",
+	["ὀ"] = "Ὀ",
+	["ὁ"] = "Ὁ",
+	["ὂ"] = "Ὂ",
+	["ὃ"] = "Ὃ",
+	["ὄ"] = "Ὄ",
+	["ὅ"] = "Ὅ",
+	["ὑ"] = "Ὑ",
+	["ὓ"] = "Ὓ",
+	["ὕ"] = "Ὕ",
+	["ὗ"] = "Ὗ",
+	["ὠ"] = "Ὠ",
+	["ὡ"] = "Ὡ",
+	["ὢ"] = "Ὢ",
+	["ὣ"] = "Ὣ",
+	["ὤ"] = "Ὤ",
+	["ὥ"] = "Ὥ",
+	["ὦ"] = "Ὦ",
+	["ὧ"] = "Ὧ",
+	["ὰ"] = "Ὰ",
+	["ά"] = "Ά",
+	["ὲ"] = "Ὲ",
+	["έ"] = "Έ",
+	["ὴ"] = "Ὴ",
+	["ή"] = "Ή",
+	["ὶ"] = "Ὶ",
+	["ί"] = "Ί",
+	["ὸ"] = "Ὸ",
+	["ό"] = "Ό",
+	["ὺ"] = "Ὺ",
+	["ύ"] = "Ύ",
+	["ὼ"] = "Ὼ",
+	["ώ"] = "Ώ",
+	["ᾀ"] = "ᾈ",
+	["ᾁ"] = "ᾉ",
+	["ᾂ"] = "ᾊ",
+	["ᾃ"] = "ᾋ",
+	["ᾄ"] = "ᾌ",
+	["ᾅ"] = "ᾍ",
+	["ᾆ"] = "ᾎ",
+	["ᾇ"] = "ᾏ",
+	["ᾐ"] = "ᾘ",
+	["ᾑ"] = "ᾙ",
+	["ᾒ"] = "ᾚ",
+	["ᾓ"] = "ᾛ",
+	["ᾔ"] = "ᾜ",
+	["ᾕ"] = "ᾝ",
+	["ᾖ"] = "ᾞ",
+	["ᾗ"] = "ᾟ",
+	["ᾠ"] = "ᾨ",
+	["ᾡ"] = "ᾩ",
+	["ᾢ"] = "ᾪ",
+	["ᾣ"] = "ᾫ",
+	["ᾤ"] = "ᾬ",
+	["ᾥ"] = "ᾭ",
+	["ᾦ"] = "ᾮ",
+	["ᾧ"] = "ᾯ",
+	["ᾰ"] = "Ᾰ",
+	["ᾱ"] = "Ᾱ",
+	["ᾳ"] = "ᾼ",
+	["ι"] = "Ι",
+	["ῃ"] = "ῌ",
+	["ῐ"] = "Ῐ",
+	["ῑ"] = "Ῑ",
+	["ῠ"] = "Ῠ",
+	["ῡ"] = "Ῡ",
+	["ῥ"] = "Ῥ",
+	["ῳ"] = "ῼ",
+	["ⅎ"] = "Ⅎ",
+	["ⅰ"] = "Ⅰ",
+	["ⅱ"] = "Ⅱ",
+	["ⅲ"] = "Ⅲ",
+	["ⅳ"] = "Ⅳ",
+	["ⅴ"] = "Ⅴ",
+	["ⅵ"] = "Ⅵ",
+	["ⅶ"] = "Ⅶ",
+	["ⅷ"] = "Ⅷ",
+	["ⅸ"] = "Ⅸ",
+	["ⅹ"] = "Ⅹ",
+	["ⅺ"] = "Ⅺ",
+	["ⅻ"] = "Ⅻ",
+	["ⅼ"] = "Ⅼ",
+	["ⅽ"] = "Ⅽ",
+	["ⅾ"] = "Ⅾ",
+	["ⅿ"] = "Ⅿ",
+	["ↄ"] = "Ↄ",
+	["ⓐ"] = "Ⓐ",
+	["ⓑ"] = "Ⓑ",
+	["ⓒ"] = "Ⓒ",
+	["ⓓ"] = "Ⓓ",
+	["ⓔ"] = "Ⓔ",
+	["ⓕ"] = "Ⓕ",
+	["ⓖ"] = "Ⓖ",
+	["ⓗ"] = "Ⓗ",
+	["ⓘ"] = "Ⓘ",
+	["ⓙ"] = "Ⓙ",
+	["ⓚ"] = "Ⓚ",
+	["ⓛ"] = "Ⓛ",
+	["ⓜ"] = "Ⓜ",
+	["ⓝ"] = "Ⓝ",
+	["ⓞ"] = "Ⓞ",
+	["ⓟ"] = "Ⓟ",
+	["ⓠ"] = "Ⓠ",
+	["ⓡ"] = "Ⓡ",
+	["ⓢ"] = "Ⓢ",
+	["ⓣ"] = "Ⓣ",
+	["ⓤ"] = "Ⓤ",
+	["ⓥ"] = "Ⓥ",
+	["ⓦ"] = "Ⓦ",
+	["ⓧ"] = "Ⓧ",
+	["ⓨ"] = "Ⓨ",
+	["ⓩ"] = "Ⓩ",
+	["ⰰ"] = "Ⰰ",
+	["ⰱ"] = "Ⰱ",
+	["ⰲ"] = "Ⰲ",
+	["ⰳ"] = "Ⰳ",
+	["ⰴ"] = "Ⰴ",
+	["ⰵ"] = "Ⰵ",
+	["ⰶ"] = "Ⰶ",
+	["ⰷ"] = "Ⰷ",
+	["ⰸ"] = "Ⰸ",
+	["ⰹ"] = "Ⰹ",
+	["ⰺ"] = "Ⰺ",
+	["ⰻ"] = "Ⰻ",
+	["ⰼ"] = "Ⰼ",
+	["ⰽ"] = "Ⰽ",
+	["ⰾ"] = "Ⰾ",
+	["ⰿ"] = "Ⰿ",
+	["ⱀ"] = "Ⱀ",
+	["ⱁ"] = "Ⱁ",
+	["ⱂ"] = "Ⱂ",
+	["ⱃ"] = "Ⱃ",
+	["ⱄ"] = "Ⱄ",
+	["ⱅ"] = "Ⱅ",
+	["ⱆ"] = "Ⱆ",
+	["ⱇ"] = "Ⱇ",
+	["ⱈ"] = "Ⱈ",
+	["ⱉ"] = "Ⱉ",
+	["ⱊ"] = "Ⱊ",
+	["ⱋ"] = "Ⱋ",
+	["ⱌ"] = "Ⱌ",
+	["ⱍ"] = "Ⱍ",
+	["ⱎ"] = "Ⱎ",
+	["ⱏ"] = "Ⱏ",
+	["ⱐ"] = "Ⱐ",
+	["ⱑ"] = "Ⱑ",
+	["ⱒ"] = "Ⱒ",
+	["ⱓ"] = "Ⱓ",
+	["ⱔ"] = "Ⱔ",
+	["ⱕ"] = "Ⱕ",
+	["ⱖ"] = "Ⱖ",
+	["ⱗ"] = "Ⱗ",
+	["ⱘ"] = "Ⱘ",
+	["ⱙ"] = "Ⱙ",
+	["ⱚ"] = "Ⱚ",
+	["ⱛ"] = "Ⱛ",
+	["ⱜ"] = "Ⱜ",
+	["ⱝ"] = "Ⱝ",
+	["ⱞ"] = "Ⱞ",
+	["ⱡ"] = "Ⱡ",
+	["ⱥ"] = "Ⱥ",
+	["ⱦ"] = "Ⱦ",
+	["ⱨ"] = "Ⱨ",
+	["ⱪ"] = "Ⱪ",
+	["ⱬ"] = "Ⱬ",
+	["ⱶ"] = "Ⱶ",
+	["ⲁ"] = "Ⲁ",
+	["ⲃ"] = "Ⲃ",
+	["ⲅ"] = "Ⲅ",
+	["ⲇ"] = "Ⲇ",
+	["ⲉ"] = "Ⲉ",
+	["ⲋ"] = "Ⲋ",
+	["ⲍ"] = "Ⲍ",
+	["ⲏ"] = "Ⲏ",
+	["ⲑ"] = "Ⲑ",
+	["ⲓ"] = "Ⲓ",
+	["ⲕ"] = "Ⲕ",
+	["ⲗ"] = "Ⲗ",
+	["ⲙ"] = "Ⲙ",
+	["ⲛ"] = "Ⲛ",
+	["ⲝ"] = "Ⲝ",
+	["ⲟ"] = "Ⲟ",
+	["ⲡ"] = "Ⲡ",
+	["ⲣ"] = "Ⲣ",
+	["ⲥ"] = "Ⲥ",
+	["ⲧ"] = "Ⲧ",
+	["ⲩ"] = "Ⲩ",
+	["ⲫ"] = "Ⲫ",
+	["ⲭ"] = "Ⲭ",
+	["ⲯ"] = "Ⲯ",
+	["ⲱ"] = "Ⲱ",
+	["ⲳ"] = "Ⲳ",
+	["ⲵ"] = "Ⲵ",
+	["ⲷ"] = "Ⲷ",
+	["ⲹ"] = "Ⲹ",
+	["ⲻ"] = "Ⲻ",
+	["ⲽ"] = "Ⲽ",
+	["ⲿ"] = "Ⲿ",
+	["ⳁ"] = "Ⳁ",
+	["ⳃ"] = "Ⳃ",
+	["ⳅ"] = "Ⳅ",
+	["ⳇ"] = "Ⳇ",
+	["ⳉ"] = "Ⳉ",
+	["ⳋ"] = "Ⳋ",
+	["ⳍ"] = "Ⳍ",
+	["ⳏ"] = "Ⳏ",
+	["ⳑ"] = "Ⳑ",
+	["ⳓ"] = "Ⳓ",
+	["ⳕ"] = "Ⳕ",
+	["ⳗ"] = "Ⳗ",
+	["ⳙ"] = "Ⳙ",
+	["ⳛ"] = "Ⳛ",
+	["ⳝ"] = "Ⳝ",
+	["ⳟ"] = "Ⳟ",
+	["ⳡ"] = "Ⳡ",
+	["ⳣ"] = "Ⳣ",
+	["ⴀ"] = "Ⴀ",
+	["ⴁ"] = "Ⴁ",
+	["ⴂ"] = "Ⴂ",
+	["ⴃ"] = "Ⴃ",
+	["ⴄ"] = "Ⴄ",
+	["ⴅ"] = "Ⴅ",
+	["ⴆ"] = "Ⴆ",
+	["ⴇ"] = "Ⴇ",
+	["ⴈ"] = "Ⴈ",
+	["ⴉ"] = "Ⴉ",
+	["ⴊ"] = "Ⴊ",
+	["ⴋ"] = "Ⴋ",
+	["ⴌ"] = "Ⴌ",
+	["ⴍ"] = "Ⴍ",
+	["ⴎ"] = "Ⴎ",
+	["ⴏ"] = "Ⴏ",
+	["ⴐ"] = "Ⴐ",
+	["ⴑ"] = "Ⴑ",
+	["ⴒ"] = "Ⴒ",
+	["ⴓ"] = "Ⴓ",
+	["ⴔ"] = "Ⴔ",
+	["ⴕ"] = "Ⴕ",
+	["ⴖ"] = "Ⴖ",
+	["ⴗ"] = "Ⴗ",
+	["ⴘ"] = "Ⴘ",
+	["ⴙ"] = "Ⴙ",
+	["ⴚ"] = "Ⴚ",
+	["ⴛ"] = "Ⴛ",
+	["ⴜ"] = "Ⴜ",
+	["ⴝ"] = "Ⴝ",
+	["ⴞ"] = "Ⴞ",
+	["ⴟ"] = "Ⴟ",
+	["ⴠ"] = "Ⴠ",
+	["ⴡ"] = "Ⴡ",
+	["ⴢ"] = "Ⴢ",
+	["ⴣ"] = "Ⴣ",
+	["ⴤ"] = "Ⴤ",
+	["ⴥ"] = "Ⴥ",
+	["a"] = "A",
+	["b"] = "B",
+	["c"] = "C",
+	["d"] = "D",
+	["e"] = "E",
+	["f"] = "F",
+	["g"] = "G",
+	["h"] = "H",
+	["i"] = "I",
+	["j"] = "J",
+	["k"] = "K",
+	["l"] = "L",
+	["m"] = "M",
+	["n"] = "N",
+	["o"] = "O",
+	["p"] = "P",
+	["q"] = "Q",
+	["r"] = "R",
+	["s"] = "S",
+	["t"] = "T",
+	["u"] = "U",
+	["v"] = "V",
+	["w"] = "W",
+	["x"] = "X",
+	["y"] = "Y",
+	["z"] = "Z",
+	["𐐨"] = "𐐀",
+	["𐐩"] = "𐐁",
+	["𐐪"] = "𐐂",
+	["𐐫"] = "𐐃",
+	["𐐬"] = "𐐄",
+	["𐐭"] = "𐐅",
+	["𐐮"] = "𐐆",
+	["𐐯"] = "𐐇",
+	["𐐰"] = "𐐈",
+	["𐐱"] = "𐐉",
+	["𐐲"] = "𐐊",
+	["𐐳"] = "𐐋",
+	["𐐴"] = "𐐌",
+	["𐐵"] = "𐐍",
+	["𐐶"] = "𐐎",
+	["𐐷"] = "𐐏",
+	["𐐸"] = "𐐐",
+	["𐐹"] = "𐐑",
+	["𐐺"] = "𐐒",
+	["𐐻"] = "𐐓",
+	["𐐼"] = "𐐔",
+	["𐐽"] = "𐐕",
+	["𐐾"] = "𐐖",
+	["𐐿"] = "𐐗",
+	["𐑀"] = "𐐘",
+	["𐑁"] = "𐐙",
+	["𐑂"] = "𐐚",
+	["𐑃"] = "𐐛",
+	["𐑄"] = "𐐜",
+	["𐑅"] = "𐐝",
+	["𐑆"] = "𐐞",
+	["𐑇"] = "𐐟",
+	["𐑈"] = "𐐠",
+	["𐑉"] = "𐐡",
+	["𐑊"] = "𐐢",
+	["𐑋"] = "𐐣",
+	["𐑌"] = "𐐤",
+	["𐑍"] = "𐐥",
+	["𐑎"] = "𐐦",
+	["𐑏"] = "𐐧",
+}
+
+
+utf8_uc_lc = {
+	["A"] = "a",
+	["B"] = "b",
+	["C"] = "c",
+	["D"] = "d",
+	["E"] = "e",
+	["F"] = "f",
+	["G"] = "g",
+	["H"] = "h",
+	["I"] = "i",
+	["J"] = "j",
+	["K"] = "k",
+	["L"] = "l",
+	["M"] = "m",
+	["N"] = "n",
+	["O"] = "o",
+	["P"] = "p",
+	["Q"] = "q",
+	["R"] = "r",
+	["S"] = "s",
+	["T"] = "t",
+	["U"] = "u",
+	["V"] = "v",
+	["W"] = "w",
+	["X"] = "x",
+	["Y"] = "y",
+	["Z"] = "z",
+	["À"] = "à",
+	["Á"] = "á",
+	["Â"] = "â",
+	["Ã"] = "ã",
+	["Ä"] = "ä",
+	["Å"] = "å",
+	["Æ"] = "æ",
+	["Ç"] = "ç",
+	["È"] = "è",
+	["É"] = "é",
+	["Ê"] = "ê",
+	["Ë"] = "ë",
+	["Ì"] = "ì",
+	["Í"] = "í",
+	["Î"] = "î",
+	["Ï"] = "ï",
+	["Ð"] = "ð",
+	["Ñ"] = "ñ",
+	["Ò"] = "ò",
+	["Ó"] = "ó",
+	["Ô"] = "ô",
+	["Õ"] = "õ",
+	["Ö"] = "ö",
+	["Ø"] = "ø",
+	["Ù"] = "ù",
+	["Ú"] = "ú",
+	["Û"] = "û",
+	["Ü"] = "ü",
+	["Ý"] = "ý",
+	["Þ"] = "þ",
+	["Ā"] = "ā",
+	["Ă"] = "ă",
+	["Ą"] = "ą",
+	["Ć"] = "ć",
+	["Ĉ"] = "ĉ",
+	["Ċ"] = "ċ",
+	["Č"] = "č",
+	["Ď"] = "ď",
+	["Đ"] = "đ",
+	["Ē"] = "ē",
+	["Ĕ"] = "ĕ",
+	["Ė"] = "ė",
+	["Ę"] = "ę",
+	["Ě"] = "ě",
+	["Ĝ"] = "ĝ",
+	["Ğ"] = "ğ",
+	["Ġ"] = "ġ",
+	["Ģ"] = "ģ",
+	["Ĥ"] = "ĥ",
+	["Ħ"] = "ħ",
+	["Ĩ"] = "ĩ",
+	["Ī"] = "ī",
+	["Ĭ"] = "ĭ",
+	["Į"] = "į",
+	["İ"] = "i",
+	["IJ"] = "ij",
+	["Ĵ"] = "ĵ",
+	["Ķ"] = "ķ",
+	["Ĺ"] = "ĺ",
+	["Ļ"] = "ļ",
+	["Ľ"] = "ľ",
+	["Ŀ"] = "ŀ",
+	["Ł"] = "ł",
+	["Ń"] = "ń",
+	["Ņ"] = "ņ",
+	["Ň"] = "ň",
+	["Ŋ"] = "ŋ",
+	["Ō"] = "ō",
+	["Ŏ"] = "ŏ",
+	["Ő"] = "ő",
+	["Œ"] = "œ",
+	["Ŕ"] = "ŕ",
+	["Ŗ"] = "ŗ",
+	["Ř"] = "ř",
+	["Ś"] = "ś",
+	["Ŝ"] = "ŝ",
+	["Ş"] = "ş",
+	["Š"] = "š",
+	["Ţ"] = "ţ",
+	["Ť"] = "ť",
+	["Ŧ"] = "ŧ",
+	["Ũ"] = "ũ",
+	["Ū"] = "ū",
+	["Ŭ"] = "ŭ",
+	["Ů"] = "ů",
+	["Ű"] = "ű",
+	["Ų"] = "ų",
+	["Ŵ"] = "ŵ",
+	["Ŷ"] = "ŷ",
+	["Ÿ"] = "ÿ",
+	["Ź"] = "ź",
+	["Ż"] = "ż",
+	["Ž"] = "ž",
+	["Ɓ"] = "ɓ",
+	["Ƃ"] = "ƃ",
+	["Ƅ"] = "ƅ",
+	["Ɔ"] = "ɔ",
+	["Ƈ"] = "ƈ",
+	["Ɖ"] = "ɖ",
+	["Ɗ"] = "ɗ",
+	["Ƌ"] = "ƌ",
+	["Ǝ"] = "ǝ",
+	["Ə"] = "ə",
+	["Ɛ"] = "ɛ",
+	["Ƒ"] = "ƒ",
+	["Ɠ"] = "ɠ",
+	["Ɣ"] = "ɣ",
+	["Ɩ"] = "ɩ",
+	["Ɨ"] = "ɨ",
+	["Ƙ"] = "ƙ",
+	["Ɯ"] = "ɯ",
+	["Ɲ"] = "ɲ",
+	["Ɵ"] = "ɵ",
+	["Ơ"] = "ơ",
+	["Ƣ"] = "ƣ",
+	["Ƥ"] = "ƥ",
+	["Ʀ"] = "ʀ",
+	["Ƨ"] = "ƨ",
+	["Ʃ"] = "ʃ",
+	["Ƭ"] = "ƭ",
+	["Ʈ"] = "ʈ",
+	["Ư"] = "ư",
+	["Ʊ"] = "ʊ",
+	["Ʋ"] = "ʋ",
+	["Ƴ"] = "ƴ",
+	["Ƶ"] = "ƶ",
+	["Ʒ"] = "ʒ",
+	["Ƹ"] = "ƹ",
+	["Ƽ"] = "ƽ",
+	["DŽ"] = "dž",
+	["Dž"] = "dž",
+	["LJ"] = "lj",
+	["Lj"] = "lj",
+	["NJ"] = "nj",
+	["Nj"] = "nj",
+	["Ǎ"] = "ǎ",
+	["Ǐ"] = "ǐ",
+	["Ǒ"] = "ǒ",
+	["Ǔ"] = "ǔ",
+	["Ǖ"] = "ǖ",
+	["Ǘ"] = "ǘ",
+	["Ǚ"] = "ǚ",
+	["Ǜ"] = "ǜ",
+	["Ǟ"] = "ǟ",
+	["Ǡ"] = "ǡ",
+	["Ǣ"] = "ǣ",
+	["Ǥ"] = "ǥ",
+	["Ǧ"] = "ǧ",
+	["Ǩ"] = "ǩ",
+	["Ǫ"] = "ǫ",
+	["Ǭ"] = "ǭ",
+	["Ǯ"] = "ǯ",
+	["DZ"] = "dz",
+	["Dz"] = "dz",
+	["Ǵ"] = "ǵ",
+	["Ƕ"] = "ƕ",
+	["Ƿ"] = "ƿ",
+	["Ǹ"] = "ǹ",
+	["Ǻ"] = "ǻ",
+	["Ǽ"] = "ǽ",
+	["Ǿ"] = "ǿ",
+	["Ȁ"] = "ȁ",
+	["Ȃ"] = "ȃ",
+	["Ȅ"] = "ȅ",
+	["Ȇ"] = "ȇ",
+	["Ȉ"] = "ȉ",
+	["Ȋ"] = "ȋ",
+	["Ȍ"] = "ȍ",
+	["Ȏ"] = "ȏ",
+	["Ȑ"] = "ȑ",
+	["Ȓ"] = "ȓ",
+	["Ȕ"] = "ȕ",
+	["Ȗ"] = "ȗ",
+	["Ș"] = "ș",
+	["Ț"] = "ț",
+	["Ȝ"] = "ȝ",
+	["Ȟ"] = "ȟ",
+	["Ƞ"] = "ƞ",
+	["Ȣ"] = "ȣ",
+	["Ȥ"] = "ȥ",
+	["Ȧ"] = "ȧ",
+	["Ȩ"] = "ȩ",
+	["Ȫ"] = "ȫ",
+	["Ȭ"] = "ȭ",
+	["Ȯ"] = "ȯ",
+	["Ȱ"] = "ȱ",
+	["Ȳ"] = "ȳ",
+	["Ⱥ"] = "ⱥ",
+	["Ȼ"] = "ȼ",
+	["Ƚ"] = "ƚ",
+	["Ⱦ"] = "ⱦ",
+	["Ɂ"] = "ɂ",
+	["Ƀ"] = "ƀ",
+	["Ʉ"] = "ʉ",
+	["Ʌ"] = "ʌ",
+	["Ɇ"] = "ɇ",
+	["Ɉ"] = "ɉ",
+	["Ɋ"] = "ɋ",
+	["Ɍ"] = "ɍ",
+	["Ɏ"] = "ɏ",
+	["Ά"] = "ά",
+	["Έ"] = "έ",
+	["Ή"] = "ή",
+	["Ί"] = "ί",
+	["Ό"] = "ό",
+	["Ύ"] = "ύ",
+	["Ώ"] = "ώ",
+	["Α"] = "α",
+	["Β"] = "β",
+	["Γ"] = "γ",
+	["Δ"] = "δ",
+	["Ε"] = "ε",
+	["Ζ"] = "ζ",
+	["Η"] = "η",
+	["Θ"] = "θ",
+	["Ι"] = "ι",
+	["Κ"] = "κ",
+	["Λ"] = "λ",
+	["Μ"] = "μ",
+	["Ν"] = "ν",
+	["Ξ"] = "ξ",
+	["Ο"] = "ο",
+	["Π"] = "π",
+	["Ρ"] = "ρ",
+	["Σ"] = "σ",
+	["Τ"] = "τ",
+	["Υ"] = "υ",
+	["Φ"] = "φ",
+	["Χ"] = "χ",
+	["Ψ"] = "ψ",
+	["Ω"] = "ω",
+	["Ϊ"] = "ϊ",
+	["Ϋ"] = "ϋ",
+	["Ϙ"] = "ϙ",
+	["Ϛ"] = "ϛ",
+	["Ϝ"] = "ϝ",
+	["Ϟ"] = "ϟ",
+	["Ϡ"] = "ϡ",
+	["Ϣ"] = "ϣ",
+	["Ϥ"] = "ϥ",
+	["Ϧ"] = "ϧ",
+	["Ϩ"] = "ϩ",
+	["Ϫ"] = "ϫ",
+	["Ϭ"] = "ϭ",
+	["Ϯ"] = "ϯ",
+	["ϴ"] = "θ",
+	["Ϸ"] = "ϸ",
+	["Ϲ"] = "ϲ",
+	["Ϻ"] = "ϻ",
+	["Ͻ"] = "ͻ",
+	["Ͼ"] = "ͼ",
+	["Ͽ"] = "ͽ",
+	["Ѐ"] = "ѐ",
+	["Ё"] = "ё",
+	["Ђ"] = "ђ",
+	["Ѓ"] = "ѓ",
+	["Є"] = "є",
+	["Ѕ"] = "ѕ",
+	["І"] = "і",
+	["Ї"] = "ї",
+	["Ј"] = "ј",
+	["Љ"] = "љ",
+	["Њ"] = "њ",
+	["Ћ"] = "ћ",
+	["Ќ"] = "ќ",
+	["Ѝ"] = "ѝ",
+	["Ў"] = "ў",
+	["Џ"] = "џ",
+	["А"] = "а",
+	["Б"] = "б",
+	["В"] = "в",
+	["Г"] = "г",
+	["Д"] = "д",
+	["Е"] = "е",
+	["Ж"] = "ж",
+	["З"] = "з",
+	["И"] = "и",
+	["Й"] = "й",
+	["К"] = "к",
+	["Л"] = "л",
+	["М"] = "м",
+	["Н"] = "н",
+	["О"] = "о",
+	["П"] = "п",
+	["Р"] = "р",
+	["С"] = "с",
+	["Т"] = "т",
+	["У"] = "у",
+	["Ф"] = "ф",
+	["Х"] = "х",
+	["Ц"] = "ц",
+	["Ч"] = "ч",
+	["Ш"] = "ш",
+	["Щ"] = "щ",
+	["Ъ"] = "ъ",
+	["Ы"] = "ы",
+	["Ь"] = "ь",
+	["Э"] = "э",
+	["Ю"] = "ю",
+	["Я"] = "я",
+	["Ѡ"] = "ѡ",
+	["Ѣ"] = "ѣ",
+	["Ѥ"] = "ѥ",
+	["Ѧ"] = "ѧ",
+	["Ѩ"] = "ѩ",
+	["Ѫ"] = "ѫ",
+	["Ѭ"] = "ѭ",
+	["Ѯ"] = "ѯ",
+	["Ѱ"] = "ѱ",
+	["Ѳ"] = "ѳ",
+	["Ѵ"] = "ѵ",
+	["Ѷ"] = "ѷ",
+	["Ѹ"] = "ѹ",
+	["Ѻ"] = "ѻ",
+	["Ѽ"] = "ѽ",
+	["Ѿ"] = "ѿ",
+	["Ҁ"] = "ҁ",
+	["Ҋ"] = "ҋ",
+	["Ҍ"] = "ҍ",
+	["Ҏ"] = "ҏ",
+	["Ґ"] = "ґ",
+	["Ғ"] = "ғ",
+	["Ҕ"] = "ҕ",
+	["Җ"] = "җ",
+	["Ҙ"] = "ҙ",
+	["Қ"] = "қ",
+	["Ҝ"] = "ҝ",
+	["Ҟ"] = "ҟ",
+	["Ҡ"] = "ҡ",
+	["Ң"] = "ң",
+	["Ҥ"] = "ҥ",
+	["Ҧ"] = "ҧ",
+	["Ҩ"] = "ҩ",
+	["Ҫ"] = "ҫ",
+	["Ҭ"] = "ҭ",
+	["Ү"] = "ү",
+	["Ұ"] = "ұ",
+	["Ҳ"] = "ҳ",
+	["Ҵ"] = "ҵ",
+	["Ҷ"] = "ҷ",
+	["Ҹ"] = "ҹ",
+	["Һ"] = "һ",
+	["Ҽ"] = "ҽ",
+	["Ҿ"] = "ҿ",
+	["Ӏ"] = "ӏ",
+	["Ӂ"] = "ӂ",
+	["Ӄ"] = "ӄ",
+	["Ӆ"] = "ӆ",
+	["Ӈ"] = "ӈ",
+	["Ӊ"] = "ӊ",
+	["Ӌ"] = "ӌ",
+	["Ӎ"] = "ӎ",
+	["Ӑ"] = "ӑ",
+	["Ӓ"] = "ӓ",
+	["Ӕ"] = "ӕ",
+	["Ӗ"] = "ӗ",
+	["Ә"] = "ә",
+	["Ӛ"] = "ӛ",
+	["Ӝ"] = "ӝ",
+	["Ӟ"] = "ӟ",
+	["Ӡ"] = "ӡ",
+	["Ӣ"] = "ӣ",
+	["Ӥ"] = "ӥ",
+	["Ӧ"] = "ӧ",
+	["Ө"] = "ө",
+	["Ӫ"] = "ӫ",
+	["Ӭ"] = "ӭ",
+	["Ӯ"] = "ӯ",
+	["Ӱ"] = "ӱ",
+	["Ӳ"] = "ӳ",
+	["Ӵ"] = "ӵ",
+	["Ӷ"] = "ӷ",
+	["Ӹ"] = "ӹ",
+	["Ӻ"] = "ӻ",
+	["Ӽ"] = "ӽ",
+	["Ӿ"] = "ӿ",
+	["Ԁ"] = "ԁ",
+	["Ԃ"] = "ԃ",
+	["Ԅ"] = "ԅ",
+	["Ԇ"] = "ԇ",
+	["Ԉ"] = "ԉ",
+	["Ԋ"] = "ԋ",
+	["Ԍ"] = "ԍ",
+	["Ԏ"] = "ԏ",
+	["Ԑ"] = "ԑ",
+	["Ԓ"] = "ԓ",
+	["Ա"] = "ա",
+	["Բ"] = "բ",
+	["Գ"] = "գ",
+	["Դ"] = "դ",
+	["Ե"] = "ե",
+	["Զ"] = "զ",
+	["Է"] = "է",
+	["Ը"] = "ը",
+	["Թ"] = "թ",
+	["Ժ"] = "ժ",
+	["Ի"] = "ի",
+	["Լ"] = "լ",
+	["Խ"] = "խ",
+	["Ծ"] = "ծ",
+	["Կ"] = "կ",
+	["Հ"] = "հ",
+	["Ձ"] = "ձ",
+	["Ղ"] = "ղ",
+	["Ճ"] = "ճ",
+	["Մ"] = "մ",
+	["Յ"] = "յ",
+	["Ն"] = "ն",
+	["Շ"] = "շ",
+	["Ո"] = "ո",
+	["Չ"] = "չ",
+	["Պ"] = "պ",
+	["Ջ"] = "ջ",
+	["Ռ"] = "ռ",
+	["Ս"] = "ս",
+	["Վ"] = "վ",
+	["Տ"] = "տ",
+	["Ր"] = "ր",
+	["Ց"] = "ց",
+	["Ւ"] = "ւ",
+	["Փ"] = "փ",
+	["Ք"] = "ք",
+	["Օ"] = "օ",
+	["Ֆ"] = "ֆ",
+	["Ⴀ"] = "ⴀ",
+	["Ⴁ"] = "ⴁ",
+	["Ⴂ"] = "ⴂ",
+	["Ⴃ"] = "ⴃ",
+	["Ⴄ"] = "ⴄ",
+	["Ⴅ"] = "ⴅ",
+	["Ⴆ"] = "ⴆ",
+	["Ⴇ"] = "ⴇ",
+	["Ⴈ"] = "ⴈ",
+	["Ⴉ"] = "ⴉ",
+	["Ⴊ"] = "ⴊ",
+	["Ⴋ"] = "ⴋ",
+	["Ⴌ"] = "ⴌ",
+	["Ⴍ"] = "ⴍ",
+	["Ⴎ"] = "ⴎ",
+	["Ⴏ"] = "ⴏ",
+	["Ⴐ"] = "ⴐ",
+	["Ⴑ"] = "ⴑ",
+	["Ⴒ"] = "ⴒ",
+	["Ⴓ"] = "ⴓ",
+	["Ⴔ"] = "ⴔ",
+	["Ⴕ"] = "ⴕ",
+	["Ⴖ"] = "ⴖ",
+	["Ⴗ"] = "ⴗ",
+	["Ⴘ"] = "ⴘ",
+	["Ⴙ"] = "ⴙ",
+	["Ⴚ"] = "ⴚ",
+	["Ⴛ"] = "ⴛ",
+	["Ⴜ"] = "ⴜ",
+	["Ⴝ"] = "ⴝ",
+	["Ⴞ"] = "ⴞ",
+	["Ⴟ"] = "ⴟ",
+	["Ⴠ"] = "ⴠ",
+	["Ⴡ"] = "ⴡ",
+	["Ⴢ"] = "ⴢ",
+	["Ⴣ"] = "ⴣ",
+	["Ⴤ"] = "ⴤ",
+	["Ⴥ"] = "ⴥ",
+	["Ḁ"] = "ḁ",
+	["Ḃ"] = "ḃ",
+	["Ḅ"] = "ḅ",
+	["Ḇ"] = "ḇ",
+	["Ḉ"] = "ḉ",
+	["Ḋ"] = "ḋ",
+	["Ḍ"] = "ḍ",
+	["Ḏ"] = "ḏ",
+	["Ḑ"] = "ḑ",
+	["Ḓ"] = "ḓ",
+	["Ḕ"] = "ḕ",
+	["Ḗ"] = "ḗ",
+	["Ḙ"] = "ḙ",
+	["Ḛ"] = "ḛ",
+	["Ḝ"] = "ḝ",
+	["Ḟ"] = "ḟ",
+	["Ḡ"] = "ḡ",
+	["Ḣ"] = "ḣ",
+	["Ḥ"] = "ḥ",
+	["Ḧ"] = "ḧ",
+	["Ḩ"] = "ḩ",
+	["Ḫ"] = "ḫ",
+	["Ḭ"] = "ḭ",
+	["Ḯ"] = "ḯ",
+	["Ḱ"] = "ḱ",
+	["Ḳ"] = "ḳ",
+	["Ḵ"] = "ḵ",
+	["Ḷ"] = "ḷ",
+	["Ḹ"] = "ḹ",
+	["Ḻ"] = "ḻ",
+	["Ḽ"] = "ḽ",
+	["Ḿ"] = "ḿ",
+	["Ṁ"] = "ṁ",
+	["Ṃ"] = "ṃ",
+	["Ṅ"] = "ṅ",
+	["Ṇ"] = "ṇ",
+	["Ṉ"] = "ṉ",
+	["Ṋ"] = "ṋ",
+	["Ṍ"] = "ṍ",
+	["Ṏ"] = "ṏ",
+	["Ṑ"] = "ṑ",
+	["Ṓ"] = "ṓ",
+	["Ṕ"] = "ṕ",
+	["Ṗ"] = "ṗ",
+	["Ṙ"] = "ṙ",
+	["Ṛ"] = "ṛ",
+	["Ṝ"] = "ṝ",
+	["Ṟ"] = "ṟ",
+	["Ṡ"] = "ṡ",
+	["Ṣ"] = "ṣ",
+	["Ṥ"] = "ṥ",
+	["Ṧ"] = "ṧ",
+	["Ṩ"] = "ṩ",
+	["Ṫ"] = "ṫ",
+	["Ṭ"] = "ṭ",
+	["Ṯ"] = "ṯ",
+	["Ṱ"] = "ṱ",
+	["Ṳ"] = "ṳ",
+	["Ṵ"] = "ṵ",
+	["Ṷ"] = "ṷ",
+	["Ṹ"] = "ṹ",
+	["Ṻ"] = "ṻ",
+	["Ṽ"] = "ṽ",
+	["Ṿ"] = "ṿ",
+	["Ẁ"] = "ẁ",
+	["Ẃ"] = "ẃ",
+	["Ẅ"] = "ẅ",
+	["Ẇ"] = "ẇ",
+	["Ẉ"] = "ẉ",
+	["Ẋ"] = "ẋ",
+	["Ẍ"] = "ẍ",
+	["Ẏ"] = "ẏ",
+	["Ẑ"] = "ẑ",
+	["Ẓ"] = "ẓ",
+	["Ẕ"] = "ẕ",
+	["Ạ"] = "ạ",
+	["Ả"] = "ả",
+	["Ấ"] = "ấ",
+	["Ầ"] = "ầ",
+	["Ẩ"] = "ẩ",
+	["Ẫ"] = "ẫ",
+	["Ậ"] = "ậ",
+	["Ắ"] = "ắ",
+	["Ằ"] = "ằ",
+	["Ẳ"] = "ẳ",
+	["Ẵ"] = "ẵ",
+	["Ặ"] = "ặ",
+	["Ẹ"] = "ẹ",
+	["Ẻ"] = "ẻ",
+	["Ẽ"] = "ẽ",
+	["Ế"] = "ế",
+	["Ề"] = "ề",
+	["Ể"] = "ể",
+	["Ễ"] = "ễ",
+	["Ệ"] = "ệ",
+	["Ỉ"] = "ỉ",
+	["Ị"] = "ị",
+	["Ọ"] = "ọ",
+	["Ỏ"] = "ỏ",
+	["Ố"] = "ố",
+	["Ồ"] = "ồ",
+	["Ổ"] = "ổ",
+	["Ỗ"] = "ỗ",
+	["Ộ"] = "ộ",
+	["Ớ"] = "ớ",
+	["Ờ"] = "ờ",
+	["Ở"] = "ở",
+	["Ỡ"] = "ỡ",
+	["Ợ"] = "ợ",
+	["Ụ"] = "ụ",
+	["Ủ"] = "ủ",
+	["Ứ"] = "ứ",
+	["Ừ"] = "ừ",
+	["Ử"] = "ử",
+	["Ữ"] = "ữ",
+	["Ự"] = "ự",
+	["Ỳ"] = "ỳ",
+	["Ỵ"] = "ỵ",
+	["Ỷ"] = "ỷ",
+	["Ỹ"] = "ỹ",
+	["Ἀ"] = "ἀ",
+	["Ἁ"] = "ἁ",
+	["Ἂ"] = "ἂ",
+	["Ἃ"] = "ἃ",
+	["Ἄ"] = "ἄ",
+	["Ἅ"] = "ἅ",
+	["Ἆ"] = "ἆ",
+	["Ἇ"] = "ἇ",
+	["Ἐ"] = "ἐ",
+	["Ἑ"] = "ἑ",
+	["Ἒ"] = "ἒ",
+	["Ἓ"] = "ἓ",
+	["Ἔ"] = "ἔ",
+	["Ἕ"] = "ἕ",
+	["Ἠ"] = "ἠ",
+	["Ἡ"] = "ἡ",
+	["Ἢ"] = "ἢ",
+	["Ἣ"] = "ἣ",
+	["Ἤ"] = "ἤ",
+	["Ἥ"] = "ἥ",
+	["Ἦ"] = "ἦ",
+	["Ἧ"] = "ἧ",
+	["Ἰ"] = "ἰ",
+	["Ἱ"] = "ἱ",
+	["Ἲ"] = "ἲ",
+	["Ἳ"] = "ἳ",
+	["Ἴ"] = "ἴ",
+	["Ἵ"] = "ἵ",
+	["Ἶ"] = "ἶ",
+	["Ἷ"] = "ἷ",
+	["Ὀ"] = "ὀ",
+	["Ὁ"] = "ὁ",
+	["Ὂ"] = "ὂ",
+	["Ὃ"] = "ὃ",
+	["Ὄ"] = "ὄ",
+	["Ὅ"] = "ὅ",
+	["Ὑ"] = "ὑ",
+	["Ὓ"] = "ὓ",
+	["Ὕ"] = "ὕ",
+	["Ὗ"] = "ὗ",
+	["Ὠ"] = "ὠ",
+	["Ὡ"] = "ὡ",
+	["Ὢ"] = "ὢ",
+	["Ὣ"] = "ὣ",
+	["Ὤ"] = "ὤ",
+	["Ὥ"] = "ὥ",
+	["Ὦ"] = "ὦ",
+	["Ὧ"] = "ὧ",
+	["ᾈ"] = "ᾀ",
+	["ᾉ"] = "ᾁ",
+	["ᾊ"] = "ᾂ",
+	["ᾋ"] = "ᾃ",
+	["ᾌ"] = "ᾄ",
+	["ᾍ"] = "ᾅ",
+	["ᾎ"] = "ᾆ",
+	["ᾏ"] = "ᾇ",
+	["ᾘ"] = "ᾐ",
+	["ᾙ"] = "ᾑ",
+	["ᾚ"] = "ᾒ",
+	["ᾛ"] = "ᾓ",
+	["ᾜ"] = "ᾔ",
+	["ᾝ"] = "ᾕ",
+	["ᾞ"] = "ᾖ",
+	["ᾟ"] = "ᾗ",
+	["ᾨ"] = "ᾠ",
+	["ᾩ"] = "ᾡ",
+	["ᾪ"] = "ᾢ",
+	["ᾫ"] = "ᾣ",
+	["ᾬ"] = "ᾤ",
+	["ᾭ"] = "ᾥ",
+	["ᾮ"] = "ᾦ",
+	["ᾯ"] = "ᾧ",
+	["Ᾰ"] = "ᾰ",
+	["Ᾱ"] = "ᾱ",
+	["Ὰ"] = "ὰ",
+	["Ά"] = "ά",
+	["ᾼ"] = "ᾳ",
+	["Ὲ"] = "ὲ",
+	["Έ"] = "έ",
+	["Ὴ"] = "ὴ",
+	["Ή"] = "ή",
+	["ῌ"] = "ῃ",
+	["Ῐ"] = "ῐ",
+	["Ῑ"] = "ῑ",
+	["Ὶ"] = "ὶ",
+	["Ί"] = "ί",
+	["Ῠ"] = "ῠ",
+	["Ῡ"] = "ῡ",
+	["Ὺ"] = "ὺ",
+	["Ύ"] = "ύ",
+	["Ῥ"] = "ῥ",
+	["Ὸ"] = "ὸ",
+	["Ό"] = "ό",
+	["Ὼ"] = "ὼ",
+	["Ώ"] = "ώ",
+	["ῼ"] = "ῳ",
+	["Ω"] = "ω",
+	["K"] = "k",
+	["Å"] = "å",
+	["Ⅎ"] = "ⅎ",
+	["Ⅰ"] = "ⅰ",
+	["Ⅱ"] = "ⅱ",
+	["Ⅲ"] = "ⅲ",
+	["Ⅳ"] = "ⅳ",
+	["Ⅴ"] = "ⅴ",
+	["Ⅵ"] = "ⅵ",
+	["Ⅶ"] = "ⅶ",
+	["Ⅷ"] = "ⅷ",
+	["Ⅸ"] = "ⅸ",
+	["Ⅹ"] = "ⅹ",
+	["Ⅺ"] = "ⅺ",
+	["Ⅻ"] = "ⅻ",
+	["Ⅼ"] = "ⅼ",
+	["Ⅽ"] = "ⅽ",
+	["Ⅾ"] = "ⅾ",
+	["Ⅿ"] = "ⅿ",
+	["Ↄ"] = "ↄ",
+	["Ⓐ"] = "ⓐ",
+	["Ⓑ"] = "ⓑ",
+	["Ⓒ"] = "ⓒ",
+	["Ⓓ"] = "ⓓ",
+	["Ⓔ"] = "ⓔ",
+	["Ⓕ"] = "ⓕ",
+	["Ⓖ"] = "ⓖ",
+	["Ⓗ"] = "ⓗ",
+	["Ⓘ"] = "ⓘ",
+	["Ⓙ"] = "ⓙ",
+	["Ⓚ"] = "ⓚ",
+	["Ⓛ"] = "ⓛ",
+	["Ⓜ"] = "ⓜ",
+	["Ⓝ"] = "ⓝ",
+	["Ⓞ"] = "ⓞ",
+	["Ⓟ"] = "ⓟ",
+	["Ⓠ"] = "ⓠ",
+	["Ⓡ"] = "ⓡ",
+	["Ⓢ"] = "ⓢ",
+	["Ⓣ"] = "ⓣ",
+	["Ⓤ"] = "ⓤ",
+	["Ⓥ"] = "ⓥ",
+	["Ⓦ"] = "ⓦ",
+	["Ⓧ"] = "ⓧ",
+	["Ⓨ"] = "ⓨ",
+	["Ⓩ"] = "ⓩ",
+	["Ⰰ"] = "ⰰ",
+	["Ⰱ"] = "ⰱ",
+	["Ⰲ"] = "ⰲ",
+	["Ⰳ"] = "ⰳ",
+	["Ⰴ"] = "ⰴ",
+	["Ⰵ"] = "ⰵ",
+	["Ⰶ"] = "ⰶ",
+	["Ⰷ"] = "ⰷ",
+	["Ⰸ"] = "ⰸ",
+	["Ⰹ"] = "ⰹ",
+	["Ⰺ"] = "ⰺ",
+	["Ⰻ"] = "ⰻ",
+	["Ⰼ"] = "ⰼ",
+	["Ⰽ"] = "ⰽ",
+	["Ⰾ"] = "ⰾ",
+	["Ⰿ"] = "ⰿ",
+	["Ⱀ"] = "ⱀ",
+	["Ⱁ"] = "ⱁ",
+	["Ⱂ"] = "ⱂ",
+	["Ⱃ"] = "ⱃ",
+	["Ⱄ"] = "ⱄ",
+	["Ⱅ"] = "ⱅ",
+	["Ⱆ"] = "ⱆ",
+	["Ⱇ"] = "ⱇ",
+	["Ⱈ"] = "ⱈ",
+	["Ⱉ"] = "ⱉ",
+	["Ⱊ"] = "ⱊ",
+	["Ⱋ"] = "ⱋ",
+	["Ⱌ"] = "ⱌ",
+	["Ⱍ"] = "ⱍ",
+	["Ⱎ"] = "ⱎ",
+	["Ⱏ"] = "ⱏ",
+	["Ⱐ"] = "ⱐ",
+	["Ⱑ"] = "ⱑ",
+	["Ⱒ"] = "ⱒ",
+	["Ⱓ"] = "ⱓ",
+	["Ⱔ"] = "ⱔ",
+	["Ⱕ"] = "ⱕ",
+	["Ⱖ"] = "ⱖ",
+	["Ⱗ"] = "ⱗ",
+	["Ⱘ"] = "ⱘ",
+	["Ⱙ"] = "ⱙ",
+	["Ⱚ"] = "ⱚ",
+	["Ⱛ"] = "ⱛ",
+	["Ⱜ"] = "ⱜ",
+	["Ⱝ"] = "ⱝ",
+	["Ⱞ"] = "ⱞ",
+	["Ⱡ"] = "ⱡ",
+	["Ɫ"] = "ɫ",
+	["Ᵽ"] = "ᵽ",
+	["Ɽ"] = "ɽ",
+	["Ⱨ"] = "ⱨ",
+	["Ⱪ"] = "ⱪ",
+	["Ⱬ"] = "ⱬ",
+	["Ⱶ"] = "ⱶ",
+	["Ⲁ"] = "ⲁ",
+	["Ⲃ"] = "ⲃ",
+	["Ⲅ"] = "ⲅ",
+	["Ⲇ"] = "ⲇ",
+	["Ⲉ"] = "ⲉ",
+	["Ⲋ"] = "ⲋ",
+	["Ⲍ"] = "ⲍ",
+	["Ⲏ"] = "ⲏ",
+	["Ⲑ"] = "ⲑ",
+	["Ⲓ"] = "ⲓ",
+	["Ⲕ"] = "ⲕ",
+	["Ⲗ"] = "ⲗ",
+	["Ⲙ"] = "ⲙ",
+	["Ⲛ"] = "ⲛ",
+	["Ⲝ"] = "ⲝ",
+	["Ⲟ"] = "ⲟ",
+	["Ⲡ"] = "ⲡ",
+	["Ⲣ"] = "ⲣ",
+	["Ⲥ"] = "ⲥ",
+	["Ⲧ"] = "ⲧ",
+	["Ⲩ"] = "ⲩ",
+	["Ⲫ"] = "ⲫ",
+	["Ⲭ"] = "ⲭ",
+	["Ⲯ"] = "ⲯ",
+	["Ⲱ"] = "ⲱ",
+	["Ⲳ"] = "ⲳ",
+	["Ⲵ"] = "ⲵ",
+	["Ⲷ"] = "ⲷ",
+	["Ⲹ"] = "ⲹ",
+	["Ⲻ"] = "ⲻ",
+	["Ⲽ"] = "ⲽ",
+	["Ⲿ"] = "ⲿ",
+	["Ⳁ"] = "ⳁ",
+	["Ⳃ"] = "ⳃ",
+	["Ⳅ"] = "ⳅ",
+	["Ⳇ"] = "ⳇ",
+	["Ⳉ"] = "ⳉ",
+	["Ⳋ"] = "ⳋ",
+	["Ⳍ"] = "ⳍ",
+	["Ⳏ"] = "ⳏ",
+	["Ⳑ"] = "ⳑ",
+	["Ⳓ"] = "ⳓ",
+	["Ⳕ"] = "ⳕ",
+	["Ⳗ"] = "ⳗ",
+	["Ⳙ"] = "ⳙ",
+	["Ⳛ"] = "ⳛ",
+	["Ⳝ"] = "ⳝ",
+	["Ⳟ"] = "ⳟ",
+	["Ⳡ"] = "ⳡ",
+	["Ⳣ"] = "ⳣ",
+	["A"] = "a",
+	["B"] = "b",
+	["C"] = "c",
+	["D"] = "d",
+	["E"] = "e",
+	["F"] = "f",
+	["G"] = "g",
+	["H"] = "h",
+	["I"] = "i",
+	["J"] = "j",
+	["K"] = "k",
+	["L"] = "l",
+	["M"] = "m",
+	["N"] = "n",
+	["O"] = "o",
+	["P"] = "p",
+	["Q"] = "q",
+	["R"] = "r",
+	["S"] = "s",
+	["T"] = "t",
+	["U"] = "u",
+	["V"] = "v",
+	["W"] = "w",
+	["X"] = "x",
+	["Y"] = "y",
+	["Z"] = "z",
+	["𐐀"] = "𐐨",
+	["𐐁"] = "𐐩",
+	["𐐂"] = "𐐪",
+	["𐐃"] = "𐐫",
+	["𐐄"] = "𐐬",
+	["𐐅"] = "𐐭",
+	["𐐆"] = "𐐮",
+	["𐐇"] = "𐐯",
+	["𐐈"] = "𐐰",
+	["𐐉"] = "𐐱",
+	["𐐊"] = "𐐲",
+	["𐐋"] = "𐐳",
+	["𐐌"] = "𐐴",
+	["𐐍"] = "𐐵",
+	["𐐎"] = "𐐶",
+	["𐐏"] = "𐐷",
+	["𐐐"] = "𐐸",
+	["𐐑"] = "𐐹",
+	["𐐒"] = "𐐺",
+	["𐐓"] = "𐐻",
+	["𐐔"] = "𐐼",
+	["𐐕"] = "𐐽",
+	["𐐖"] = "𐐾",
+	["𐐗"] = "𐐿",
+	["𐐘"] = "𐑀",
+	["𐐙"] = "𐑁",
+	["𐐚"] = "𐑂",
+	["𐐛"] = "𐑃",
+	["𐐜"] = "𐑄",
+	["𐐝"] = "𐑅",
+	["𐐞"] = "𐑆",
+	["𐐟"] = "𐑇",
+	["𐐠"] = "𐑈",
+	["𐐡"] = "𐑉",
+	["𐐢"] = "𐑊",
+	["𐐣"] = "𐑋",
+	["𐐤"] = "𐑌",
+	["𐐥"] = "𐑍",
+	["𐐦"] = "𐑎",
+	["𐐧"] = "𐑏",
+}
+
diff --git a/EMA/Libs/changelog-Ace3-r1173.txt b/EMA/Libs/changelog-Ace3-r1173.txt
new file mode 100644
index 0000000..9658f34
--- /dev/null
+++ b/EMA/Libs/changelog-Ace3-r1173.txt
@@ -0,0 +1,391 @@
+Ace3 Release - Revision r1166 (August 29th, 2017)
+-------------------------------------------------
+- Updated any use of PlaySound to the new numeric constants (Fix for WoW 7.3)
+- AceConfigDialog-3.0: implement fallback validation feedback in a StaticPopup (Ticket #2)
+
+Ace3 Release - Revision r1158 (March 28th, 2017)
+------------------------------------------------
+- AceGUI-3.0: Fire OnShow events from Frame and Windows containers (Ticket #396)
+- AceGUI-3.0: Add SetJustifyV/H API to the Label/InteractiveLabel widgets (Ticket #397)
+
+Ace3 Release - Revision r1151 (July 18th, 2016)
+-----------------------------------------------
+- AceConfig-3.0: Allow specifying images using the numeric fileID (Ticket #389)
+- AceGUI-3.0: Use SetColorTexture in WoW 7.0
+- AceGUI-3.0: Expose the HighlightText API for EditBox and MultiLineEditBox Widgets (Ticket #378)
+- AceGUI-3.0: Keybinding: Support MouseWheel Up/Down bindings (Ticket #372)
+- AceGUI-3.0: TreeGroup: Refresh the tree in an OnUpdate once after Acquire, not only after creation (Fixes missing tree in WoW 7.0)
+- AceSerializer-3.0: Create consistent tokens for infinity, independent of the clients platform
+
+Ace3 Release - Revision r1134 (June 23rd, 2015)
+-----------------------------------------------
+- AceGUI-3.0: TreeGroup: Prevent Word Wrap in tree elements
+
+Ace3 Release - Revision r1128 (February 24th, 2015)
+---------------------------------------------------
+- AceGUI-3.0: Fixed an error in GameTooltip handling causing wrong formatting in some cases
+
+Ace3 Release - Revision r1122 (October 14th, 2014)
+--------------------------------------------------
+- AceDB-3.0: Now using the GetCurrentRegion() API to determine region-based profile keys (fix for WoW 6.0)
+- AceComm-3.0: Update ChatThrottleLib to v23
+- AceConfigDialog-3.0: Show a more meaningful title on Blizzard Options Groups (Ticket #353)
+- AceGUI-3.0: ColorPicker: Frame Level is automatically increased to ensure the color picker frame is above the option panel
+- AceGUI-3.0: DropDown: Properly disable all clickable areas when the dropdown is disabled (Ticket #360)
+- AceHook-3.0: Always use HookScript when hooking scripts in a secure fashion (Ticket #338)
+- AceTimer-3.0: New timer implementation based on C_Timer.After
+
+Ace3 Release - Revision r1109 (February 19th, 2014)
+---------------------------------------------------
+- AceComm-3.0: Ambiguate addon comm messages to restore behavior to be identical to pre-5.4.7
+- AceConfigRegistry-3.0: Added an option to skip options table validation on registering
+
+Ace3 Release - Revision r1104 (October 31st, 2013)
+--------------------------------------------------
+- AceGUI-3.0: Flow Layout: Added a safeguard to prevent an infinite loop in the layout engine
+- AceGUI-3.0: DropDown: Adjust its style slightly to closer resemble the Blizzard DropDown Widget
+- AceGUI-3.0: DropDown: API enhancements to specify the width of the pullout and be notified when its opened
+
+Ace3 Release - Revision r1098 (September 13th, 2013)
+----------------------------------------------------
+- AceDB-3.0: Switch characters to the default profile if their active profile is deleted (Ticket #324)
+- AceConfigDialog-3.0: Try to prevent static popup taint (Ticket #322)
+- AceGUI-3.0: Button: Add a new "Auto Width" option (Ticket #310)
+- AceGUI-3.0: DropDown: Make the entire DropDown widget clickable (Ticket #339)
+- AceGUI-3.0: EditBox: Allow dragging macros to the editbox (which will then contain the macros name) (Ticket #337)
+- AceGUI-3.0: Slider: Add a workaround for the broken slider steps in WoW 5.4 (Ticket #346)
+- AceGUI-3.0: TreeGroup: Fix an issue introduced by 5.4 broken scrollbars (Ticket #345)
+- AceHook-3.0: Allow hooking of AnimationGroup scripts (Ticket #314)
+
+Ace3 Release - Revision r1086 (May 21st, 2013)
+----------------------------------------------
+- AceAddon-3.0: Improved behavior when loading modules during game startup, ensures proper loading order
+
+Ace3 Release - Revision r1083 (March 4th, 2013)
+-----------------------------------------------
+- AceTimer-3.0: Fixed an issue that caused the parameter list passed to the callback to be cut off at nil values
+- AceGUI-3.0: InlineGroup: The title attribute is properly reset for recycled objects
+
+Ace3 Release - Revision r1078 (February 10th, 2013)
+---------------------------------------------------
+- AceTimer-3.0: Re-write based on AnimationTimers
+- AceHook-3.0: Improved checks/error messages when trying to hook a script on a "nil" frame
+- AceDBOptions-3.0: Added Italian locale
+- AceGUI-3.0: BlizOptionsGroup: Fixed the "default" button callback
+- AceGUI-3.0: Colorpicker: The colorpicker is now clamped to the screen
+
+Ace3 Release - Revision r1061 (August 27th, 2012)
+-------------------------------------------------
+- AceConfigDialog-3.0: Try to avoid potential taints in static popup dialogs
+- AceConfigDialog-3.0: Sort multiselects with "radio" style
+- AceGUI-3.0: Support for WoW 5.0
+- AceGUI-3.0: MultiLineEditBox: Support shift-click'ing items/spells/etc. into the editbox
+- AceGUI-3.0: Label: Fix text alignment (Ticket #301)
+- AceGUI-3.0: Checkbox: Description text on a disable checkbox should look disabled (Ticket #304)
+- AceGUI-3.0: Keybinding: Ensure the Keybinding popup is on the top level (Ticket #305)
+
+Ace3 Release - Revision r1041 (November 29th, 2011)
+---------------------------------------------------
+- AceDB-3.0: Added locale and factionrealmregion profile keys
+- AceSerializer-3.0: Removed support for NaN, as WoW 4.3 does no longer allow it.
+- AceGUI-3.0: Frame: Add :EnableResize (Ticket #214)
+
+Ace3 Release - Revision r1032 (June 29th, 2011)
+-----------------------------------------------
+- AceTab-3.0: Improvements to Match handling (Ticket #255 and #256)
+- AceGUI-3.0: DropDown layout fix with hidden labels (Ticket #234)
+
+Ace3 Release - Revision r1025 (April 27th, 2011)
+------------------------------------------------
+- AceComm-3.0: Updated for 4.1 changes - now handles RegisterAddonMessagePrefix internally for you.
+- AceGUI-3.0: TabGroup: Fixed width of tabs in 4.1(Ticket #243)
+
+Ace3 Release - Revision r1009 (February 9th, 2011)
+--------------------------------------------------
+- AceLocale-3.0: Fix erronous assumption that the default locale is always the first to be registered for the :NewLocale() "silent" flag. The flag must now be set on the FIRST locale to be registered.
+- AceLocale-3.0: The :NewLocale() "silent" flag may now be set to the string "raw", meaning nils are returned for unknown translations.
+- AceGUI-3.0: Fix the disabled state of Icon widgets
+- AceGUI-3.0: The header of the Frame widget now dynamically changes size to fit the text (Ticket #171)
+- AceGUI-3.0: Its now possible to define a custom order the elements in a dropdown widget
+- AceGUI-3.0: Improved widget focus behaviour across the board (Ticket #192, #193)
+- AceGUI-3.0: Fixed a bug that made it impossible to block the tree widget from being user resizable (Ticket #163)
+- AceGUI-3.0: Fixed a bug that caused TreeGroups to become unresponsive under certain conditions (Ticket #189, #202)
+- AceGUI-3.0: Enhanced the DropDown widget to allow it to be reused more easily.
+- AceConfigDialog-3.0: Select Groups now have the proper order in the dropdown (Ticket #184)
+- AceConfigDialog-3.0: Implemented "radio" style select boxes (Ticket #149)
+
+Ace3 Release - Revision r981 (October 27th, 2010)
+-------------------------------------------------
+- AceAddon-3.0: Fixed a library upgrading issue
+- AceAddon-3.0: Modules are now enabled in loading order
+- AceGUI-3.0: Keybinding: The widget will no longer steal keybindings even when inactive (Ticket #169)
+- AceGUI-3.0: EditBox: Fixed spell drag'n'drop
+
+
+Ace3 Release - Revision r971 (October 12th, 2010)
+-------------------------------------------------
+- Small fixes and adjustments for the 4.0 Content Patch.
+- AceGUI-3.0: ScrollFrame: Allow for a small margin of error when determining if the scroll bar should be shown.
+- AceGUI-3.0: Added new widget APIs: GetText for EditBox and DisableButton for MultiLineEditBox
+
+Ace3 Release - Revision r960 (July 20th, 2010)
+----------------------------------------------
+- AceGUI-3.0: Label: Reset Image Size and TexCoords on Acquire (Ticket #110)
+- AceGUI-3.0: CheckBox: Re-apply the disabled state after setting a value, so the visuals are correct in either case. (Ticket #107)
+- AceGUI-3.0: Icon: Fix the vertical size. It'll now properly scale with the image size, and not be fixed to about 110px. (Ticket #104)
+- AceGUI-3.0: External Containers (Frame, Window) should always start in a visible state. (Ticket #121)
+- AceGUI-3.0: Added Blizzard sounds to widgets (Ticket #120)
+- AceGUI-3.0: CheckBox: check for self.desc:GetText() being nil as well as "" to prevent setting the wrong height on the checkbox causing bouncing checkboxes.
+- AceGUI-3.0: Rewrite of the MultiLineEditBox (Ticket #68)
+- AceGUI-3.0: CheckBox: Fix alignment of the text in OnMouseDown when an image is set. (Ticket #142)
+- AceGUI-3.0: Add SetMaxLetters APIs to EB and MLEB (Ticket #135)
+- AceGUI-3.0: Frame: Add events for OnEnter/OnLeave of the statusbar (Ticket #139)
+- AceGUI-3.0: Major cleanups and refactoring in nearly all widgets and containers.
+- AceConfigDialog-3.0: Always obey the min/max values on range-type widgets (Ticket #114)
+- AceConfigDialog-3.0: Pass iconCoords set on groups in the options table to the tree widget (Ticket #111)
+- AceConfigDialog-3.0: Implement "softMin" and "softMax", allowing for a UI-specific minimum/maximum for range controls, while allowing manual input of values in the old min/max range. (Ticket #123)
+- AceConfigDialog-3.0: Don't close frames in CloseAll that are being opened after the CloseAll event was dispatched. (Ticket #132).
+- AceSerializer-3.0: Fix encoding & decoding of \030. (Ticket #115)
+- AceDB-3.0: Remove empty sections on logout, keeping the SV clean of more useless informations.
+- AceDBOptions-3.0.lua: Fix a string typo (Ticket #141)
+
+Ace3 Release - Revision r907 (December 16th, 2009)
+---------------------------------------------------
+- AceGUI-3.0: Frame: Properly save the width in the status table.
+- AceConfigCmd-3.0: Properly handle help output of inline groups with a different handler. (Ticket #101)
+- AceConfigDialog-3.0: Don't bail out and error when a dialogControl was invalid, instead show the error and fallback to the default control for that type.
+- AceConfigDialog-3.0: Fix a hickup with the OnUpdate script not getting upgraded properly in some situations.
+
+Ace3 Release - Revision r900 (December 8th, 2009)
+--------------------------------------------------
+- AceGUI-3.0: Alot of visual fixes regarding margins and general widget styles.
+- AceGUI-3.0: Ability to accept links for EditBox Widget (Ticket #21)
+- AceGUI-3.0: ScrollFrame: Hide the scrollbar when there is no overflowing content, and allow the Layout functions to use that space for widgets.
+- AceGUI-3.0: DropDown: Added a GetValue() API to the Widget (Ticket #69)
+- AceGUI-3.0: Button: Pass the arguments of the OnClick handler to the OnClick callback (Ticket #57)
+- AceGUI-3.0: add a Window container, basically a plain window with close button
+- AceGUI-3.0: Add support for inline descriptions to the checkbox widget.
+- AceGUI-3.0: Added an API to the Window container to disable the user-resizing of the same. (Ticket #80)
+- AceGUI-3.0: TreeGroup: Allow iconCoords to be passed for the tree elements. (Ticket #59)
+- AceGUI-3.0: Slider: Add a more visible backdrop/border around the manual input area (Ticket #98, #46)
+- AceGUI-3.0: Allow displaying a image in front of the checkbox label. (Ticket #82)
+- AceConfig-3.0: Added an experimental "descStyle" member to all option table nodes that allows you to control the way the description is presented.
+                 Supported values are "tooltip" for the old behaviour, and "inline" for a inline display of the description, pending support in AceGUI-3.0 widgets.
+- AceConfigCmd-3.0: Properly parse functions and methods supplied for the "hidden" option table member. (Ticket #96)
+- AceConfigDialog-3.0: Fix the unpacking of the basepath arguments when internally calling :Open (Ticket #90)
+- AceConfigDialog-3.0: Properly refresh BlizOptions Windows which are registered with a path on NotifyChange. (Ticket #93)
+- AceConfigDialog-3.0: Allow image/imageCoords on toogle elements (Note that the width/height of the image on the toggle cannot be changed) (Ticket #82)
+- AceConfigDialog-3.0: Pass the groups "name" tag to DropDownGroups as the title. (Ticket #79)
+- AceDB-3.0: Remove the metatable from the DB before removing defaults, so we don't accidentally invoke it in the process. (Ticket #66)
+- AceDB-3.0: Don't save the profileKeys for namespaces, since we use the profile of the parent DB anyway. This will cut down on SV complexity when using alot of namespaces.
+- AceDB-3.0: Don't fire the OnProfileReset callback when copying a profile.
+- AceDBOptions-3.0: Show the current profile on the dialog. (Ticket #56)
+- AceComm-3.0: Add callbacks for message chunks going out the wire (via CTL). Useful for displaying progress for very large messages.
+- AceConsole-3.0: Add :Printf() so you don't have to do Print(format())
+
+Ace3 Beta - Revision 820 (August 7th, 2009)
+--------------------------------------------
+- AceComm-3.0: Updated ChatThrottleLib to v21
+- AceGUI-3.0: Fixed a glitch in the TabGroup code that caused tabs to be unresponsive under rare conditions. (Ticket #38)
+- AceGUI-3.0: Consistent "disabled" behaviour of all widgets. (Ticket #47)
+- AceGUI-3.0: Changed the way widgets are handled on release to avoid a crash in the game client. (Ticket #49)
+- AceGUI-3.0: Fixed a glitch in the button graphics. (Ticket #58)
+- AceGUI-3.0: Localized the "Close" Text on the Frame widget.
+
+Ace3 Beta - Revision 803 (April 14th, 2009)
+--------------------------------------------
+- AceConfig-3.0: Allow spaces in the keys of config tables. Spaces will be changed on the fly to underscores in AceConfigCmd-3.0 - there is no collision check in place, yet.
+- AceConfig-3.0: Support a "fontSize" attribute to the description type. Possible values are "small" (default), "medium" and "large".
+- AceConfigDialog-3.0: Fixed an error that would occur when calling InterfaceOptionsFrame_OpenToCategory from within an event handler in a Blizzard Options integrated frame. (Ticket #33)
+- AceConfigDialog-3.0: The "execute" type does now recognize the "image" attributes, and will display a clickable icon instead of the button when an image is supplied. (Ticket #35)
+- AceConfigDialog-3.0: Pass icons defined in the option table to the TreeGroup widget (Ticket #20)
+- AceConfigDialog-3.0: Fixed a bug that caused an empty group widget to be drawn if all groups were hidden.
+- AceConfigCmd-3.0: Improved the behaviour of select and multiselect elements. (Ticket #26)
+- AceDB-3.0: Add a GetNamespace function to the DB Objects which returns an existing namespace from the DB object.
+- AceGUI-3.0 Slider Widget: Properly show percentage values as min/max if isPercent is true. (Ticket #32)
+- AceGUI-3.0: Fixed an error in the TreeGroup Widget that caused execution to stop if no name was provided.
+- AceGUI-3.0: Fixed the behaviour of the MultiLineEditbox Widget (Accept button not clickable). (Ticket #28)
+- AceGUI-3.0: TabGroup: Set a maximum width for tabs based on the size of the widget. (Ticket #34)
+- AceGUI-3.0: Added a new InteractiveLabel with OnEnter/OnLeave/OnClick callbacks and a highlight texture
+- AceGUI-3.0: Add SetFont and SetFontObject functions to the Label widget (and the new InteractiveLabel)
+- AceGUI-3.0: Support icons in the TreeGroup display. (Ticket #20)
+- AceGUI-3.0: Added a new :SetRelativeWidth Widget-API that allows you to set the width of widgets relative to their container.
+- AceGUI-3.0: Alot of fixes, tweaks and consistency changes.
+
+Ace3 Beta - Revision 741 (Feb 15th, 2009)
+--------------------------------------------
+- AceDBOptions-3.0: Disable the "Copy From" and "Delete" dropdowns if there are no profiles to choose from. (Ticket #19)
+- AceGUI-3.0: Improve TabGroup visual style - only stretch them to the full width if they would use more then 75% of the exisiting space.
+- AceGUI-3.0: Added a third optional argument to <container>:AddChild() to specify the position for the new widget. (Ticket #22)
+- AceConfigCmd-3.0: Improve help output when viewing groups.
+- AceConfigDialog-3.0: Refresh the Options Panel after a confirmation is canceled to reset the value to its previous value. (Ticket #23)
+- AceDB-3.0: Fix a data inconsistency when using false as a table key. (Ticket #25)
+
+Ace3 Beta - Revision 722 (Jan 4th, 2009)
+--------------------------------------------
+- AceHook-3.0: Fix :SecureHookScript to not fail on previously empty scripts since frame:HookScript does nothing at all in that case. (Ticket #16)
+- AceLocale-3.0: Implement 'silent' option for :NewLocale to disable the warnings on unknown entrys (Ticket #18)
+- AceTimer-3.0: Implement :TimeLeft(handle) function (Ticket #10)
+- AceGUI-3.0: Fix TabGroup tab resizing to be consistent
+- AceGUI-3.0: Fixed EditBox alignment when the label is disabled (Ticket #13)
+- AceDB-3.0: Implement OnProfileShutdown callback (Ticket #7)
+- AceDBOptions-3.0: Updated esES and ruRU locale
+
+Ace3 Beta - Revision 706 (Oct 18th, 2008)
+--------------------------------------------
+- First Beta release after WoWAce move
+- Removed WoW 2.4.x compat layer
+- AceGUI-3.0: Fix disabling of the Multiline Editbox
+- AceGUI-3.0: Improvements to the Keybinding Widget
+
+Ace3 Beta - Revision 81437 (Sept 6th, 2008)
+--------------------------------------------
+- AceConfigDialog-3.0: the confirm callback will now receive the new value that is being set (same signature as the validate callback)
+- AceConfigDialog-3.0: :Close and :CloseAll are now safe to call from within callbacks.
+- AceGUI-3.0: Added new methods to the widget base table, see ACE-205 for full reference
+- AceGUI-3.0: Various fixes to Widgets and recycling process
+- Now compatible with WoW 3.0 (compat layer is to be removed upon 3.0 release)
+
+
+Ace3 Beta - Revision 76325 (June 9th, 2008)
+--------------------------------------------
+- AceGUI-3.0: Finish Multiselect support for the Dropdown widget (nargiddley)
+- AceGUI-3.0: Re-write TabGroup layouting (nargiddley)
+- AceGUI-3.0: TreeGroup: Add :EnableButtonTooltips(enable) to make the default tooltips on the tree optional, enabled by default. (nargiddley)
+- AceGUI-3.0: TabGroup: Add OnTabEnter and OnTabLeave Callbacks  (nargiddley)
+- AceConfigDialog-3.0: Add :SelectGroup(appName, ...) - Selects the group given by the path specified then refreshes open windows. (nargiddley)
+- AceConfigDialog-3.0: :Open now accepts an optional path, when given will open the window with only the given group and its children visible (nargiddley)
+- AceConfigDialog-3.0: :AddToBlizOptions now accepts an optional path, this will add the config page to display the specified group and its children only. (nargiddley)
+- AceConfigDialog-3.0: ACE-189: allow multiselect to be shown as a dropdown by setting dialogControl = "Dropdown" (nargiddley)
+- AceConfigDialog-3.0: Add Custom tooltips to the TreeGroup and TabGroup, shows both name and desc for the group. (nargiddley)
+- AceConfigCmd-3.0: ACE-195: Remove unneeded references to .confirm, will no longer error when .confirm is a boolean (nargiddley)
+- AceAddon-3.0: Allow for an optional first argument to NewAddon to be a table to be used as the base for the addon. (ammo)
+
+Ace3 Beta - Revision 74633 (May 19th, 2008)
+--------------------------------------------
+- AceTimer-3.0: ACE-173: don't error on nil handle for CancelTimer(), just bail out early. (ammo)
+- AceGUI-3.0: ACE-161, ACE-180, ACE-181: New and improved DropDown widget (originally coded by Borlox) (nargiddley,nevcairiel)
+- AceGUI-3.0: AceGUI will call OnWidthSet and OnHeightSet as frames resize (nargiddley)
+- AceGUI-3.0: TabGroup: Use OptionsFrameTabButtonTemplate for tabs (nargiddley)
+- AceGUI-3.0: TabGroup: Tabs now span multiple lines when there are too many to fit in the width of the frame (nargiddley)
+- AceGUI-3.0: TreeGroup: Tree is now sizable by dragging, orig patch by yssaril (nargiddley)
+- AceGUI-3.0: Flow layout will now reduce widgets width to fit rather than leaving them sticking out the side of container widgets (nargiddley)
+- AceGUI-3.0: Dropdowns will no longer be left open in the background when the frame is clicked or other widgets are activated (nargiddley)
+- AceGUI-3.0: ACE-159: Rename Release to OnRelease and Acquire to OnAcquire for widgets. (nargiddley)
+- AceGUI-3.0: ACE-171: add IsVisible and IsShown methods to the widget metatable (nargiddley)
+- AceGUI-3.0: ACE-164: add tooltips to tree to show full text of childs that got clipped (ammo)
+- AceGUI-3.0: ACE-174: make buttons in AceGUI-3.0 locale independant (ammo)
+- AceGUI-3.0: ACE-166: fix treegroup visual bug (ammo)
+- AceGUI-3.0: ACE-184: make numeric entry for slider more intuitive (ammo)
+- AceConfigCmd-3.0: ACE-172 - ignore description in cmd (ammo)
+- AceConsole-3.0:  nolonger check for existance of slashcommands, overwrite where needed. Last one wins, this enables AddonLoader to X-LoadOn-Slash and override the slashcommand from AddonLoader slashcommand with an Ace3 one. (Ammo)
+
+Ace3 Beta - Revision 69509 (April 13th, 2008)
+---------------------------------------------
+- AceComm-3.0: turn off error messages when receiving invalid multi-part messages (its happening on login etc) (nevcairiel)
+- AceDBOptions-3.0: shorten info text at top to prevent scrollbars. (nevcairiel)
+- AceHook-3.0: ACE-162: fix unhooking of objects that were not actually hooked (nevcairiel)
+- AceDB-3.0: fire the DB callbacks after the namespaces changed their profile as well (nevcairiel)
+- AceDB-3.0: namespaces can now be individually reset using :ResetProfile() on the namespace directly (nevcairiel)
+- AceDB-3.0: added a optional argument to :ResetProfile to not populate the reset to all namespaces (so the main profile can reset individually without reseting all namespaces too)  (nevcairiel)
+
+Ace3 Beta - Revision 66329 (March 27th, 2008)
+---------------------------------------------
+- Overall 2.4 clean ups - removing 2.4 checks and work arounds (nevcairiel)
+- AceBucket-3.0: clear the timer reference when unregistering a bucket to prevent a error when unregistering a bucket that was never fired (nevcairiel)
+- AceAddon-3.0: Bugfix when enabling/disabling modules from the parents OnEnable after disabling / enabling the parent addon. (ammo)
+- AceGUI-3.0: Don't parent the BlizOptionsGroup widget to UIParent and Hide it by default. Fixes stray controls on the screen. (nargiddley)
+- AceConfigDialog-3.0: Config windows without a default size won't incorrectly get a default size from a previously open window. (nargiddley)
+- AceDBOptions-3.0: added zhCN and zhTW locale (nevcairiel)
+
+Ace3 Beta - Revision 65665 (March 25th, 2008)
+---------------------------------------------
+- AceGUI-3.0: ACE-139: Changed all Widgets to resemble the Blizzard 2.4 Options Style (nevcairiel)
+- AceGUI-3.0: Fixed "List"-Layout not reporting new width to "fill"-mode widgets (mikk)
+- AceGUI-3.0: added :SetColor to the Label widget (nevcairiel)
+- AceGUI-3.0: ACE-132: ColorPicker: added checkers texture for better alpha channel display, and fixed "white"-texture bug (nevcairiel,nargiddley,ammo)
+- AceConfig-3.0: ACE-113: Added uiName, uiType, handler, option, type to the info table (nevcairiel,nargiddley)
+- AceConfigDialog-3.0: ACE-139: Adjusted for 2.4 options panels (nevcairiel)
+- AceConfigDialog-3.0: Use "width" parameter for the description widget (if present) (nevcairiel)
+- AceConfigDialog-3.0: ACE-135: Add support for specifying a rowcount for multiline editboxes (nargiddley)
+- AceConfigDialog-3.0: :AddToBlizOptions will return the frame registered so you can use it in InterfaceOptionsFrame_OpenToFrame (nevcairiel)
+- AceConfigCmd-3.0: handle "hidden" in help-output (nevcairiel)
+- AceHook-3.0: fix unhooking of secure hooks (nevcairiel)
+- AceDBOptions-3.0: add optional argument to GetOptionsTable(db[, noDefaultProfiles]) - if set to true will not show the default profiles in the profile selection (nevcairiel)
+- AceDBOptions-3.0: added koKR locale (nevcairiel)
+- Ace3 Standalone: Removed the "Ace3" Category from the 2.4 options panel (nevcairiel)
+
+Ace3 Beta - Revision 64176 (March 10th, 2008)
+---------------------------------------------
+- AceGUI-3.0: Improve Alpha handling for the ColorPicker widget, ColorPicker widget closes the ColorPickerFrame before opening to prevent values getting carried over (nargiddley)
+- AceGUI-3.0: The Slider widget will only react to the mousewheel after it has been clicked (anywhere including the label) to prevent accidental changes to the value when trying to scroll the container it is in (nargiddley)
+- AceGUI-3.0: The TreeGroup widget is scrollable with the mousewheel (nargiddley)
+- AceGUI-3.0: ACE-154: Fix frame levels in more cases to prevent widgets ending up behind their containers (nargiddley)
+- AceConfigDialog: Color picker obeys hasAlpha on the color type (nargiddley)
+- AceConfigDialog-3.0: ACE-155: Make sure that the selected group is type='group' when checking if it exists (nargiddley)
+- AceDBOptions-3.0: added frFR locale (nevcairiel)
+
+Ace3 Beta - Revision 63886 (March 8th, 2008)
+---------------------------------------------
+- AceDBOptions-3.0: new library to provide a Ace3Options table to control the AceDB-3.0 profiles (nevcairiel)
+- AceDB-3.0: add "silent" option to DeleteProfile and CopyProfile when we deal with namespaces (nevcairiel)
+- AceDB-3.0: implement library upgrade path (nevcairiel)
+- AceDB-3.0: ACE-146: fix problem with non-table values overruling ['*']-type defaults (nevcairiel)
+- AceConsole-3.0: treat |T|t texture links similar to |H|h|h links. (ammo)
+- AceGUI-3.0: Use Blizzard Templates for the EditBox and DropDown widget (nevcairiel)
+- AceBucket-3.0: ACE-150: callback is now optional, if not supplied will use the eventname as method name (only possible if one event is supplied, and not a event table) (nevcairiel)
+- tests: adjust tests for AceGUI and AceConsole changes (nevcairiel)
+
+Ace3 Beta - Revision 63220 (Feb 29th, 2008)
+---------------------------------------------
+- AceTimer-3.0: CancelAllTimers() now cancels silent (elkano)
+- AceConfigDialog: Add :SetDefaultSize(appName, width, height), sets the size the dialog will open to. Does not effect already open windows.  (nargiddley)
+- AceConfigDialog: Fix typo in type check for range values (nargiddley)
+- AceGUI: ColorPicker widget will correctly fire OnValueChanged for the cancel event of the colorpicker popup.  Reset ColorPicker's color on Acquire.  (nargiddley)
+- AceGUI: Fix Spelling of Aquire -> Acquire for widgets, all custom widgets will need to be updated.  A warning will be printed for widgets not upgraded yet.  (nargiddley)
+- AceConfigCmd-3.0: add simple coloring to slashcommand output. (ammo)
+- AceConsole-3.0: add some color to :Print (ammo)
+- AceAddon-3.0: set error level on library embedding to point to the :NewAddon call (nevcairiel)
+
+Ace3 Beta - Revision 62182 (Feb 20th, 2008)
+---------------------------------------------
+- Ace3 StandAlone: Add a page to the Blizzard 2.4 Interface Options with icons to open dialogs for configs registered when installed standalone (nargiddley)
+- AceConfigDialog: type = 'description' now uses the fields image and imageCoords instead of icon and iconCoords, add imageWidth and imageHeight (nargiddley)
+- AceConfigDialog: Add :AddToBlizzardOptions(appName, name), this will add the specified config to the Blizzard Options pane new in 2.4.  This will only be available if running on the 2.4 PTR (nargiddley)
+- AceDB: fix GetProfiles() when setting the same profile twice (nevcairiel)
+- AceDB: bail out of :SetProfile early when trying to set to the same profile (nevcairiel)
+- AceDB: add nil checks to metatable handling (nevcairiel)
+- AceDB: clear tables that are empty after defaults removal (nevcairiel)
+- AceGUI: Fix a couple of layout bugs causing the width of groups to be wrong (nargiddley)
+- AceGUI: Add Icon widget (nargiddley)
+- AceGUI: Allow room for the border in the BlizOptionsGroup widget (nargiddley)
+- AceGUI: Button and Keybinding use UIPanelButtonTemplate2 (nargiddley)
+- AceConsole-3.0: Fix bug where no table for [self] was created when registering weak commands (ammo)
+- AceTimer-3.0: add missing :OnEmbedDisable (ammo)
+- AceAddon-3.0: added :GetName() that will always return the "real" name of a addon or module object without any prefixes (nevcairiel)
+
+Ace3 Beta - Revision 60697 (Feb 9th, 2008)
+---------------------------------------------
+- CallbackHandler-1.0: remove unnecessary table creation if a event is fired thats not registered (nevcairiel)
+- AceAddon-3.0: fixed a bug with recursive addon loading (nevcairiel)
+- AceGUI: Update TabGroup's tablist format, tabs are selected by value not index (nargiddley)
+- AceGUI: Add MultiLineEditBox widget (nargiddley, originally by bam)
+- AceGUI: Small fix to the flow layout preventing controls overlapping in some cases (nargiddley)
+- AceConfigDialog: Implement control and dialogControl for types 'input' and 'select' (nargiddley)
+- AceConfigDialog: Add support for multiline = true on type = 'input' (nargiddley)
+- AceConfigDialog: Fix an error when all groups are hidden in a group with childGroups = 'select' (nargiddley)
+- AceConfigDialog: type = 'description' will now show .icon as an image with its text (nargiddley)
+- AceConfigDialog: multiline inputs are no longer forced to width = "full" (nargiddley)
+- AceConfigDialog: bug fix when loading without AceConsole present (nevcairiel)
+
+Ace3 Beta - Revision 60545 (Feb 7th, 2008)
+---------------------------------------------
+- AceGUI: SetToplevel(true) for the Frame widget, multiple open windows should play nice together now (nargiddley)
+- AceGUI: Move Frames to the FULLSCREEN_DIALOG strata (nargiddley)
+- AceGUI: Dropdown, Editbox and Keybinding labels grey out when disabled (nargiddley)
+- AceGUI: Add OnClick callback to the TreeGroup widget (nargiddley)
+- AceConfigDialog: Confirm popups will be above the config window (nargiddley)
+
+Ace3 Beta - Revision 60163 (Feb 3rd, 2008)
+---------------------------------------------
+- Initial Beta release
\ No newline at end of file
diff --git a/EMA/Locales/Core-Locale-deDE.lua b/EMA/Locales/Core-Locale-deDE.lua
new file mode 100644
index 0000000..839f31c
--- /dev/null
+++ b/EMA/Locales/Core-Locale-deDE.lua
@@ -0,0 +1,862 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+local L = LibStub("AceLocale-3.0"):NewLocale( "Core", "deDE")
+if not L then
+	return
+end
+-- NewLocales
+
+--PreCoded ALL
+L["JAMBA"] = "Jamba"
+L["JAMBA EE"] = "Jamba EE"
+
+L["EMA"] = "EMA"
+L[""] = true
+L[" "] = true
+L[": "] = true
+L["("] = true
+L[")"] = true
+L[" / "] = true
+L["/"] = true
+L["%"] = true
+L["N/A"] = true
+L["PUSH_SETTINGS"] = "Teile Einstellungen"
+L["PUSH_ALL_SETTINGS"] = "Teile Alle Einstellungen"
+L["PUSH_SETTINGS_INFO"] = "Teile Einstellungen mit Team Mitgliedern"
+L["MINION"] = "Minion"
+L["NAME"] = "Name"
+L["MASTER"] = "Master"
+L["ALL"] = "All"
+L["MESSAGES_HEADER"] = "Nachricht"
+L["MESSAGE_AREA"]  = "Nachrichten Region"
+L["SEND_WARNING_AREA"] = "Warnungs Region"
+L["PH"] = "PH"
+L["GUILD"] = "Gilde"
+L["CTRL"] = "Strg"
+L["SHIFT"] = "Shift"
+L["ALT"] = "Alt"
+L["UPDATE"] = "Update"
+
+
+-- Display Options
+L["APPEARANCE_LAYOUT_HEALDER"] = "Aussehen und Anordnung"
+L["BLIZZARD"] = "Blizzard"
+L["BLIZZARD_TOOLTIP"] = "Blizzard Tooltip"
+L["BLIZZARD_DIALOG_BACKGROUND"] = "Blizzard Dialog Hintergrund"
+L["ARIAL_NARROW"] = "Arial Narrow"
+L["NUMBER_OF_ROWS"] = "Anzahl der Reihen"
+L["SCALE"] = "Skalierung"
+L["TRANSPARENCY"] = "Transparenz"
+L["BORDER_STYLE"] = "Rahmen Style"
+L["BORDER COLOUR"] = "Rahmen Farbe"
+L["BACKGROUND"] = "Hintergrund"
+L["BG_COLOUR"] = "Hintergrundfarbe"
+L["FONT"] = "Schriftart"
+L["FONT_SIZE"] = "Schriftart Größe"
+L["BAR_TEXTURES"] = "Statusbalken Textur"
+L["WIDTH"] = "Breite"
+L["HEIGHT"] = "Höhe"
+
+-- Numbers
+L["1"] = "Eins"
+L["2"] = "Zwei"
+L["3"] = "Drei"
+L["4"] = "Vier"
+L["5"] = "Fünf"
+L["6"] = "Sechs"
+L["7"] = "Sieben"
+L["8"] = "Acht"
+L["9"] = "Neun"
+L["10"] = "Zehn"
+L["11"] = "Elf"
+L["12"] = "Zwölf"
+L["13"] = "Dreizehn"
+L["14"] = "Vierzehn"
+L["15"] = "Fünfzehn"
+L["16"] = "Sechzehn"
+L["17"] = "Siebenzehn"
+L["18"] = "Achtzehn"
+L["19"] = "Neunzehn"
+L["20"] = "Zwanzig"
+
+--------------------------
+-- Modules Locale
+L["NEWS"] = "Neuigkeiten"
+L["OPTIONS"] = "Optionen"
+L["SETUP"] = "Aufbau"
+L["PROFILES"] = "Profiles"
+L["TEAM"] = "Team"
+L["COMMUNICATIONS"] = "Kommunikationen"
+L["MESSAGE_DISPLAY"] = "Nachrichten Anzeige"
+L["GROUP_LIST"] = "Kategorien Liste"
+L["DISPLAY"] = "Anzeigen"
+L["ITEM_USE"] = "Gegenstände"
+L["VENDER_LIST_MODULE"] = "Verkaufen"
+L["INTERACTION"] = "Interaktionen"
+L["CURRENCY"] = "Währungen"
+L["TOON"] = "Toon"
+L["FOLLOW"] = "Folgen"
+L["PURCHASE"] = "Kaufen"
+-- FUCKED UP!
+L["VENDER"] = "Händler"
+L["VENDOR"] = "Verkaufen"
+L["PURCHASE"] = "Kaufen"
+L["WARNINGS"] = "Warnungen"
+L["QUEST"] = "Quest"
+L["TRADE"] = "Handeln"
+L["REPAIR"] = "Reparieren"
+L["TALK"] = "Unterhaltungen"
+L["QUEST"] = "Quest"
+L["COMPLETION"] = "Abschluss"
+L["TRACKER"] = "Anzeige"
+
+--------------------------
+-- Pecoded String Formats
+L["SETTINGS_RECEIVED_FROM_A"] = function( characterName )
+	return string.format("Einstellungen erhalten von %s", characterName )
+end
+
+L["A_IS_NOT_IN_TEAM"] = function( characterName )
+	return string.format("%s ist nicht in der Team Liste. %s kann nicht zum Meister ernannt werden.", characterName )
+end
+--------------------------
+-- Core Locale
+L["STATUSTEXT"] = "The Awesome MultiBoxing Assistant Ebony's Edition"
+L["RESET_SETTINGS_FRAME"] = "Setzt Einstellungs Fenster zurück"
+L["MODULE_NOT_LOADED"] = "Modul nicht geladen oder nicht Aktuell"
+L["RELEASE_NOTES"] = "Veröffentlichungsnotiz "
+L["COPYING_PROFILE"] = "Copying profile: "
+L["CHANGING_PROFILE"] = "Änderungsprofil: "
+L["PROFILE_RESET"] = "Profile reset - iterating all modules."
+L["RESETTING_PROFILE"] = "Resetting profile: "
+L["PROFILE_DELETED"] = "Profile deleted - iterating all modules."
+L["DELETING_PROFILE"] = "Deleting profile: "
+L["Failed_LOAD_MODULE"] =  "Failed to load EMA Module: "
+L["TEXT1"] = "EMA Ebony's Edition v8 für BFA"
+L["TEXT2"] = ""
+L["TEXT3"] = "Dies ist eine Beta Version!"
+L["TEXT4"] = ""
+L["TEXT5"] = ""
+L["TEXT6"] = "Für mehr Informationen lies Bitte den ChangeLog"
+L["TEXT7"] = ""
+L["TEXT8"] = ""
+L["TEXT9"] = ""
+L["TEXT10"] = ""
+L["SPECIAL_THANKS"] = "Special Thanks:"
+L["THANKS1"] = "Michael \"Jafula\" Miller For Making Jamba That Some Of This Code Is Based Of"
+L["THANKS2"] = "tk911 für die Deutsche Übersetzung"
+L["THANKS3"] = ""
+L["WEBSITES"] = "Websites"
+L["ME"] = "Current Project Manger Jennifer (Ebony) Cally"
+L["ME_TWITTER"] = "https://twitter.com/Jenn_Ebony"
+L["D-B"] = "http://Dual-boxing.com"
+L["ISB"] = "http://IsBoxer.com"
+L["TEMP_WEBSITE1"] = ""
+L["TEMP_WEBSITE2"] = ""
+L["TEMP_WEBSITE3"] = ""
+L["COPYRIGHT"] = "Copyright (c) 2015-2018  Jennifer Cally"
+L["COPYRIGHTTWO"] = "Released Under License: The MIT License"
+L["FRAME_RESET"] = "Frame Reset"
+-- Msg 8000
+L["ALL_SETTINGS_RESET"] = "Willkommen zu EMA \"Ebony's Edition\" für Patch 8.0.1 \nAlle EMA Einstellungen wurden Zurückgesetzt!"
+--------------------------
+-- Communications Locale
+
+L["A: Failed to deserialize command arguments for B from C."] = function( libraryName, moduleName, sender )
+	return libraryName..": Failed to deserialize command arguments for "..moduleName.." from "..sender.."."
+end
+L["AUTO_SET_TEAM"] = "Team Mitglieder automatisch On/Offline setzen"
+L["BOOST_COMMUNICATIONS"] = "Erhöhe EMA zu EMA Kommunikationen"
+L["BOOST_COMMUNICATIONS_HELP"] = "Erfordert Neustart, kann zu Verbindungsabbrüchen führen."
+L["USE_GUILD_COMMS"] = "Verwende Gilden Kommunikationen"
+L["USE_GUILD_COMMS_INFO"] = "Alle Teammitglieder müssen in der selben Gilde sein."
+
+----------------------------
+-- Helper Locale
+L["COMMANDS"] = "Kommandos"
+L["SLASH_COMMANDS"] = "/Kommandos"
+
+----------------------------
+-- Team Locale
+L["JAMBA-TEAM"] = "EMA-Team"
+L["INVITE_GROUP"] = "Lade Team in Gruppe ein"
+L["DISBAND_GROUP"] = "Löse Gruppe auf"
+L["SET_MASTER"] = "Mache Aktuellen Charakter zum Meister"
+L["ADD"] = "Hinzufügen"
+L["ADD_HELP"] = "Füge ein Mitglied zur Teamliste hinzu."
+L["REMOVE"] = "Entferne"
+L["REMOVE_REMOVE"] = "Entferne ein Mitglied aus der Teamliste."
+L["MASTER_HELP"] = "Ernenne einen Charakter zum Meister"
+L["I_AM_MASTER"] = "Ich bin der Meister"
+L["I_AM_MASTER_HELP"] = "Ernenne diesen Charakter zum Meister"
+L["INVITE"] = "Einladen"
+L["INVITE_HELP"] = "Ladet alle Teammitgieder in eine Gruppe ein."
+L["DISBAND"] = "Auflösen"
+L["DISBAND_HELP"] = "Alle Teammitgieder verlassen ihre Gruppe."
+L["ADD_GROUPS_MEMBERS"] = "Füge ein Gruppenmitglied hinzu"
+L["ADD_GROUPS_MEMBERS_HELP"] = "Füge ein Mitglied deiner Aktuellen Gruppe dem Team Hinzu."
+L["REMOVE_ALL_MEMBERS"] = "Entferne alle Mitglieder"
+L["REMOVE_ALL_MEMBERS_HELP"] = "Entfernt alle Mitglieder aus dem Team."
+L["SET_TEAM_OFFLINE"] = "Markiere Team als Offline"
+L["SET_TEAM_OFFLINE_HELP"] = "Markiert alle Teammitgieder als Offline"
+L["SET_TEAM_ONLINE"] = "Markiere Team als Online"
+L["SET_TEAM_ONLINE_HELP"] = "Markiert alle Teammitgieder als Online"
+L["TEAM_HEADER"] = "Team"
+L["GROUPS_HEADER"] = "Kategorie"
+L["BUTTON_ADD_HELP"] = "Füge ein Mitglied zur Team Liste hinzu\nBenützt werden kann:\nCharakterName\nCharakterName-realm\nZiel\nMouseover"
+L["BUTTON_ADDALL_HELP"] = "Fügt alle Gruppen/Schlachtzugsmitglieder der Team Liste hinzu"
+L["BUTTON_UP_HELP"] = "Bewege einen Charakter in der Team Liste nach Oben"
+L["BUTTON_ISBOXERADD_HELP"] = "Fügt dein IsBoxer Team deiner Teamliste hinzu."
+L["BUTTON_DOWN_HELP"] = "Bewege einen Charakter in der Team Liste nach Unten"
+L["BUTTON_REMOVE_HELP"] = "Entfernt das ausgewählte Mitglied aus der Teamliste"
+L["BUTTON_MASTER_HELP"] = "Ernenne das ausgewählte Mitglied zum Meister seiner Gruppe"
+L["BUTTON_GROUP_REMOVE_HELP"] = "Entfernt die Kategorie vom ausgewählten Charakter"
+L["CHECKBOX_ISBOXER_SYNC"] = "Synchronisiere mit IsBoxer"
+L["CHECKBOX_ISBOXER_SYNC_HELP"] = "Charakere basierent auf dem IsBoxer Team hinzufügen/entfernen."
+L["MASTER_CONTROL"] = "Meister Kontrolle"
+L["CHECKBOX_MASTER_LEADER"] = "Befördere Meister zum Gruppenanführer"
+L["CHECKBOX_MASTER_LEADER_HELP"] = "Meister wird immer der Gruppenanführer sein."
+L["CHECKBOX_CTM"] = "Setzte 'Mit Klicks Bewegen' bei Dienern"
+L["CHECKBOX_CTM_HELP"] = "Automatischen Aktivieren von 'Mit Klicks Bewegen' bei Dienern und Deaktivieren beim Meister."
+L["PARTY_CONTROLS"] = "Gruppen Einladungskontrolle"
+L["CHECKBOX_CONVERT_RAID"] = "Automatischen ändern zum Schlachtzugs"
+L["CHECKBOX_CONVERT_RAID_HELP"] = "Ändert Automatisch zum Schlachtzugs falls mehr als Fünf Charaktere eingeladen werden."
+L["CHECKBOX_ASSISTANT"] = "Automatisch zum Assistenten befördern"
+L["CHECKBOX_ASSISTANT_HELP"] = "Befördert Automatisch alle Schlachtzugsmitglieder zum Assistenten"
+L["CHECKBOX_TEAM"] = "Von Team Mitgliedern annehmen"
+L["CHECKBOX_TEAM_HELP"] = "Akzeptiert automatisch Einladungen von Team Mitgliedern."
+L["CHECKBOX_ACCEPT_FROM_FRIENDS"] = "Von Freunden annehmen"
+L["CHECKBOX_ACCEPT_FROM_FRIENDS_HELP"] = "Akzeptiert automatisch Einladungen von Freunden."
+L["CHECKBOX_ACCEPT_FROM_GUILD"] = "Von Gilde annehmen"
+L["CHECKBOX_ACCEPT_FROM_GUILD_HELP"] = "Akzeptiert automatisch Einladungen von Gilden Mitgliedern."
+L["CHECKBOX_DECLINE_STRANGERS"] = "Von Fremden ablehnen"
+L["CHECKBOX_DECLINE_STRANGERS_HELP"] = "Lehnt einladungen von allen anderen ab."
+L["NOT_LINKED"] = "(Nicht Verknüpft)"
+L["TEAM_NO_TARGET"] = "Kein Ziel oder Ziel ist kein Spieler"
+L["UNKNOWN_GROUP"] = "Unbekannte Kategorie"
+L["ONLINE"] = "Online"
+L["OFFLINE"] = "Offline"
+L["STATICPOPUP_ADD"] = "Trage Charakter-Server Namen ein um ihn der Team Liste hinzuzufügen:"
+L["STATICPOPUP_REMOVE"] = "Bist du dir sicher das du %s aus der Team Liste entfernen willst?"
+
+--------------------------
+-- Message Locale
+L["DEFAULT_CHAT_WINDOW"] = "Standard Chatfenster"
+L["WHISPER"] = "Flüstern"
+L["PARTY"] = "Gruppe"
+L["GUILD_OFFICER"] = "Gilden Offizier"
+L["RAID"] = "Schlachtzug"
+L["RAID_WARNING"] = "Schlachtzugs Warnung"
+L["MUTE"] = "Stummschlaten"
+L["DEFAULT_MESSAGE"] = "Standard Nachricht"
+L["DEFAULT_WARNING"] = "Standard Warnung"
+L["MUTE_POFILE"] = "Stummschalten (Standart)"
+L["ADD_MSG_HELP"] = "Hinzufügen einer Neuen Nachrichten Region"
+L["REMOVE_MSG_HELP"] = "Entferne eine Nachrichten Region"
+L["NAME"] = "Name"
+L["PASSWORD"] = "Passwort"
+L["AREA"]  = "Region auf dem Bildschirm"
+L["SOUND_TO_PLAY"] = "Geräusch"
+L["SAVE"] = "Speichern"
+L["STATICPOPUP_ADD_MSG"] = "Name der hinzuzufügenden Region?"
+L["REMOVE_MESSAGE_AREA"] = "Willst du \"%s\" aus der Liste entfernen?"
+L["MESSAGE_AREA_LIST"] = "Nachrichten Regions Liste"
+L["MESSAGE_AREA_CONFIGURATION"] = "Nachrichten Regions Konfigurierung"
+L["ERR_COULD_NOT_FIND_AREA"] = function( areaName )
+	return string.format("ERROR: Could not find area: %s", areaName)
+end
+--------------------------
+-- Tag/Group Locale
+L["ADD_TAG_HELP"]= "Add a Group To This Character."
+L["REMMOVE_TAG_HELP"] = "Remove A Tag From This Character."
+L["GROUP"] =  "Kategorie"
+L["BUTTON_TAG_ADD_HELP"] = "Füge eine Kategorie der Liste hinzu"
+L["BUTTON_TAG_REMOVE_HELP"] = "Entferne eine Kategorie aus der Liste"
+L["ADD_TO_GROUP"] = "Add To Group"
+L["ADD_TO_GROUP_HELP"] = "Add Character To Group"
+L["REMOVE_FROM_GROUP"] = "Remove From Group"
+L["REMOVE_FROM_GROUP_HELP"] = "Remove Character From Group"
+L["WRONG_TEXT_INPUT_GROUP"] = "Needs To Be In <Character-realm> <Group> Format"
+L["NEW_GROUP_NAME"] = "Füge eine Neue Kategorie hinzu:"
+L["REMOVE_FROM_TAG_LIST"] = "Willst du \"%s\" aus der Liste entfernen?"
+--Note This need to be lowercase!
+--If translated Make Sure you keep them as a the lowercase words or you Will breck Group/Tag
+--It be a headache i don't need -- Ebony
+L["ALL_LOWER"] = "all"
+L["MASTER_LOWER"] = "master"
+L["MINION_LOWER"] = "minion"
+
+--------------------------
+-- Item-Use Locale
+L["ITEM-USE"] = "Gegenstände"
+L["ITEM"] = "Gegenstand"
+L["HIDE_ITEM_BAR"] = "Verstecke Gegenstands Anzeige"
+L["HIDE_ITEM_BAR_HELP"] = "Verstecke die Gegenstands Anzeige."
+L["SHOW_ITEM_BAR"] = "Zeige Gegenstands Anzeige an"
+L["SHOW_ITEM_BAR_HELP"] = "Zeigt die Gegenstands Anzeige an."
+L["CLEAR_ITEM_BAR"] = "Leere Gegenstands Anzeige"
+L["CLEAR_ITEM_BAR_HELP"] = "Leere die Gegenstands Anzeige(Entfernt alle Gegenstände)"
+L["CLEAR_BUTT"] = "Leeren"
+L["SYNC_BUTT"] = "Sync"
+L["TOOLTIP_SYNCHRONISE"] = "Synchronisiere die Gegenstands Anzeige"
+L["TOOLTIP_NOLONGER_IN_BAGS"] = "Entfernt Gegenstände die sich nicht länger in deiner Tasche befinden aus der Gegenstands Anzeige."
+L["NEW_QUEST_ITEM"] = "Neuer Gegenstand gefunden der eine Quest startet!"
+L["ITEM_USE_OPTIONS"] = "Gegenstands Anzeigen Optionen"
+L["SHOW_ITEM_BAR"] = "Zeige Gegenstands Anzeige"
+L["SHOW_ITEM_BAR_HELP"] = "Zeigt die Gegenstands Anzeige"
+L["ONLY_ON_MASTER"] = "Nur bei Meister"
+L["ONLY_ON_MASTER_HELP"] = "Zeigt die Gegenstands Anzeige nur beim Meister an."
+L["SHOW_ITEM_COUNT"] = "Zeige Gegenstandsanzahl an"
+L["SHOW_ITEM_COUNT_HELP"] = "Zeigt Gegenstandanzahl und Gegenstandanzahl Tooltips an."
+L["KEEP_BARS_SYNCHRONIZED"] = "Halte Gegenstands Anzeige bei Dienern Synchronisiert"
+L["KEEP_BARS_SYNCHRONIZED_HELP"] = "Halte Gegenstands Anzeige bei Dienern Synchronisiert"
+L["ADD_QUEST_ITEMS_TO_BAR"] = "Füge Questgegenstände automatisch der Anzeige hinzu"
+L["ADD_QUEST_ITEMS_TO_BAR_HELP"] = "Fügt verwendbare Questgegenstände automatisch der Anzeige hinzu."
+L["ADD_ARTIFACT_ITEMS"] = "Füge Artefaktmacht automatisch der Anzeige hinzu"
+L["ADD_ARTIFACT_ITEMS_HELP"] = "Fügt verwendbare Artefaktmacht automatisch der Anzeige hinzu. (Legion)"
+L["ADD_SATCHEL_ITEMS"] = "Füge Behälter automatisch der Anzeige hinzu"
+L["ADD_SATCHEL_ITEMS_HELP"] = "Fügt Behälter(Kisten/Beutel) automatisch der Anzeige hinzu. "
+L["HIDE_BUTTONS"] = "Verstecke Tasten"
+L["HIDE_BUTTONS_HELP"] = "Versteckt Tasten(Sync/Leeren)"
+L["HIDE_IN_COMBAT"] = "Im Kampf verstecken"
+L["HIDE_IN_COMBAT_HELP_IU"] = "Versteckt Anzeige im Kampf"
+L["NUMBER_OF_ITEMS"] = "Anzahl der Gegenstände"
+L["CLEAR_BUTT"] = "Leeren"
+L["SYNC_BUTT"] = "Sync"
+L["ITEM_BAR_CLEARED"] = "Gegenstands Anzeige geleert"
+L["TEAM_BAGS"] = "Gegenstände des Teams"
+L["BAG_BANK"] = "Taschen (Bank)"
+
+--------------------------
+-- EMA-Sell Locale
+L["SELL"] = "Verkauf"
+L["SELL_LIST"] = "Sell/Delete Item's List"
+L["SELL_ALL"] = "Sell or Delete If Not Sell Price All Item's In This List"
+L["ALT_SELL_ALL"] = "[Alt] um weitere Gegenstände zu verkaufen"
+L["ALT_SELL_ALL_HELP"] = "Halte [Alt] um gleiche Gegenstände auf allen Charakteren zu verkaufen."
+L["AUTO_SELL_ITEMS"] = "Gegenstände automatisch verkaufen"
+L["AUTO_SELL_ITEMS_HELP"] = "Gegenstände unterhalb automatisch verkaufen."
+L["ONLY_SB"] = "Nur Seelengebunden"
+L["ONLY_SB_HELP"] = "Nur Seelengebundene Gegenstände verkaufen."
+L["iLVL"] = "Gegenstandsstufe"
+L["iLVL_HELP"] = "Verkaufe Gegenstände unterhalb der angegebenen Gegenstandsstufe. "
+L["SELL_GRAY"] = "Verkaufe Graue Gegenstände"
+L["SELL_GRAY_HELP"] = "Verkauft alle Grauen Gegenstände"
+L["SELL_GREEN"] = "Verkaufe Ungewöhnliche Gegenstände"
+L["SELL_GREEN_HELP"] = "Verkauft alle Ungewöhnliche (Grün) Gegenstände"
+L["SELL_RARE"] = "Verkaufe Seltene Gegenstände"
+L["SELL_RARE_HELP"] = "Verkauft alle Seltene (Blau) Gegenstände"
+L["SELL_EPIC"] = "Verkaufe Epische Gegenstände"
+L["SELL_EPIC_HELP"]	= "Verkauft alle Epische (Lila) Gegenstände"
+L["SELL_LIST_DROP_ITEM"] = "Verkaufe Andere Gegenstände(Ziehe Gegenstände in die Box)"
+L["ITEM_TAG_ERR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
+L["POPUP_REMOVE_ITEM"] = "Bist du dir sicher das du den ausgewählten Gegenstand aus der Verkaufs Liste entfernen willst?"
+L["ADD_TO_LIST"] = "Adds Item To List"
+L["SELL_ITEMS"] = "Sell Items"
+L["POPUP_DELETE_ITEM"] = "What You like to delete?"
+L["I_HAVE_SOLD_X"] = function( temLink )
+	return string.format("Ich habe %s verkauft.", temLink)
+end
+L["I_SOLD_ITEMS_PLUS_GOLD"] = function( count )
+	return string.format( "Ich habe %s verkauft, für: ", count)
+end
+L["DELETE_ITEM"] = function( bagItemLink )
+	return string.format( "Ich habe %s GELÖSCHT!", bagItemLink)
+end
+
+--------------------------
+-- Interaction Locale
+L["TAXI"] = "Taxi"
+L["TAXI_OPTIONS"] = "Taxi Optionen"
+L["TAKE_TEAMS_TAXI"] = "Benutze Flugrouten mit Team"
+L["TAKE_TEAMS_TAXI_HELP"] = "Benutze die selbe Flugroute mit allen Team Mitgliedern \n(Andere Team Mitglieder müssen die Flugkarte geöffnet haben)."
+L["REQUEST_TAXI_STOP"] = "Beantrage Notlandung mit Team"
+L["REQUEST_TAXI_STOP_HELP"] = "[PH] REQUEST_TAXI_STOP_HELP"
+L["CLONES_TO_TAKE_TAXI_AFTER"] = "Diener Flug verzögerung (Sek)"
+--Mount Locale
+L["MOUNT"] = "Reittier"
+L["MOUNT_OPTIONS"] = "Reittier Optionen"
+L["MOUNT_WITH_TEAM"] = "Aufsteigen mit dem Team"
+L["MOUNT_WITH_TEAM_HELP"] = "[PH] MOUNT_WITH_TEAM_HELP"
+L["DISMOUNT_WITH_TEAM"] = "Absteigen mit dem Team"
+L["DISMOUNT_WITH_TEAM_HELP"] = "Absteigen wenn das Team Absitzt"
+L["ONLY_DISMOUNT_WITH_MASTER"] = "Nur mit Meister Absteigen"
+L["ONLY_DISMOUNT_WITH_MASTER_HELP"] = "NUR Absteigen WENN DER MEISTER ABSITZT"
+L["ONLY_MOUNT_WHEN_IN_RANGE"] = "Nur Absteigen wenn in Reichweite"
+L["ONLY_MOUNT_WHEN_IN_RANGE_HELP"] = "Absteigen nur wenn das Team in Reichweite ist. \nFunktioniert nur in der Gruppe!"
+L["I_AM_UNABLE_TO_MOUNT"] = "Ich kann nicht Aufsteigen!"
+-- Loot Locale
+L["LOOT_OPTIONS"] = "Beute Option Version 2.0"
+L["DISMOUNT_WITH_CHARACTER"] = "Dismount With Character That Dismount"
+L["ENABLE_AUTO_LOOT"] = "Verbesserte Beute aufteilung"
+L["ENABLE_AUTO_LOOT_HELP"] = "Alte Beute aufteilung \naber Besser!"
+L["TELL_TEAM_BOE_RARE"] = "Mitteilung bei Seltenen Gegenständen"
+L["TELL_TEAM_BOE_RARE_HELP"] = "Macht sich bemerkbar wenn ein Seltener Gegenstand gefunden wurde der nicht beim Aufheben gebunden ist."
+L["TELL_TEAM_BOE_EPIC"] = "Mitteilung bei Epischen Gegenständen"
+L["TELL_TEAM_BOE_EPIC_HELP"] = "Macht sich bemerkbar wenn ein Epischer Gegenstand gefunden wurde der nicht beim Aufheben gebunden ist."
+L["I_HAVE_LOOTED_X_Y_ITEM"] = function( rarity, itemName )
+	return string.format( "Ich habe einen %q Gegenstand gefunden: %s", rarity, itemName )
+end
+L["EPIC"] = "Epischen"
+L["RARE"] = "Selernen"
+L["REQUESTED_STOP_X"] = function( sender )
+	return string.format( "Ich habe eine anfrage für eine Notlandung von %s erhalten", sender )
+end
+L["SETTINGS_RECEIVED_FROM_A"] = function( characterName )
+	return string.format( "Neue Einstellungen von %s erhalten.", characterName )
+end
+L["I_AM_UNABLE_TO_FLY_TO_A"] = function( nodename )
+	return string.format( "Es ist mir nicht möglich nach %s zu fliegen.", nodename )
+end
+--------------------------
+-- Currency Locale
+L["EMA_CURRENCY"] = "EMA Währungen"
+L["SHOW_CURRENCY"] = "Zeige Währungen an"
+L["SHOW_CURRENCY_HELP"] = "Zeigt die Währungs Anzeige an."
+L["HIDE_CURRENCY"] = "Verstecke Währungen"
+L["HIDE_CURRENCY_HELP"] = "Versteckt die Währungs Anzeige für alle Team Mitglieder."
+L["CURRENCY_HEADER"] = "Währungs Auswahl für die Anzeige"
+L["GOLD"] = "Gold"
+L["GOLD_HELP"] = "Zeige Gold der Diener"
+L["GOLD_GB"] = "Zeige Gold in Gildenbank"
+L["GOLD_GB_HELP"] = "Zeige Gold in der Gildenbank.\n(Wird nur beim besuch der Gildenbank Aktualisiert)"
+L["CURR_STARTUP"] = "Zeige Währungs Anzeige beim Starten an"
+L["CURR_STARTUP_HELP"] = "Zeigt die Währungs Anzeige beim starten an.\n(Nur beim Meister)"
+L["LOCK_CURR_LIST"] = "Sperre die Währungs Anzeige"
+L["LOCK_CURR_LIST_HELP"] = "Sperrt die Währungs Anzeige, hindurch Klicken möglich."
+L["SPACE_FOR_NAME"] = "Platz für Namen"
+L["SPACE_FOR_GOLD"] =  "Platz für Namen"
+L["SPACE_FOR_POINTS"] = "Platz für Währungen"
+L["SPACE_BETWEEN_VALUES"] = "Platz zwischen Werten"
+L["TOTAL"] = "Gesamt"
+L["CURR"] = "Curr"
+
+
+--------------------------
+-- Display Team Locale
+L["EMA_TEAM"] = "EMA Team"
+L["HIDE_TEAM_DISPLAY"] = "Verstecke Team"
+L["HIDE_TEAM_DISPLAY_HELP"] = "Verstecke die Team Anzeige."
+L["SHOW_TEAM_DISPLAY"] = "Zeige Team"
+L["SHOW_TEAM_DISPLAY_HELP"] = "Zeige die Team Anzeige an."
+L["DISPLAY_HEADER"] = "Team Anzeigeoptionen"
+L["SHOW"] = "Anzeigen"
+L["SHOW_TEAM_FRAME"] = "Zeige Team Anzeige"
+L["SHOW_TEAM_FRAME_HELP"] = "Zeige EMA Team Anzeige"
+L["HIDE_IN_COMBAT_HELP_DT"] = "Verstecke Team Anzeige im Kampf"
+L["ENABLE_CLIQUE"] = "Aktiviere 'Clique' Unterstützung"
+L["ENABLE_CLIQUE_HELP"] = "Aktiviere die 'Clique' Unterstützung\n(benötigt [/Reload Ui])"
+L["SHOW_PARTY"] = "Zeige nur Gruppen Mitglieder"
+L["SHOW_PARTY_HELP"] = "Zeige nur aktuelle Gruppenmitglieder an."
+L["HEALTH_POWER_GROUP"] = "Gesundheit & Ressourcen außerhalb der Gruppe"
+L["HEALTH_POWER_GROUP_HELP"] = "Aktualisiert Gesundheit und Ressourcen über die aktuelle Gruppe hinaus \nBenötigt Gilden Kommunikationen!"
+L["SHOW_TITLE"] = "Zeige Titel"
+L["SHOW_TITLE_HELP"] = "Zeige Titel der Team Anzeige an."
+L["STACK_VERTICALLY"] = "Vertikale Team Anzeige"
+L["STACK_VERTICALLY_HELP"] = "Ordnet die Team Anzeige Vertikal an."
+L["CHARACTERS_PER_BAR"] = "Anzahl der Charaktere pro Reihe"
+L["SHOW_CHARACTER_PORTRAIT"] = "Zeige Charakter Portrait"
+L["SHOW_FOLLOW_BAR"] = "Zeige die 'Folgeanzeige' und den Charakter Namen"
+L["SHOW_NAME"] = "Zeige Charakter Namen"
+L["SHOW_XP_BAR"] = "Zeige Erfahrung\n\nund Artefaktmacht\nund Ehre\nund Ruf"
+L["VALUES"] = "Werte"
+L["VALUES_HELP"] = "Zeige Werte"
+L["PERCENTAGE"] = "Prozentual"
+L["PERCENTAGE_HELP"] = "Zeigt Prozente an."
+L["SHOW_XP"] = "Erfahrung"
+L["SHOW_XP_HELP"] = "Zeigt Team Erfahrung an."
+L["ARTIFACT_BAR"] = "Artefaktmacht"
+L["ARTIFACT_BAR_HELP"] = "Zeigt Team Artefaktmacht an."
+L["HONORXP"] = "Ehre"
+L["HONORXP_HELP"] = "Zeigt Team Ehre an."
+L["REPUTATION_BAR"] = "Ruf"
+L["REPUTATION_BAR_HELP"] = "Zeigt Team Ruf an."
+L["SHOW_HEALTH"] = "Zeige Team Gesundheit"
+L["SHOW_CLASS_COLORS"] = "Zeige Klassenfarbe"
+L["SHOW_CLASS_COLORS_HELP"] = "Färbt Gesundheit in der Klassenfarbe es Charakters an."
+L["POWER_HELP"] = "Zeit Team Ressourcen an\n\nMana, Wut, Etc..."
+L["CLASS_POWER"] = "Zeigt Team Klassen Ressourcen an\n\nCombopunkte\nSeelensplitter\nHeilige Kraft\nRunen"
+L["DEAD"] = "Tot"
+L["PORTRAIT_HEADER"] = "Portrait"
+L["FOLLOW_BAR_HEADER"] = "Folgen Anzeige"
+L["EXPERIENCE_HEADER"] = "Erfahrungs Anzeige"
+L["HEALTH_BAR_HEADER"] = "Gesundheits Anzeige"
+L["POWER_BAR_HEADER"] = "Ressourcen Anzeige"
+L["CLASS_BAR_HEADER"] = "Klassen Ressourcen Anzeige"
+
+--------------------------
+-- Follow Locale
+L["FOLLOW_BINDING_HEADER"] = "Folgen Tastenbelegung"
+L["FOLLOW_TRAIN"] = "Folgen im Zug"
+L["FOLLOW_STROBE_ME"] = "Auto Folgen AN"
+L["FOLLOW_STROBE_OFF"] = "Auto Folgen Aus"
+L["FOLLOW_BROKEN_MSG"] = "Folgen Unterbrochen!"
+L["FOLLOW_MASTER"] = "Folge dem Meister"
+L["FOLLOW_MASTER_HELP"] = "Folge dem aktuellen Meister"
+L["FOLLOW_TARGET"] = "Folge Ziel: <TargetName>"
+L["FOLLOW_TARGET_HELP"] = "Folge einem Spezifischen Ziel"
+L["FOLLOW_AFTER_COMBAT"] = "Automatisches Folgen nach dem Kampf"
+L["FOLLOW_AFTER_COMBAT_HELP"] = "Automatisches Folgen nach dem Kampf"
+L["DELAY_FOLLOW_AFTER_COMBAT"] = "Verzögerung in Sekunden"
+L["DELAY_FOLLOW_AFTER_COMBAT_HELP"] = "Verzögerung des Automatischen Folgen nach dem Kampf in Sekunden"
+L["FOLLOW_STROBING"] = "Beginnt wiederholtes Folgen <TargetName>"
+L["FOLLOW_STROBING_HELP"] = "Beginnt eine Sequenze von Folgebefehlen (Einstellbaren) \nZiel Spezifischer Charakter."
+L["FOLLOW_STROBING_ME"] = "Beginnt wiederholtes Folgen auf mir!"
+L["FOLLOW_STROBING_ME_HELP"] = "Beginnt eine Sequenze von Folge Befehlen (Einstellbaren) \nAktueller Charakter."
+L["FOLLOW_STROBING_END"] = "Beendet wiederholtes Folgen"
+L["FOLLOW_STROBING_END_HELP"] = "Beendet wiederholtes Folgen auf allen Charakteren."
+L["FOLLOW_SET_MASTER"] = "Bestimmt Folge Ziel durch Namen"
+L["FOLLOW_SET_MASTER_HELP"] = "Bestimmt Folge Ziel durch Namen"
+L["TRAIN"] = "Folge Kette"
+L["FOLLOW_ME"] = "Folge mir"
+L["TRAIN_HELP"] = "Alle Charaktere bilden eine Folgen Kette."
+L["FOLLOW_ME_HELP"] = "Folge Mor <EMA Kategorie>"
+L["SNW"] = "Unw"
+L["SNW_HELP"] = "Unterdrücke nächste Warnung"
+L["TIME_DELAY_FOLLOWING"] = "Verzögerung für automatisches Folgen nach dem Kampf"
+L["DIFFERENT_TOON_FOLLOW"] = "Benutze anderen Charakter als Folge Ziel"
+L["DIFFERENT_TOON_FOLLOW_HELP"] = "Benutze anderen Charakter unterhalb als Folge Ziel"
+L["NEW_FOLLOW_MASTER"] = "Neuer Folge Charakter"
+L["FOLLOW_BROKEN_WARNING"] = "Warnung beim brechen von Folgen"
+L["WARN_STOP_FOLLOWING"] = "Wenn ich aufhöre zu Folgen"
+L["WARN_STOP_FOLLOWING_HELP"] = "Benachrichtigt den Meister wenn ein Charakter aufhört ihm zu folgen."
+L["ONLY_IF_OUTSIDE_RANGE"] = "Nur warnen wenn außerhalb der Folge Reichweite"
+L["ONLY_IF_OUTSIDE_RANGE_HELP"] = "Warnt nur wenn sich der Charakter außerhalb der Reichweite befindet die benöigt wird um erneut zu folgen."
+L["FOLLOW_BROKEN_MESSAGE"] = "Benutzerdefinierte Nachricht wenn Charakter aufhört zufolgen"
+L["DO_NOT_WARN"] = "Nicht warnen wenn ..."
+L["IN_COMBAT"] = "Im Kampf"
+L["ANY_MEMBER_IN_COMBAT"] = "Ein Teammitglied im Kampf ist"
+L["FOLLOW_STROBING"] = "Wiederholtes Folgen aktiv"
+L["FOLLOW_STROBING_AJM_FOLLOW_COMMANDS."] = "Wiederholtes Folgen wird durch /EMA-Follow Befehle kontrolliert."
+L["USE_MASTER_STROBE_TARGET"] = "Meister ist IMMER Ziel Auto Folgen"
+L["PAUSE_FOLLOW_STROBING"] = "Pausiere Wiederholtes Folgen wenn ...."
+L["DRINKING_EATING"] = "Esse/Trinke"
+L["IN_A_VEHICLE"] = "In einem Fahrzeug"
+L["GROUP_FOLLOW_STROBE"] = "Kategorie für Auto Folgen"
+L["FREQUENCY"] = "Frequenz in Sekunden"
+L["FREQUENCY_COMABT"] = "Frequenz im Kampf in Sekunden"
+L["ON"] = "An"
+L["OFF"] = "Aus"
+L["DRINK"] = "Trinken"
+L["FOOD"] = "Essen"
+L["REFRESHMENT"] = "Erfrischung"
+
+--------------------------
+-- Vender/Purchase Locale.
+L["AUTO_BUY_ITEMS"] = "Gegenstände automatisch Kaufen"
+L["OVERFLOW"] = "Überkaufen"
+L["REMOVE_VENDER_LIST"] = "Entfernen von der Kaufliste"
+L["ITEM_DROP"] = "Gegenstand (Ziehe Gegenstand aus deiner Tasche in die Box)"
+L["PURCHASE_ITEMS"] = "Gegenstände automatisch Kaufen"
+L["ADD_ITEM"] = "Gegenstand hinzufügen"
+L["AMOUNT"] = "Anzahl"
+L["PURCHASE_MSG"] = "Kauf Nachrichten"
+L["ITEM_ERROR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
+L["NUM_ERROR"] = "Anzahl muss eine Nummer sein."
+L["BUY_POPUP_ACCEPT"] = "Bist du sicher das du den ausgewählten Gegenstand aus der Liste entfernen willst?"
+L["ERROR_BAGS_FULL"] =  "Ich habe nicht genug Platz in meiner Tasche um alles zu kaufen."
+L["ERROR_GOLD"] = "Ich hab nicht genug Gold um alles zu kaufen."
+L["ERROR_CURR"] = "Ich habe nicht genug der benötigten Währung um alles zu kaufen."
+
+--------------------------
+-- Trade Locale
+L["REMOVE_TRADE_LIST"] = "Bist du sicher das du den ausgewählten Gegenstand aus der Liste entfernen willst?"
+L["TRADE_LIST_HEADER"] = "Handels Liste"
+L["TRADE_LIST"] = "Handel die angegebenen Gegenständen"
+L["TRADE_LIST_HELP"] = "Alle in dieser angegeben Gegenstände werden entsprechend der Kategorien gehaldelt."
+L["TRADE_BOE_ITEMS"] = "Handel nicht gebundene Gegenstände"
+L["TRADE_BOE_ITEMS_HELP"] = "Handel alle Gegenstände die nicht beim Aufheben gebunden werden mit dem aktuellen Meister."
+L["TRADE_REAGENTS"] = "Handel alle Handwerksmaterialien"
+L["TRADE_REAGENTS_HELP"] = "Handel Alle Handwerksmaterialien mit dem aktuellen Meister"
+L["TRADE_OPTIONS"] = "Handel mit \"Meister\" Optionen"
+L["TRADE_GOLD"] = "Handel überschüssiges Gold"
+L["TRADE_GOLD_HELP"] = "Handel überschüssiges Gold von den Minions zum Meister \n\n ACHTUNG!\n Passe beim automatischen Handeln immer auf!"
+L["GOLD_TO_KEEP"] = "Anzahl des Goldes das die Minions behalten sollen"
+L["TRADE_TAG_ERR"] = "Gegenstands Bezeichnungen dürfen nur Buchstaben und Ziffern beinhalten"
+L["ERR_WILL_NOT_TRADE"] = "Das Ziel ist kein Teammitglied, Handel nicht möglich."
+L["ADD_ITEMS"] = "Füge Gegenstände hinzu"
+
+--------------------------
+-- Toon Locale
+L["ATTACKED"] = "Ich werde ANGEGRIFFEN!"
+L["TARGETING"] = "kein Ziel!"
+L["FOCUS"] = "kein Focus!"
+L["LOW_HEALTH"] = "wenig Gesundheit!"
+L["LOW_MANA"] = "wenig Mana!"
+L["BAGS_FULL"] = "volle Taschen!"
+L["CCED"] = "Ich habe"
+-- Vendor
+L["AUTO_REPAIR"] = "Automatisches Reparieren"
+L["AUTO_REPAIR_HELP"] = "Minions versuchen bei Händlern automatisch zu Reparieren."
+L["REPAIR_GUILD_FUNDS"] = "Reparaturen von der Gildenbank zahlen"
+L["REPAIR_GUILD_FUNDS_HELP"] = "Versucht mit Gold von der Gildenbank zu reparieren."
+-- Requests
+L["REQUESTS"] = "Anfragen"
+L["DENY_DUELS"] = "Duell Einladungen ablehnen"
+L["DENY_DUELS_HELP"] = "Lehnt Duell Anfragen automatisch ab."
+L["DENY_GUILD_INVITES"] = "Gildeneinladungen ablehnen"
+L["DENY_GUILD_INVITES_HELP"] = "Lehnt Gildeneinladungen automatisch ab."
+L["ACCEPT_RESURRECT"] = "Wiederbelebungen annehmen"
+L["ACCEPT_RESURRECT_AUTO"] = "Nimmt Wiederbelebungen automatisch an."
+L["ACCEPT_RESURRECT_FROM_TEAM"] = "Nur von Teammitgliedern"
+L["ACCEPT_RESURRECT_FROM_TEAM_HELP"] = "Automatische Annahme von Wiederbelebungsanfragen \nAuf ALLEN Teammitgiedern\nNur für Teammitgieder"
+
+L["RELEASE_PROMPTS"] = "Team Anzeige zum Geist Freilassen anzeigen"
+L["RELEASE_PROMPTS_HELP"] = "Sobald ein Teammitglied stirbt wird auf alles Charakteren eine Anzeige eingeblendet mit der alle Charaktere gleichzeitig den Geist Freilassen können. "
+L["SUMMON_REQUEST"] = "Beschwörungen annehmen"
+L["SUMMON_REQUEST_HELP"] = "Nimmt Beschwörungen automatisch an."
+L["GROUPTOOLS_HEADING"] = "Dungeon Werkzeuge"
+L["ROLE_CHECKS"] = "Gruppen Rollen akzeptieren"
+L["ROLE_CHECKS_HELP"] = "Wenn bereits eine Rolle ausgewählt ist wird diese automatisch angenommen"
+L["READY_CHECKS"] = "Bereitschafts Abfrage als Team annehmen"
+L["READY_CHECKS_HELP"] = "Bereitschafts Abfrage wird von allen Charakteren mit bestätigt."
+L["LFG_Teleport"] = "Dungeon Teleportation mit Team"
+L["LFG_Teleport_HELP"] = "Minions werden Teleportation in/aus einem Dungeon nachmachen."
+L["ROLL_LOOT"] = "Mit Team auf Beute würfeln"
+L["ROLL_LOOT_HELP"] = "Falls möglich würfeln alle Minions auf die gleichen Gegenstände wie der Master."
+-- Warnings
+L["COMBAT"] = "Kampf"
+L["WARN_HIT"] = "Warnt falls ein Minion Schaden erleidet"
+L["WARN_HIT_HELP"] = "Warnt bei dem ersten Schaden denn ein Minion im Kampf erleidet."
+L["TARGET_NOT_MASTER"] = "Warnt wenn kein Ziel existiert"
+L["TARGET_NOT_MASTER_HELP"] = "Warnt wenn im Kampf kein Ziel existiert (Minion)"
+L["FOCUS_NOT_MASTER"] = "Warnt wenn kein Focus Ziel existiert"
+L["FOCUS_NOT_MASTER_HELP"] = "Warnt wenn im Kampf kein Focus Ziel existiert (Minion)"
+L["HEALTH_POWER"] = "Gesundheit / Mana"
+L["HEALTH_DROPS_BELOW"] = "Warnt wenn Gesundheit unter den Wert fällt"
+L["HEALTH_DROPS_BELOW_HELP"] = "Warnt wenn die Gesundheit eines Minions unter den Wert fällt"
+L["HEALTH_PERCENTAGE"] = "Gesundheitswert - warnt bei weniger als ... Prozent"
+L["MANA_DROPS_BELOW"] = "Warnt wenn Mana unter den Wert fällt"
+L["MANA_DROPS_BELOW_HELP"] = "Warnt wenn das Mana eines Minions unter den Wert fäll"
+L["MANA_PERCENTAGE"] = "Manawert - warnt bei weniger als ... Prozent"
+L["DURABILITY_DROPS_BELOW"] = "Warnt wenn Haltbarkeit unter den Wert fällt"
+L["DURABILITY_DROPS_BELOW_HELP"] = "Warnt wenn die Haltbarkeit eines Minions unter den Wert fällt."
+L["DURABILITY_PERCENTAGE"] = "Haltbarkeit - warnt bei weniger als ... Prozent"
+L["LOW_DURABILITY_TEXT"] = "Niedrige Haltbarkeit Text"
+L["DURABILITY_LOW_MSG"] = "Meine Haltbarkeit fällt auf"
+L["BAGS_FULL"] = "Taschen sind Voll"
+L["BAGS_FULL_HELP"] = "Warnt wenn Taschen Voll sind"
+L["BAG_SPACE"] = "Taschen Platz"
+L["OTHER"] = "Andere"
+L["WARN_IF_CC"] = "Warnt wenn ein Team Mitglied unter den Einfluss von Kontrollversucheffekten fällt"
+L["WARN_IF_CC_HELP"] = "Warnt wenn ein Team Mitglied unter den Einfluss von Kontrollversucheffekten fällt"
+L["RELEASE_TEAM_Q"] = "Mit Team Geist Freilassen?"
+L["RELEASE_TEAM"] = "Team freilassen"
+L["RECOVER_CORPSES"] = "Team wiederbeleben?"
+L["ERR_GOLD_TO_REPAIR"] = "Ich habe nicht genug Gold um alle Gegenstände zu Reparieren."
+L["RELEASE_CORPSE_FOR_X"] = function( delay )
+	return string.format( "Ich kann meinen Geist für %s sekunden nicht freilassen", delay )
+end
+L["I_REFUSED_A_DUEL_FROM_X"] = function( challenger )
+	return string.format( "Ich habe eine Duell Anfrage von %s abgelehnt.", challenger )
+end
+L["REFUSED_GUILD_INVITE"] = function( guild, inviter )
+	return string.format( "Ich habe eine Gildeneinladung für %s von %s abgelehnt.", guild, inviter )
+end
+L["SUMMON_FROM_X_TO_Y"] = function( sender, location )
+	return string.format( "Ich habe eine Beschwörung von: %s nach: %s angenommen.", sender, location )
+end
+L["REPAIRING_COST_ME_X"] = function( costString )
+    return string.format( "Reparieren kostet mich: %s", costString )
+end
+
+--------------------------
+-- Talk Locale
+
+L["TALK_OPTIONS"] = "Unterhaltungs Optionen"
+L["FORWARD_WHISPERS_MASTER_RELAY"] = "Leite Unterhaltungen zu und von dem Master weiter"
+L["FORWARD_WHISPERS_MASTER_RELAY_HELP"] = "Leitet geflüstertes zum Master weiter und \nleitet antworten zu dem flüsterer zurück."
+L["DO_NOT_BATTENET_WHISPERS"] = "Battle.net Nachrichten nicht weiterleiten"
+L["DO_NOT_BATTENET_WHISPERS_HELP"] = "Leitet keine Nachrichten über das Battle.net System weiter."
+
+L["FORWARD_FAKE_WHISPERS"] = "Weiterleitung per Falschem geflüster für Klickbare Spieler und Links"
+L["FORWARD_FAKE_WHISPERS_HELP"] = "Weiterleitung per Falschem geflüster für Klickbare Spieler und Links"
+L["FAKE_WHISPERS_CHANNEL"]  = "Sende Falsch geflüster an"
+L["FORWARDER_REPLY_QUEUE"] = "Zeigt Weiterleitenden im geflüster an den Master an"
+L["FORWARDER_REPLY_QUEUE_HELP"] = "Zeigt Weiterleitenden im geflüster an den Master an."
+L["ORIGINATOR_REPLY_QUEUE"] = "Zeigt den Flüsternden im geflüster an den Meister an"
+L["ORIGINATOR_REPLY_QUEUE_HELP"] = "Zeigt den Weiterleitenden Flüsterer im geflüster an den Meister an."
+L["MESSAGES_WITH_LINKS"] = "Zeige nur Nachrichten mit Links"
+L["MESSAGES_WITH_LINKS_HELP"] = "Zeige nur Nachrichten mit Links"
+-- TOBEREMOVED
+L["CHAT_SNIPPETS"] = "Chat Snippets"
+L["ENABLE_CHAT_SNIPPETS"] = "Enable Chat Snippets"
+L["ENABLE_CHAT_SNIPPETS_HELP"] = "Chat Snippets Auto Send Messages To Players That Wispers Your Minions"
+L["SNIPPET_TEXT"] = "Snippet Text"
+L["CHAT_SNIPPET_POPUP"] = "Enter The Shortcut Text For This Chat Snippet:"
+L["REMOVE_CHAT_SNIPPET"] = "Are You Sure You Wish To Remove The Selected Chat Snippet?"
+--END
+L["GM"] = "GM"
+L["TALK_VIA"] = " (über "
+L["BATTLE_NET"] = "<BatteTag>"
+L["<GM>"] = "<GameMaster>"
+L["WHISPERS"] = " flüstert: "
+L["WHISPERED_YOU"] = "Flüstert dir."
+
+------------------------
+-- Quest Locale
+
+L["ABANDON_QUESTS_TEAM"] = "Willst du \"%s\" auf all deinen Toons abbrechen?"
+L["JUST_ME"] = "Nur bei Mir"
+L["ALL_TEAM"] = "Gesamten Team"
+L["TRACK_QUEST_ON_TEAM"] = "Willst du \"%s\" auf all deinen Toons verfolgen?"
+L["UNTRACK_QUEST_ON_TEAM"] = "Willst du \"%s\" auf all deinen Toons NICHT mehr verfolgen?"
+L["ABANDON_ALL_QUESTS"] = "Willst du \"ALLE\" deine Quests auf JEDEM Toon abbrechen? \nBist du Sicher?"
+L["YES_IAM_SURE"] = "Ja, ich bin mir Sicher"
+L["INFORMATION"] = "Informationen"
+L["QUESTINFORMATIONONE"] = "EMA-Quest behandelt alle Teammitgieder als wären sie Master."
+L["QUESTINFORMATIONTWO"] = "Quest Aktionen eines Charakters werden von allen anderen ebenfalls durchgeführt."
+L["QUESTINFORMATIONTHREE"] = "Egal wer aktuell Master ist."
+L["QUEST_HEADER"] = "Quest Annahme und Abgabe mit EMA"
+L["MIRROR_QUEST"] = "Quest Auswahl und Annahme"
+L["MIRROR_QUEST_HELP"] = "Spiegelt die Auswahl des Meisters auf das restliche Team."
+L["AUTO_SELECT_QUESTS"] = "Automatische Annahme aller Quests"
+L["AUTO_SELECT_QUESTS_HELP"] = "Automatische Questannahme \nSobald ein Questgeber angesprochen wurde."
+L["ACCEPT_QUESTS"] = "Quest annahme"
+L["ACCEPT_QUESTS_HELP"] = "Quest annahme"
+L["ACCEPT_QUEST_WITH_TEAM"] = "Nimmt Quests mit Team an"
+L["ACCEPT_QUEST_WITH_TEAM_HELP"] = "Nimmt Quests gleichzeitig mit dem Team an."
+L["QUEST_INFORMATION_AUTO"] = "AUTOMATISCH: Nimmt jede Quest an unabhängig vom Team."
+L["DONOT_AUTO_ACCEPT_QUESTS"] = "Nimmt Quests nicht automatisch an."
+L["DONOT_AUTO_ACCEPT_QUESTS_HELP"] = "Nimmt Quest niemals automatisch an."
+L["AUTO_ACCEPT_QUESTS"] = "Nimmt jede geteilte Quest Automatisch an"
+L["AUTO_ACCEPT_QUESTS_HELP"] = "Nimmt jede geteilte Quest Automatisch an unabhängig von Wem. "
+L["AUTO_ACCEPT_QUESTS_LIST"] = "Nimmt geteilte Quest an:"
+L["AUTO_ACCEPT_QUESTS_LIST_HELP"] = "Nimmt geteilte Quests von folgenden Quellen automatisch an."
+L["TEAM_QUEST_HELP"] = "Von jedem Team Mitglied."
+L["NPC"] = "Questgeber"
+L["NPC_HELP"] = "Von jedem Nicht-Spieler-Charakter."
+L["FRIENDS"] = "Freunden"
+L["FRIENDS_HELP"] = "Von jedem in deiner Freundes/BattleTag Liste."
+-- Quest
+L["QUEST_GROUP_HELP"] = "Von jedem in deiner Gruppe."
+L["GUILD_HELP"] = "Von jedem in deiner Gilde."
+L["PH_RAID"] = "[PH] Raid"
+L["PH_RAID_HELP"] = "[PH] Raid"
+L["MASTER_SHARE_QUESTS"] = "Master teilt automatisch jede angenommene Quest"
+L["MASTER_SHARE_QUESTS_HELP"] = "Master wird versuchen jede angenommene Quest auch zuteilen."
+L["ACCEPT_ESCORT_QUEST"] = "Team akzeptiert jede Eskort Quest vom Team."
+L["ACCEPT_ESCORT_QUEST_HELP"] = "Automatische annahme von Eskort Quests die jemand im Team startet."
+L["HOLD_SHIFT_TO_OVERRIDE"] = "Halte [Shift] zum überschreiben der Automatischen Annahme/Abgabe von Quests"
+L["HOLD_SHIFT_TO_OVERRIDE_HELP"] = "Halte [Shift] zum überschreiben der Automatischen Annahme/Abgabe von Quests."
+L["SHOW_PANEL_UNDER_QUESTLOG"] = "Zeige Zusätzliche Tasten unter der Weltkarte"
+L["SHOW_PANEL_UNDER_QUESTLOG_HELP"] = "Zeige Zusätzliche Tasten unter der Weltkarte"
+-- Completion
+L["QUEST_COMPLETION"] = "Quest Abschluss"
+L["ENABLE_QUEST_COMPLETION"] = "Aktiviere automatische Questabgabe"
+L["ENABLE_QUEST_COMPLETION_HELP"] = "Ermöglicht das automatische abgeben von Fertigen Quests."
+L["NOREWARDS_OR_ONEREWARD"] = "Quest hat keine oder eine Belohnung:"
+L["QUEST_DO_NOTHING"] = "Toon macht nichts"
+L["QUEST_DO_NOTHING_HELP"] = "Toon gibt Quest nicht automatisch ab."
+L["COMPLETE_QUEST_WITH_TEAM"] = "Toon gibt Quest mit Master ab"
+L["COMPLETE_QUEST_WITH_TEAM_HELP"] = "Alle geben ihre Quest gleichzeitig mit dem Master ab."
+L["AUTO_COMPLETE_QUEST"] = "Toon gibt Quest automatisch ab"
+L["AUTO_COMPLETE_QUEST_HELP"] = "Gibt Quests automatisch ab."
+L["MORE_THEN_ONE_REWARD"] = "Quest hat mehr als eine Belohnung:"
+L["MUST_CHOOSE_OWN_REWARD"] = "Toon muss Belohnung auswählen"
+L["MUST_CHOOSE_OWN_REWARD_HELP"] = "Toons müssen ihre Belohnung seperat auswählen"
+L["CHOOSE_SAME_REWARD"] = "Toons wählen die selbe Belohnung"
+L["CHOOSE_SAME_REWARD_HELP"] = "Toons wählen die selbe Belohnung wie der rest des Teams \n\nNur verwenden wenn alle Teammitglieder die selbe Klasse sind."
+L["MODIFIER_CHOOSE_SAME_REWARD"] = "Wenn eine Modifier Taste gehalten wird, wählen die Toons die selbe Belohnung"
+L["MODIFIER_CHOOSE_SAME_REWARD_HELP"] = "Wenn eine Modifier Taste gehalten wird, wählen die Toons die selbe Belohnung"
+L["OVERRIDE_REWARD_SELECTED"] = "Überschreibung: Wenn ein Minion bereits eine Belohnung ausgewählt hat, wählt er diesen"
+L["OVERRIDE_REWARD_SELECTED_HELP"] = "Überschreibung: Wenn ein Minion bereits eine Belohnung ausgewählt hat, wählt er diesen."
+L["SHARING_QUEST_TO_ALLMINIONS"] = "Teile Quests mit allen Minions"
+L["TRACKING_QUEST_TO_ALLMINIONS"] = "Verfolge Quests bei allen Minions"
+L["UNTRACKING_QUESTS_ALLMINIONS"] = "Entfolge Quests bei allen Minions"
+L["TOGGLE"] = "Wechseln"
+L["ABANDON_ALL"] = "ALLE Quests abbrechen"
+L["ABANDON_ALL_TOOLTIP"] = "Breche alle Quests auf Allen Minions ab"
+L["SHARE_ALL"] = "Teile Alle"
+L["SHARE_ALL_TOOLTIP"] = "Teile Alle Quests bei Allen Minions"
+L["TRACK_ALL"] = "Verfolge Alle"
+L["TRACK_ALL_TOOLTIP"] = "Verfolge Alle Quests bei Allen Minions"
+L["UNTRACK_ALL"] = "Entfolge Alle"
+L["UNTRACK_ALL_TOOLTIP"] = "Entfolge Alle Quests bei Allen Minions"
+L["ABANDONING_ALLQUEST"] = "Breche Quest bei allem Minions ab"
+
+-- Quest Strings
+L["AUTOMATICALLY_ACCEPTED_ESCORT_QUEST"] = function( questName )
+	return string.format( "Eine Eskort Quest wurde angenommen: %s", questName )
+end
+L["INVENTORY_IS_FULL_CAN_NOT_HAND_IN_QUEST"] = function( questName )
+	return string.format( "Taschen sind voll, ich kann die Quest %s nicht abgeben.", questName )
+end
+L["ACCEPTED_QUEST_QN"] = function( questName )
+	return string.format( "%s angenommen", questName )
+end
+L["AUTO_ACCEPTED_PICKUPQUEST_QN"] = function( questName )
+	return string.format( "Eine Quest wurde automatisch angenommen: %s", questName )
+end
+L["AUTOMATICALLY_ACCEPTED_QUEST"] = function( questName )
+	return string.format( "Eine Quest wurde automatisch angenommen: %s", questName )
+end
+L["QUESTLOG_DO_NOT_HAVE_QUEST"] = function( questName )
+	return string.format( "Ich habe diese Quest nicht: %s", questName )
+end
+L["JAMBA_QUESTLOG_Have_Abandoned_Quest"] = function( questName )
+	return string.format( "Ich habe diese Quest abgebrochen: %s", questName )
+end
+
+------------------------
+-- QuestTracker Locale
+
+L["SHOW_QUEST_WATCHER"] = "Zeige Quests an"
+L["SHOW_QUEST_WATCHER_HELP"] = "Zeige die Questanzeige an."
+L["HIDE_QUEST_WATCHER"] = "Verstecke Quests"
+L["HIDE_QUEST_WATCHER_HELP"] = "Versteckt die Questanzeige."
+L["QUEST_TRACKER_HEADER"] = "Quest Anzeige Einstellungen"
+L["ENABLE_TRACKER"] = "Aktiviere Quest Anzeige"
+L["ENABLE_TRACKER_HELP"] = "Aktivie die EMA Quest Anzeige"
+L["UNLOCK_TRACKER"] = "Entriegel Quest Anzeige"
+L["UNLOCK_TRACKER_HELP"] = "Entriegel die EMA Questanzeige. \n Halte[Alt] zum verschieben"
+L["HIDE_BLIZZ_OBJ_TRACKER"] = "Verstecke Blizzards Quest Anzeige"
+L["HIDE_BLIZZ_OBJ_TRACKER_HELP"] = "Versteckt die Standard Blizzard Quest verfolgung."
+L["SHOW_JOT_ON_MASTER"] = "Zeige Quest nur auf Master"
+L["SHOW_JOT_ON_MASTER_HELP"] = "Zeigt die EMA Quest Anzeige nur auf dem Master an."
+L["HIDE_JOT_IN_COMBAT"] = "Verstecke Quests im Kamp"
+L["HIDE_JOT_IN_COMBAT_HELP"] = "Verstecke die EMA Quest Anzeige im Kampf"
+L["SHOW_COMPLETED_OBJ_DONE"] = "Zeige Vollständige Quests an"
+L["SHOW_COMPLETED_OBJ_DONE_HELP"] = "Zeigt vervollständigte Quests als 'Fertig' an."
+L["HIDE_OBJ_COMPLETED"] = "Verstecke Vollständige Quests"
+L["HIDE_OBJ_COMPLETED_HELP"] = "Verstecke Vollständige Quests"
+L["SEND_PROGRESS_MESSAGES"] = "Teile Questfortschritte mit"
+L["SEND_PROGRESS_MESSAGES_HELP"] = "Teile Questfortschritt in der Nachrichten Region's Box unterhalb"
+L["QUESTWACHERINFORMATIONONE"] = "Um die Zeilen und Breite zu übernehmen wird ein [/reload] benötigt. "
+L["LINES_TO_DISPLAY"] = "Zeilen mit Informationen anzeigen"
+L["TRACKER_WIDTH"] = "Anzeige Breite"
+L["DONE"] = "Fertig"
+L["TRACKER_TITLE_NAME"] = "EMA Quest Anzeige"
+L["REWARDS"] = "Belohnung"
+L["REWARDS_TEXT"] = "Abschluss dieser Quest gewährt \nEuch:"
+L["HEADER_MOUSE_OVER_QUESTWATCHER"] = "Halte \"ALT\" gedrückt um die Quest Anzeige zu verschieben"
+L["UPDATE_MOUSE_OVER_QUESTWATCHER"] = "Zwingt die Quest Anzeige zu einer Aktualisierung"
+
+------------------------
+-- Guild Locale
+L["GUILDTAB"] = ""
+L["GUILD_LIST_HEADER"] = "Gildenbank Liste"
+L["GUILD_LIST"] = "Verstaue aufgelistete Gegenstände in der Gildenbank"
+L["GUILD_LIST_HELP"] = "Verstaue aufgelistete Gegenstände Automatisch in der Gildenbank"
+L["GB_TAB_LIST"] = "Gildenbank Tab Number"
+L["GUILD_BOE_ITEMS"] = "Verstaue alle Nicht gebundenen Ausrüstung in der Gildenbank"
+L["GUILD_BOE_ITEMS_HELP"] = "Verstaue alle nicht beim aufheben gebundene Ausrüstung in der Gildenbank"
+L["GUILD_REAGENTS"] =  "Verstaue alle Handwerksmaterialien in der Gildenbank"
+L["GUILD_REAGENTS_HELP"] = "Verstaue alle Handwerksmaterialien in der Gildenbank"
+L["GB_OPTIONS"] = "Gildenbank Optionen"
+L["GB_GOLD"] = "Adjustiere Charakter Gold bei Gildenbank besuch"
+L["GB_GOLD_HELP"] = "Adjustiere Charakter Gold bei Gildenbank besuch"
+L["REMOVE_GUILD_LIST"] = "Bist du dir sicher das du den ausgewählten Gegenstand aus der Liste entfernen willst?"
+
+------------------------
+-- X Locale
diff --git a/EMA/Locales/Core-Locale-enUS.lua b/EMA/Locales/Core-Locale-enUS.lua
new file mode 100644
index 0000000..dd7cc20
--- /dev/null
+++ b/EMA/Locales/Core-Locale-enUS.lua
@@ -0,0 +1,862 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+local L = LibStub("AceLocale-3.0"):NewLocale( "Core", "enUS", true )
+
+
+
+-- NewLocales
+
+--PreCoded ALL
+L["JAMBA"] = "Jamba"
+L["JAMBA EE"] = "Jamba EE"
+
+L["EMA"] = "EMA"
+L[""] = true
+L[" "] = true
+L[": "] = true
+L["("] = true
+L[")"] = true
+L[" / "] = true
+L["/"] = true
+L["%"] = true
+L["N/A"] = true
+L["PUSH_SETTINGS"] = "Push Settings"
+L["PUSH_ALL_SETTINGS"] = "Push All Settings"
+L["PUSH_SETTINGS_INFO"] = "Push Settings To Team Members"
+L["MINION"] = "Minion"
+L["NAME"] = "Name"
+L["MASTER"] = "Master"
+L["ALL"] = "All"
+L["MESSAGES_HEADER"] = "Messages"
+L["MESSAGE_AREA"]  = "Message Area"
+L["SEND_WARNING_AREA"] = "Warning Area"
+L["PH"] = "PH"
+L["GUILD"] = "Guild"
+L["CTRL"] = "Ctrl"
+L["SHIFT"] = "Shift"
+L["ALT"] = "Alt"
+L["UPDATE"] = "Update"
+
+
+-- Display Options
+L["APPEARANCE_LAYOUT_HEALDER"] = "Appearance & Layout"
+L["BLIZZARD"] = "Blizzard"
+L["BLIZZARD_TOOLTIP"] = "Blizzard Tooltip"
+L["BLIZZARD_DIALOG_BACKGROUND"] = "Blizzard Dialog Background"
+L["ARIAL_NARROW"] = "Arial Narrow"
+L["NUMBER_OF_ROWS"] = "Number Of Rows"
+L["SCALE"] = "Scale"
+L["TRANSPARENCY"] = "Transparency"
+L["BORDER_STYLE"] = "Border Style"
+L["BORDER COLOUR"] = "Border Colour"
+L["BACKGROUND"] = "Background"
+L["BG_COLOUR"] = "Background Colour"
+L["FONT"] = "Font"
+L["FONT_SIZE"] = "Font Size"
+L["BAR_TEXTURES"] = "Status Bar Textures"
+L["WIDTH"] = "Width"
+L["HEIGHT"] = "Hight"
+
+-- Numbers
+L["1"] = "One"
+L["2"] = "Two"
+L["3"] = "Three"
+L["4"] = "Four"
+L["5"] = "Five"
+L["6"] = "Six"
+L["7"] = "Seven"
+L["8"] = "Eight"
+L["9"] = "Nine"
+L["10"] = "Ten"
+L["11"] = "Eleven"
+L["12"] = "Twelve"
+L["13"] = "Thirteen"
+L["14"] = "Fourteen"
+L["15"] = "Fifteen"
+L["16"] = "Sixteen"
+L["17"] = "Sventeen"
+L["18"] = "Eighteen"
+L["19"] = "Nineteen"
+L["20"] = "Twenty"
+
+--------------------------
+-- Modules Locale
+L["NEWS"] = "News"
+L["OPTIONS"] = "Options"
+L["SETUP"] = "Setup"
+L["PROFILES"] = "Profiles"
+L["TEAM"] = "Team"
+L["COMMUNICATIONS"] = "Communications"
+L["MESSAGE_DISPLAY"] = "Message Display"
+L["GROUP_LIST"] = "Group List"
+L["DISPLAY"] = "Display"
+L["ITEM_USE"] = "Item Use"
+L["VENDER_LIST_MODULE"] = "Sell List"
+L["INTERACTION"] = "Interaction"
+L["CURRENCY"] = "Currency"
+L["TOON"] = "Toon"
+L["FOLLOW"] = "Follow"
+L["PURCHASE"] = "Purchase"
+-- FUCKED UP!
+L["VENDER"] = "Vendor"
+L["VENDOR"] = "Vendor"
+L["PURCHASE"] = "Purchase"
+L["WARNINGS"] = "Warnings"
+L["QUEST"] = "Quest"
+L["TRADE"] = "Trade"
+L["REPAIR"] = "Repair"
+L["TALK"] = "Talk"
+L["QUEST"] = "Quest"
+L["COMPLETION"] = "Completion"
+L["TRACKER"] = "Tracker"
+
+--------------------------
+-- Pecoded String Formats
+L["SETTINGS_RECEIVED_FROM_A"] = function( characterName )
+	return string.format("Settings Received From %s", characterName )
+end
+
+L["A_IS_NOT_IN_TEAM"] = function( characterName )
+	return string.format("%s Is Not In My Team List. I Can Not Set Them To Be My Master.", characterName )
+end
+--------------------------
+-- Core Locale
+L["STATUSTEXT"] = "EMA: The Even More Awesome MultiBoxing Assistant"
+L["RESET_SETTINGS_FRAME"] = "Reset Settings Frame"
+L["MODULE_NOT_LOADED"] = "Module Not Loaded Or Is Out Of Date"
+L["RELEASE_NOTES"] = "Release Notes "
+L["COPYING_PROFILE"] = "Copying profile: "
+L["CHANGING_PROFILE"] = "Changing profile: "
+L["PROFILE_RESET"] = "Profile reset - iterating all modules."
+L["RESETTING_PROFILE"] = "Resetting profile: "
+L["PROFILE_DELETED"] = "Profile deleted - iterating all modules."
+L["DELETING_PROFILE"] = "Deleting profile: "
+L["Failed_LOAD_MODULE"] =  "Failed to load Ema Module: "
+L["TEXT1"] = "Ebony's MultiBoxing Assistant v8 For BFA!"
+L["TEXT2"] = ""
+L["TEXT3"] = "This Build Is Beta!"
+L["TEXT4"] = ""
+L["TEXT5"] = ""
+L["TEXT6"] = "Read The ChangeLog For More Information"
+L["TEXT7"] = ""
+L["TEXT8"] = ""
+L["TEXT9"] = ""
+L["TEXT10"] = ""
+L["SPECIAL_THANKS"] = "Special Thanks:"
+L["THANKS1"] = "Michael \"Jafula\" Miller For Making Jamba That Some Of This Code Is Based Of"
+L["THANKS2"] = "tk911 For Translating EMA To German (DE)"
+L["THANKS3"] = ""
+L["WEBSITES"] = "Websites"
+L["ME"] = "Current Project Manger Jennifer (Ebony) Cally"
+L["ME_TWITTER"] = "https://twitter.com/Jenn_Ebony"
+L["D-B"] = "http://Dual-boxing.com"
+L["ISB"] = ""
+L["TEMP_WEBSITE1"] = ""
+L["TEMP_WEBSITE2"] = ""
+L["TEMP_WEBSITE3"] = ""
+L["COPYRIGHT"] = "Copyright (c) 2015-2018  Jennifer Cally"
+L["COPYRIGHTTWO"] = "Released Under License: The MIT License"
+L["FRAME_RESET"] = "Frame Reset"
+-- Msg 8000
+L["ALL_SETTINGS_RESET"] = "Thank You For Useing EMA Please Report Bugs GitHub"
+--------------------------
+-- Communications Locale
+
+L["A: Failed to deserialize command arguments for B from C."] = function( libraryName, moduleName, sender )
+	return libraryName..": Failed to deserialize command arguments for "..moduleName.." from "..sender.."."
+end
+L["AUTO_SET_TEAM"] = "Auto Set Team Members On and Off Line"
+L["BOOST_COMMUNICATIONS"] = "Boost EMA Communications"
+L["BOOST_COMMUNICATIONS_HELP"] = "Reload Ui To Take Effect, May Cause Disconnections"
+L["USE_GUILD_COMMS"] = "Use Guild Communications"
+L["USE_GUILD_COMMS_INFO"] = "Use Guild Communications All Of Team Needs To Be In Same Guild"
+
+----------------------------
+-- Helper Locale
+L["COMMANDS"] = "Commands"
+L["SLASH_COMMANDS"] = "Slash Commands"
+
+----------------------------
+-- Team Locale
+L["JAMBA-TEAM"] = "Team"
+L["INVITE_GROUP"] = "Invite Team To Group"
+L["DISBAND_GROUP"] = "Disband Group"
+L["SET_MASTER"] = "Set Current Character The Master"
+L["ADD"] = "Add"
+L["ADD_HELP"] = "Add a member to the team list."
+L["REMOVE"] = "Remove"
+L["REMOVE_REMOVE"] = "Remove A Member From The Team List."
+L["MASTER_HELP"] = "Set The Master Character."
+L["I_AM_MASTER"] = "I'm The Master"
+L["I_AM_MASTER_HELP"] = "Set This Character To Be The Master Character."
+L["INVITE"] = "Invite"
+L["INVITE_HELP"] = "Invite Team Members To A Party With Or Without A <Group>."
+L["DISBAND"] = "Disband"
+L["DISBAND_HELP"] = "Disband All Team Members From Their Parties."
+L["ADD_GROUPS_MEMBERS"] = "Add Groups Members"
+L["ADD_GROUPS_MEMBERS_HELP"] = "Add Members In The Current Group To The Team."
+L["REMOVE_ALL_MEMBERS"] = "Remove All Members"
+L["REMOVE_ALL_MEMBERS_HELP"] = "Remove all members from the team."
+L["SET_TEAM_OFFLINE"] = "Set Team OffLine"
+L["SET_TEAM_OFFLINE_HELP"] = "Set All Team Members OffLine"
+L["SET_TEAM_ONLINE"] = "Set Team OnLine"
+L["SET_TEAM_ONLINE_HELP"] = "Set All Team Members OnLine"
+L["TEAM_HEADER"] = "Team"
+L["GROUPS_HEADER"] = "Groups"
+L["BUTTON_ADD_HELP"] = "Adds A Member To The Team List\nYou can Use:\nCharacterName\nCharacterName-realm\nTarget\nMouseover"
+L["BUTTON_ADDALL_HELP"] = "Adds all Party/Raid members to the team list"
+L["BUTTON_UP_HELP"] = "Move The Character Up A Place In The Team List"
+L["BUTTON_ISBOXERADD_HELP"] = "Adds IsBoxer Team Members To The Team List"
+L["BUTTON_DOWN_HELP"] = "Move The Character Down A Place In The Team List"
+L["BUTTON_REMOVE_HELP"] = "Removes Selected Member From The Team List"
+L["BUTTON_MASTER_HELP"] = "Set The Selected Member To Be The Master Of The Group"
+L["BUTTON_GROUP_REMOVE_HELP"] = "Removes The Group From The Selected Character"
+L["CHECKBOX_ISBOXER_SYNC"] = "Sync With Isboxer"
+L["CHECKBOX_ISBOXER_SYNC_HELP"] = "Sync With Isboxer TeamList \nAdd/Remove Characters No Longer In Isboxer Team"
+L["CHECKBOX_ISBOXER_ADD"] = "Auto Add Isboxer Team List"
+L["CHECKBOX_ISBOXER_ADD_HELP"] = "Automatically Adds Isboxer Team List Members \nNOTE:\nDoes Not Remove Members No Longer In The Isboxer Team"
+L["MASTER_CONTROL"] = "Master Control"
+L["CHECKBOX_MASTER_LEADER"] = "Promote Master To Party Leader."
+L["CHECKBOX_MASTER_LEADER_HELP"] = "Master Will Always Be The Party Leader."
+L["CHECKBOX_CTM"] = "Sets Click-To-Move On Minions"
+L["CHECKBOX_CTM_HELP"] = "Auto Activate Click-To-Move On Minions And Deactivate On Master."
+L["PARTY_CONTROLS"] = "Party Invitations Control"
+L["CHECKBOX_CONVERT_RAID"] = "Auto Convert To Raid"
+L["CHECKBOX_CONVERT_RAID_HELP"] = "Auto Convert To Raid If Team Is Over Five Characters"
+L["CHECKBOX_ASSISTANT"] = "Auto Set All Assistant"
+L["CHECKBOX_ASSISTANT_HELP"] = "Auto Set all raid Member's to Assistant."
+L["CHECKBOX_TEAM"] = "Accept From Team"
+L["CHECKBOX_TEAM_HELP"] = "Auto Accept Invites From The Team."
+L["CHECKBOX_ACCEPT_FROM_FRIENDS"] = "Accept From Friends"
+L["CHECKBOX_ACCEPT_FROM_FRIENDS_HELP"] = "Auto Accept Invites From Your Friends List."
+L["CHECKBOX_ACCEPT_FROM_GUILD"] = "Accept From Guild."
+L["CHECKBOX_ACCEPT_FROM_GUILD_HELP"] = "Auto Accept Invites From Your Guild."
+L["CHECKBOX_DECLINE_STRANGERS"] = "Decline from strangers."
+L["CHECKBOX_DECLINE_STRANGERS_HELP"] = "Decline Invites From Anyone Else"
+L["NOT_LINKED"] = "(Not Linked)"
+L["TEAM_NO_TARGET"] = "No Target Or Target Is Not A Player"
+L["UNKNOWN_GROUP"] = "Unknown Group"
+L["ONLINE"] = "Online"
+L["OFFLINE"] = "Offline"
+L["STATICPOPUP_ADD"] = "Enter character to add in name-server format:"
+L["STATICPOPUP_REMOVE"] = "Are you sure you wish to remove %s from the team list?"
+
+--------------------------
+-- Message Locale
+L["DEFAULT_CHAT_WINDOW"] = "Default Chat Window"
+L["WHISPER"] = "Whisper"
+L["PARTY"] = "Party"
+L["GUILD_OFFICER"] = "Guild Officer"
+L["RAID"] = "Raid"
+L["RAID_WARNING"] = "Raid Warning"
+L["MUTE"] = "MUTE"
+L["DEFAULT_MESSAGE"] = "Default Message"
+L["DEFAULT_WARNING"] = "Default Warning"
+L["MUTE_POFILE"] = "Mute (Default)"
+L["ADD_MSG_HELP"] = "Add's New Message Area"
+L["REMOVE_MSG_HELP"] = "Remove's Message Area"
+L["NAME"] = "Name"
+L["PASSWORD"] = "Password"
+L["AREA"]  = "Area On Screen"
+L["SOUND_TO_PLAY"] = "Sound To Play"
+L["SAVE"] = "Save"
+L["STATICPOPUP_ADD_MSG"] = "Enter Name Of The Message Area To Add:"
+L["REMOVE_MESSAGE_AREA"] = "Are You Sure You Wish To Remove \"%s\" From The Message Area List?"
+L["MESSAGE_AREA_LIST"] = "Message Area List"
+L["MESSAGE_AREA_CONFIGURATION"] = "Message Area Configuration"
+L["ERR_COULD_NOT_FIND_AREA"] = function( areaName )
+	return string.format("ERROR: Could not find area: %s", areaName)
+end
+--------------------------
+-- Tag/Group Locale
+L["ADD_TAG_HELP"]= "Add a Group To This Character."
+L["REMMOVE_TAG_HELP"] = "Remove A Tag From This Character."
+L["GROUP"] =  "Group"
+L["BUTTON_TAG_ADD_HELP"] = "Adds A New Group To The List"
+L["BUTTON_TAG_REMOVE_HELP"] = "Removes A Group From The List"
+L["ADD_TO_GROUP"] = "Add To Group"
+L["ADD_TO_GROUP_HELP"] = "Add Character To Group"
+L["REMOVE_FROM_GROUP"] = "Remove From Group"
+L["REMOVE_FROM_GROUP_HELP"] = "Remove Character From Group"
+L["WRONG_TEXT_INPUT_GROUP"] = "Needs To Be In <Character-realm> <Group> Format"
+L["NEW_GROUP_NAME"] = "Adds A New Group:"
+L["REMOVE_FROM_TAG_LIST"] = "Are You Sure You Wish To Remove %s From The Group List?"
+--Note This need to be lowercase!
+--If translated Make Sure you keep them as a the lowercase words or you Will breck Group/Tag
+--It be a headache i don't need -- Ebony
+L["ALL_LOWER"] = "all"
+L["MASTER_LOWER"] = "master"
+L["MINION_LOWER"] = "minion"
+
+--------------------------
+-- Item-Use Locale
+L["ITEM-USE"] = "Item-Use"
+L["ITEM"] = "Item"
+L["HIDE_ITEM_BAR"] = "Hide Item Bar"
+L["HIDE_ITEM_BAR_HELP"] = "Hide The Item Bar Panel."
+L["SHOW_ITEM_BAR"] = "Show Item Bar"
+L["SHOW_ITEM_BAR_HELP"] = "Show The Item Bar Panel."
+L["CLEAR_ITEM_BAR"] = "Clear Item Bar"
+L["CLEAR_ITEM_BAR_HELP"] = "Clear The Item Bar (Remove All Items)."
+L["CLEAR_BUTT"] = "Clear"
+L["SYNC_BUTT"] = "Sync"
+L["TOOLTIP_SYNCHRONISE"] = "Synchronise The Item-Use Bar \nAnd Updates Item Count"
+L["TOOLTIP_NOLONGER_IN_BAGS"] = "Remove Items No Longer In Your Bags, From The Item Bar"
+L["NEW_QUEST_ITEM"] = "New Item That Starts A Quest Found!"
+L["ITEM_USE_OPTIONS"] = "Item Use Options"
+L["SHOW_ITEM_BAR"] = "Shows The ItemBar"
+L["SHOW_ITEM_BAR_HELP"] = "Shows The Ema Item Use Bar"
+L["ONLY_ON_MASTER"] = "Only On Master"
+L["ONLY_ON_MASTER_HELP"] = "Only Shows On The Master Character"
+L["SHOW_ITEM_COUNT"] = "Show Item Count"
+L["SHOW_ITEM_COUNT_HELP"] = "Show ItemCount and ItemCount Tooltips \nOn Ema Item Use Bar"
+L["KEEP_BARS_SYNCHRONIZED"] = "Keep Item Bars On Minions Synchronized"
+L["KEEP_BARS_SYNCHRONIZED_HELP"] = "Keep Item Bars On Minions Synchronized"
+L["ADD_QUEST_ITEMS_TO_BAR"] = "Automatically Add Quest Items To Bar"
+L["ADD_QUEST_ITEMS_TO_BAR_HELP"] = "Automatically Add's Useable Quest Items To Bar"
+L["ADD_ARTIFACT_ITEMS"] = "Automatically Add ArtifactPower Tokens To Bar"
+L["ADD_ARTIFACT_ITEMS_HELP"] = "Automatically Add ArtifactPower Tokens To Bar (Legion)"
+L["ADD_SATCHEL_ITEMS"] = "Automatically Add Satchel Items To Bar"
+L["ADD_SATCHEL_ITEMS_HELP"] = "Automatically Add Satchel Items To Bar ( Lootable Bags/Box's )"
+L["HIDE_BUTTONS"] = "Hide Buttons"
+L["HIDE_BUTTONS_HELP"] = "Hides The Top Buttons (Clear)"
+L["HIDE_IN_COMBAT"] = "Hide In Combat"
+L["HIDE_IN_COMBAT_HELP_IU"] = "Hide Item Bar In Combat"
+L["NUMBER_OF_ITEMS"] = "Number Of Items"
+L["ITEM_BAR_CLEARED"] = "Item Bar Cleared"
+L["TEAM_BAGS"] = "Items In Team Bags"
+L["BAG_BANK"] = "Bag (Banks)"
+
+--------------------------
+-- Sell Locale
+L["SELL"] = "Sell"
+L["SELL_LIST"] = "Sell/Delete Item's List"
+L["SELL_ALL"] = "Sell or Delete If Not Sell Price All Item's In This List"
+L["ALT_SELL_ALL"] = "Hold [Alt] While Selling An Item, To Sell On All Toons"
+L["ALT_SELL_ALL_HELP"] = "Hold [Alt] Key While Selling An Item To The Vendor, To Sell That Item On All Toons"
+L["AUTO_SELL_ITEMS"] = "Automatically Sell Items"
+L["AUTO_SELL_ITEMS_HELP"] = "Automatically Sell Items Below"
+L["ONLY_SB"] = "Only SoulBound"
+L["ONLY_SB_HELP"] = "Only Sell SoulBound Items"
+L["iLVL"] = "Item Level"
+L["iLVL_HELP"] = "Sell Items Below The Item Level"
+L["SELL_GRAY"] = "Sell Gray Items"
+L["SELL_GRAY_HELP"] = "Sell All Gray Items"
+L["SELL_GREEN"] = "Sell Uncommon Items"
+L["SELL_GREEN_HELP"] = "Sell All Uncommon(Green) Items"
+L["SELL_RARE"] = "Sell Rare Items"
+L["SELL_RARE_HELP"] = "Sell All Rare(Blue) Items"
+L["SELL_EPIC"] = "Sell Epic Items"
+L["SELL_EPIC_HELP"]	= "Sell All Epic(Purple) Items"
+L["SELL_LIST_DROP_ITEM"] = "Sell Other Item (DRAG ITEM TO BOX)"
+L["ITEM_TAG_ERR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
+L["POPUP_REMOVE_ITEM"] = "Are You Sure You Wish To Remove The Selected Item From The Auto Sell: Items List?"
+L["ADD_TO_LIST"] = "Adds Item To List"
+L["SELL_ITEMS"] = "Sell Items"
+L["POPUP_DELETE_ITEM"] = "What You like to delete?"
+L["I_HAVE_SOLD_X"] = function( temLink )
+	return string.format("I Have Sold: %s", temLink )
+end
+L["I_SOLD_ITEMS_PLUS_GOLD"] = function( count )
+	return string.format( "I have sold: %s Items And Made: ", count )
+end
+L["DELETE_ITEM"] = function( bagItemLink )
+	return string.format( "I Have DELETED: %s", bagItemLink )
+end
+
+--------------------------
+-- Interaction Locale
+L["TAXI"] = "Taxi"
+L["TAXI_OPTIONS"] = "Taxi Options"
+L["TAKE_TEAMS_TAXI"] = "Take Teams Taxi"
+L["TAKE_TEAMS_TAXI_HELP"] = "Take The Same Flight As The Any Team Member \n(Other Team Members Must Have Npc Flight Master Window Open)."
+L["REQUEST_TAXI_STOP"] = "Request Taxi Stop With Team"
+L["REQUEST_TAXI_STOP_HELP"] = "[PH] REQUEST_TAXI_STOP_HELP"
+L["CLONES_TO_TAKE_TAXI_AFTER"] = "Clones To Take Taxi After Leader"
+--Mount Locale
+L["MOUNT"] = "Mount"
+L["MOUNT_OPTIONS"] = "Mount Options"
+L["MOUNT_WITH_TEAM"] = "Mount With Team"
+L["MOUNT_WITH_TEAM_HELP"] = "[PH] MOUNT_WITH_TEAM_HELP"
+L["DISMOUNT_WITH_TEAM"] = "Dismount With Team"
+L["DISMOUNT_WITH_TEAM_HELP"] = "Dismount When Any Team Dismounts"
+L["ONLY_DISMOUNT_WITH_MASTER"] = "Only Dismount's With Master"
+L["ONLY_DISMOUNT_WITH_MASTER_HELP"] = "Only Dismount's When Master Character Dismounts"
+L["ONLY_MOUNT_WHEN_IN_RANGE"] = "Only Mount When In Range"
+L["ONLY_MOUNT_WHEN_IN_RANGE_HELP"] = "Dismounts Olny When The Team Is In Range /nOnly Works In A Party!"
+L["I_AM_UNABLE_TO_MOUNT"] = "I Am Unable To Mount."
+-- Loot Locale
+L["LOOT_OPTIONS"] = "Loot v2 Options"
+L["DISMOUNT_WITH_CHARACTER"] = "Dismount With Character That Dismount"
+L["ENABLE_AUTO_LOOT"] = "Enable Auto Loot"
+L["ENABLE_AUTO_LOOT_HELP"] = "Old Advanced Loot \nBut Better \nWorks Better WITH Blizzard Auto Loot"
+L["TELL_TEAM_BOE_RARE"] = "Tell Team BoE Rare"
+L["TELL_TEAM_BOE_RARE_HELP"] = "Tell The Team If I Loot A Boe Rare"
+L["TELL_TEAM_BOE_EPIC"] = "Tell Team Boe Epic"
+L["TELL_TEAM_BOE_EPIC_HELP"] = "Tell The Team If I Loot A Boe Epic"
+L["I_HAVE_LOOTED_X_Y_ITEM"] = function( rarity, itemName )
+	return string.format( "I Have Looted A %q BoE Item: %s", rarity, itemName )
+end
+L["EPIC"] = "Epic"
+L["RARE"] = "Rare"
+L["REQUESTED_STOP_X"] = function( sender )
+	return string.format( "I Have Requested a Stop From %s", sender )
+end
+L["SETTINGS_RECEIVED_FROM_A"] = function( characterName )
+	return string.format( "Settings Received From %s.", characterName )
+end
+L["I_AM_UNABLE_TO_FLY_TO_A"] = function( nodename )
+	return string.format( "I Am Unable To Fly To %s.", nodename )
+end
+--------------------------
+-- Currency Locale
+L["EMA_CURRENCY"] = "Currency"
+L["SHOW_CURRENCY"] = "Show Currency"
+L["SHOW_CURRENCY_HELP"] = "Show The Currency Frame Window."
+L["HIDE_CURRENCY"] = "Hide Currency"
+L["HIDE_CURRENCY_HELP"] = "Hide The Currency Values For All Members In The Team."
+L["CURRENCY_HEADER"] = "Currency Selection To Show On Frame"
+L["GOLD"] = "Gold"
+L["GOLD_HELP"] = "Shows The Minions Gold"
+L["GOLD_GB"] = "Include Gold In Guild Bank"
+L["GOLD_GB_HELP"] = "Show Gold In Guild Bank\n(This Does Not Update Unless You Visit The Guildbank)"
+L["CURR_STARTUP"] = "Open Currency List On Start Up"
+L["CURR_STARTUP_HELP"] = "Open Currency List On Start Up.\nThe Master Only)"
+L["LOCK_CURR_LIST"] = "Lock The Currency List Frame"
+L["LOCK_CURR_LIST_HELP"] = "Lock's The Currency List Frame And Enables Mouse Click-Through"
+L["SPACE_FOR_NAME"] = "Space For Name"
+L["SPACE_FOR_GOLD"] =  "Space For Gold"
+L["SPACE_FOR_POINTS"] = "Space For Points"
+L["SPACE_BETWEEN_VALUES"] = "Space Between Values"
+L["TOTAL"] = "Total"
+L["CURR"] = "Curr"
+
+
+--------------------------
+-- Display Team Locale
+L["EMA_TEAM"] = "EMA Team"
+L["HIDE_TEAM_DISPLAY"] = "Hide Team Display"
+L["HIDE_TEAM_DISPLAY_HELP"] = "Hide The Display Team Panel."
+L["SHOW_TEAM_DISPLAY"] = "Show Team Display"
+L["SHOW_TEAM_DISPLAY_HELP"] = "Show The Display Team Panel."
+L["DISPLAY_HEADER"] = "Display Team Options"
+L["SHOW"] = "Show"
+L["SHOW_TEAM_FRAME"] = "Show Team Frame"
+L["SHOW_TEAM_FRAME_HELP"] = "Show Ema Team Frame List"
+L["HIDE_IN_COMBAT_HELP_DT"] = "Hides The TeamFrame In Combat"
+L["ENABLE_CLIQUE"] = "Enable Clique Support"
+L["ENABLE_CLIQUE_HELP"] = "Enable Clique Support\n([/Reload Ui] To Take Effect)"
+L["SHOW_PARTY"] = "Only Show Party Members"
+L["SHOW_PARTY_HELP"] = "Only Show Party Team Members"
+L["HEALTH_POWER_GROUP"] = "Health & Power Out of Group"
+L["HEALTH_POWER_GROUP_HELP"] = "Update Health and Power Out Of Groups\nUse Guild Communications!"
+L["SHOW_TITLE"] = "Show Title on Frame"
+L["SHOW_TITLE_HELP"] = "Show Team List Title on Display Team Frame"
+L["STACK_VERTICALLY"] = "Stack Bars Vertically"
+L["STACK_VERTICALLY_HELP"] = "Stack Display Team Frame Bars Vertically"
+L["CHARACTERS_PER_BAR"] = "Number of Characters Per Row"
+L["SHOW_CHARACTER_PORTRAIT"] = "Shows Characters Portraits"
+L["SHOW_FOLLOW_BAR"] = "Shows the Follow Bar and Character Name"
+L["SHOW_NAME"] = "Show Character Name"
+L["SHOW_XP_BAR"] = "Show the Team Experience bar\n\nAnd Artifact XP Bar\nAnd Honor XP Bar\nAnd Reputation Bar"
+L["VALUES"] = "Values"
+L["VALUES_HELP"] = "Show Values"
+L["PERCENTAGE"] = "Percentage"
+L["PERCENTAGE_HELP"] = "Show Percentage"
+L["SHOW_XP"] = "Experience Bar"
+L["SHOW_XP_HELP"] = "Show the Team Experience bar"
+L["ARTIFACT_BAR"] = "Artifact Bar"
+L["ARTIFACT_BAR_HELP"] = "Show the Team Artifact Experience bar"
+L["HONORXP"] = "Show Honor Bar"
+L["HONORXP_HELP"] = "Show the Team Honor Experience Bar"
+L["REPUTATION_BAR"] = "Show Reputation Bar"
+L["REPUTATION_BAR_HELP"] = "Show the Team Reputation Bar"
+L["SHOW_HEALTH"] = "Show the Teams Health Bars"
+L["SHOW_CLASS_COLORS"] = "Show Class Colors"
+L["SHOW_CLASS_COLORS_HELP"] = "Show class Coulor on Health Bars"
+L["POWER_HELP"] = "Show the Team Power Bar\n\nMana, Rage, Etc..."
+L["CLASS_POWER"] = "Show the Teams Class Power Bar\n\nComboPoints\nSoulShards\nHoly Power\nRunes"
+L["DEAD"] = "Dead"
+L["PORTRAIT_HEADER"] = "Portrait"
+L["FOLLOW_BAR_HEADER"] = "Follow Status Bar"
+L["EXPERIENCE_HEADER"] = "Experience Bars"
+L["HEALTH_BAR_HEADER"] = "Health Bar"
+L["POWER_BAR_HEADER"] = "Power Bar"
+L["CLASS_BAR_HEADER"] = "Class Power Bar"
+
+--------------------------
+-- Follow Locale
+L["FOLLOW_BINDING_HEADER"] = "Follow Key Bindings"
+L["FOLLOW_TRAIN"] = "Follow As A Train"
+L["FOLLOW_STROBE_ME"] = "Follow Strobe Me"
+L["FOLLOW_STROBE_OFF"] = "Follow Strobe Off"
+L["FOLLOW_BROKEN_MSG"] = "Follow Broken!"
+L["FOLLOW_MASTER"] = "Follow The Master <Group>"
+L["FOLLOW_MASTER_HELP"] = "Follow The Master Currebt Master (Group)"
+L["FOLLOW_TARGET"] = "Follow A Target <TargetName>"
+L["FOLLOW_TARGET_HELP"] = "Follow The Specified Target (Group)"
+L["FOLLOW_AFTER_COMBAT"] = "Auto Folllow After Combat"
+L["FOLLOW_AFTER_COMBAT_HELP"] = "Automatically Follow After Combat"
+L["DELAY_FOLLOW_AFTER_COMBAT"] = "Delay Follow After Combat (S)"
+L["DELAY_FOLLOW_AFTER_COMBAT_HELP"] = "Delay_Follow_After_Combat In Seconds"
+L["FOLLOW_STROBING"] = "Begin Follow Strobing <TargetName>"
+L["FOLLOW_STROBING_HELP"] = "Begin A Sequence Of Follow Commands That Strobe Every Second (Configurable) A Specified Target."
+L["FOLLOW_STROBING_ME"] = "Begin Follow Strobing Me"
+L["FOLLOW_STROBING_ME_HELP"] = "Begin A Sequence Of Follow Commands That Strobe Every Second (Configurable) This Character"
+L["FOLLOW_STROBING_END"] = "Ends Follow Strobing"
+L["FOLLOW_STROBING_END_HELP"] = "Ends Follow Strobing On All Characters"
+L["FOLLOW_SET_MASTER"] = "Sets Follow By Name"
+L["FOLLOW_SET_MASTER_HELP"] = "Sets Follow By Name"
+L["TRAIN"] = "Makes All Characters Follow In A Train"
+L["FOLLOW_ME"] = "Follow Me"
+L["TRAIN_HELP"] = "Makes All Characters Follow In A Train Behind Each Other"
+L["FOLLOW_ME_HELP"] = "Follow Me <EMA Group>"
+L["SNW"] = "Snw"
+L["SNW_HELP"] = "Suppress Next Warning"
+L["TIME_DELAY_FOLLOWING"] = "Seconds To Delay Before Following After Combat"
+L["DIFFERENT_TOON_FOLLOW"] = "Use Different Character For Follow"
+L["DIFFERENT_TOON_FOLLOW_HELP"] = "Use Different Character Below For Follow"
+L["NEW_FOLLOW_MASTER"] = "New Follow Character"
+L["FOLLOW_BROKEN_WARNING"] = "Follow Broken Warning"
+L["WARN_STOP_FOLLOWING"] = "Warn If I Stop Following"
+L["WARN_STOP_FOLLOWING_HELP"] = "Tell The Master If A Character Stops Following"
+L["ONLY_IF_OUTSIDE_RANGE"] = "Only Warn If Outside Follow Range"
+L["ONLY_IF_OUTSIDE_RANGE_HELP"] = "Only Warn If Character Is Outside Follow Range"
+L["FOLLOW_BROKEN_MESSAGE"] = "Follow Broken Custom Message"
+L["DO_NOT_WARN"] = "Do Not Warn If"
+L["IN_COMBAT"] = "In Combat"
+L["ANY_MEMBER_IN_COMBAT"] = "Any Member In Combat"
+L["FOLLOW_STROBING"] = "Follow Strobing"
+L["FOLLOW_STROBING_EMA_FOLLOW_COMMANDS."] = "Follow Strobing Is Controlled By /Ema Commands."
+L["USE_MASTER_STROBE_TARGET"] = "Always Use Master As The Strobe Target"
+L["PAUSE_FOLLOW_STROBING"] = "Pause Follow Strobing If ...."
+L["DRINKING_EATING"] = "Drinking/Eating"
+L["IN_A_VEHICLE"] = "In A Vehicle"
+L["GROUP_FOLLOW_STROBE"] = "Group For Follow Strobe"
+L["FREQUENCY"] = "Frequency (S)"
+L["FREQUENCY_COMABT"] = "Frequency In Combat (S)"
+L["ON"] = "On"
+L["OFF"] = "Off"
+L["DRINK"] = "Drink"
+L["FOOD"] = "Food"
+L["REFRESHMENT"] = "Refreshment"
+
+--------------------------
+-- Vendor/Purchase Locale.
+L["AUTO_BUY_ITEMS"] = "Auto Buy Items"
+L["OVERFLOW"] = "Overflow"
+L["REMOVE_VENDER_LIST"] = "Remove From Vendor List"
+L["ITEM_DROP"] = "Item (Drag Item To Box From Your Bags)"
+L["PURCHASE_ITEMS"] = "Auto Purchase Items"
+L["ADD_ITEM"] = "Add Item"
+L["AMOUNT"] = "Amount"
+L["PURCHASE_MSG"] = "Purchase Messages"
+L["ITEM_ERROR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
+L["NUM_ERROR"] = "Amount To Buy Must Be A Number."
+L["BUY_POPUP_ACCEPT"] = "Are You Sure You Wish To Remove The Selected Item From The Auto Buy Items List?"
+L["ERROR_BAGS_FULL"] =  "I Do Not Have Enough Space In My Bags To Complete My Purchases."
+L["ERROR_GOLD"] = "I Do Not Have Enough Money To Complete My Purchases."
+L["ERROR_CURR"] = "I Do Not Have Enough Other Currency To Complete My Purchases."
+
+--------------------------
+-- Trade Locale
+L["REMOVE_TRADE_LIST"] = "Are You Sure You Wish To Remove The Selected Item From The Trade Items List?"
+L["TRADE_LIST_HEADER"] = "Trade Item List"
+L["TRADE_LIST"] = "Trade The List Of Items With Master"
+L["TRADE_LIST_HELP"] = "The List Will Trade With The Current Masster \nGroups Do not Currently Work"
+L["TRADE_BOE_ITEMS"] = "Trades Binds When Equipped Items With Master"
+L["TRADE_BOE_ITEMS_HELP"] = "Trade All Binds When Equipped Items With The Current Master"
+L["TRADE_REAGENTS"] = "Trades Crafting Reagents Items With Master"
+L["TRADE_REAGENTS_HELP"] = "Trades All Crafting Reagents Items Current Master"
+L["TRADE_OPTIONS"] = "Trade To \"Master\" Options"
+L["TRADE_GOLD"] = "Trade Excess Gold To Master From Minion"
+L["TRADE_GOLD_HELP"] = "Trade Excess Gold To Master From Minions \nAlways Be Careful When Auto Trading."
+L["GOLD_TO_KEEP"] = "Amount of Gold To Keep On Current Minion"
+L["TRADE_TAG_ERR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
+L["ERR_WILL_NOT_TRADE"] = "Is Not A Member Of The Team, Will Not Trade Items."
+L["ADD_ITEMS"] = "Add Items"
+
+--------------------------
+-- Toon Locale
+L["ATTACKED"] = "I'm Attacked!"
+L["TARGETING"] = "Not Targeting!"
+L["FOCUS"] = "Not Focus!"
+L["LOW_HEALTH"] = "Low Health!"
+L["LOW_MANA"] = "Low_Mana!"
+L["BAGS_FULL"] = "Bags Full!"
+L["CCED"] = "I'm"
+-- Vendor
+L["AUTO_REPAIR"] = "Auto Repair"
+L["AUTO_REPAIR_HELP"] = "Auto Repairs Toons Items When You Visit a Repair Merchant"
+L["REPAIR_GUILD_FUNDS"] = "Auto Repair With Guild Funds"
+L["REPAIR_GUILD_FUNDS_HELP"] = "Trys To Auto Repair With Guild Bank Funds \n Before There Own Gold"
+-- Requests
+L["REQUESTS"] = "Requests"
+L["DENY_DUELS"] = "Auto Deny Duels"
+L["DENY_DUELS_HELP"] = "Automatically Deny Duels From Players \n On All Team Members"
+L["DENY_GUILD_INVITES"] = "Auto Deny Guild Invites"
+L["DENY_GUILD_INVITES_HELP"] = "Automatically Deny All Guild Invites"
+L["ACCEPT_RESURRECT"] = "Auto Accept Resurrect Request"
+L["ACCEPT_RESURRECT_AUTO"] = "Automatically Accept Resurrect Request \nOn All Team Members"
+L["ACCEPT_RESURRECT_FROM_TEAM"] = "Only From EMA Team Members"
+L["ACCEPT_RESURRECT_FROM_TEAM_HELP"] = "Automatically Accept Resurrect Request \nOn All Team Members\nOnly From Team Members"
+
+L["RELEASE_PROMPTS"] = "Display Team Release Prompts"
+L["RELEASE_PROMPTS_HELP"] = "Display EMA Team Release Popup Displays when the Team Dies"
+L["SUMMON_REQUEST"] = "Auto Accept Summon Request"
+L["SUMMON_REQUEST_HELP"] = "Automatically Accept Summon Requests"
+L["GROUPTOOLS_HEADING"] = "Instance Tools"
+L["ROLE_CHECKS"] = "Auto Accept Role Checks"
+L["ROLE_CHECKS_HELP"] = "Automatically Accept Role Checks \n\nIf A Role Is Already Set.."
+L["READY_CHECKS"] = "Accept Ready Checks With Team"
+L["READY_CHECKS_HELP"] = "Accept Ready Checks With Team \n\nIf Team Member Is The One That Does The Ready Check It Is Auto."
+L["LFG_Teleport"] = "Instance Teleport With Team"
+L["LFG_Teleport_HELP"] = "Minions Will Copy The Teams Instance Telport"
+L["ROLL_LOOT"] = "Roll Loot With Team"
+L["ROLL_LOOT_HELP"] = "Roll Loot With the Team \nIf Any Instance Has A Roll On A Item"
+-- Warnings
+L["COMBAT"] = "Combat"
+L["WARN_HIT"] = "Warn If Minion Gets Hit"
+L["WARN_HIT_HELP"] = "Warn If Hit First Time In Combat (Minion)"
+L["TARGET_NOT_MASTER"] = "Warn If Target Not Master"
+L["TARGET_NOT_MASTER_HELP"] = "Warn If Target Not Master On Combat (Minion)"
+L["FOCUS_NOT_MASTER"] = "Warn If Focus Not Master"
+L["FOCUS_NOT_MASTER_HELP"] = "Warn If Focus Not Master On Combat (Minion)"
+L["HEALTH_POWER"] = "Health / Mana"
+L["HEALTH_DROPS_BELOW"] = "Warn If My Health Drops Below"
+L["HEALTH_DROPS_BELOW_HELP"] = "Warn Master If Health Drops Below A Certain Percent"
+L["HEALTH_PERCENTAGE"] = "Health Amount - Percentage Allowed Before Warning"
+L["MANA_DROPS_BELOW"] = "Warn If My Mana Drops Below"
+L["MANA_DROPS_BELOW_HELP"] = "Warn Master If Mana Drops Below A Certain Percent"
+L["MANA_PERCENTAGE"] = "Mana Amount - Percentage Allowed Before Warning"
+L["DURABILITY_DROPS_BELOW"] = "Durability Drops Below"
+L["DURABILITY_DROPS_BELOW_HELP"] = "Warn Master If My Durability Drops Below A Certain Percent"
+L["DURABILITY_PERCENTAGE"] = "Warn If My Durability Drops Below"
+L["LOW_DURABILITY_TEXT"] = "Low Durability Text"
+L["DURABILITY_LOW_MSG"] = "I Have My Durability At"
+L["BAGS_FULL"] = "Warn If Bags Are Full"
+L["BAGS_FULL_HELP"] = "Warn If All Regular Bags Are Full"
+L["BAG_SPACE"] = "Bag Space"
+L["OTHER"] = "Other"
+L["WARN_IF_CC"] = "Warn If Toon Gets Crowd Controled"
+L["WARN_IF_CC_HELP"] = "Warn If any Team Member Gets Crowd Control"
+L["RELEASE_TEAM_Q"] = "Release All Team?"
+L["RELEASE_TEAM"] = "Release Team"
+L["RECOVER_CORPSES"] = "Recover All Team Corpses?"
+L["ERR_GOLD_TO_REPAIR"] = "I Do Not Have Enough Money To Repair All My Items"
+L["RELEASE_CORPSE_FOR_X"] = function( delay )
+	return string.format( "I can not release to my Corpse for: %s seconds", delay )
+end
+L["I_REFUSED_A_DUEL_FROM_X"] = function( challenger )
+	return string.format( "I Refused A Duel From: %s", challenger )
+end
+L["REFUSED_GUILD_INVITE"] = function( guild, inviter )
+	return string.format( "I Refused A Guild Invite To: %s From: %s", guild, inviter )
+end
+L["SUMMON_FROM_X_TO_Y"] = function( sender, location )
+	return string.format( "I Accepted Summon From: %s To: %s", sender, location )
+end
+L["REPAIRING_COST_ME_X"] = function( costString )
+    return string.format( "Repairing Cost Me: %s", costString )
+end
+
+--------------------------
+-- Talk Locale
+
+L["TALK_OPTIONS"] = "Talk Options"
+L["FORWARD_WHISPERS_MASTER_RELAY"] = "Forward Whispers To Master And Relay Back"
+L["FORWARD_WHISPERS_MASTER_RELAY_HELP"] = "Forward Whispers To Master And \nRelay Back To The Character That Whispered You"
+L["DO_NOT_BATTENET_WHISPERS"] = "Do Not Forward Batte.Net Whispers"
+L["DO_NOT_BATTENET_WHISPERS_HELP"] = "Do Not Forward BatteTag Or RealID Whispers"
+
+L["FORWARD_FAKE_WHISPERS"] = "Forward Via Fake Whispers For Clickable Links And Players"
+L["FORWARD_FAKE_WHISPERS_HELP"] = "Forward Via Fake Whispers To Use As Clickable Links And Players"
+L["FAKE_WHISPERS_CHANNEL"]  = "Send Fake Whispers To"
+L["FORWARDER_REPLY_QUEUE"] = "Add Forwarder To Reply Queue On Master"
+L["FORWARDER_REPLY_QUEUE_HELP"] = "Add Forwarder To Reply Queue On Master"
+L["ORIGINATOR_REPLY_QUEUE"] = "Add Originator To Reply Queue On Master"
+L["ORIGINATOR_REPLY_QUEUE_HELP"] = "Add Originator To Reply Queue On Master"
+L["MESSAGES_WITH_LINKS"] = "Only Show Messages With Links"
+L["MESSAGES_WITH_LINKS_HELP"] = "Only Show Messages With Links"
+-- TOBEREMOVED
+L["CHAT_SNIPPETS"] = "Chat Snippets"
+L["ENABLE_CHAT_SNIPPETS"] = "Enable Chat Snippets"
+L["ENABLE_CHAT_SNIPPETS_HELP"] = "Chat Snippets Auto Send Messages To Players That Wispers Your Minions"
+L["SNIPPET_TEXT"] = "Snippet Text"
+L["CHAT_SNIPPET_POPUP"] = "Enter The Shortcut Text For This Chat Snippet:"
+L["REMOVE_CHAT_SNIPPET"] = "Are You Sure You Wish To Remove The Selected Chat Snippet?"
+--END
+L["GM"] = "GM"
+L["TALK_VIA"] = " (via "
+L["BATTLE_NET"] = "<BatteTag>"
+L["<GM>"] = "<GameMaster>"
+L["WHISPERS"] = " Whispers: "
+L["WHISPERED_YOU"] = "Whispered You."
+
+------------------------
+-- Quest Locale
+
+L["ABANDON_QUESTS_TEAM"] = "Would you like to Abandon \"%s\" On All Toons?"
+L["JUST_ME"] = "Just Me"
+L["ALL_TEAM"] = "All Team"
+L["TRACK_QUEST_ON_TEAM"] = "Would you like to Track \"%s\" On All Toons?"
+L["UNTRACK_QUEST_ON_TEAM"] = "Would you like to Untrack \"%s\" On All Toons?"
+L["ABANDON_ALL_QUESTS"] = "This Will Abandon \"ALL\" Quests On Every Toon! \nYes, This Means You Will End Up With ZERO Quests In Your Quest Log! \nAre You Sure?"
+L["YES_IAM_SURE"] = "Yes I'm Sure"
+L["INFORMATION"] = "Information"
+L["QUESTINFORMATIONONE"] = "Quest Treats Any Team member as the Master."
+L["QUESTINFORMATIONTWO"] = "Quest actions by one character will be actioned by the other"
+L["QUESTINFORMATIONTHREE"] = "Characters Regardless Of Who The Master Is."
+L["QUEST_HEADER"] = "Toon Select & Decline Quest With Team"
+L["MIRROR_QUEST"] = "Quest Selection & Acceptance"
+L["MIRROR_QUEST_HELP"] = "Mirror Quest Selection With All Team"
+L["AUTO_SELECT_QUESTS"] = "All Auto Select Quests"
+L["AUTO_SELECT_QUESTS_HELP"] = "Automatically Pick Up Quest \nWhen You Talk To A Quest Giving NPC"
+L["ACCEPT_QUESTS"] = "Accept Quests"
+L["ACCEPT_QUESTS_HELP"] = "Accept Quests"
+L["ACCEPT_QUEST_WITH_TEAM"] = "Accept Quest With Team"
+L["ACCEPT_QUEST_WITH_TEAM_HELP"] = "Accept Quest With Team Members"
+L["QUEST_INFORMATION_AUTO"] = "Automatically: Accept Quests Regardless of the Team Selection"
+L["DONOT_AUTO_ACCEPT_QUESTS"] = "Do Not Auto Accept Quests"
+L["DONOT_AUTO_ACCEPT_QUESTS_HELP"] = "Nerver Auto Accept Quests From Anyone"
+L["AUTO_ACCEPT_QUESTS"] = "All Auto Accept ANY Quest"
+L["AUTO_ACCEPT_QUESTS_HELP"] = "All Auto Accept ANY Quest From Anyone"
+L["AUTO_ACCEPT_QUESTS_LIST"] = "Only Auto Accept Quests From:"
+L["AUTO_ACCEPT_QUESTS_LIST_HELP"] = "Only Auto Accept Quests From The Following  List"
+L["TEAM_QUEST_HELP"] = "Any EMA Team Member"
+L["NPC"] = "NPC"
+L["NPC_HELP"] = "Any Non-Player Character"
+L["FRIENDS"] = "Friends"
+L["FRIENDS_HELP"] = "Anyone On Your Friends List Or BattleTag Friends List"
+-- Quest
+L["QUEST_GROUP_HELP"] = "Anyone In Your Party Group"
+L["GUILD_HELP"] = "Anyone In Your Guild"
+L["PH_RAID"] = "[PH] Raid"
+L["PH_RAID_HELP"] = "[PH] Raid"
+L["MASTER_SHARE_QUESTS"] = "Master Auto Share Quests When Accepted"
+L["MASTER_SHARE_QUESTS_HELP"] = "Master Will Try And Share Quests When Accepted"
+L["ACCEPT_ESCORT_QUEST"] = "Toon Auto Accept Escort Quest From Team"
+L["ACCEPT_ESCORT_QUEST_HELP"] = "Automatically Accept Escort Quests When A Team Picks One Up"
+L["HOLD_SHIFT_TO_OVERRIDE"] = "Hold Shift To Override Auto Select/Auto Complete"
+L["HOLD_SHIFT_TO_OVERRIDE_HELP"] = "Hold Shift Key To Override Auto Select/Auto Complete"
+L["SHOW_PANEL_UNDER_QUESTLOG"] = "Show Extra Buttons Panel Under WorldMap Quest Log"
+L["SHOW_PANEL_UNDER_QUESTLOG_HELP"] = "Show Extra Buttons Panel Under World Map Quest Log \nEG: TrackALL AbandonALL"
+-- Completion
+L["QUEST_COMPLETION"] = "Quest Completion"
+L["ENABLE_QUEST_COMPLETION"] = "Enable Auto Quest Completion"
+L["ENABLE_QUEST_COMPLETION_HELP"] = "Enable Automatically Handing In Quest's"
+L["NOREWARDS_OR_ONEREWARD"] = "Quest Has No Rewards Or One Reward:"
+L["QUEST_DO_NOTHING"] = "Toon Do Nothing"
+L["QUEST_DO_NOTHING_HELP"] = "Do Not Automatically Hand In Quest"
+L["COMPLETE_QUEST_WITH_TEAM"] = "Toon Complete Quest With Team"
+L["COMPLETE_QUEST_WITH_TEAM_HELP"] = "Complete Quest With Team EMA Members"
+L["AUTO_COMPLETE_QUEST"] = "Automatically Complete Quest"
+L["AUTO_COMPLETE_QUEST_HELP"] = "Automatically Complete/Turn In The Quest"
+L["MORE_THEN_ONE_REWARD"] = "Quest Has More Than One Reward:"
+L["MUST_CHOOSE_OWN_REWARD"] = "Toon Must Choose Own Reward"
+L["MUST_CHOOSE_OWN_REWARD_HELP"] = "Toon Must Select Own Quest Reward"
+L["CHOOSE_SAME_REWARD"] = "Toon Choose Same Reward As Team"
+L["CHOOSE_SAME_REWARD_HELP"] = "Toon Will Choose Same Reward As EMA Team Members \n\nOnly Use If All Team Members Class"
+L["MODIFIER_CHOOSE_SAME_REWARD"] = "If Modifier Keys Pressed, Toon Choose Same Reward"
+L["MODIFIER_CHOOSE_SAME_REWARD_HELP"] = "If Modifier Key Below Is Pressed, Minion Can Choose Same Reward"
+L["OVERRIDE_REWARD_SELECTED"] = "Override: If Minion Already Has Reward Selected, Choose That Reward"
+L["OVERRIDE_REWARD_SELECTED_HELP"] = "Override: If Minion Already Has Reward Selected, Choose That Reward \nAnd Not Use The Current Toons Reward"
+L["SHARING_QUEST_TO_ALLMINIONS"] = "Sharing Quest's To All Minions"
+L["TRACKING_QUEST_TO_ALLMINIONS"] = "Tracking Quest's To All Minions"
+L["UNTRACKING_QUESTS_ALLMINIONS"] = "Untracking Quest's To All Minions"
+L["TOGGLE"] = "Toggle"
+L["ABANDON_ALL"] = "Abandon All Quests"
+L["ABANDON_ALL_TOOLTIP"] = "Aabandon All Quests On All Minions"
+L["SHARE_ALL"] = "Share ALL"
+L["SHARE_ALL_TOOLTIP"] = "Share All Quests To All Minions"
+L["TRACK_ALL"] = "Track All"
+L["TRACK_ALL_TOOLTIP"] = "Track All Quests On All Minions"
+L["UNTRACK_ALL"] = "Untrack All"
+L["UNTRACK_ALL_TOOLTIP"] = "Untrack All Quests on all Minions"
+L["ABANDONING_ALLQUEST"] = "Abandoning Quest's To All Toons"
+
+-- Quest Strings
+L["AUTOMATICALLY_ACCEPTED_ESCORT_QUEST"] = function( questName )
+	return string.format( "Automatically Accepted Escort Quest: %s", questName )
+end
+L["INVENTORY_IS_FULL_CAN_NOT_HAND_IN_QUEST"] = function( questName )
+	return string.format( "Inventory Is Full Can Not Hand In Quest: %s", questName )
+end
+L["ACCEPTED_QUEST_QN"] = function( questName )
+	return string.format( "Accepted Quest: %s", questName )
+end
+L["AUTO_ACCEPTED_PICKUPQUEST_QN"] = function( questName )
+	return string.format( "Automatically Accepted PickupQuest: %s", questName )
+end
+L["AUTOMATICALLY_ACCEPTED_QUEST"] = function( questName )
+	return string.format( "Automatically Accepted Quest: %s", questName )
+end
+L["QUESTLOG_DO_NOT_HAVE_QUEST"] = function( questName )
+	return string.format( "I Do Not Have The Quest: %s", questName )
+end
+L["QUESTLOG_HAVE_ABANDONED_QUEST"] = function( questName )
+	return string.format( "I Have Abandoned The Quest: %s", questName )
+end
+
+------------------------
+-- QuestTracker Locale
+
+L["SHOW_QUEST_WATCHER"] = "Show Objective Tracker"
+L["SHOW_QUEST_WATCHER_HELP"] = "Show The Objective/Quest EMA Tracker Window."
+L["HIDE_QUEST_WATCHER"] = "Hide Objective Tracker"
+L["HIDE_QUEST_WATCHER_HELP"] = "Hides The Objective/Quest EMA Tracker Window."
+L["QUEST_TRACKER_HEADER"] = "Quest Tracker Settings"
+L["ENABLE_TRACKER"] = "Enable Objective Tracker"
+L["ENABLE_TRACKER_HELP"] = "Enables The EMA Objective/Quest Tracker"
+L["UNLOCK_TRACKER"] = "Unlocks The Objective Tracker"
+L["UNLOCK_TRACKER_HELP"] = "Unlocks The Objective/Quest Tracker \n\nHold Alt key To Move It\nLock to Click Through"
+L["HIDE_BLIZZ_OBJ_TRACKER"] = "Hide Blizzard's Objectives Tracker"
+L["HIDE_BLIZZ_OBJ_TRACKER_HELP"] = "Hides Defualt Blizzard Objective\Quest Tracker"
+L["SHOW_JOT_ON_MASTER"] = "Show The JOT On Master Toon"
+L["SHOW_JOT_ON_MASTER_HELP"] = "Only show (EMA Objective Tracker) On Master Character Only"
+L["HIDE_JOT_IN_COMBAT"] = "Hide JOT In Combat"
+L["HIDE_JOT_IN_COMBAT_HELP"] = "Hide EMA Objective/Quest Tracker in Combat"
+L["SHOW_COMPLETED_OBJ_DONE"] = "Show Completed Objectives As 'DONE'"
+L["SHOW_COMPLETED_OBJ_DONE_HELP"] = "Show Completed Objectives/Quests As 'DONE'"
+L["HIDE_OBJ_COMPLETED"] = "Hide Objectives Completed"
+L["HIDE_OBJ_COMPLETED_HELP"] = "Hide Objectives/Quests Completed By The Team"
+L["SEND_PROGRESS_MESSAGES"] = "Send Progress Messages"
+L["SEND_PROGRESS_MESSAGES_HELP"] = "Send Progress Messages To Message Area Box Below"
+L["QUESTWACHERINFORMATIONONE"] = "You Will Need To Do UI [/reload] To Change Lines And Width"
+L["LINES_TO_DISPLAY"] = "Lines Of Information To Display"
+L["TRACKER_WIDTH"] = "Tracker Width"
+L["DONE"] = "Done"
+L["TRACKER_TITLE_NAME"] = "EMA Objectives Tracker"
+L["REWARDS"] = "Rewards"
+L["REWARDS_TEXT"] = "Completing This Quest Will \nReward You With:"
+L["HEADER_MOUSE_OVER_QUESTWATCHER"] = "Hold Down \"ALT\" Key To Move EMA Objectives Tracker"
+L["UPDATE_MOUSE_OVER_QUESTWATCHER"] = "Force A Update Of The EMA Objectives Tracker"
+
+------------------------
+-- Guild Locale
+L["GUILDTAB"] = ""
+L["GUILD_LIST_HEADER"] = "Guild Bank List"
+L["GUILD_LIST"] = "Put Listed Items In The Guild Bank"
+L["GUILD_LIST_HELP"] = "Automatically Put Listed Items Below In The Guild Bank"
+L["GB_TAB_LIST"] = "Guild Bank Number Tab"
+L["GUILD_BOE_ITEMS"] = "Places All Binds When Equipped Items In The GuildBank"
+L["GUILD_BOE_ITEMS_HELP"] = "Places All Binds When Equipped Items In The GuildBank"
+L["GUILD_REAGENTS"] =  "Places All Crafting Reagents Items In The GuildBank"
+L["GUILD_REAGENTS_HELP"] = "Places All Crafting Reagents Items In The GuildBank"
+L["GB_OPTIONS"] = "Guild Bank Options"
+L["GB_GOLD"] = "Adjust Characters Money While Visiting A Guild Bank"
+L["GB_GOLD_HELP"] = "Adjust Characters Money While Visiting A Guild Bank"
+L["REMOVE_GUILD_LIST"] = "Are You Sure You Wish To Remove The Selected Item From The Guild Items List?"
+
+------------------------
+-- X Locale
\ No newline at end of file
diff --git a/EMA/Locales/Locales.xml b/EMA/Locales/Locales.xml
new file mode 100644
index 0000000..853ef37
--- /dev/null
+++ b/EMA/Locales/Locales.xml
@@ -0,0 +1,12 @@
+<!--
+				Jamba EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )
+				Current Author: Jennifer Cally (Ebony)
+				Copyright 2015 - 2018 Jennifer Cally "Ebony"
+
+				License: The MIT License (MIT)
+
+-->
+<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd" xmlns="http://www.blizzard.com/wow/ui/">
+	<Script file="Core-Locale-enUS.lua" />
+	<Script file="Core-Locale-deDE.lua" />
+</Ui>
\ No newline at end of file
diff --git a/EMA/Media/AddGroup.tga b/EMA/Media/AddGroup.tga
new file mode 100644
index 0000000..df9c5fa
Binary files /dev/null and b/EMA/Media/AddGroup.tga differ
diff --git a/EMA/Media/AddPlayerIcon.tga b/EMA/Media/AddPlayerIcon.tga
new file mode 100644
index 0000000..6f81830
Binary files /dev/null and b/EMA/Media/AddPlayerIcon.tga differ
diff --git a/EMA/Media/CharAdd.tga b/EMA/Media/CharAdd.tga
new file mode 100644
index 0000000..efd131f
Binary files /dev/null and b/EMA/Media/CharAdd.tga differ
diff --git a/EMA/Media/CharAddParty.tga b/EMA/Media/CharAddParty.tga
new file mode 100644
index 0000000..b1e37e5
Binary files /dev/null and b/EMA/Media/CharAddParty.tga differ
diff --git a/EMA/Media/CharDown.tga b/EMA/Media/CharDown.tga
new file mode 100644
index 0000000..01c0729
Binary files /dev/null and b/EMA/Media/CharDown.tga differ
diff --git a/EMA/Media/CharMaster.tga b/EMA/Media/CharMaster.tga
new file mode 100644
index 0000000..b281ed3
Binary files /dev/null and b/EMA/Media/CharMaster.tga differ
diff --git a/EMA/Media/CharRemove.tga b/EMA/Media/CharRemove.tga
new file mode 100644
index 0000000..dfeaf08
Binary files /dev/null and b/EMA/Media/CharRemove.tga differ
diff --git a/EMA/Media/CharRemoveParty.tga b/EMA/Media/CharRemoveParty.tga
new file mode 100644
index 0000000..0870bdd
Binary files /dev/null and b/EMA/Media/CharRemoveParty.tga differ
diff --git a/EMA/Media/CharUp.tga b/EMA/Media/CharUp.tga
new file mode 100644
index 0000000..071bcbe
Binary files /dev/null and b/EMA/Media/CharUp.tga differ
diff --git a/EMA/Media/ChatIcon.tga b/EMA/Media/ChatIcon.tga
new file mode 100644
index 0000000..49758e0
Binary files /dev/null and b/EMA/Media/ChatIcon.tga differ
diff --git a/EMA/Media/CommsLogo.tga b/EMA/Media/CommsLogo.tga
new file mode 100644
index 0000000..40f669f
Binary files /dev/null and b/EMA/Media/CommsLogo.tga differ
diff --git a/EMA/Media/EMALogo.tga b/EMA/Media/EMALogo.tga
new file mode 100644
index 0000000..e90e005
Binary files /dev/null and b/EMA/Media/EMALogo.tga differ
diff --git a/EMA/Media/FollowIcon.tga b/EMA/Media/FollowIcon.tga
new file mode 100644
index 0000000..5d12f00
Binary files /dev/null and b/EMA/Media/FollowIcon.tga differ
diff --git a/EMA/Media/GoldIcon.tga b/EMA/Media/GoldIcon.tga
new file mode 100644
index 0000000..388ed3c
Binary files /dev/null and b/EMA/Media/GoldIcon.tga differ
diff --git a/EMA/Media/GroupIcon.tga b/EMA/Media/GroupIcon.tga
new file mode 100644
index 0000000..a0c41f3
Binary files /dev/null and b/EMA/Media/GroupIcon.tga differ
diff --git a/EMA/Media/GuildIcon.tga b/EMA/Media/GuildIcon.tga
new file mode 100644
index 0000000..f3d6c43
Binary files /dev/null and b/EMA/Media/GuildIcon.tga differ
diff --git a/EMA/Media/HeaderLogo.tga b/EMA/Media/HeaderLogo.tga
new file mode 100644
index 0000000..a5fb8e1
Binary files /dev/null and b/EMA/Media/HeaderLogo.tga differ
diff --git a/EMA/Media/InteractionIcon.tga b/EMA/Media/InteractionIcon.tga
new file mode 100644
index 0000000..97e8b87
Binary files /dev/null and b/EMA/Media/InteractionIcon.tga differ
diff --git a/EMA/Media/Isboxer_Add.tga b/EMA/Media/Isboxer_Add.tga
new file mode 100644
index 0000000..c2e567f
Binary files /dev/null and b/EMA/Media/Isboxer_Add.tga differ
diff --git a/EMA/Media/ItemUseIcon.tga b/EMA/Media/ItemUseIcon.tga
new file mode 100644
index 0000000..a279fbf
Binary files /dev/null and b/EMA/Media/ItemUseIcon.tga differ
diff --git a/EMA/Media/NewsIcon.tga b/EMA/Media/NewsIcon.tga
new file mode 100644
index 0000000..ad891c5
Binary files /dev/null and b/EMA/Media/NewsIcon.tga differ
diff --git a/EMA/Media/QuestCompletionIcon.tga b/EMA/Media/QuestCompletionIcon.tga
new file mode 100644
index 0000000..8ce7191
Binary files /dev/null and b/EMA/Media/QuestCompletionIcon.tga differ
diff --git a/EMA/Media/QuestIcon.tga b/EMA/Media/QuestIcon.tga
new file mode 100644
index 0000000..d3e5fc8
Binary files /dev/null and b/EMA/Media/QuestIcon.tga differ
diff --git a/EMA/Media/QuestTrackerIcon.tga b/EMA/Media/QuestTrackerIcon.tga
new file mode 100644
index 0000000..73d8793
Binary files /dev/null and b/EMA/Media/QuestTrackerIcon.tga differ
diff --git a/EMA/Media/RemoveGroup.tga b/EMA/Media/RemoveGroup.tga
new file mode 100644
index 0000000..4ab900f
Binary files /dev/null and b/EMA/Media/RemoveGroup.tga differ
diff --git a/EMA/Media/SellIcon.tga b/EMA/Media/SellIcon.tga
new file mode 100644
index 0000000..bd94dc7
Binary files /dev/null and b/EMA/Media/SellIcon.tga differ
diff --git a/EMA/Media/SettingsIcon.tga b/EMA/Media/SettingsIcon.tga
new file mode 100644
index 0000000..a610010
Binary files /dev/null and b/EMA/Media/SettingsIcon.tga differ
diff --git a/EMA/Media/TeamCore.tga b/EMA/Media/TeamCore.tga
new file mode 100644
index 0000000..c836d99
Binary files /dev/null and b/EMA/Media/TeamCore.tga differ
diff --git a/EMA/Media/Toon.tga b/EMA/Media/Toon.tga
new file mode 100644
index 0000000..30e76c4
Binary files /dev/null and b/EMA/Media/Toon.tga differ
diff --git a/EMA/Media/TradeIcon.tga b/EMA/Media/TradeIcon.tga
new file mode 100644
index 0000000..5c7c0b5
Binary files /dev/null and b/EMA/Media/TradeIcon.tga differ
diff --git a/EMA/Media/WarningIcon.tga b/EMA/Media/WarningIcon.tga
new file mode 100644
index 0000000..253bbb8
Binary files /dev/null and b/EMA/Media/WarningIcon.tga differ
diff --git a/EMA/Media/moduleIconRepair.tga b/EMA/Media/moduleIconRepair.tga
new file mode 100644
index 0000000..5465642
Binary files /dev/null and b/EMA/Media/moduleIconRepair.tga differ
diff --git a/EMA/Modules/DisplayTeam.lua b/EMA/Modules/DisplayTeam.lua
new file mode 100644
index 0000000..f99408a
--- /dev/null
+++ b/EMA/Modules/DisplayTeam.lua
@@ -0,0 +1,3356 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "EMA" that is 								--
+--				Released under the MIT License 										--
+--				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"DisplayTeam",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
+local LibButtonGlow = LibStub:GetLibrary( "LibButtonGlow-1.0")
+EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
+
+-- Constants required by EMAModule and Locale for this module.
+EMA.moduleName = "JmbDspTm"
+EMA.settingsDatabaseName = "DisplayTeamProfileDB"
+EMA.chatCommand = "ema-display-team"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["DISPLAY"]
+EMA.moduleDisplayName = L["DISPLAY"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\TeamCore.tga"
+-- order
+EMA.moduleOrder = 50
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		showTeamList = true,
+		showTeamListOnMasterOnly = false,
+		hideTeamListInCombat = false,
+		enableClique = false,
+		statusBarTexture = L["BLIZZARD"],
+		borderStyle = L["BLIZZARD_TOOLTIP"],
+		backgroundStyle = L["BLIZZARD_DIALOG_BACKGROUND"],
+		fontStyle = L["ARIAL_NARROW"],
+		fontSize = 12,
+		teamListScale = 1,
+		teamListTitleHeight = 15,
+		teamListVerticalSpacing = 3,
+		teamListHorizontalSpacing = 6,
+		barVerticalSpacing = 2,
+		barHorizontalSpacing = 2,
+		charactersPerRow = 1,
+		--Old code kept for Legacy Purpose
+		barsAreStackedVertically = false,
+		teamListHorizontal = true,
+		showListTitle = true,
+		olnyShowInParty = false,
+		healthManaOutOfParty = false,
+		showCharacterPortrait = false,
+		characterPortraitWidth = 80,
+		showFollowStatus = true,
+		followStatusWidth = 100,
+		followStatusHeight = 15,
+		followStatusShowName = true,
+		showExperienceStatus = true,
+		showXpStatus = true,
+		showArtifactStatus = false,
+		showHonorStatus = false,
+		showRepStatus = false,
+		experienceStatusWidth = 100,
+		experienceStatusHeight = 15,
+		experienceStatusShowValues = false,
+		experienceStatusShowPercentage = true,
+		showHealthStatus = false,
+		showClassColors = false,
+		healthStatusWidth = 100,
+		healthStatusHeight = 25,
+		healthStatusShowValues = true,
+		healthStatusShowPercentage = true,
+		showPowerStatus = false,
+		powerStatusWidth = 100,
+		powerStatusHeight = 15,
+		powerStatusShowValues = true,
+		powerStatusShowPercentage = true,
+		showComboStatus = false,
+		comboStatusWidth = 100,
+		comboStatusHeight = 10,
+		comboStatusShowValues = true,
+		comboStatusShowPercentage = true,
+		showToolTipInfo = false,
+--		ShowEquippedOnly = false,
+		framePoint = "LEFT",
+		frameRelativePoint = "LEFT",
+		frameXOffset = 0,
+		frameYOffset = 30,
+		frameAlpha = 1.0,
+		frameBackgroundColourR = 1.0,
+		frameBackgroundColourG = 1.0,
+		frameBackgroundColourB = 1.0,
+		frameBackgroundColourA = 1.0,
+		frameBorderColourR = 1.0,
+		frameBorderColourG = 1.0,
+		frameBorderColourB = 1.0,
+		frameBorderColourA = 1.0,
+		timerCount = 1,
+		currGold = true
+	},
+}
+
+-- Debug message.
+function EMA:DebugMessage( ... )
+	--EMA:Print( ... )
+end
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = "group",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-display-team push",
+				get = false,
+				set = "EMASendSettings",
+			},
+			hide = {
+				type = "input",
+				name = L["HIDE_TEAM_DISPLAY"],
+				desc = L["HIDE_TEAM_DISPLAY_HELP"],
+				usage = "/EMA-display-team hide",
+				get = false,
+				set = "HideTeamListCommand",
+			},
+			show = {
+				type = "input",
+				name = L["SHOW_TEAM_DISPLAY"],
+				desc = L["SHOW_TEAM_DISPLAY_HELP"],
+				usage = "/EMA-display-team show",
+				get = false,
+				set = "ShowTeamListCommand",
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_FOLLOW_STATUS_UPDATE = "FlwStsUpd"
+EMA.COMMAND_EXPERIENCE_STATUS_UPDATE = "ExpStsUpd"
+EMA.COMMAND_REPUTATION_STATUS_UPDATE = "RepStsUpd"
+EMA.COMMAND_COMBO_STATUS_UPDATE = "CboStsUpd"
+EMA.COMMAND_REQUEST_INFO = "SendInfo"
+EMA.COMMAND_COMBAT_STATUS_UPDATE = "InComStsUpd"
+EMA.COMMAND_POWER_STATUS_UPDATE = "PowStsUpd"
+EMA.COMMAND_HEALTH_STATUS_UPDATE = "heaStsUpd"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Constants used by module.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Variables used by module.
+-------------------------------------------------------------------------------------------------------------
+
+-- Team display variables.
+EMA.globalFramePrefix = "EMADisplayTeam"
+EMA.characterStatusBar = {}
+EMA.totalMembersDisplayed = 0
+EMA.teamListCreated = false
+EMA.refreshHideTeamListControlsPending = false
+EMA.refreshShowTeamListControlsPending = false
+EMA.updateSettingsAfterCombat = false
+
+-------------------------------------------------------------------------------------------------------------
+-- Team Frame.
+-------------------------------------------------------------------------------------------------------------
+
+local function GetCharacterHeight()
+	local height = 0
+	local heightPortrait = 0
+	local heightFollowStatus = 0
+	local heightExperienceStatus = 0
+	local heightHealthStatus = 0
+	local heightPowerStatus = 0
+	local heightComboStatus = 0
+	local heightAllBars = 0
+	if EMA.db.showCharacterPortrait == true then
+		heightPortrait = EMA.db.characterPortraitWidth + EMA.db.teamListVerticalSpacing
+	end
+	if EMA.db.showFollowStatus == true then
+		heightFollowStatus = EMA.db.followStatusHeight + EMA.db.barVerticalSpacing
+		heightAllBars = heightAllBars + heightFollowStatus
+	end
+	if EMA.db.showExperienceStatus == true then
+		heightExperienceStatus = EMA.db.experienceStatusHeight + EMA.db.barVerticalSpacing
+		heightAllBars = heightAllBars + heightExperienceStatus
+	end
+	if EMA.db.showHealthStatus == true then
+		heightHealthStatus = EMA.db.healthStatusHeight + EMA.db.barVerticalSpacing
+		heightAllBars = heightAllBars + heightHealthStatus
+	end
+	if EMA.db.showPowerStatus == true then
+		heightPowerStatus = EMA.db.powerStatusHeight + EMA.db.barVerticalSpacing
+		heightAllBars = heightAllBars + heightPowerStatus
+	end
+	if EMA.db.showComboStatus == true then
+		heightComboStatus = EMA.db.comboStatusHeight + EMA.db.barVerticalSpacing
+		heightAllBars = heightAllBars + heightComboStatus
+	end
+	if EMA.db.barsAreStackedVertically == true then
+		height = max( heightPortrait, heightAllBars )
+
+	else
+		height = max( heightPortrait, heightFollowStatus, heightExperienceStatus, heightHealthStatus, heightPowerStatus, heightComboStatus )
+		--height = max( heightPortrait, heightBagInformation, heightFollowStatus, heightExperienceStatus, heightReputationStatus, heightHealthStatus, heightPowerStatus, heightComboStatus )
+	end
+	return height
+end
+
+local function GetCharacterWidth()
+	local width = 0
+	local widthPortrait = 0
+	local widthFollowStatus = 0
+	local widthExperienceStatus = 0
+	local widthHealthStatus = 0
+	local widthPowerStatus = 0
+	local widthComboStatus = 0
+	local widthAllBars = 0
+	if EMA.db.showCharacterPortrait == true then
+		widthPortrait = EMA.db.characterPortraitWidth + EMA.db.teamListHorizontalSpacing
+	end
+	if EMA.db.showFollowStatus == true then
+		widthFollowStatus = EMA.db.followStatusWidth + EMA.db.barHorizontalSpacing
+		widthAllBars = widthAllBars + widthFollowStatus
+	end
+	if EMA.db.showExperienceStatus == true then
+		widthExperienceStatus = EMA.db.experienceStatusWidth + EMA.db.barHorizontalSpacing
+		widthAllBars = widthAllBars + widthExperienceStatus
+	end
+	if EMA.db.showHealthStatus == true then
+		widthHealthStatus = EMA.db.healthStatusWidth + EMA.db.barHorizontalSpacing
+		widthAllBars = widthAllBars + widthHealthStatus
+	end
+	if EMA.db.showPowerStatus == true then
+		widthPowerStatus = EMA.db.powerStatusWidth + EMA.db.barHorizontalSpacing
+		widthAllBars = widthAllBars + widthPowerStatus
+	end
+	if EMA.db.showComboStatus == true then
+		widthComboStatus = EMA.db.comboStatusWidth + EMA.db.barHorizontalSpacing
+		widthAllBars = widthAllBars + widthComboStatus
+	end
+	if EMA.db.barsAreStackedVertically == true then
+		width = widthPortrait + max( widthFollowStatus, widthExperienceStatus, widthHealthStatus, widthPowerStatus, widthComboStatus )
+		--width = widthPortrait + max( widthBagInformation, widthFollowStatus, widthExperienceStatus, widthReputationStatus, widthHealthStatus, widthPowerStatus, widthComboStatus )
+	else
+		width = widthPortrait + widthAllBars
+	end
+	return width
+end
+
+local function UpdateEMATeamListDimensions()
+	local frame = EMADisplayTeamListFrame
+	if EMA.db.showListTitle == true then
+		EMA.db.teamListTitleHeight = 15
+		EMADisplayTeamListFrame.titleName:SetText( L["EMA_TEAM"] )
+	else
+		EMA.db.teamListTitleHeight = 0
+		EMADisplayTeamListFrame.titleName:SetText( "" )
+	end
+	if EMA.db.teamListHorizontal == true then
+		--Old code kept for Legacy Purpose
+		--	frame:SetWidth( (EMA.db.teamListVerticalSpacing * 3) + (GetCharacterWidth() * EMA.totalMembersDisplayed) )
+		--	frame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() )
+	else
+		frame:SetWidth( (EMA.db.teamListHorizontalSpacing * 3) + GetCharacterWidth() )
+		frame:SetHeight( EMA.db.teamListTitleHeight + (GetCharacterHeight() * EMA.totalMembersDisplayed) + (EMA.db.teamListVerticalSpacing * 3) )
+	end
+	frame:SetScale( EMA.db.teamListScale )
+end
+
+local function CreateEMATeamListFrame()
+	-- The frame.
+	local frame = CreateFrame( "Frame", "EMADisplayTeamListWindowFrame", UIParent )
+	frame.obj = EMA
+	frame:SetFrameStrata( "LOW" )
+	frame:SetToplevel( true )
+	frame:SetClampedToScreen( true )
+	frame:EnableMouse( true )
+	frame:SetMovable( true )
+	frame:RegisterForDrag( "LeftButton" )
+	frame:SetScript( "OnDragStart",
+		function( this )
+			if IsAltKeyDown() then
+				if not UnitAffectingCombat("player") then
+					-- TODO: SO ARROW ICON ON MOUDE
+					this:StartMoving()
+				end
+			end
+		end )
+	frame:SetScript( "OnDragStop",
+		function( this )
+			this:StopMovingOrSizing()
+			local point, relativeTo, relativePoint, xOffset, yOffset = this:GetPoint()
+			EMA.db.framePoint = point
+			EMA.db.frameRelativePoint = relativePoint
+			EMA.db.frameXOffset = xOffset
+			EMA.db.frameYOffset = yOffset
+		end	)
+	frame:ClearAllPoints()
+	frame:SetPoint( EMA.db.framePoint, UIParent, EMA.db.frameRelativePoint, EMA.db.frameXOffset, EMA.db.frameYOffset )
+	frame:SetBackdrop( {
+		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+		tile = true, tileSize = 10, edgeSize = 10,
+		insets = { left = 3, right = 3, top = 3, bottom = 3 }
+	} )
+	-- Create the title for the team list frame.
+	local titleName = frame:CreateFontString( "EMADisplayTeamListWindowFrameTitleText", "OVERLAY", "GameFontNormal" )
+	titleName:SetPoint( "TOP", frame, "TOP", 0, -5 )
+	titleName:SetTextColor( 1.00, 1.00, 1.00 )
+	titleName:SetText( L["EMA_TEAM"] )
+	frame.titleName = titleName
+	-- Set transparency of the the frame (and all its children).
+	frame:SetAlpha(EMA.db.frameAlpha)
+
+	-- Set the global frame reference for this frame.
+	EMADisplayTeamListFrame = frame
+
+	EMA:SettingsUpdateBorderStyle()
+	EMA.teamListCreated = true
+
+end
+
+local function CanDisplayTeamList()
+	local canShow = false
+	if EMA.db.showTeamList == true then
+		if EMA.db.showTeamListOnMasterOnly == true then
+			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+				canShow = true
+			end
+		else
+			canShow = true
+		end
+	end
+	return canShow
+end
+
+function EMA:ShowTeamListCommand()
+	EMA.db.showTeamList = true
+	EMA:SetTeamListVisibility()
+end
+
+function EMA:HideTeamListCommand()
+	EMA.db.showTeamList = false
+	EMA:SetTeamListVisibility()
+end
+
+function EMA:SetTeamListVisibility()
+	if CanDisplayTeamList() == true then
+		EMADisplayTeamListFrame:ClearAllPoints()
+		EMADisplayTeamListFrame:SetPoint( EMA.db.framePoint, UIParent, EMA.db.frameRelativePoint, EMA.db.frameXOffset, EMA.db.frameYOffset )
+		EMADisplayTeamListFrame:SetAlpha( EMA.db.frameAlpha )
+		EMADisplayTeamListFrame:Show()
+	else
+		EMADisplayTeamListFrame:Hide()
+	end
+end
+
+function EMA:RefreshTeamListControlsHide()
+	if InCombatLockdown() then
+		EMA.refreshHideTeamListControlsPending = true
+		return
+	end
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		characterName = EMAUtilities:AddRealmToNameIfMissing ( characterName )
+		-- Hide their status bar.
+		EMA:HideEMATeamStatusBar( characterName )
+	end
+	UpdateEMATeamListDimensions()
+end
+
+function EMA:RefreshTeamListControlsShow()
+	if InCombatLockdown() then
+		EMA.refreshShowTeamListControlsPending = true
+		return
+	end
+
+	EMA.totalMembersDisplayed = 0
+	for index, characterName in EMAApi.TeamListOrdered() do
+		characterName = EMAUtilities:AddRealmToNameIfMissing ( characterName )
+		-- Is the team member online?
+	if EMAApi.GetCharacterOnlineStatus( characterName ) == true then
+		-- Checks the player is the party to hide the bar if needed.
+			if EMA.db.olnyShowInParty == true then
+				if UnitClass(Ambiguate( characterName, "none" ) ) then
+				-- Yes, the team member is online, draw their status bars.
+					EMA:UpdateEMATeamStatusBar( characterName, EMA.totalMembersDisplayed )
+					EMA.totalMembersDisplayed = EMA.totalMembersDisplayed + 1
+				end
+			else
+					EMA:UpdateEMATeamStatusBar( characterName, EMA.totalMembersDisplayed )
+					EMA.totalMembersDisplayed = EMA.totalMembersDisplayed + 1
+			end
+		end
+	end
+	UpdateEMATeamListDimensions()
+end
+
+function EMA:RefreshTeamListControls()
+	EMA:RefreshTeamListControlsHide()
+	EMA:RefreshTeamListControlsShow()
+end
+
+function EMA:SettingsUpdateStatusBarTexture()
+	local statusBarTexture = EMA.SharedMedia:Fetch( "statusbar", EMA.db.statusBarTexture )
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		characterStatusBar["followBar"]:SetStatusBarTexture( statusBarTexture )
+		characterStatusBar["followBar"]:GetStatusBarTexture():SetHorizTile( false )
+		characterStatusBar["followBar"]:GetStatusBarTexture():SetVertTile( false )
+		characterStatusBar["experienceBar"]:SetStatusBarTexture( statusBarTexture )
+		characterStatusBar["experienceBar"]:GetStatusBarTexture():SetHorizTile( false )
+		characterStatusBar["experienceBar"]:GetStatusBarTexture():SetVertTile( false )
+		characterStatusBar["experienceArtBar"]:SetStatusBarTexture( statusBarTexture )
+		characterStatusBar["experienceArtBar"]:GetStatusBarTexture():SetHorizTile( false )
+		characterStatusBar["experienceArtBar"]:GetStatusBarTexture():SetVertTile( false )
+	--	characterStatusBar["experienceHonorBar"]:SetStatusBarTexture( statusBarTexture )
+	--	characterStatusBar["experienceHonorBar"]:GetStatusBarTexture():SetHorizTile( false )
+	--	characterStatusBar["experienceHonorBar"]:GetStatusBarTexture():SetVertTile( false )
+		characterStatusBar["reputationBar"]:SetStatusBarTexture( statusBarTexture )
+		characterStatusBar["reputationBar"]:GetStatusBarTexture():SetHorizTile( false )
+		characterStatusBar["reputationBar"]:GetStatusBarTexture():SetVertTile( false )
+		characterStatusBar["healthBar"]:SetStatusBarTexture( statusBarTexture )
+		characterStatusBar["healthBar"]:GetStatusBarTexture():SetHorizTile( false )
+		characterStatusBar["healthBar"]:GetStatusBarTexture():SetVertTile( false )
+		characterStatusBar["powerBar"]:SetStatusBarTexture( statusBarTexture )
+		characterStatusBar["powerBar"]:GetStatusBarTexture():SetHorizTile( false )
+		characterStatusBar["powerBar"]:GetStatusBarTexture():SetVertTile( false )
+		characterStatusBar["comboBar"]:SetStatusBarTexture( statusBarTexture )
+		characterStatusBar["comboBar"]:GetStatusBarTexture():SetHorizTile( false )
+		characterStatusBar["comboBar"]:GetStatusBarTexture():SetVertTile( false )
+	end
+end
+
+function EMA:SettingsUpdateFontStyle()
+	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.fontStyle )
+	local textSize = EMA.db.fontSize
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		characterStatusBar["followBarText"]:SetFont( textFont , textSize , "OUTLINE")
+		characterStatusBar["experienceBarText"]:SetFont( textFont , textSize , "OUTLINE")
+		characterStatusBar["experienceArtBarText"]:SetFont( textFont , textSize , "OUTLINE")
+--		characterStatusBar["experienceHonorBarText"]:SetFont( textFont , textSize , "OUTLINE")
+		characterStatusBar["reputationBarText"]:SetFont( textFont , textSize , "OUTLINE")
+		characterStatusBar["healthBarText"]:SetFont( textFont , textSize , "OUTLINE")
+		characterStatusBar["powerBarText"]:SetFont( textFont , textSize , "OUTLINE")
+		characterStatusBar["comboBarText"]:SetFont( textFont , textSize , "OUTLINE")
+
+	end
+end
+
+function EMA:SettingsUpdateBorderStyle()
+	local borderStyle = EMA.SharedMedia:Fetch( "border", EMA.db.borderStyle )
+	local backgroundStyle = EMA.SharedMedia:Fetch( "background", EMA.db.backgroundStyle )
+	local frame = EMADisplayTeamListFrame
+	frame:SetBackdrop( {
+		bgFile = backgroundStyle,
+		edgeFile = borderStyle,
+		tile = true, tileSize = frame:GetWidth(), edgeSize = 10,
+		insets = { left = 3, right = 3, top = 3, bottom = 3 }
+	} )
+	frame:SetBackdropColor( EMA.db.frameBackgroundColourR, EMA.db.frameBackgroundColourG, EMA.db.frameBackgroundColourB, EMA.db.frameBackgroundColourA )
+	frame:SetBackdropBorderColor( EMA.db.frameBorderColourR, EMA.db.frameBorderColourG, EMA.db.frameBorderColourB, EMA.db.frameBorderColourA )
+end
+
+function EMA:CreateEMATeamStatusBar( characterName, parentFrame )
+	local statusBarTexture = EMA.SharedMedia:Fetch( "statusbar", EMA.db.statusBarTexture )
+	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.fontStyle )
+	local textSize = EMA.db.fontSize
+
+	-- Create the table to hold the status bars for this character.
+	EMA.characterStatusBar[characterName] = {}
+	-- Get the status bars table.
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	-- Set the portrait.
+	local portraitName = EMA.globalFramePrefix.."PortraitButton"
+	local portraitButton = CreateFrame( "PlayerModel", portraitName, parentFrame )
+	portraitButton:ClearModel()
+	local portraitName = Ambiguate( characterName, "none" )
+	portraitButton:SetUnit( portraitName )
+	portraitButton:SetPortraitZoom( 1 )
+    portraitButton:SetCamDistanceScale( 1 )
+    portraitButton:SetPosition( 0, 0, 0 )
+	local portraitButtonClick = CreateFrame( "CheckButton", portraitName.."Click", parentFrame, "SecureActionButtonTemplate" )
+	portraitButtonClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
+	characterStatusBar["portraitButton"] = portraitButton
+	characterStatusBar["portraitButtonClick"] = portraitButtonClick
+	-- Set the follow bar.
+	local followName = EMA.globalFramePrefix.."FollowBar"
+	local followBar = CreateFrame( "StatusBar", followName, parentFrame) --, "TextStatusBar,SecureActionButtonTemplate" )
+	followBar.backgroundTexture = followBar:CreateTexture( followName.."BackgroundTexture", "ARTWORK" )
+	followBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
+	followBar:SetStatusBarTexture( statusBarTexture )
+	followBar:GetStatusBarTexture():SetHorizTile( false )
+	followBar:GetStatusBarTexture():SetVertTile( false )
+	followBar:SetStatusBarColor( 0.55, 0.15, 0.15, 0.25 )
+	followBar:SetMinMaxValues( 0, 100 )
+	followBar:SetValue( 100 )
+	followBar:SetFrameStrata( "LOW" )
+	followBar:SetAlpha( 1 )
+	local followBarClick = CreateFrame( "CheckButton", followName.."Click", parentFrame, "SecureActionButtonTemplate" )
+	followBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
+	followBarClick:SetFrameStrata( "MEDIUM" )
+	characterStatusBar["followBar"] = followBar
+	characterStatusBar["followBarClick"] = followBarClick
+	local followBarText = followBar:CreateFontString( followName.."Text", "OVERLAY", "GameFontNormal" )
+	followBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	followBarText:SetFont( textFont , textSize, "OUTLINE")
+	followBarText:SetAllPoints()
+	characterStatusBar["followBarText"] = followBarText
+	EMA:SettingsUpdateFollowText( characterName ) --, UnitLevel( Ambiguate( characterName, "none" ) ), nil, nil )
+	-- Set the experience bar.
+	local experienceName = EMA.globalFramePrefix.."ExperienceBar"
+	local experienceBar = CreateFrame( "StatusBar", experienceName, parentFrame, "AnimatedStatusBarTemplate" ) --"TextStatusBar,SecureActionButtonTemplate" )
+	experienceBar.backgroundTexture = experienceBar:CreateTexture( experienceName.."BackgroundTexture", "ARTWORK" )
+	experienceBar.backgroundTexture:SetColorTexture( 0.0, 0.39, 0.88, 0.15 )
+	experienceBar:SetStatusBarTexture( statusBarTexture )
+	experienceBar:GetStatusBarTexture():SetHorizTile( false )
+	experienceBar:GetStatusBarTexture():SetVertTile( false )
+	experienceBar:SetMinMaxValues( 0, 100 )
+	experienceBar:SetValue( 100 )
+	experienceBar:SetFrameStrata( "LOW" )
+	local experienceBarClick = CreateFrame( "CheckButton", experienceName.."Click", parentFrame, "SecureActionButtonTemplate" )
+	experienceBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
+	experienceBarClick:SetFrameStrata( "MEDIUM" )
+	characterStatusBar["experienceBar"] = experienceBar
+	characterStatusBar["experienceBarClick"] = experienceBarClick
+	local experienceBarText = experienceBar:CreateFontString( experienceName.."Text", "OVERLAY", "GameFontNormal" )
+	experienceBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	experienceBarText:SetFont( textFont , textSize, "OUTLINE")
+	experienceBarText:SetAllPoints()
+	experienceBarText.playerExperience = 100
+	experienceBarText.playerMaxExperience = 100
+	experienceBarText.exhaustionStateID = 1
+	experienceBarText.playerLevel = 1
+	characterStatusBar["experienceBarText"] = experienceBarText
+	EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil )
+	-- Set the artifactXP bar.
+	local experienceArtName = EMA.globalFramePrefix.."ExperienceArtBar"
+	local experienceArtBar = CreateFrame( "StatusBar", experienceArtName, parentFrame, "AnimatedStatusBarTemplate" ) --"TextStatusBar,SecureActionButtonTemplate" )
+	experienceArtBar.backgroundTexture = experienceArtBar:CreateTexture( experienceArtName.."BackgroundTexture", "ARTWORK" )
+	experienceArtBar.backgroundTexture:SetColorTexture( 1.0, 0.0, 0.0, 0.15 )
+	experienceArtBar:SetStatusBarTexture( statusBarTexture )
+	experienceArtBar:GetStatusBarTexture():SetHorizTile( false )
+	experienceArtBar:GetStatusBarTexture():SetVertTile( false )
+	experienceArtBar:SetMinMaxValues( 0, 100 )
+	experienceArtBar:SetValue( 100 )
+	experienceArtBar:SetFrameStrata( "LOW" )
+	local experienceArtBarClick = CreateFrame( "CheckButton", experienceArtName.."Click", parentFrame, "SecureActionButtonTemplate" )
+	experienceArtBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
+	experienceArtBarClick:SetFrameStrata( "MEDIUM" )
+	characterStatusBar["experienceArtBar"] = experienceArtBar
+	characterStatusBar["experienceArtBarClick"] = experienceArtBarClick
+	local experienceArtBarText = experienceArtBar:CreateFontString( experienceArtName.."Text", "OVERLAY", "GameFontNormal" )
+	experienceArtBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	experienceArtBarText:SetFont( textFont , textSize, "OUTLINE")
+	experienceArtBarText:SetAllPoints()
+	experienceArtBarText.artifactName = "N/A"
+	experienceArtBarText.artifactXP = 0
+	experienceArtBarText.artifactForNextPoint = 100
+	experienceArtBarText.artifactPointsSpent = 1
+	experienceArtBarText.artifactPointsAvailable = 0
+	characterStatusBar["experienceArtBarText"] = experienceArtBarText
+	EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil )
+--[[
+	-- Set the HonorXP bar.
+	local experienceHonorName = EMA.globalFramePrefix.."ExperienceHonorBar"
+	local experienceHonorBar = CreateFrame( "StatusBar", experienceHonorName, parentFrame, "AnimatedStatusBarTemplate" ) --"TextStatusBar,SecureActionButtonTemplate" )
+	experienceHonorBar.backgroundTexture = experienceArtBar:CreateTexture( experienceArtName.."BackgroundTexture", "ARTWORK" )
+	experienceHonorBar.backgroundTexture:SetColorTexture( 1.0, 0.0, 0.0, 0.15 )
+	experienceHonorBar:SetStatusBarTexture( statusBarTexture )
+	experienceHonorBar:GetStatusBarTexture():SetHorizTile( false )
+	experienceHonorBar:GetStatusBarTexture():SetVertTile( false )
+	experienceHonorBar:SetMinMaxValues( 0, 100 )
+	experienceHonorBar:SetValue( 100 )
+	experienceHonorBar:SetFrameStrata( "LOW" )
+	local experienceHonorBarClick = CreateFrame( "CheckButton", experienceHonorName.."Click", parentFrame, "SecureActionButtonTemplate" )
+	experienceHonorBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
+	experienceHonorBarClick:SetFrameStrata( "MEDIUM" )
+	characterStatusBar["experienceHonorBar"] = experienceHonorBar
+	characterStatusBar["experienceHonorBarClick"] = experienceHonorBarClick
+	local experienceHonorBarText = experienceHonorBar:CreateFontString( experienceHonorName.."Text", "OVERLAY", "GameFontNormal" )
+	experienceHonorBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	experienceHonorBarText:SetFont( textFont , textSize, "OUTLINE")
+	experienceHonorBarText:SetAllPoints()
+	experienceHonorBarText.honorLevel = 0
+	experienceHonorBarText.honorXP = 0
+	experienceHonorBarText.honorMax = 100
+	experienceHonorBarText.honorExhaustionStateID = 1
+	experienceHonorBarText.canPrestige = "N/A"
+	characterStatusBar["experienceHonorBarText"] = experienceHonorBarText
+	EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil )
+]]
+	-- Set the reputation bar.
+	local reputationName = EMA.globalFramePrefix.."ReputationBar"
+	local reputationBar = CreateFrame( "StatusBar", reputationName, parentFrame, "AnimatedStatusBarTemplate" ) --"TextStatusBar,SecureActionButtonTemplate" )
+	reputationBar.backgroundTexture = reputationBar:CreateTexture( reputationName.."BackgroundTexture", "ARTWORK" )
+	reputationBar.backgroundTexture:SetColorTexture( 0.0, 0.39, 0.88, 0.15 )
+	reputationBar:SetStatusBarTexture( statusBarTexture )
+	reputationBar:GetStatusBarTexture():SetHorizTile( false )
+	reputationBar:GetStatusBarTexture():SetVertTile( false )
+	reputationBar:SetMinMaxValues( 0, 100 )
+	reputationBar:SetValue( 100 )
+	reputationBar:SetFrameStrata( "LOW" )
+	local reputationBarClick = CreateFrame( "CheckButton", reputationName.."Click", parentFrame, "SecureActionButtonTemplate" )
+	reputationBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
+	reputationBarClick:SetFrameStrata( "MEDIUM" )
+	characterStatusBar["reputationBar"] = reputationBar
+	characterStatusBar["reputationBarClick"] = reputationBarClick
+	local reputationBarText = reputationBar:CreateFontString( reputationName.."Text", "OVERLAY", "GameFontNormal" )
+	reputationBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	reputationBarText:SetFont( textFont , textSize, "OUTLINE")
+	reputationBarText:SetAllPoints()
+	reputationBarText.reputationName = "Faction"
+	reputationBarText.reputationStandingID = 4
+	reputationBarText.reputationBarMin = 0
+	reputationBarText.reputationBarMax = 100
+	reputationBarText.reputationBarValue = 100
+	characterStatusBar["reputationBarText"] = reputationBarText
+	EMA:UpdateReputationStatus( characterName, nil, nil, nil )
+	-- Set the health bar.
+
+	local healthName = EMA.globalFramePrefix.."HealthBar"
+	local healthBar = CreateFrame( "StatusBar", healthName, parentFrame, "TextStatusBar","SecureActionButtonTemplate" )
+	healthBar.backgroundTexture = healthBar:CreateTexture( healthName.."BackgroundTexture", "ARTWORK" )
+	healthBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
+	healthBar:SetStatusBarTexture( statusBarTexture )
+	healthBar:GetStatusBarTexture():SetHorizTile( false )
+	healthBar:GetStatusBarTexture():SetVertTile( false )
+	healthBar:SetMinMaxValues( 0, 100 )
+	healthBar:SetValue( 100 )
+	healthBar:SetFrameStrata( "LOW" )
+	healthBar:SetAlpha( 1 )
+
+
+	local healthIncomingName = EMA.globalFramePrefix.."HealthIncomingBar"
+	local healthIncomingBar = CreateFrame( "StatusBar", healthIncomingName, parentFrame, "TextStatusBar","SecureActionButtonTemplate" )
+	healthIncomingBar.backgroundTexture = healthIncomingBar:CreateTexture( healthIncomingName.."BackgroundTexture", "ARTWORK" )
+	healthIncomingBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
+	healthIncomingBar:SetStatusBarTexture( statusBarTexture )
+	healthIncomingBar:GetStatusBarTexture():SetHorizTile( false )
+	healthIncomingBar:GetStatusBarTexture():SetVertTile( false )
+	healthIncomingBar:SetMinMaxValues( 0, 100 )
+	healthIncomingBar:SetValue( 0 )
+	healthIncomingBar:SetFrameStrata( "BACKGROUND" )
+	healthIncomingBar:SetAlpha( 1 )
+
+	-- Set the heal Incoming bar
+
+	local healthBarClick = CreateFrame( "CheckButton", healthName.."Click"..characterName, parentFrame, "SecureActionButtonTemplate" )
+	healthBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
+	healthBarClick:SetFrameStrata( "MEDIUM" )
+	characterStatusBar["healthBar"] = healthBar
+	characterStatusBar["healthIncomingBar"] = healthIncomingBar
+	characterStatusBar["healthBarClick"] = healthBarClick
+	local healthBarText = healthBar:CreateFontString( healthName.."Text", "OVERLAY", "GameFontNormal" )
+	healthBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	healthBarText:SetFont( textFont , textSize, "OUTLINE")
+	healthBarText:SetAllPoints()
+	healthBarText.playerHealth = 100
+	healthBarText.playerMaxHealth = 100
+	healthBarText.inComingHeal = 0
+	characterStatusBar["healthBarText"] = healthBarText
+	EMA:UpdateHealthStatus( characterName, nil, nil )
+
+
+	-- Set the power bar.
+	local powerName = EMA.globalFramePrefix.."PowerBar"
+	local powerBar = CreateFrame( "StatusBar", powerName, parentFrame, "TextStatusBar","SecureActionButtonTemplate" )
+	powerBar.backgroundTexture = powerBar:CreateTexture( powerName.."BackgroundTexture", "ARTWORK" )
+	powerBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
+	powerBar:SetStatusBarTexture( statusBarTexture )
+	powerBar:GetStatusBarTexture():SetHorizTile( false )
+	powerBar:GetStatusBarTexture():SetVertTile( false )
+	powerBar:SetMinMaxValues( 0, 100 )
+	powerBar:SetValue( 100 )
+	powerBar:SetFrameStrata( "LOW" )
+	powerBar:SetAlpha( 1 )
+	local powerBarClick = CreateFrame( "CheckButton", powerName.."Click"..characterName, parentFrame, "SecureActionButtonTemplate" )
+	powerBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
+	powerBarClick:SetFrameStrata( "MEDIUM" )
+	characterStatusBar["powerBar"] = powerBar
+	characterStatusBar["powerBarClick"] = powerBarClick
+	local powerBarText = powerBar:CreateFontString( powerName.."Text", "OVERLAY", "GameFontNormal" )
+	powerBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	powerBarText:SetFont( textFont , textSize, "OUTLINE")
+	powerBarText:SetAllPoints()
+	powerBarText.playerPower = 100
+	powerBarText.playerMaxPower = 100
+	characterStatusBar["powerBarText"] = powerBarText
+	EMA:UpdatePowerStatus( characterName, nil, nil, nil )
+	-- Set the Combo Points bar.
+	local comboName = EMA.globalFramePrefix.."ComboBar"
+	local comboBar = CreateFrame( "StatusBar", comboName, parentFrame, "TextStatusBar","SecureActionButtonTemplate" )
+	comboBar.backgroundTexture = comboBar:CreateTexture( comboName.."BackgroundTexture", "ARTWORK" )
+	comboBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
+	comboBar:SetStatusBarTexture( statusBarTexture )
+	comboBar:GetStatusBarTexture():SetHorizTile( false )
+	comboBar:GetStatusBarTexture():SetVertTile( false )
+	comboBar:SetStatusBarColor( 1.00, 0.0, 0.0, 1.00 )
+	comboBar:SetMinMaxValues( 0, 5 )
+	comboBar:SetValue( 5 )
+	comboBar:SetFrameStrata( "LOW" )
+	comboBar:SetAlpha( 1 )
+	local comboBarClick = CreateFrame( "CheckButton", comboName.."Click"..characterName, parentFrame, "SecureActionButtonTemplate" )
+	comboBarClick:SetAttribute( "unit", characterName )
+	comboBarClick:SetFrameStrata( "MEDIUM" )
+	characterStatusBar["comboBar"] = comboBar
+	characterStatusBar["comboBarClick"] = comboBarClick
+	local comboBarText = comboBar:CreateFontString( comboName.."Text", "OVERLAY", "GameFontNormal" )
+	comboBarText:SetTextColor( 1.00, 1.00, 0.0, 1.00 )
+	comboBarText:SetFont( textFont , textSize, "OUTLINE")
+	comboBarText:SetAllPoints()
+	comboBarText.playerCombo = 0
+	comboBarText.playerMaxCombo = 5
+	characterStatusBar["comboBarText"] = comboBarText
+	EMA:UpdateComboStatus( characterName, nil, nil )
+	-- Add the health and power click bars to ClickCastFrames for addons like Clique to use.
+	--Ebony if Support for Clique if not on then default to target unit
+	--TODO there got to be a better way to doing this for sure but right now i can not be assed to do this for now you need to reload the UI when turning off and on clique support.
+	ClickCastFrames = ClickCastFrames or {}
+	if EMA.db.enableClique == true then
+		ClickCastFrames[portraitButtonClick] = true
+		ClickCastFrames[followBarClick] = true
+		ClickCastFrames[experienceBarClick] = true
+		ClickCastFrames[reputationBarClick] = true
+		ClickCastFrames[healthBarClick] = true
+		ClickCastFrames[powerBarClick] = true
+		ClickCastFrames[comboBarClick] = true
+	else
+		portraitButtonClick:SetAttribute( "type1", "target")
+		followBarClick:SetAttribute( "type1", "target")
+		experienceBarClick:SetAttribute( "type1", "target")
+		reputationBarClick:SetAttribute( "type1", "target")
+		healthBarClick:SetAttribute( "type1", "target")
+		powerBarClick:SetAttribute( "type1", "target")
+		comboBarClick:SetAttribute( "type1", "target")
+	end
+end
+
+
+function EMA:HideEMATeamStatusBar( characterName )
+	local parentFrame = EMADisplayTeamListFrame
+	-- Get (or create and get) the character status bar information.
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	if characterStatusBar == nil then
+		EMA:CreateEMATeamStatusBar( characterName, parentFrame )
+		characterStatusBar = EMA.characterStatusBar[characterName]
+	end
+	--if characterStatusBar ~= nil then
+	-- Hide the bars.
+	characterStatusBar["portraitButton"]:Hide()
+	characterStatusBar["portraitButtonClick"]:Hide()
+	characterStatusBar["followBar"]:Hide()
+	characterStatusBar["followBarClick"]:Hide()
+	characterStatusBar["experienceBar"]:Hide()
+	characterStatusBar["experienceBarClick"]:Hide()
+	characterStatusBar["experienceArtBar"]:Hide()
+	characterStatusBar["experienceArtBarClick"]:Hide()
+--	characterStatusBar["experienceHonorBar"]:Hide()
+--	characterStatusBar["experienceHonorBarClick"]:Hide()
+	characterStatusBar["reputationBar"]:Hide()
+	characterStatusBar["reputationBarClick"]:Hide()
+	characterStatusBar["healthBar"]:Hide()
+	characterStatusBar["healthIncomingBar"]:Hide()
+	characterStatusBar["healthBarClick"]:Hide()
+	characterStatusBar["powerBar"]:Hide()
+	characterStatusBar["powerBarClick"]:Hide()
+	characterStatusBar["comboBar"]:Hide()
+	characterStatusBar["comboBarClick"]:Hide()
+	--end
+end
+
+
+function EMA:UpdateEMATeamStatusBar( characterName, characterPosition )
+	local parentFrame = EMADisplayTeamListFrame
+	-- Get (or create and get) the character status bar information.
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	if characterStatusBar == nil then
+		EMA:CreateEMATeamStatusBar( characterName, parentFrame )
+		characterStatusBar = EMA.characterStatusBar[characterName]
+	end
+	-- Set the positions.
+	local characterHeight = GetCharacterHeight()
+	local characterWidth = GetCharacterWidth()
+	local positionLeft = 0
+	local positionTop = -EMA.db.teamListTitleHeight - (EMA.db.teamListVerticalSpacing * 2)
+	local charactersPerRow = EMA.db.charactersPerRow
+	if EMA.db.teamListHorizontal == true then
+		if characterPosition < charactersPerRow then
+			positionLeft = -6 + (characterPosition * characterWidth) + (EMA.db.teamListHorizontalSpacing * 3)
+			parentFrame:SetWidth( (EMA.db.teamListVerticalSpacing * 3) + (GetCharacterWidth() ) + ( positionLeft ) )
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() )
+		-- Row 2
+		elseif 	characterPosition < ( charactersPerRow * 2 ) then
+			positionLeft = -6 + (characterPosition - charactersPerRow ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
+			positionTop = (positionTop - characterHeight)
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + ( GetCharacterHeight() ) * 2 )
+		-- Row 3
+		elseif 	characterPosition < ( charactersPerRow * 3 ) then
+			positionLeft = -6 + (characterPosition - charactersPerRow * 2 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
+			positionTop = (positionTop - characterHeight * 2 )
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 3 )
+			-- Row 4
+		elseif 	characterPosition < ( charactersPerRow * 4 ) then
+			positionLeft = -6 + (characterPosition - charactersPerRow * 3 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
+			positionTop = (positionTop - characterHeight * 3 )
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 4 )
+		-- Row 5
+		elseif 	characterPosition < ( charactersPerRow * 5 ) then
+			positionLeft = -6 + (characterPosition - charactersPerRow * 4 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
+			positionTop = (positionTop - characterHeight * 4 )
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 5)
+		-- Row 6
+		elseif 	characterPosition < ( charactersPerRow * 6 ) then
+			positionLeft = -6 + (characterPosition - charactersPerRow * 5 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
+			positionTop = (positionTop - characterHeight * 5 )
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 6 )
+		--Row 7
+		elseif 	characterPosition < ( charactersPerRow * 7 ) then
+			positionLeft = -6 + (characterPosition - charactersPerRow * 6 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
+			positionTop = (positionTop - characterHeight * 6 )
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 7 )
+		--Row 8
+		elseif 	characterPosition < ( charactersPerRow * 8 ) then
+			positionLeft = -6 + (characterPosition - charactersPerRow * 7 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
+			positionTop = (positionTop - characterHeight * 7 )
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 8 )
+		--Row 9
+		elseif 	characterPosition < ( charactersPerRow * 9 ) then
+			positionLeft = -6 + (characterPosition - charactersPerRow * 8 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
+			positionTop = (positionTop - characterHeight * 8 )
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 9 )
+			--Row 10
+		elseif 	characterPosition < ( charactersPerRow * 10 ) then
+			positionLeft = -6 + (characterPosition - charactersPerRow * 9 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
+			positionTop = (positionTop - characterHeight * 9 )
+			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 10 )
+		else
+			return
+		end
+	--Old code kept for Legacy Purpose
+		--positionLeft = -6 + (characterPosition * characterWidth) + (EMA.db.teamListHorizontalSpacing * 3)
+	else
+		positionLeft = 6
+		positionTop = positionTop - (characterPosition * characterHeight)
+	end
+	-- Display the portrait.
+
+	local portraitButton = characterStatusBar["portraitButton"]
+	local portraitButtonClick = characterStatusBar["portraitButtonClick"]
+	if EMA.db.showCharacterPortrait == true then
+		portraitButton:ClearModel()
+		local portraitName = Ambiguate( characterName, "none" )
+		portraitButton:SetUnit( portraitName )
+		portraitButton:SetPortraitZoom( 1 )
+        portraitButton:SetCamDistanceScale( 1 )
+        portraitButton:SetPosition( 0, 0, 0 )
+        portraitButton:SetWidth( EMA.db.characterPortraitWidth )
+		portraitButton:SetHeight( EMA.db.characterPortraitWidth )
+		portraitButton:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		portraitButtonClick:SetWidth( EMA.db.characterPortraitWidth )
+		portraitButtonClick:SetHeight( EMA.db.characterPortraitWidth )
+		portraitButtonClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		portraitButton:Show()
+		portraitButtonClick:Show()
+		positionLeft = positionLeft + EMA.db.characterPortraitWidth + EMA.db.teamListHorizontalSpacing
+	else
+		portraitButton:Hide()
+		portraitButtonClick:Hide()
+	end
+	-- Display the follow bar.
+	local followBar	= characterStatusBar["followBar"]
+	local followBarClick = characterStatusBar["followBarClick"]
+	if EMA.db.showFollowStatus == true then
+		followBar.backgroundTexture:SetAllPoints()
+		followBar:SetWidth( EMA.db.followStatusWidth )
+		followBar:SetHeight( EMA.db.followStatusHeight )
+		followBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		followBarClick:SetWidth( EMA.db.followStatusWidth )
+		followBarClick:SetHeight( EMA.db.followStatusHeight )
+		followBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		followBar:Show()
+		followBarClick:Show()
+		if EMA.db.barsAreStackedVertically == true then
+			positionTop = positionTop - EMA.db.followStatusHeight - EMA.db.barVerticalSpacing
+		else
+			positionLeft = positionLeft + EMA.db.followStatusWidth + EMA.db.teamListHorizontalSpacing
+		end
+	else
+		followBar:Hide()
+		followBarClick:Hide()
+	end
+	-- Display the experience bar.
+	local experienceBar	= characterStatusBar["experienceBar"]
+	local experienceBarClick = characterStatusBar["experienceBarClick"]
+	local experienceArtBar = characterStatusBar["experienceArtBar"]
+	local experienceArtBarClick	= characterStatusBar["experienceArtBarClick"]
+	local experienceHonorBar = characterStatusBar["experienceHonorBar"]
+	local experienceHonorBarClick = characterStatusBar["experienceHonorBarClick"]
+	local reputationBar	= characterStatusBar["reputationBar"]
+	local reputationBarClick = characterStatusBar["reputationBarClick"]
+	if EMA.db.showExperienceStatus == true then
+		--EMA:Print("TestLevel", characterName, level, maxLevel, xpDisabled, showXP, showArtifact )
+		local showBarCount = 0
+		if EMA.db.showXpStatus == true then
+			showBarCount = showBarCount + 1
+			showBeforeBar = parentFrame
+			showXP = true
+		end
+		if EMA.db.showArtifactStatus == true then
+			--EMA:Print("ShowArtifact")
+			showBarCount = showBarCount + 1
+			if EMA.db.showXpStatus == true then
+				showArtBeforeBar = experienceBar
+				setArtPoint = "BOTTOMLEFT"
+				setArtLeft = 0
+				setArtTop = -1
+			else
+				showArtBeforeBar = parentFrame
+				setArtPoint = "TOPLEFT"
+				setArtLeft = positionLeft
+				setArtTop = positionTop
+			end
+		end
+	--[[if EMA.db.showHonorStatus == true then
+			--EMA:Print("ShowHonorXP")
+			showBarCount = showBarCount + 1
+			if EMA.db.showXpStatus == true and EMA.db.showArtifactStatus == false then
+				showHonorBeforeBar = experienceBar
+				setHonorPoint = "BOTTOMLEFT"
+				setHonorLeft = 0
+				setHonorTop = -1
+			elseif EMA.db.showArtifactStatus == true then
+				showHonorBeforeBar = experienceArtBar
+				setHonorPoint = "BOTTOMLEFT"
+				setHonorLeft = 0
+				setHonorTop = -1
+			else
+				showHonorBeforeBar = parentFrame
+				setHonorPoint = "TOPLEFT"
+				setHonorLeft = positionLeft
+				setHonorTop = positionTop
+			end
+		end
+	]]
+		if EMA.db.showRepStatus == true then
+			--EMA:Print("Show Reputation")
+			showBarCount = showBarCount + 1
+			if EMA.db.showXpStatus == true and EMA.db.showArtifactStatus == false then --and EMA.db.showHonorStatus == false then
+				--EMA:Print("Show Reputation 1")
+				showRepBeforeBar = experienceBar
+				setRepPoint = "BOTTOMLEFT"
+				setRepLeft = 0
+				setRepTop = -1
+			elseif EMA.db.showArtifactStatus == true then --and EMA.db.showHonorStatus == false then
+				--EMA:Print("Show Reputation 2")
+				showRepBeforeBar = experienceArtBar
+				setRepPoint = "BOTTOMLEFT"
+				setRepLeft = 0
+				setRepTop = -1
+		--[[	elseif EMA.db.showHonorStatus == true then
+				--EMA:Print("Show Reputation 3")
+				showRepBeforeBar = experienceHonorBar
+				setRepPoint = "BOTTOMLEFT"
+				setRepLeft = 0
+				setRepTop = -1
+		]]
+			else
+				--EMA:Print("Show Reputation 4")
+				showRepBeforeBar = parentFrame
+				setRepPoint = "TOPLEFT"
+				setRepLeft = positionLeft
+				setRepTop = positionTop
+			end
+		end
+		if showBarCount < 1 then
+			showBarCount = showBarCount + 1
+		end
+		--EMA:Print("showBarCountTest", showBarCount)
+		--Xp Bar
+			experienceBar.backgroundTexture:SetAllPoints()
+			experienceBar:SetWidth( EMA.db.experienceStatusWidth )
+			experienceBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
+			experienceBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft , positionTop )
+			experienceBarClick:SetWidth( EMA.db.experienceStatusWidth )
+			experienceBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
+			experienceBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		if EMA.db.showXpStatus == true then
+			experienceBar:Show()
+			experienceBarClick:Show()
+		else
+			experienceBar:Hide()
+			experienceBarClick:Hide()
+		end
+		--Artifact Bar
+			experienceArtBar.backgroundTexture:SetAllPoints()
+			experienceArtBar:SetWidth( EMA.db.experienceStatusWidth )
+			experienceArtBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
+			experienceArtBar:SetPoint( "TOPLEFT", showArtBeforeBar, setArtPoint, setArtLeft , setArtTop )
+			experienceArtBarClick:SetPoint( "TOPLEFT", showArtBeforeBar, setArtPoint, setArtLeft , setArtTop )
+			experienceArtBarClick:SetWidth( EMA.db.experienceStatusWidth )
+			experienceArtBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
+		if EMA.db.showArtifactStatus == true then
+			experienceArtBar:Show()
+			experienceArtBarClick:Show()
+		else
+			experienceArtBar:Hide()
+			experienceArtBarClick:Hide()
+		end
+	--[[	-- Honor
+			experienceHonorBar.backgroundTexture:SetAllPoints()
+			experienceHonorBar:SetWidth( EMA.db.experienceStatusWidth )
+			experienceHonorBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
+			experienceHonorBar:SetPoint( "TOPLEFT", showHonorBeforeBar , setHonorPoint, setHonorLeft, setHonorTop )
+			experienceHonorBarClick:SetPoint( "TOPLEFT", showHonorBeforeBar , setHonorPoint, setHonorLeft, setHonorTop )
+			experienceHonorBarClick:SetWidth( EMA.db.experienceStatusWidth )
+			experienceHonorBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
+		if EMA.db.showHonorStatus == true then
+			experienceHonorBar:Show()
+			experienceHonorBarClick:Show()
+		else
+			experienceHonorBar:Hide()
+			experienceHonorBarClick:Hide()
+		end
+	]]	--rep
+			reputationBar.backgroundTexture:SetAllPoints()
+			reputationBar:SetWidth( EMA.db.experienceStatusWidth )
+			reputationBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
+			reputationBar:SetPoint( "TOPLEFT", showRepBeforeBar , setRepPoint, setRepLeft, setRepTop )
+			reputationBarClick:SetPoint( "TOPLEFT", showRepBeforeBar , setRepPoint, setRepLeft, setRepTop )
+			reputationBarClick:SetWidth( EMA.db.experienceStatusWidth )
+			reputationBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
+		if EMA.db.showRepStatus == true then
+			reputationBar:Show()
+			reputationBarClick:Show()
+		else
+			reputationBar:Hide()
+			reputationBarClick:Hide()
+		end
+
+		if EMA.db.barsAreStackedVertically == true then
+			positionTop = positionTop - EMA.db.experienceStatusHeight - EMA.db.barVerticalSpacing
+		else
+			positionLeft = positionLeft + EMA.db.experienceStatusWidth + EMA.db.teamListHorizontalSpacing
+		end
+
+	else
+		experienceBar:Hide()
+		experienceBarClick:Hide()
+		experienceArtBar:Hide()
+		experienceArtBarClick:Hide()
+	--	experienceHonorBar:Hide()
+	--	experienceHonorBarClick:Hide()
+	end
+	-- Display the health bar.
+	local healthBar	= characterStatusBar["healthBar"]
+	local healthIncomingBar = characterStatusBar["healthIncomingBar"]
+	local healthBarClick = characterStatusBar["healthBarClick"]
+	if EMA.db.showHealthStatus == true then
+		healthBar.backgroundTexture:SetAllPoints()
+		healthBar:SetWidth( EMA.db.healthStatusWidth )
+		healthBar:SetHeight( EMA.db.healthStatusHeight )
+		healthBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		healthBarClick:SetWidth( EMA.db.healthStatusWidth )
+		healthBarClick:SetHeight( EMA.db.healthStatusHeight )
+		healthBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		healthBar:Show()
+		healthBarClick:Show()
+		if EMA.db.barsAreStackedVertically == true then
+			positionTop = positionTop - EMA.db.healthStatusHeight - EMA.db.barVerticalSpacing
+		else
+			positionLeft = positionLeft + EMA.db.healthStatusWidth + EMA.db.teamListHorizontalSpacing
+		end
+	else
+		healthBar:Hide()
+		healthBarClick:Hide()
+	end
+	-- Display the health Incoming bar.
+	if EMA.db.showHealthStatus == true then
+		healthIncomingBar.backgroundTexture:SetAllPoints()
+		healthIncomingBar:SetWidth( EMA.db.healthStatusWidth )
+		healthIncomingBar:SetHeight( EMA.db.healthStatusHeight )
+		healthIncomingBar:SetPoint( "TOPLEFT", healthBar, "TOPLEFT", 0, 0 )
+		healthIncomingBar:Show()
+	else
+		healthIncomingBar:Hide()
+		--healthBarClick:Hide()
+	end
+	-- Display the power bar.
+	local powerBar = characterStatusBar["powerBar"]
+	local powerBarClick = characterStatusBar["powerBarClick"]
+	if EMA.db.showPowerStatus == true then
+		powerBar.backgroundTexture:SetAllPoints()
+		powerBar:SetWidth( EMA.db.powerStatusWidth )
+		powerBar:SetHeight( EMA.db.powerStatusHeight )
+		powerBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		powerBarClick:SetWidth( EMA.db.powerStatusWidth )
+		powerBarClick:SetHeight( EMA.db.powerStatusHeight )
+		powerBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		powerBar:Show()
+		powerBarClick:Show()
+		if EMA.db.barsAreStackedVertically == true then
+			positionTop = positionTop - EMA.db.powerStatusHeight - EMA.db.barVerticalSpacing
+		else
+			positionLeft = positionLeft + EMA.db.powerStatusWidth + EMA.db.teamListHorizontalSpacing
+		end
+	else
+		powerBar:Hide()
+		powerBarClick:Hide()
+	end
+	-- Display the Combo Point bar.
+	local comboBar = characterStatusBar["comboBar"]
+	local comboBarClick = characterStatusBar["comboBarClick"]
+	if EMA.db.showComboStatus == true then
+		comboBar.backgroundTexture:SetAllPoints()
+		comboBar:SetWidth( EMA.db.comboStatusWidth )
+		comboBar:SetHeight( EMA.db.comboStatusHeight )
+		comboBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		comboBarClick:SetWidth( EMA.db.comboStatusWidth )
+		comboBarClick:SetHeight( EMA.db.comboStatusHeight )
+		comboBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		comboBar:Show()
+		comboBarClick:Show()
+		if EMA.db.barsAreStackedVertically == true then
+			positionTop = positionTop - EMA.db.comboStatusHeight - EMA.db.barVerticalSpacing
+		else
+			positionLeft = positionLeft + EMA.db.comboStatusWidth + EMA.db.teamListHorizontalSpacing
+		end
+	else
+		comboBar:Hide()
+		comboBarClick:Hide()
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateDisplayOptions( top )
+	-- Get positions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
+	local sliderHeight = EMAHelperSettings:GetSliderHeight()
+	local mediaHeight = EMAHelperSettings:GetMediaHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( true )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local sectionSpacing = verticalSpacing * 4
+	local halfWidthSlider = (headingWidth - horizontalSpacing) / 2
+	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
+	local column2left = left + halfWidthSlider
+	local left2 = left + thirdWidth
+	local left3 = left + (thirdWidth * 2)
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	-- Create show.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["DISPLAY_HEADER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsCheckBoxShowTeamList = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SHOW_TEAM_FRAME"],
+		EMA.SettingsToggleShowTeamList,
+		L["SHOW_TEAM_FRAME_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxShowTeamListOnlyOnMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ONLY_ON_MASTER"],
+		EMA.SettingsToggleShowTeamListOnMasterOnly,
+		L["ONLY_ON_MASTER_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxHideTeamListInCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["HIDE_IN_COMBAT"],
+		EMA.SettingsToggleHideTeamListInCombat,
+		L["HIDE_IN_COMBAT_HELP_DT"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxEnableClique = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ENABLE_CLIQUE"],
+		EMA.SettingsToggleEnableClique,
+		L["ENABLE_CLIQUE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxOlnyShowInParty = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SHOW_PARTY"],
+		EMA.SettingsToggleOlnyShowinParty,
+		L["SHOW_PARTY_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxHpManaOutOfParty = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["HEALTH_POWER_GROUP"],
+		EMA.SettingsToggleHpManaOutOfParty,
+		L["HEALTH_POWER_GROUP_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	-- Create appearance & layout.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["APPEARANCE_LAYOUT_HEALDER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsCheckBoxShowListTitle = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["SHOW_TITLE"],
+		EMA.SettingsToggleShowTeamListTitle,
+		L["SHOW_TITLE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxStackVertically = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["STACK_VERTICALLY_HELP"],
+		EMA.SettingsToggleStackVertically,
+		L["STACK_VERTICALLY_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCharactersPerBar = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["CHARACTERS_PER_BAR"]
+	)
+	EMA.settingsControl.displayOptionsCharactersPerBar:SetSliderValues( 1, 10, 1 )
+	EMA.settingsControl.displayOptionsCharactersPerBar:SetCallback( "OnValueChanged", EMA.SettingsChangeCharactersPerBar )
+
+
+	EMA.settingsControl.displayOptionsTeamListScaleSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left,
+		movingTop,
+		L["SCALE"]
+	)
+	EMA.settingsControl.displayOptionsTeamListScaleSlider:SetSliderValues( 0.5, 2, 0.01 )
+	EMA.settingsControl.displayOptionsTeamListScaleSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeScale )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+
+	EMA.settingsControl.displayOptionsTeamListTransparencySlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["TRANSPARENCY"]
+	)
+	EMA.settingsControl.displayOptionsTeamListTransparencySlider:SetSliderValues( 0, 1, 0.01 )
+	EMA.settingsControl.displayOptionsTeamListTransparencySlider:SetCallback( "OnValueChanged", EMA.SettingsChangeTransparency )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsTeamListMediaStatus = EMAHelperSettings:CreateMediaStatus(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["BAR_TEXTURES"]
+	)
+	EMA.settingsControl.displayOptionsTeamListMediaStatus:SetCallback( "OnValueChanged", EMA.SettingsChangeStatusBarTexture )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsTeamListMediaBorder = EMAHelperSettings:CreateMediaBorder(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["BORDER_STYLE"]
+	)
+	EMA.settingsControl.displayOptionsTeamListMediaBorder:SetCallback( "OnValueChanged", EMA.SettingsChangeBorderStyle )
+	EMA.settingsControl.displayOptionsBorderColourPicker = EMAHelperSettings:CreateColourPicker(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left + 15,
+		movingTop - 15,
+		L["BORDER COLOUR"]
+	)
+	EMA.settingsControl.displayOptionsBorderColourPicker:SetHasAlpha( true )
+	EMA.settingsControl.displayOptionsBorderColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBorderColourPickerChanged )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsTeamListMediaBackground = EMAHelperSettings:CreateMediaBackground(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["BACKGROUND"]
+	)
+	EMA.settingsControl.displayOptionsTeamListMediaBackground:SetCallback( "OnValueChanged", EMA.SettingsChangeBackgroundStyle )
+	EMA.settingsControl.displayOptionsBackgroundColourPicker = EMAHelperSettings:CreateColourPicker(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left + 15,
+		movingTop - 15,
+		L["BG_COLOUR"]
+	)
+	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetHasAlpha( true )
+	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBackgroundColourPickerChanged )
+	--Set the font
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsTeamListMediaFont = EMAHelperSettings:CreateMediaFont(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["FONT"]
+	)
+	EMA.settingsControl.displayOptionsTeamListMediaFont:SetCallback( "OnValueChanged", EMA.SettingsChangeFontStyle )
+	EMA.settingsControl.displayOptionsSetFontSize = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left,
+		movingTop,
+		L["FONT_SIZE"]
+	)
+	EMA.settingsControl.displayOptionsSetFontSize:SetSliderValues( 8, 20 , 1 )
+	EMA.settingsControl.displayOptionsSetFontSize:SetCallback( "OnValueChanged", EMA.SettingsChangeFontSize )
+	movingTop = movingTop - mediaHeight - sectionSpacing
+	-- Create portrait.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PORTRAIT_HEADER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsCheckBoxShowPortrait = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SHOW"],
+		EMA.SettingsToggleShowPortrait,
+		L["SHOW_CHARACTER_PORTRAIT"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsPortraitWidthSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["WIDTH"]
+	)
+	EMA.settingsControl.displayOptionsPortraitWidthSlider:SetSliderValues( 15, 300, 1 )
+	EMA.settingsControl.displayOptionsPortraitWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangePortraitWidth )
+	movingTop = movingTop - sliderHeight - sectionSpacing
+	-- Create follow status.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_BAR_HEADER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsCheckBoxShowFollowStatus = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["SHOW"],
+		EMA.SettingsToggleShowFollowStatus,
+		L["SHOW_FOLLOW_BAR"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowFollowStatusName = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left2,
+		movingTop,
+		L["NAME"],
+		EMA.SettingsToggleShowFollowStatusName,
+		L["SHOW_NAME"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsFollowStatusWidthSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["WIDTH"]
+	)
+	EMA.settingsControl.displayOptionsFollowStatusWidthSlider:SetSliderValues( 15, 300, 1 )
+	EMA.settingsControl.displayOptionsFollowStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeFollowStatusWidth )
+	EMA.settingsControl.displayOptionsFollowStatusHeightSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left,
+		movingTop,
+		L["HEIGHT"]
+	)
+	EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetSliderValues( 15, 100, 1 )
+	EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeFollowStatusHeight )
+	movingTop = movingTop - sliderHeight - sectionSpacing
+	-- Create experience status.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["EXPERIENCE_HEADER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatus = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["SHOW"],
+		EMA.SettingsToggleShowExperienceStatus,
+		L["SHOW_XP_BAR"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left2,
+		movingTop,
+		L["VALUES"],
+		EMA.SettingsToggleShowExperienceStatusValues,
+		L["VALUES_HELP"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left3,
+		movingTop,
+		L["PERCENTAGE"],
+		EMA.SettingsToggleShowExperienceStatusPercentage,
+		L["PERCENTAGE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxShowXpStatus = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["SHOW_XP"],
+		EMA.SettingsToggleShowXpStatus,
+		L["SHOW_XP_HELP"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowArtifactStatus = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left2,
+		movingTop,
+		L["ARTIFACT_BAR"],
+		EMA.SettingsToggleShowArtifactStatus,
+		L["ARTIFACT_BAR_HELP"]
+	)
+--[[
+	EMA.settingsControl.displayOptionsCheckBoxShowHonorStatus = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left3,
+		movingTop,
+		L["HONORXP"],
+		EMA.SettingsToggleShowHonorStatus,
+		L["HONORXP_HELP"]
+	)
+]]
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxShowRepStatus = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["REPUTATION_BAR"],
+		EMA.SettingsToggleShowRepStatus,
+		L["REPUTATION_BAR_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsExperienceStatusWidthSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["WIDTH"]
+	)
+	EMA.settingsControl.displayOptionsExperienceStatusWidthSlider:SetSliderValues( 15, 300, 1 )
+	EMA.settingsControl.displayOptionsExperienceStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeExperienceStatusWidth )
+	EMA.settingsControl.displayOptionsExperienceStatusHeightSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left,
+		movingTop,
+		L["HEIGHT"]
+	)
+	EMA.settingsControl.displayOptionsExperienceStatusHeightSlider:SetSliderValues( 15, 100, 1 )
+	EMA.settingsControl.displayOptionsExperienceStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeExperienceStatusHeight )
+	movingTop = movingTop - sliderHeight - sectionSpacing
+	-- Create health status.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["HEALTH_BAR_HEADER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatus = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["SHOW"],
+		EMA.SettingsToggleShowHealthStatus,
+		L["SHOW_HEALTH"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusValues = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left2,
+		movingTop,
+		L["VALUES"],
+		EMA.SettingsToggleShowHealthStatusValues,
+		L["VALUES_HELP"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left3,
+		movingTop,
+		L["PERCENTAGE"],
+		EMA.SettingsToggleShowHealthStatusPercentage,
+		L["PERCENTAGE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxShowClassColors = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["SHOW_CLASS_COLORS"],
+		EMA.SettingsToggleShowClassColors,
+		L["SHOW_CLASS_COLORS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsHealthStatusWidthSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["WIDTH"]
+	)
+	EMA.settingsControl.displayOptionsHealthStatusWidthSlider:SetSliderValues( 15, 300, 1 )
+	EMA.settingsControl.displayOptionsHealthStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeHealthStatusWidth )
+	EMA.settingsControl.displayOptionsHealthStatusHeightSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left,
+		movingTop,
+		L["HEIGHT"]
+	)
+	EMA.settingsControl.displayOptionsHealthStatusHeightSlider:SetSliderValues( 15, 100, 1 )
+	EMA.settingsControl.displayOptionsHealthStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeHealthStatusHeight )
+	movingTop = movingTop - sliderHeight - sectionSpacing
+	-- Create power status.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["POWER_BAR_HEADER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatus = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["SHOW"],
+		EMA.SettingsToggleShowPowerStatus,
+		L["POWER_HELP"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusValues = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left2,
+		movingTop,
+		L["VALUES"],
+		EMA.SettingsToggleShowPowerStatusValues,
+		L["VALUES_HELP"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusPercentage = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left3,
+		movingTop,
+		L["PERCENTAGE"],
+		EMA.SettingsToggleShowPowerStatusPercentage,
+		L["PERCENTAGE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsPowerStatusWidthSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["WIDTH"]
+	)
+	EMA.settingsControl.displayOptionsPowerStatusWidthSlider:SetSliderValues( 15, 300, 1 )
+	EMA.settingsControl.displayOptionsPowerStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangePowerStatusWidth )
+	EMA.settingsControl.displayOptionsPowerStatusHeightSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left,
+		movingTop,
+		L["HEIGHT"]
+	)
+	EMA.settingsControl.displayOptionsPowerStatusHeightSlider:SetSliderValues( 10, 100, 1 )
+	EMA.settingsControl.displayOptionsPowerStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangePowerStatusHeight )
+	movingTop = movingTop - sliderHeight - sectionSpacing
+	-- Create Combo Point status.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CLASS_BAR_HEADER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsCheckBoxShowComboStatus = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["SHOW"],
+		EMA.SettingsToggleShowComboStatus,
+		L["CLASS_POWER"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowComboStatusValues = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left2,
+		movingTop,
+		L["VALUES"],
+		EMA.SettingsToggleShowComboStatusValues,
+		L["VALUES_HELP"]
+	)
+	EMA.settingsControl.displayOptionsCheckBoxShowComboStatusPercentage = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left3,
+		movingTop,
+		L["PERCENTAGE"],
+		EMA.SettingsToggleShowComboStatusPercentage,
+		L["PERCENTAGE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsComboStatusWidthSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["WIDTH"]
+	)
+	EMA.settingsControl.displayOptionsComboStatusWidthSlider:SetSliderValues( 15, 300, 1 )
+	EMA.settingsControl.displayOptionsComboStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeComboStatusWidth )
+	EMA.settingsControl.displayOptionsComboStatusHeightSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left,
+		movingTop,
+		L["HEIGHT"]
+	)
+	EMA.settingsControl.displayOptionsComboStatusHeightSlider:SetSliderValues( 10, 100, 1 )
+	EMA.settingsControl.displayOptionsComboStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeComboStatusHeight )
+	movingTop = movingTop - sliderHeight - sectionSpacing
+	return movingTop
+end
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfDisplayOptions = SettingsCreateDisplayOptions( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfDisplayOptions )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+	EMA:RefreshTeamListControlsHide()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	EMA.settingsControl.displayOptionsCheckBoxShowTeamList:SetValue( EMA.db.showTeamList )
+	EMA.settingsControl.displayOptionsCheckBoxShowTeamListOnlyOnMaster:SetValue( EMA.db.showTeamListOnMasterOnly )
+	EMA.settingsControl.displayOptionsCheckBoxHideTeamListInCombat:SetValue( EMA.db.hideTeamListInCombat )
+	EMA.settingsControl.displayOptionsCheckBoxEnableClique:SetValue( EMA.db.enableClique )
+	EMA.settingsControl.displayOptionsCharactersPerBar:SetValue( EMA.db.charactersPerRow )
+	EMA.settingsControl.displayOptionsCheckBoxStackVertically:SetValue( EMA.db.barsAreStackedVertically )
+	EMA.settingsControl.displayOptionsCheckBoxShowListTitle:SetValue( EMA.db.showListTitle )
+	EMA.settingsControl.displayOptionsCheckBoxOlnyShowInParty:SetValue( EMA.db.olnyShowInParty )
+	EMA.settingsControl.displayOptionsCheckBoxHpManaOutOfParty:SetValue ( EMA.db.healthManaOutOfParty )
+	EMA.settingsControl.displayOptionsTeamListTransparencySlider:SetValue( EMA.db.frameAlpha )
+	EMA.settingsControl.displayOptionsTeamListScaleSlider:SetValue( EMA.db.teamListScale )
+	EMA.settingsControl.displayOptionsTeamListMediaStatus:SetValue( EMA.db.statusBarTexture )
+	EMA.settingsControl.displayOptionsTeamListMediaBorder:SetValue( EMA.db.borderStyle )
+	EMA.settingsControl.displayOptionsTeamListMediaBackground:SetValue( EMA.db.backgroundStyle )
+	EMA.settingsControl.displayOptionsTeamListMediaFont:SetValue( EMA.db.fontStyle )
+	EMA.settingsControl.displayOptionsSetFontSize:SetValue( EMA.db.fontSize )
+	EMA.settingsControl.displayOptionsCheckBoxShowPortrait:SetValue( EMA.db.showCharacterPortrait )
+	EMA.settingsControl.displayOptionsPortraitWidthSlider:SetValue( EMA.db.characterPortraitWidth )
+	EMA.settingsControl.displayOptionsCheckBoxShowFollowStatus:SetValue( EMA.db.showFollowStatus )
+	EMA.settingsControl.displayOptionsCheckBoxShowFollowStatusName:SetValue( EMA.db.followStatusShowName )
+	EMA.settingsControl.displayOptionsFollowStatusWidthSlider:SetValue( EMA.db.followStatusWidth )
+	EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetValue( EMA.db.followStatusHeight )
+	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatus:SetValue( EMA.db.showExperienceStatus )
+	EMA.settingsControl.displayOptionsCheckBoxShowXpStatus:SetValue( EMA.db.showXpStatus )
+	EMA.settingsControl.displayOptionsCheckBoxShowArtifactStatus:SetValue( EMA.db.showArtifactStatus )
+--	EMA.settingsControl.displayOptionsCheckBoxShowHonorStatus:SetValue( EMA.db.showHonorStatus )
+	EMA.settingsControl.displayOptionsCheckBoxShowRepStatus:SetValue( EMA.db.showRepStatus )
+	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues:SetValue( EMA.db.experienceStatusShowValues )
+	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage:SetValue( EMA.db.experienceStatusShowPercentage )
+	EMA.settingsControl.displayOptionsExperienceStatusWidthSlider:SetValue( EMA.db.experienceStatusWidth )
+	EMA.settingsControl.displayOptionsExperienceStatusHeightSlider:SetValue( EMA.db.experienceStatusHeight )
+	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatus:SetValue( EMA.db.showHealthStatus )
+	EMA.settingsControl.displayOptionsCheckBoxShowClassColors:SetValue( EMA.db.showClassColors )
+	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusValues:SetValue( EMA.db.healthStatusShowValues )
+	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage:SetValue( EMA.db.healthStatusShowPercentage )
+	EMA.settingsControl.displayOptionsHealthStatusWidthSlider:SetValue( EMA.db.healthStatusWidth )
+	EMA.settingsControl.displayOptionsHealthStatusHeightSlider:SetValue( EMA.db.healthStatusHeight )
+	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatus:SetValue( EMA.db.showPowerStatus )
+	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusValues:SetValue( EMA.db.powerStatusShowValues )
+	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusPercentage:SetValue( EMA.db.powerStatusShowPercentage )
+	EMA.settingsControl.displayOptionsPowerStatusWidthSlider:SetValue( EMA.db.powerStatusWidth )
+	EMA.settingsControl.displayOptionsPowerStatusHeightSlider:SetValue( EMA.db.powerStatusHeight )
+	EMA.settingsControl.displayOptionsCheckBoxShowComboStatus:SetValue( EMA.db.showComboStatus )
+	EMA.settingsControl.displayOptionsCheckBoxShowComboStatusValues:SetValue( EMA.db.comboStatusShowValues )
+	EMA.settingsControl.displayOptionsCheckBoxShowComboStatusPercentage:SetValue( EMA.db.comboStatusShowPercentage )
+	EMA.settingsControl.displayOptionsComboStatusWidthSlider:SetValue( EMA.db.comboStatusWidth )
+	EMA.settingsControl.displayOptionsComboStatusHeightSlider:SetValue( EMA.db.comboStatusHeight )
+	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetColor( EMA.db.frameBackgroundColourR, EMA.db.frameBackgroundColourG, EMA.db.frameBackgroundColourB, EMA.db.frameBackgroundColourA )
+	EMA.settingsControl.displayOptionsBorderColourPicker:SetColor( EMA.db.frameBorderColourR, EMA.db.frameBorderColourG, EMA.db.frameBorderColourB, EMA.db.frameBorderColourA )
+--	EMA.settingsControl.displayOptionsCheckBoxShowEquippedOnly:SetValue( EMA.db.ShowEquippedOnly )
+	-- State.
+	-- Trying to change state in combat lockdown causes taint. Let's not do that. Eventually it would be nice to have a "proper state driven team display",
+	-- but this workaround is enough for now.
+	if not InCombatLockdown() then
+		EMA.settingsControl.displayOptionsCheckBoxShowTeamListOnlyOnMaster:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxHideTeamListInCombat:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxEnableClique:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCharactersPerBar:SetDisabled(not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxStackVertically:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxShowListTitle:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxOlnyShowInParty:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxHpManaOutOfParty:SetDisabled( not EMA.db.showTeamList)
+		EMA.settingsControl.displayOptionsTeamListScaleSlider:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsTeamListTransparencySlider:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsTeamListMediaStatus:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsTeamListMediaBorder:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsTeamListMediaBackground:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsTeamListMediaFont:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsSetFontSize:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxShowPortrait:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsPortraitWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showCharacterPortrait )
+		EMA.settingsControl.displayOptionsCheckBoxShowFollowStatus:SetDisabled( not EMA.db.showTeamList)
+		EMA.settingsControl.displayOptionsCheckBoxShowFollowStatusName:SetDisabled( not EMA.db.showTeamList or not EMA.db.showFollowStatus )
+		EMA.settingsControl.displayOptionsFollowStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showFollowStatus )
+		EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showFollowStatus)
+		EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatus:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxShowXpStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus)
+		EMA.settingsControl.displayOptionsCheckBoxShowArtifactStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus)
+--		EMA.settingsControl.displayOptionsCheckBoxShowHonorStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus)
+		EMA.settingsControl.displayOptionsCheckBoxShowRepStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus )
+		EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus )
+		EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus )
+		EMA.settingsControl.displayOptionsExperienceStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus)
+		EMA.settingsControl.displayOptionsExperienceStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus )
+		EMA.settingsControl.displayOptionsCheckBoxShowHealthStatus:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxShowClassColors:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
+		EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusValues:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
+		EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
+		EMA.settingsControl.displayOptionsHealthStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
+		EMA.settingsControl.displayOptionsHealthStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
+		EMA.settingsControl.displayOptionsCheckBoxShowPowerStatus:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusValues:SetDisabled( not EMA.db.showTeamList or not EMA.db.showPowerStatus )
+		EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusPercentage:SetDisabled( not EMA.db.showTeamList or not EMA.db.showPowerStatus )
+		EMA.settingsControl.displayOptionsPowerStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showPowerStatus )
+		EMA.settingsControl.displayOptionsPowerStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showPowerStatus )
+		EMA.settingsControl.displayOptionsCheckBoxShowComboStatus:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsCheckBoxShowComboStatusValues:SetDisabled( not EMA.db.showTeamList or not EMA.db.showComboStatus )
+		EMA.settingsControl.displayOptionsCheckBoxShowComboStatusPercentage:SetDisabled( not EMA.db.showTeamList or not EMA.db.showComboStatus)
+		EMA.settingsControl.displayOptionsComboStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showComboStatus)
+		EMA.settingsControl.displayOptionsComboStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showComboStatus)
+		EMA.settingsControl.displayOptionsBackgroundColourPicker:SetDisabled( not EMA.db.showTeamList )
+		EMA.settingsControl.displayOptionsBorderColourPicker:SetDisabled( not EMA.db.showTeamList )
+		if EMA.teamListCreated == true then
+			EMA:RefreshTeamListControls()
+			EMA:SettingsUpdateBorderStyle()
+			EMA:SettingsUpdateStatusBarTexture()
+			EMA:SettingsUpdateFontStyle()
+			EMA:SetTeamListVisibility()
+			EMA:SettingsUpdateFollowTextAll()
+			EMA:SettingsUpdateExperienceAll()
+			EMA:SettingsUpdateReputationAll()
+			EMA:SettingsUpdateHealthAll()
+			EMA:SettingsUpdatePowerAll()
+			EMA:SettingsUpdateComboAll()
+		end
+	else
+		EMA.updateSettingsAfterCombat = true
+	end
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.showTeamList = settings.showTeamList
+		EMA.db.showTeamListOnMasterOnly = settings.showTeamListOnMasterOnly
+		EMA.db.hideTeamListInCombat = settings.hideTeamListInCombat
+		EMA.db.enableClique = settings.enableClique
+		EMA.db.charactersPerRow = settings.charactersPerRow
+		EMA.db.barsAreStackedVertically = settings.barsAreStackedVertically
+		EMA.db.teamListHorizontal = settings.teamListHorizontal
+		EMA.db.showListTitle = settings.showListTitle
+		EMA.db.olnyShowInParty = settings.olnyShowInParty
+		EMA.db.healthManaOutOfParty = settings.healthManaOutOfParty
+		EMA.db.teamListScale = settings.teamListScale
+		EMA.db.statusBarTexture = settings.statusBarTexture
+		EMA.db.borderStyle = settings.borderStyle
+		EMA.db.backgroundStyle = settings.backgroundStyle
+		EMA.db.fontStyle = settings.fontStyle
+		EMA.db.fontSize = settings.fontSize
+		EMA.db.showCharacterPortrait = settings.showCharacterPortrait
+		EMA.db.characterPortraitWidth = settings.characterPortraitWidth
+		EMA.db.showFollowStatus = settings.showFollowStatus
+		EMA.db.followStatusWidth = settings.followStatusWidth
+		EMA.db.followStatusHeight = settings.followStatusHeight
+		EMA.db.followStatusShowName = settings.followStatusShowName
+		EMA.db.showExperienceStatus = settings.showExperienceStatus
+		EMA.db.showXpStatus = settings.showXpStatus
+		EMA.db.showArtifactStatus = settings.showArtifactStatus
+--		EMA.db.showHonorStatus = settings.showHonorStatus
+		EMA.db.showRepStatus = settings.showRepStatus
+		EMA.db.experienceStatusWidth = settings.experienceStatusWidth
+		EMA.db.experienceStatusHeight = settings.experienceStatusHeight
+		EMA.db.experienceStatusShowValues = settings.experienceStatusShowValues
+		EMA.db.experienceStatusShowPercentage = settings.experienceStatusShowPercentage
+		EMA.db.showHealthStatus = settings.showHealthStatus
+		EMA.db.showClassColors = settings.showClassColors
+		EMA.db.healthStatusWidth = settings.healthStatusWidth
+		EMA.db.healthStatusHeight = settings.healthStatusHeight
+		EMA.db.healthStatusShowValues = settings.healthStatusShowValues
+		EMA.db.healthStatusShowPercentage = settings.healthStatusShowPercentage
+		EMA.db.showPowerStatus = settings.showPowerStatus
+		EMA.db.powerStatusWidth = settings.powerStatusWidth
+		EMA.db.powerStatusHeight = settings.powerStatusHeight
+		EMA.db.powerStatusShowValues = settings.powerStatusShowValues
+		EMA.db.powerStatusShowPercentage = settings.powerStatusShowPercentage
+		EMA.db.showComboStatus = settings.showComboStatus
+		EMA.db.comboStatusWidth = settings.comboStatusWidth
+		EMA.db.comboStatusHeight = settings.comboStatusHeight
+		EMA.db.comboStatusShowValues = settings.comboStatusShowValues
+		EMA.db.comboStatusShowPercentage = settings.comboStatusShowPercentage
+		EMA.db.frameAlpha = settings.frameAlpha
+		EMA.db.framePoint = settings.framePoint
+		EMA.db.frameRelativePoint = settings.frameRelativePoint
+		EMA.db.frameXOffset = settings.frameXOffset
+		EMA.db.frameYOffset = settings.frameYOffset
+		EMA.db.frameBackgroundColourR = settings.frameBackgroundColourR
+		EMA.db.frameBackgroundColourG = settings.frameBackgroundColourG
+		EMA.db.frameBackgroundColourB = settings.frameBackgroundColourB
+		EMA.db.frameBackgroundColourA = settings.frameBackgroundColourA
+		EMA.db.frameBorderColourR = settings.frameBorderColourR
+		EMA.db.frameBorderColourG = settings.frameBorderColourG
+		EMA.db.frameBorderColourB = settings.frameBorderColourB
+		EMA.db.frameBorderColourA = settings.frameBorderColourA
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Callbacks.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsToggleShowTeamList( event, checked )
+	EMA.db.showTeamList = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowTeamListOnMasterOnly( event, checked )
+	EMA.db.showTeamListOnMasterOnly = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHideTeamListInCombat( event, checked )
+	EMA.db.hideTeamListInCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleEnableClique( event, checked )
+	EMA.db.enableClique = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeCharactersPerBar( event, value )
+	EMA.db.charactersPerRow = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+
+function EMA:SettingsToggleStackVertically( event, checked )
+	EMA.db.barsAreStackedVertically = checked;
+	EMA.db.teamListHorizontal = checked;
+	EMA:SettingsRefresh();
+end
+
+
+function EMA:SettingsToggleShowTeamListTitle( event, checked )
+	EMA.db.showListTitle = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleOlnyShowinParty( event, checked )
+	EMA.db.olnyShowInParty = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHpManaOutOfParty( event, checked )
+	EMA.db.healthManaOutOfParty = checked
+	EMA:SettingsRefresh()
+end
+
+
+function EMA:SettingsChangeScale( event, value )
+	EMA.db.teamListScale = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeTransparency( event, value )
+	EMA.db.frameAlpha = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeStatusBarTexture( event, value )
+	EMA.db.statusBarTexture = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeBorderStyle( event, value )
+	EMA.db.borderStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeBackgroundStyle( event, value )
+	EMA.db.backgroundStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeFontStyle( event, value )
+	EMA.db.fontStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeFontSize( event, value )
+	EMA.db.fontSize = value
+	EMA:SettingsRefresh()
+end
+
+
+function EMA:SettingsToggleShowPortrait( event, checked )
+	EMA.db.showCharacterPortrait = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangePortraitWidth( event, value )
+	EMA.db.characterPortraitWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowFollowStatus( event, checked )
+	EMA.db.showFollowStatus = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowFollowStatusName( event, checked )
+	EMA.db.followStatusShowName = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowToolTipInfo( event, checked )
+	EMA.db.showToolTipInfo = checked
+	EMA:SettingsRefresh()
+end
+
+
+function EMA:SettingsChangeFollowStatusWidth( event, value )
+	EMA.db.followStatusWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeFollowStatusHeight( event, value )
+	EMA.db.followStatusHeight = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowExperienceStatus( event, checked )
+	EMA.db.showExperienceStatus = checked
+	EMA:SettingsRefresh()
+end
+--
+
+function EMA:SettingsToggleShowXpStatus( event, checked )
+	EMA.db.showXpStatus = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowArtifactStatus( event, checked )
+	EMA.db.showArtifactStatus = checked
+	EMA:SettingsRefresh()
+end
+--[[
+function EMA:SettingsToggleShowHonorStatus( event, checked )
+	EMA.db.showHonorStatus = checked
+	EMA:SettingsRefresh()
+end
+]]
+function EMA:SettingsToggleShowRepStatus( event, checked )
+	EMA.db.showRepStatus = checked
+	EMA:SettingsRefresh()
+end
+--
+
+function EMA:SettingsToggleShowExperienceStatusValues( event, checked )
+	EMA.db.experienceStatusShowValues = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowExperienceStatusPercentage( event, checked )
+	EMA.db.experienceStatusShowPercentage = checked
+	EMA.SettingsRefresh()
+end
+
+function EMA:SettingsChangeExperienceStatusWidth( event, value )
+	EMA.db.experienceStatusWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeExperienceStatusHeight( event, value )
+	EMA.db.experienceStatusHeight = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowHealthStatus( event, checked )
+	EMA.db.showHealthStatus = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowClassColors( event, checked )
+	EMA.db.showClassColors = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowHealthStatusValues( event, checked )
+	EMA.db.healthStatusShowValues = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowHealthStatusPercentage( event, checked )
+	EMA.db.healthStatusShowPercentage = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeHealthStatusWidth( event, value )
+	EMA.db.healthStatusWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeHealthStatusHeight( event, value )
+	EMA.db.healthStatusHeight = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowPowerStatus( event, checked )
+	EMA.db.showPowerStatus = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowPowerStatusValues( event, checked )
+	EMA.db.powerStatusShowValues = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowPowerStatusPercentage( event, checked )
+	EMA.db.powerStatusShowPercentage = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangePowerStatusWidth( event, value )
+	EMA.db.powerStatusWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangePowerStatusHeight( event, value )
+	EMA.db.powerStatusHeight = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowComboStatus( event, checked )
+	EMA.db.showComboStatus = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowComboStatusValues( event, checked )
+	EMA.db.comboStatusShowValues = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowComboStatusPercentage( event, checked )
+	EMA.db.comboStatusShowPercentage = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeComboStatusWidth( event, value )
+	EMA.db.comboStatusWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeComboStatusHeight( event, value )
+	EMA.db.comboStatusHeight = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsBackgroundColourPickerChanged( event, r, g, b, a )
+	EMA.db.frameBackgroundColourR = r
+	EMA.db.frameBackgroundColourG = g
+	EMA.db.frameBackgroundColourB = b
+	EMA.db.frameBackgroundColourA = a
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsBorderColourPickerChanged( event, r, g, b, a )
+	EMA.db.frameBorderColourR = r
+	EMA.db.frameBorderColourG = g
+	EMA.db.frameBorderColourB = b
+	EMA.db.frameBorderColourA = a
+	EMA:SettingsRefresh()
+end
+
+--[[
+function EMA:SettingsToggleShowEquippedOnly( event, checked )
+	EMA.db.ShowEquippedOnly = checked
+	EMA:SettingsRefresh()
+end ]]
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Commands.
+-------------------------------------------------------------------------------------------------------------
+
+-- A EMA command has been recieved.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	EMA:DebugMessage( "EMAOnCommandReceived", characterName )
+	--EMA:Print("DebugCommandReceived", characterName, commandName )
+	if commandName == EMA.COMMAND_FOLLOW_STATUS_UPDATE then
+		EMA:ProcessUpdateFollowStatusMessage( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_EXPERIENCE_STATUS_UPDATE then
+		EMA:ProcessUpdateExperienceStatusMessage( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_REPUTATION_STATUS_UPDATE then
+		EMA:ProcessUpdateReputationStatusMessage( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_COMBO_STATUS_UPDATE then
+		EMA:ProcessUpdateComboStatusMessage( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_COMBAT_STATUS_UPDATE then
+		EMA:ProcessUpdateCombatStatusMessage( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_HEALTH_STATUS_UPDATE then
+		EMA:ProcessUpdateHealthStatusMessage( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_POWER_STATUS_UPDATE then
+		EMA:ProcessUpdatePowerStatusMessage(characterName, ... )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Shared Media Callbacks
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:LibSharedMedia_Registered()
+end
+
+function EMA:LibSharedMedia_SetGlobal()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Status Bar Updates.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Range Status Bar Updates.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:RangeUpdateCommand()
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		--EMA:Print("name", characterName )
+		local name = Ambiguate( characterName, "none" )
+		local range = UnitInRange( name )
+
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Follow Status Bar Updates.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:AUTOFOLLOW_BEGIN( event, name, ... )
+	if EMA.isFollowing == false then
+		EMA:ScheduleTimer( "SendFollowStatusUpdateCommand", 1 , true)
+		EMA.isFollowing = true
+	end
+end
+
+function EMA:AUTOFOLLOW_END( event, ... )
+	EMA:ScheduleTimer( "SendFollowStatusUpdateCommand", 1 , false )
+end
+
+
+function EMA:SendFollowStatusUpdateCommand( isFollowing )
+	if EMA.db.showTeamList == true and EMA.db.showFollowStatus == true then
+		local canSend = false
+		local alpha = AutoFollowStatus:GetAlpha()
+		--EMA:Print("testA", alpha)
+		if alpha < 1 then
+			canSend = true
+			EMA.isFollowing = false
+		end
+		if isFollowing == true then
+			canSend = true
+		end
+		-- Check to see if EMAFollow is enabled and follow strobing is on.  If this is the case then
+		-- do not send the follow update.
+		if EMAApi.Follow ~= nil then
+			if EMAApi.Follow.IsFollowingStrobing() == true then
+				canSend = false
+			end
+		end
+		--EMA:Print("canSend", canSend )
+		if canSend == true then
+			if EMA.db.showTeamListOnMasterOnly == true then
+				EMA:EMASendCommandToMaster( EMA.COMMAND_FOLLOW_STATUS_UPDATE, isFollowing )
+			else
+				EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_STATUS_UPDATE, isFollowing )
+			end
+		end
+	end
+end
+
+
+function EMA:ProcessUpdateFollowStatusMessage( characterName, isFollowing )
+	EMA:UpdateFollowStatus( characterName, isFollowing )
+end
+
+function EMA:UpdateFollowStatus( characterName, isFollowing )
+	--EMA:Print("follow", characterName, "follow", isFollowing)
+	if CanDisplayTeamList() == false then
+		return
+	end
+	if EMA.db.showFollowStatus == false then
+		return
+	end
+	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	if characterStatusBar == nil then
+		return
+	end
+	local followBar = characterStatusBar["followBar"]
+	if isFollowing == true then
+		-- Following.
+		followBar:SetStatusBarColor( 0.05, 0.85, 0.05, 1.00 )
+		LibButtonGlow.HideOverlayGlow(followBar)
+	else
+		if isFollowLeader == true then
+			-- Follow leader.
+			followBar:SetStatusBarColor( 0.55, 0.15, 0.15, 0.25 )
+			LibButtonGlow.HideOverlayGlow(followBar)
+		else
+			-- Not following.
+		LibButtonGlow.ShowOverlayGlow(followBar)
+		followBar:SetStatusBarColor( 0.85, 0.05, 0.05, 1.00 )
+		EMA:ScheduleTimer("EndGlowFollowBar", 2 , followBar)
+		end
+	end
+end
+
+function EMA:EndGlowFollowBar(frame)
+	LibButtonGlow.HideOverlayGlow(frame)
+end
+
+-- TEXT and Combat updates
+
+function EMA:SendCombatStatusUpdateCommand()
+	local inCombat = UnitAffectingCombat("player")
+	--EMA:Print("canSend", inCombat)
+	if EMA.db.showTeamListOnMasterOnly == true then
+		EMA:EMASendCommandToMaster( EMA.COMMAND_COMBAT_STATUS_UPDATE, inCombat )
+	else
+		EMA:EMASendCommandToTeam( EMA.COMMAND_COMBAT_STATUS_UPDATE, inCombat )
+	end
+end
+
+function EMA:SettingsUpdateFollowTextAll()
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		EMA:SettingsUpdateFollowText( characterName, nil )
+	end
+end
+
+
+function EMA:ProcessUpdateCombatStatusMessage( characterName, inCombat )
+--	EMA:Print("test", characterName, inCombat )
+	EMA:SettingsUpdateFollowText( characterName, inCombat )
+end
+
+
+function EMA:SettingsUpdateFollowText( characterName, inCombat )
+	--EMA:Print("FollowTextInfo", characterName, inCombat) -- debug
+	if CanDisplayTeamList() == false then
+		return
+	end
+	if EMA.db.showFollowStatus == false then
+		return
+	end
+	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	if characterStatusBar == nil then
+		return
+	end
+	local followBarText = characterStatusBar["followBarText"]
+
+	if inCombat == true then
+		followBarText:SetTextColor(1.0, 0.5, 0.25)
+	else
+		followBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	end
+
+	local text = ""
+	if EMA.db.followStatusShowName == true then
+		text = text..Ambiguate( characterName, "none" )
+	end
+	followBarText:SetText( text )
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Experience Status Bar Updates.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:PLAYER_XP_UPDATE( event, ... )
+	EMA:SendExperienceStatusUpdateCommand()
+end
+
+function EMA:UPDATE_EXHAUSTION( event, ... )
+	--TODO This Event Is Spaming so we have turned it off for now it does it in rested areas
+	--EMA:Print("testSpam")
+	--EMA:SendExperienceStatusUpdateCommand()
+end
+
+function EMA:PLAYER_LEVEL_UP( event, ... )
+	EMA:SendExperienceStatusUpdateCommand()
+end
+
+function EMA:ARTIFACT_XP_UPDATE(event, ...)
+	EMA:SendExperienceStatusUpdateCommand()
+end
+
+--[[ CLEAN UP FOR 8.0
+function EMA:HONOR_XP_UPDATE(event, arg1, agr2, ...)
+	--EMA:SendExperienceStatusUpdateCommand()
+end
+
+function EMA:HONOR_LEVEL_UPDATE(event, arg1, agr2, ...)
+	---EMA:SendExperienceStatusUpdateCommand()
+end
+
+function EMA:HONOR_PRESTIGE_UPDATE(event, arg1, agr2, ...)
+	--EMA:SendExperienceStatusUpdateCommand()
+end
+]]
+
+function EMA:SendExperienceStatusUpdateCommand()
+	if EMA.db.showTeamList == true and EMA.db.showExperienceStatus == true then
+		--Player XP
+		local playerExperience = UnitXP( "player" )
+		local playerMaxExperience = UnitXPMax( "player" )
+		local playerMaxLevel = GetMaxPlayerLevel()
+		local playerLevel = UnitLevel("player")
+		local exhaustionStateID, exhaustionStateName, exhaustionStateMultiplier = GetRestState()
+		--Artifact XP
+		local artifactName = "n/a"
+		local artifactXP = 0
+		local artifactForNextPoint = 100
+		local artifactPointsAvailable = 0
+		local artifactPointsSpent = 0
+
+
+	local azeriteItemLocation = C_AzeriteItem.FindActiveAzeriteItem()
+	if (azeriteItemLocation) and HasArtifactEquipped() == false then
+		local azeriteXP, azeriteTotalXP = C_AzeriteItem.GetAzeriteItemXPInfo(azeriteItemLocation)
+		local azeriteLevel = C_AzeriteItem.GetPowerLevel(azeriteItemLocation)
+		local azeriteItem = Item:CreateFromItemLocation(azeriteItemLocation)
+		local azeriteName = azeriteItem:GetItemName()
+		--EMA:Print("test", azeriteName, azeriteXP, azeriteTotalXP )
+		artifactName = azeriteName
+		artifactXP = azeriteXP
+		artifactForNextPoint = azeriteTotalXP
+		artifactPointsAvailable = 0
+		artifactPointsSpent	= 0
+	end
+--Remove From 8.0
+--[[
+		local honorXP = UnitHonor("player")
+		local prestigeLevel = UnitPrestige("Player")
+		local honorMax = UnitHonorMax("player")
+		-- A DityDityHack if capped --Ebony
+		if honorMax == 0 then
+			honorMax = 10000
+		end
+		local HonorLevel = UnitHonorLevel("player")
+		local honorExhaustionStateID = GetHonorRestState()
+		if not (honorexhaustionStateID == 1) then
+			honorExhaustionStateID = 0
+		end
+]]
+		--	EMA:Print("testSend", honorXP, honorMax, HonorLevel, honorExhaustionStateID)
+		if EMA.db.showTeamListOnMasterOnly == true then
+				--EMA:Print("Testtoteam", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend)
+				--EMA:Print("TestTOTEAM", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend)
+				EMA:EMASendCommandToMaster( EMA.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactPointsSpent, artifactForNextPoint, artifactPointsAvailable )--, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID )
+			else
+				--EMA:DebugMessage( "SendExperienceStatusUpdateCommand TO TEAM!" )
+				--EMA:Print("TestTOTEAM", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend)
+				EMA:EMASendCommandToTeam( EMA.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactPointsSpent, artifactForNextPoint, artifactPointsAvailable ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID)
+			end
+	end
+end
+
+function EMA:ProcessUpdateExperienceStatusMessage( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactForNextPoint, artifactPointsSpent, artifactPointsAvailable ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID)
+	EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactForNextPoint, artifactPointsSpent, artifactPointsAvailable ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID )
+end
+
+function EMA:SettingsUpdateExperienceAll()
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil) --, nil, nil, nil, nil, nil )
+	end
+end
+
+function EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactPointsSpent, artifactForNextPoint, artifactPointsAvailable) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID )
+--	EMA:Print( "UpdateExperienceStatus", characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel)
+--	EMA:Print("ArtTest", characterName, "name", artifactName, "xp", artifactXP, "Points", artifactForNextPoint, artifactPointsAvailable)
+--	EMA:Print("honorTest", characterName, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID)
+	if CanDisplayTeamList() == false then
+		return
+	end
+	if EMA.db.showExperienceStatus == false then
+		return
+	end
+	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	if characterStatusBar == nil then
+		return
+	end
+
+	local experienceBarText = characterStatusBar["experienceBarText"]
+	local experienceBar = characterStatusBar["experienceBar"]
+
+	local experienceArtBarText = characterStatusBar["experienceArtBarText"]
+	if characterStatusBar["experienceArtBarText"] == nil then
+		return
+	end
+	local experienceArtBar = characterStatusBar["experienceArtBar"]
+	if characterStatusBar["experienceArtBar"] == nil then
+		return
+	end
+--[[
+	local experienceHonorBarText = characterStatusBar["experienceHonorBarText"]
+	if characterStatusBar["experienceHonorBarText"] == nil then
+		return
+	end
+	local experienceHonorBar = characterStatusBar["experienceHonorBar"]
+	if characterStatusBar["experienceHonorBar"] == nil then
+		return
+	end
+]]
+	if playerExperience == nil then
+		playerExperience = experienceBarText.playerExperience
+	end
+	if playerMaxExperience == nil then
+		playerMaxExperience = experienceBarText.playerMaxExperience
+	end
+	if exhaustionStateID == nil then
+		exhaustionStateID = experienceBarText.exhaustionStateID
+	end
+	if playerLevel == nil then
+		playerLevel = experienceBarText.playerLevel
+	end
+	if artifactName == nil then
+		artifactName = experienceArtBarText.artifactName
+	end
+
+	if artifactXP == nil then
+		artifactXP = experienceArtBarText.artifactXP
+	end
+	if artifactPointsSpent == nil then
+		artifactPointsSpent = experienceArtBarText.artifactPointsSpent
+	end
+	if artifactForNextPoint == nil then
+		artifactForNextPoint = experienceArtBarText.artifactForNextPoint
+	end
+
+	if artifactPointsAvailable == nil then
+		artifactPointsAvailable = experienceArtBarText.artifactPointsAvailable
+	end
+--[[
+	if honorXP == nil then
+		honorXP = experienceHonorBarText.honorXP
+	end
+
+	if honorMax == nil then
+		honorMax = experienceHonorBarText.honorMax
+	end
+
+	if HonorLevel == nil then
+		honorLevel = experienceHonorBarText.honorLevel
+	end
+
+	if honorExhaustionStateID == nil then
+		honorExhaustionStateID = experienceHonorBarText.honorExhaustionStateID
+	end
+]]
+	experienceBarText.playerExperience = playerExperience
+	experienceBarText.playerMaxExperience = playerMaxExperience
+	experienceBarText.exhaustionStateID = exhaustionStateID
+	experienceBarText.playerLevel = playerLevel
+	experienceArtBarText.artifactName = artifactName
+	experienceArtBarText.artifactXP = artifactXP
+	experienceArtBarText.artifactPointsSpent = artifactPointsSpent
+	experienceArtBarText.artifactForNextPoint = artifactForNextPoint
+	experienceArtBarText.artifactPointsAvailable = artifactPointsAvailable
+--[[
+	experienceHonorBarText.honorXP = honorXP
+	experienceHonorBarText.honorMax = honorMax
+	experienceHonorBarText.honorLevel = honorLevel
+	experienceHonorBarText.honorExhaustionStateID = honorExhaustionStateID
+]]
+	local min, max = math.min(0, playerExperience), playerMaxExperience
+
+	experienceBar:SetAnimatedValues(playerExperience, min, max , playerLevel)
+	experienceArtBar:SetAnimatedValues(artifactXP, 0, artifactForNextPoint, artifactPointsAvailable + artifactPointsSpent)
+--	experienceHonorBar:SetAnimatedValues(honorXP, 0, honorMax, honorLevel)
+
+	local text = ""
+	if EMA.db.experienceStatusShowValues == true then
+		text = text..tostring( AbbreviateLargeNumbers(playerExperience) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxExperience) )..L[" "]
+	end
+	if EMA.db.experienceStatusShowPercentage == true then
+		if EMA.db.experienceStatusShowValues == true then
+			text = tostring( AbbreviateLargeNumbers(playerExperience) )..L[" "]..L["("]..tostring( floor( (playerExperience/playerMaxExperience)*100) )..L["%"]..L[")"]
+		else
+			text = tostring( floor( (playerExperience/playerMaxExperience)*100) )..L["%"]
+		end
+	end
+	experienceBarText:SetText( text )
+	if exhaustionStateID == 1 then
+		experienceBar:SetStatusBarColor( 0.0, 0.39, 0.88, 1.0 )
+		experienceBar.backgroundTexture:SetColorTexture( 0.0, 0.39, 0.88, 0.15 )
+	else
+		experienceBar:SetStatusBarColor( 0.58, 0.0, 0.55, 1.0 )
+		experienceBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
+	end
+
+--ArtText
+	local artText = ""
+	--EMA:Print("TextTest", artifactXP, artifactForNextPoint)
+	if EMA.db.experienceStatusShowValues == true and EMA.db.experienceStatusShowPercentage == false then
+		artText = artText..tostring( AbbreviateLargeNumbers(artifactXP ) )..L[" / "]..tostring( AbbreviateLargeNumbers(artifactForNextPoint) )..L[" "]
+	end
+	if EMA.db.experienceStatusShowPercentage == true then
+		if EMA.db.experienceStatusShowValues == true then
+			artText = artText..L["("]..tostring( AbbreviateLargeNumbers(artifactXP ) )..L[" "]..tostring( floor( (artifactXP/artifactForNextPoint)*100) )..L["%"]..L[")"]
+		else
+			artText = artText..L["("]..tostring( floor( (artifactXP/artifactForNextPoint)*100) )..L["%"]..L[")"]
+		end
+	end
+	if artifactPointsAvailable > 0 then
+		artText = artText..L[" "].."[+ "..artifactPointsAvailable.."]"
+	end
+	--EMA:Print("arttest", artText)
+	experienceArtBarText:SetText( artText )
+	experienceArtBar:SetStatusBarColor( 0.901, 0.8, 0.601, 1.0 )
+	experienceArtBar.backgroundTexture:SetColorTexture( 0.901, 0.8, 0.601, 0.20 )
+
+--[[
+	--HonorText
+	local honorText = ""
+	if EMA.db.showExpInfo == true then
+		if prestigeLevel > 0 then
+			honorText = honorText..prestigeLevel.."-"..honorLevel..L[" "]
+		else
+			honorText = honorText..honorLevel..L[" "]
+		end
+	end
+	if EMA.db.experienceStatusShowValues == true then
+		honorText = honorText..tostring( AbbreviateLargeNumbers(honorXP) )..L[" / "]..tostring( AbbreviateLargeNumbers(honorMax) )..L[" "]
+	end
+	if EMA.db.experienceStatusShowPercentage == true then
+		if EMA.db.experienceStatusShowValues == true then
+			honorText = honorText..tostring( AbbreviateLargeNumbers(honorXP) )..L[" "]..L["("]..tostring( floor( (honorXP/honorMax)*100) )..L["%"]..L[")"]
+		else
+			honorText = honorText..L["("]..tostring( floor( (honorXP/honorMax)*100) )..L["%"]..L[")"]
+		end
+	end
+	experienceHonorBarText:SetText( honorText )
+	if honorExhaustionStateID == 1 then
+		experienceHonorBar:SetStatusBarColor( 1.0, 0.71, 0.0, 1.0 )
+		experienceHonorBar.backgroundTexture:SetColorTexture( 1.0, 0.71, 0.0, 0.20 )
+	else
+		experienceHonorBar:SetStatusBarColor( 1.0, 0.24, 0.0, 1.0 )
+		experienceHonorBar.backgroundTexture:SetColorTexture( 1.0, 0.24, 0.0, 0.20 )
+	end
+]]
+end
+
+
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Reputation Status Bar Updates.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:CHAT_MSG_COMBAT_FACTION_CHANGE( event, ... )
+	EMA:SendReputationStatusUpdateCommand()
+end
+
+function EMA:SetWatchedFactionIndex( index )
+	EMA:ScheduleTimer( "SendReputationStatusUpdateCommand", 5 )
+end
+
+function EMA:SendReputationStatusUpdateCommand()
+	if EMA.db.showTeamList == true and EMA.db.showRepStatus == true then
+		local reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue = GetWatchedFactionInfo()
+		if EMA.db.showTeamListOnMasterOnly == true then
+			EMA:EMASendCommandToMaster( EMA.COMMAND_REPUTATION_STATUS_UPDATE, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue )
+		else
+			EMA:EMASendCommandToTeam( EMA.COMMAND_REPUTATION_STATUS_UPDATE, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue )
+		end
+	end
+end
+
+function EMA:ProcessUpdateReputationStatusMessage( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue)
+	EMA:UpdateReputationStatus( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue)
+end
+
+function EMA:SettingsUpdateReputationAll()
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		EMA:UpdateReputationStatus( characterName, nil, nil, nil, nil, nil, nil )
+	end
+end
+
+function EMA:UpdateReputationStatus( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue)
+	if CanDisplayTeamList() == false then
+		return
+	end
+	if EMA.db.showRepStatus == false then
+		return
+	end
+	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	if characterStatusBar == nil then
+		return
+	end
+	local reputationBarText = characterStatusBar["reputationBarText"]
+	local reputationBar = characterStatusBar["reputationBar"]
+	if reputationName == nil then
+		reputationName = reputationBarText.reputationName
+	end
+	if reputationStandingID == nil then
+		reputationStandingID = reputationBarText.reputationStandingID
+	end
+	if reputationBarMin == nil then
+		reputationBarMin = reputationBarText.reputationBarMin
+	end
+	if reputationBarMax == nil then
+		reputationBarMax = reputationBarText.reputationBarMax
+	end
+	if reputationBarValue == nil then
+		reputationBarValue = reputationBarText.reputationBarValue
+	end
+	reputationBarText.reputationName = reputationName
+	reputationBarText.reputationStandingID = reputationStandingID
+	reputationBarText.reputationBarMin = reputationBarMin
+	reputationBarText.reputationBarMax = reputationBarMax
+	reputationBarText.reputationBarValue = reputationBarValue
+
+	--reputationBar:SetMinMaxValues( tonumber( reputationBarMin ), tonumber( reputationBarMax ) )
+	--reputationBar:SetValue( tonumber( reputationBarValue ) )
+	reputationBar:SetAnimatedValues(reputationBarValue, reputationBarMin, reputationBarMax, 0 )
+
+   if reputationName == 0 then
+        reputationBarMin = 0
+        reputationBarMax = 100
+        reputationBarValue = 100
+        reputationStandingID = 1
+    end
+--[[
+	if 	UnitInParty(Ambiguate( characterName, "none" ) ) == true then
+		if range == false then
+			reputationBar:SetAlpha( 0.5 )
+		else
+			reputationBar:SetAlpha( 1 )
+		end
+	else
+		reputationBar:SetAlpha( 1 )
+	end
+--]]
+	local text = ""
+	if EMA.db.experienceStatusShowValues == true then
+		text = text..tostring( AbbreviateLargeNumbers(reputationBarValue-reputationBarMin) )..L[" / "]..tostring( AbbreviateLargeNumbers(reputationBarMax-reputationBarMin) )..L[" "]
+	end
+	if EMA.db.experienceStatusShowPercentage == true then
+		local textPercentage = tostring( floor( (reputationBarValue-reputationBarMin)/(reputationBarMax-reputationBarMin)*100 ) )..L["%"]
+		if EMA.db.experienceStatusShowValues == true then
+			text = tostring( AbbreviateLargeNumbers(reputationBarValue-reputationBarMin) )..L[" "]..L["("]..textPercentage..L[")"]
+		else
+			text = text..textPercentage
+		end
+	end
+	reputationBarText:SetText( text )
+	local barColor = _G.FACTION_BAR_COLORS[reputationStandingID]
+	if barColor ~= nil then
+		reputationBar:SetStatusBarColor( barColor.r, barColor.g, barColor.b, 1.0 )
+		reputationBar.backgroundTexture:SetColorTexture( barColor.r, barColor.g, barColor.b, 0.15 )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Health Status Bar Updates.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:UNIT_HEALTH( event, unit, ... )
+	--EMA:Print("test2", unit)
+	EMA:SendHealthStatusUpdateCommand( unit )
+end
+
+function EMA:UNIT_MAXHEALTH( event, unit, ... )
+	--EMA:Print("sendtest2", unit )
+	EMA:SendHealthStatusUpdateCommand( unit )
+end
+
+function EMA:UNIT_HEAL_PREDICTION( event, unit, ... )
+	--EMA:Print("test2", unit)
+	EMA:SendHealthStatusUpdateCommand( unit )
+end
+
+
+function EMA:SendHealthStatusUpdateCommand(unit)
+	--EMA:Print("debugHealthUpd", unit )
+	if unit == nil then
+		return
+	end
+	if EMA.db.showTeamList == true and EMA.db.showHealthStatus == true then
+		if EMA.db.healthManaOutOfParty == true then
+			if unit == "player" then
+				--EMA:Print("itsme", unit)
+				local playerHealth = UnitHealth( unit )
+				local playerMaxHealth = UnitHealthMax( unit )
+				local inComingHeal = UnitGetIncomingHeals( unit )
+				local _, class = UnitClass ("player")
+
+				if EMA.db.showTeamListOnMasterOnly == true then
+					--EMA:Print( "SendHealthStatusUpdateCommand TO Master!" )
+					EMA:EMASendCommandToMaster( EMA.COMMAND_HEALTH_STATUS_UPDATE, playerHealth, playerMaxHealth, inComingHeal, class )
+				else
+					--EMA:Print( "SendHealthStatusUpdateCommand TO Team!" )
+					EMA:EMASendCommandToTeam( EMA.COMMAND_HEALTH_STATUS_UPDATE, playerHealth, playerMaxHealth, inComingHeal, class )
+				end
+			end
+		else
+			local playerHealth = UnitHealth( unit )
+			local playerMaxHealth = UnitHealthMax( unit )
+			local inComingHeal = UnitGetIncomingHeals( unit )
+			local characterName, characterRealm = UnitName( unit )
+			local _, class = UnitClass ( unit )
+			local character = EMAUtilities:AddRealmToNameIfNotNil( characterName, characterRealm )
+			--EMA:Print("HeathStats", character, playerHealth, playerMaxHealth)
+			EMA:UpdateHealthStatus( character, playerHealth, playerMaxHealth, inComingHeal, class)
+		end
+	end
+end
+
+function EMA:ProcessUpdateHealthStatusMessage( characterName, playerHealth, playerMaxHealth, inComingHeal, class )
+	EMA:UpdateHealthStatus( characterName, playerHealth, playerMaxHealth, inComingHeal, class)
+end
+
+function EMA:SettingsUpdateHealthAll()
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		EMA:UpdateHealthStatus( characterName, nil, nil, nil, nil )
+	end
+end
+
+function EMA:UpdateHealthStatus( characterName, playerHealth, playerMaxHealth, inComingHeal, class )
+	--EMA:Print("testUpdate", characterName, playerHealth, playerMaxHealth, inComingHeal, class )
+		if characterName == nil then
+		return
+	end
+	if CanDisplayTeamList() == false then
+		return
+	end
+	if EMA.db.showHealthStatus == false then
+		return
+	end
+	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	if characterStatusBar == nil then
+		return
+	end
+	local healthBarText = characterStatusBar["healthBarText"]
+	local healthBar = characterStatusBar["healthBar"]
+	local healthIncomingBar = characterStatusBar["healthIncomingBar"]
+
+	if playerMaxHealth == 0 then
+		playerMaxHealth = healthBarText.playerMaxHealth
+	end
+	if playerHealth == nil then
+		playerHealth = healthBarText.playerHealth
+	end
+	if playerMaxHealth == nil then
+		playerMaxHealth = healthBarText.playerMaxHealth
+	end
+	if inComingHeal == nil then
+		inComingHeal = healthBarText.inComingHeal
+	end
+	healthBarText.playerHealth = playerHealth
+	healthBarText.playerMaxHealth = playerMaxHealth
+	healthBarText.inComingHeal = inComingHeal
+	-- Set statusBar
+	healthBar:SetMinMaxValues( 0, tonumber( playerMaxHealth ) )
+	healthBar:SetValue( tonumber( playerHealth ) )
+	healthIncomingBar:SetMinMaxValues( 0, tonumber( playerMaxHealth ) )
+	healthIncomingBar:SetValue( tonumber( playerHealth ) )
+
+	if inComingHeal > 0 then
+--	EMA:Print("incomingHeal", inComingHeal)
+		healthIncomingBar:SetValue( tonumber( playerHealth + inComingHeal ) )
+		healthIncomingBar:SetStatusBarColor( 0, 1, 0, 1 )
+	end
+	local text = ""
+	if UnitIsDeadOrGhost(Ambiguate( characterName, "none" ) ) == true then
+		--EMA:Print("dead", characterName)
+		text = text..L["DEAD"]
+	else
+		if EMA.db.healthStatusShowValues == true then
+			text = text..tostring( AbbreviateLargeNumbers(playerHealth) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxHealth) )..L[" "]
+		end
+		if EMA.db.healthStatusShowPercentage == true then
+			if EMA.db.healthStatusShowValues == true then
+				text = tostring( AbbreviateLargeNumbers(playerHealth) )..L[" "]..L["("]..tostring( floor( (playerHealth/playerMaxHealth)*100) )..L["%"]..L[")"]
+			else
+				text = tostring( floor( (playerHealth/playerMaxHealth)*100) )..L["%"]
+			end
+		end
+	end
+	healthBarText:SetText( text )
+	EMA:SetStatusBarColourForHealth( healthBar, floor((playerHealth/playerMaxHealth)*100), characterName, class)
+end
+
+-- TODO Support for classColors
+function EMA:SetStatusBarColourForHealth( statusBar, statusValue, characterName, class )
+	--EMA:Print("colour class", statusValue, characterName)
+	local classColor = RAID_CLASS_COLORS[class]
+	if classColor ~= nil and EMA.db.showClassColors == true then
+		-- EMA:Print("test", characterName, class, classColor.r, classColor.g, classColor.b )
+		local r = classColor.r
+		local g = classColor.g
+		local b = classColor.b
+		statusBar:SetStatusBarColor( r, g, b, 1 )
+	else
+		local r, g, b = 0, 0, 0
+		statusValue = statusValue / 100
+		if( statusValue > 0.5 ) then
+			r = (1.0 - statusValue) * 2
+			g = 1.0
+		else
+			r = 1.0
+			g = statusValue * 2
+		end
+		b = b
+		statusBar:SetStatusBarColor( r, g, b )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Power Status Bar Updates.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:UNIT_POWER( event, unit, ... )
+	EMA:SendPowerStatusUpdateCommand( unit )
+end
+
+function EMA:UNIT_DISPLAYPOWER( event, unit, ... )
+	EMA:SendPowerStatusUpdateCommand( unit )
+end
+
+function EMA:SendPowerStatusUpdateCommand( unit )
+	if EMA.db.showTeamList == true and EMA.db.showPowerStatus == true then
+		if EMA.db.healthManaOutOfParty == true then
+			if unit == "player" then
+				--EMA:Print("itsme", unit)
+				local playerPower = UnitPower( unit )
+				local playerMaxPower = UnitPowerMax( unit )
+				local _, powerToken = UnitPowerType( unit )
+				if EMA.db.showTeamListOnMasterOnly == true then
+					--EMA:Print( "SendHealthStatusUpdateCommand TO Master!"  )
+					EMA:EMASendCommandToMaster( EMA.COMMAND_POWER_STATUS_UPDATE, playerPower, powerToken )
+				else
+					--EMA:Print( "SendHealthStatusUpdateCommand TO Team!", playerPower, playerMaxPower, powerToken )
+					EMA:EMASendCommandToTeam( EMA.COMMAND_POWER_STATUS_UPDATE, playerPower, playerMaxPower, powerToken )
+				end
+			end
+		else
+			local playerPower = UnitPower( unit )
+			local playerMaxPower = UnitPowerMax( unit )
+			local characterName, characterRealm = UnitName( unit )
+			local _, powerToken = UnitPowerType( unit )
+			local character = EMAUtilities:AddRealmToNameIfNotNil( characterName, characterRealm )
+			--EMA:Print("power", character, playerPower, playerMaxPower )
+			EMA:UpdatePowerStatus( character, playerPower, playerMaxPower, powerToken)
+		end
+	end
+end
+
+function EMA:ProcessUpdatePowerStatusMessage( characterName, playerPower, playerMaxPower, powerToken )
+	EMA:UpdatePowerStatus( characterName, playerPower, playerMaxPower, powerToken )
+end
+
+function EMA:SettingsUpdatePowerAll()
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		EMA:UpdatePowerStatus( characterName, nil, nil, nil )
+	end
+end
+
+function EMA:UpdatePowerStatus( characterName, playerPower, playerMaxPower, powerToken)
+	--EMA:Print("testPOwer", characterName, playerPower, playerMaxPower, powerToken )
+	if characterName == nil then
+		return
+	end
+	if CanDisplayTeamList() == false then
+		return
+	end
+	if EMA.db.showPowerStatus == false then
+		return
+	end
+	local originalChatacterName = characterName
+	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	if characterStatusBar == nil then
+		return
+	end
+	local powerBarText = characterStatusBar["powerBarText"]
+	local powerBar = characterStatusBar["powerBar"]
+
+	if playerMaxPower == 0 then
+		playerMaxPower = powerBarText.playerMaxPower
+	end
+
+	if playerPower == nil then
+		playerPower = powerBarText.playerPower
+	end
+	if playerMaxPower == nil then
+		playerMaxPower = powerBarText.playerMaxPower
+	end
+	powerBarText.playerPower = playerPower
+	powerBarText.playerMaxPower = playerMaxPower
+	powerBar:SetMinMaxValues( 0, tonumber( playerMaxPower ) )
+	powerBar:SetValue( tonumber( playerPower ) )
+	local text = ""
+	if EMA.db.powerStatusShowValues == true then
+		text = text..tostring( AbbreviateLargeNumbers(playerPower) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxPower) )..L[" "]
+	end
+	if EMA.db.powerStatusShowPercentage == true then
+		if EMA.db.powerStatusShowValues == true then
+			text = tostring( AbbreviateLargeNumbers(playerPower) )..L[" "]..L["("]..tostring( floor( (playerPower/playerMaxPower)*100) )..L["%"]..L[")"]
+		else
+			text = tostring( floor( (playerPower/playerMaxPower)*100) )..L["%"]
+		end
+	end
+	powerBarText:SetText( text )
+	EMA:SetStatusBarColourForPower( powerBar, powerToken )--originalChatacterName )
+end
+
+function EMA:SetStatusBarColourForPower( statusBar, powerToken )
+	local info = PowerBarColor[powerToken]
+	if info ~= nil then
+	--	EMA:Print("powertest", powerToken, info.r, info.g, info.b )
+		statusBar:SetStatusBarColor( info.r, info.g, info.b, 1 )
+		statusBar.backgroundTexture:SetColorTexture( info.r, info.g, info.b, 0.25 )
+
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Combo Points Status Bar Updates.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:UNIT_POWER_FREQUENT( event, Unit, powerType, ... )
+	--TODO there got to be a better way to clean this code up Checking to see if its the event we need and then send the command to the update if it is.
+	--EMA:Print("EventTest", Unit, powerType)
+	if Unit == "player" then
+		--EMA:Print("player", Unit, powerType)
+		if( event and powerType == "COMBO_POINTS" ) then
+			EMA:SendComboStatusUpdateCommand()
+		elseif( event and powerType == "SOUL_SHARDS" ) then
+			EMA:SendComboStatusUpdateCommand()
+		elseif( event and powerType == "HOLY_POWER" ) then
+			EMA:SendComboStatusUpdateCommand()
+		elseif( event and powerType == "ARCANE_CHARGES" ) then
+			EMA:SendComboStatusUpdateCommand()
+		elseif( event and powerType == "CHI" ) then
+			EMA:SendComboStatusUpdateCommand()
+		else
+			return
+		end
+	end
+end
+
+function EMA:RUNE_POWER_UPDATE( event, ...)
+	EMA:SendComboStatusUpdateCommand()
+end
+
+function EMA:SendComboStatusUpdateCommand()
+	--EMA:Print("test")
+	if EMA.db.showTeamList == true and EMA.db.showComboStatus == true then
+		-- get powerType from http://wowprogramming.com/docs/api_types#powerType as there no real API to get this infomation as of yet.
+		local Class = select(2, UnitClass("player"))
+		--EMA:Print("class", Class)
+		-- Combo Points
+		if Class == "DRUID" then
+			PowerType = 4
+		-- Combo Points
+		elseif Class == "ROGUE" then
+			PowerType = 4
+		-- Warlock's soulshards
+		elseif Class == "WARLOCK" then
+				PowerType = 7
+		-- Paladin Holy Power
+		elseif Class == "PALADIN" then
+			PowerType = 9
+		-- DEATHKNIGHT Runes
+		elseif Class == "DEATHKNIGHT" then
+			PowerType = 5
+		-- Mage ARCANE_CHARGES
+		elseif Class == "MAGE" then
+			PowerType = 16
+		-- Monk Cil
+		elseif Class == "MONK" then
+			PowerType = 12
+		else
+			return
+		end
+
+		local playerCombo = UnitPower ( "player", PowerType)
+		local playerMaxCombo = UnitPowerMax( "player", PowerType)
+
+		--Deathkight Dity Hacky Hacky.
+		if Class == "DEATHKNIGHT" then
+			for i=1, playerMaxCombo do
+				local start, duration, runeReady = GetRuneCooldown(i)
+					if not runeReady then
+						playerCombo = playerCombo - 1
+					end
+			end
+		end
+		--EMA:Print ("PowerType", PowerType, playerCombo, playerMaxCombo, class)
+		if EMA.db.showTeamListOnMasterOnly == true then
+			EMA:DebugMessage( "SendComboStatusUpdateCommand TO Master!" )
+			EMA:EMASendCommandToMaster( EMA.COMMAND_COMBO_STATUS_UPDATE, playerCombo, playerMaxCombo, class )
+		else
+			EMA:DebugMessage( "SendComboStatusUpdateCommand TO TEAM!" )
+			EMA:EMASendCommandToTeam( EMA.COMMAND_COMBO_STATUS_UPDATE, playerCombo, playerMaxCombo, class )
+		end
+	end
+end
+
+function EMA:ProcessUpdateComboStatusMessage( characterName, playerCombo, playerMaxCombo, class )
+	EMA:UpdateComboStatus( characterName, playerCombo , playerMaxCombo, class)
+end
+
+function EMA:SettingsUpdateComboAll()
+	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
+		EMA:UpdateComboStatus( characterName, nil, nil, nil )
+	end
+end
+
+function EMA:UpdateComboStatus( characterName, playerCombo, playerMaxCombo, class )
+	if CanDisplayTeamList() == false then
+		return
+	end
+
+	if EMA.db.showComboStatus == false then
+		return
+	end
+
+	local characterStatusBar = EMA.characterStatusBar[characterName]
+	if characterStatusBar == nil then
+		return
+	end
+
+	local comboBarText = characterStatusBar["comboBarText"]
+	local comboBar = characterStatusBar["comboBar"]
+
+	if playerCombo == nil then
+		playerCombo = comboBarText.playerCombo
+	end
+	if playerMaxCombo == 0 then
+		playerMaxCombo = comboBarText.playerMaxCombo
+	end
+	if playerMaxCombo == nil then
+		playerMaxCombo = comboBarText.playerMaxCombo
+	end
+
+	comboBarText.playerCombo = playerCombo
+	comboBarText.playerMaxCombo = playerMaxCombo
+	comboBar:SetMinMaxValues( 0, tonumber( playerMaxCombo ) )
+	comboBar:SetValue( tonumber( playerCombo ) )
+	local text = ""
+
+	if EMA.db.comboStatusShowValues == true then
+		text = text..tostring( AbbreviateLargeNumbers(playerCombo) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxCombo) )..L[" "]
+	end
+
+	if EMA.db.ComboStatusShowPercentage == true then
+		if EMA.db.comboStatusShowValues == true then
+			text = text..tostring( AbbreviateLargeNumbers(playerCombo) )..L[" "]..L["("]..tostring( floor( (playerCombo/playerMaxCombo)*100) )..L["%"]..L[")"]
+		else
+			text = tostring( floor( (playerCombo/playerMaxCombo)*100) )..L["%"]
+		end
+	end
+	comboBarText:SetText( text )
+	EMA:SetStatusBarColourForCombo( comboBar, class )
+end
+
+function EMA:SetStatusBarColourForCombo( comboBar, Class )
+	if Class == "WARLOCK" then
+		-- Purple
+		comboBar:SetStatusBarColor( 0.58, 0.51, 0.79, 1 )
+		comboBar.backgroundTexture:SetColorTexture( 0.58, 0.51, 0.79, 0.25)
+	elseif  Class == "PALADIN" then
+		--yellow(gold)
+		comboBar:SetStatusBarColor( 0.96, 0.55, 0.73, 1 )
+		comboBar.backgroundTexture:SetColorTexture( 0.96, 0.55, 0.73, 0.25)
+	elseif Class =="DEATHKNIGHT" then
+		--Sky Blue?
+		comboBar:SetStatusBarColor( 0.60, 0.80, 1.0, 1 )
+		comboBar.backgroundTexture:SetColorTexture( 0.60, 0.80, 1.0, 0.25)
+	elseif Class =="MAGE" then
+		--Very Blue ice?
+		comboBar:SetStatusBarColor( 0.07, 0.30, 0.92, 1 )
+		comboBar.backgroundTexture:SetColorTexture( 0.07, 0.30, 0.92, 0.25)
+	elseif Class =="MONK" then
+		--Greenish
+		comboBar:SetStatusBarColor( 0.44, 0.79, 0.67, 1 )
+		comboBar.backgroundTexture:SetColorTexture( 0.44, 0.79, 0.67, 0.25)
+	else
+		return
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	EMA.previousSlotsFree = 0
+	EMA.previousTotalSlots = 0
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Create the team list frame.
+	CreateEMATeamListFrame()
+	EMA:SetTeamListVisibility()
+	-- Is Following to stop spam
+	EMA.isFollowing = false
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
+	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
+	EMA:RegisterEvent( "AUTOFOLLOW_BEGIN" )
+	EMA:RegisterEvent( "AUTOFOLLOW_END" )
+	EMA:RegisterEvent( "PLAYER_XP_UPDATE" )
+	EMA:RegisterEvent( "UPDATE_EXHAUSTION" )
+	EMA:RegisterEvent( "PLAYER_LEVEL_UP" )
+	EMA:RegisterEvent( "UNIT_HEALTH" )
+	EMA:RegisterEvent( "UNIT_MAXHEALTH" )
+	EMA:RegisterEvent( "UNIT_HEAL_PREDICTION" )
+	--TODO Adds support for 8.0.x
+	if EMAPrivate.Core.isBetaBuild() == true then
+		EMA:RegisterEvent( "UNIT_POWER_UPDATE", "UNIT_POWER" )
+	else
+		EMA:RegisterEvent( "UNIT_POWER", "UNIT_POWER" )
+	end
+	EMA:RegisterEvent( "UNIT_MAXPOWER", "UNIT_POWER" )
+	EMA:RegisterEvent( "UNIT_DISPLAYPOWER" )
+	EMA:RegisterEvent( "CHAT_MSG_COMBAT_FACTION_CHANGE" )
+	EMA:RegisterEvent( "UNIT_POWER_FREQUENT")
+	EMA:RegisterEvent( "RUNE_POWER_UPDATE" )
+	EMA:RegisterEvent( "PLAYER_TALENT_UPDATE")
+	--EMA:RegisterEvent( "HONOR_XP_UPDATE" )
+	--EMA:RegisterEvent( "HONOR_LEVEL_UPDATE" )
+	--EMA:RegisterEvent( "HONOR_PRESTIGE_UPDATE" )
+	EMA:RegisterEvent( "GROUP_ROSTER_UPDATE" )
+	EMA:RegisterEvent( "ARTIFACT_XP_UPDATE" )
+	EMA:RegisterEvent("UNIT_PORTRAIT_UPDATE")
+	EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_Registered" )
+    EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_SetGlobal" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_CHARACTER_ADDED, "OnCharactersChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_CHARACTER_REMOVED, "OnCharactersChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_ORDER_CHANGED, "OnCharactersChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_ONLINE, "OnCharactersChanged")
+	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_OFFLINE, "OnCharactersChanged")
+
+	EMA:SecureHook( "SetWatchedFactionIndex" )
+	EMA:ScheduleTimer( "RefreshTeamListControls", 3 )
+	EMA:ScheduleTimer( "SendExperienceStatusUpdateCommand", 8 )
+	EMA:ScheduleTimer( "SendReputationStatusUpdateCommand", 5 )
+	EMA:ScheduleTimer( "SendHealthStatusUpdateCommand", 5, "player" )
+	EMA:ScheduleTimer( "SendPowerStatusUpdateCommand", 5, "player" )
+	EMA:ScheduleTimer( "SendComboStatusUpdateCommand", 5 )
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+
+function EMA:UpdateAll(event, ...)
+	EMA:ScheduleTimer( "RefreshTeamListControls", 3 )
+	EMA:ScheduleTimer( "SendExperienceStatusUpdateCommand", 2 )
+	EMA:ScheduleTimer( "SendReputationStatusUpdateCommand", 2 )
+	EMA:ScheduleTimer( "SendComboStatusUpdateCommand", 2 )
+end
+
+
+function EMA:OnMasterChanged( message, characterName )
+	EMA:SettingsRefresh()
+end
+
+function EMA:GROUP_ROSTER_UPDATE()
+	EMA:ScheduleTimer( "RefreshTeamListControls", 1 )
+	EMA:ScheduleTimer( "SendExperienceStatusUpdateCommand", 1 )
+	EMA:ScheduleTimer( "SendReputationStatusUpdateCommand", 1 )
+	EMA:ScheduleTimer( "SendComboStatusUpdateCommand", 1 )
+	for index, characterName in EMAApi.TeamListOrderedOnline() do
+		unit = Ambiguate( characterName, "none" )
+		EMA:ScheduleTimer( "SendHealthStatusUpdateCommand", 2, unit )
+		EMA:ScheduleTimer( "SendPowerStatusUpdateCommand", 2, unit )
+	end
+end
+
+function EMA:UNIT_PORTRAIT_UPDATE(event, ...)
+	if EMA.db.showCharacterPortrait == true then
+		EMA:RefreshTeamListControls()
+	end
+end
+
+function EMA:PLAYER_REGEN_ENABLED( event, ... )
+	if EMA.db.hideTeamListInCombat == true then
+		EMA:SetTeamListVisibility()
+	end
+	if EMA.refreshHideTeamListControlsPending == true then
+		EMA:RefreshTeamListControlsHide()
+		EMA.refreshHideTeamListControlsPending = false
+	end
+	if EMA.refreshShowTeamListControlsPending == true then
+		EMA:RefreshTeamListControlsShow()
+		EMA.refreshShowTeamListControlsPending = false
+	end
+	if EMA.updateSettingsAfterCombat == true then
+		EMA:SettingsRefresh()
+		EMA.updateSettingsAfterCombat = false
+	end
+	-- Ebony added follow bar combat Text Change To Orange
+	if EMA.db.showTeamList == true and EMA.db.showFollowStatus == true then
+		EMA:ScheduleTimer( "SendCombatStatusUpdateCommand", 1 )
+	end
+end
+
+function EMA:PLAYER_REGEN_DISABLED( event, ... )
+	if EMA.db.hideTeamListInCombat == true then
+		EMADisplayTeamListFrame:Hide()
+	end
+	-- Ebony added follow bar Combat Text Change To Orange
+	if EMA.db.showTeamList == true and EMA.db.showFollowStatus == true then
+		EMA:ScheduleTimer( "SendCombatStatusUpdateCommand", 1 )
+	end
+end
+
+function EMA:PLAYER_TALENT_UPDATE(event, ...)
+	EMA:SendComboStatusUpdateCommand()
+	EMA:ScheduleTimer( "SendExperienceStatusUpdateCommand", 1 )
+end
+
+function EMA:OnCharactersChanged()
+	EMA:RefreshTeamListControls()
+end
+
diff --git a/EMA/Modules/Follow.lua b/EMA/Modules/Follow.lua
new file mode 100644
index 0000000..539e410
--- /dev/null
+++ b/EMA/Modules/Follow.lua
@@ -0,0 +1,1311 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "EMA" that is 								--
+--				Released under the MIT License 										--
+--				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Follow",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceTimer-3.0"
+)
+
+-- Get the EMA Utilities Library.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Follow"
+EMA.settingsDatabaseName = "FollowProfileDB"
+EMA.chatCommand = "ema-follow"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["TOON"]
+EMA.moduleDisplayName = L["FOLLOW"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\FollowIcon.tga"
+-- order
+EMA.moduleOrder = 50
+
+-- EMA key bindings.
+
+BINDING_HEADER_F0LLOW = L["FOLLOW_BINDING_HEADER"]
+BINDING_NAME_FOLLOWME = L["FOLLOW_ME"]
+BINDING_NAME_FOLLOWSTROBEME = L["FOLLOW_STROBE_ME"]
+BINDING_NAME_FOLLOWSTROBEOFF = L["FOLLOW_STROBE_OFF"]
+BINDING_NAME_FOLLOWTEAIN = L["FOLLOW_TRAIN"]
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		warnWhenFollowBreaks = true,
+		followBrokenMessage = L["FOLLOW_BROKEN_MSG"],
+		autoFollowAfterCombat = false,
+		useAfterCombatDelay = false,
+		afterCombatDelay = "3",
+		strobeFrequencySeconds = "1",
+		strobeFrequencySecondsInCombat = "1",
+		doNotWarnFollowBreakInCombat = false,
+		doNotWarnFollowBreakMembersInCombat = false,
+		doNotWarnFollowStrobing = false,
+		strobePauseInCombat = false,
+		strobePauseIfDrinking = false,
+		strobePauseIfInVehicle = false,
+		strobePauseTag = EMAApi.AllTag(),
+		warningArea = EMAApi.DefaultWarningArea(),
+		followMaster = "",
+		useFollowMaster = false,
+		overrideStrobeTargetWithMaster = false,
+		onlyWarnIfOutOfFollowRange = false,
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-follow push",
+				get = false,
+				set = "EMASendSettings",
+			},
+			master = {
+				type = "input",
+				name = L["FOLLOW_MASTER"],
+				desc = L["FOLLOW_MASTER_HELP"],
+				usage = "/EMA-follow master <tag>",
+				get = false,
+				set = "FollowMasterCommand",
+			},
+			target = {
+				type = "input",
+				name = L["FOLLOW_TARGET"],
+				desc = L["FOLLOW_TARGET_HELP"],
+				usage = "/EMA-follow target <target> <tag>",
+				get = false,
+				set = "FollowTargetCommand",
+			},
+			afterCombat = {
+				type = "input",
+				name = L["FOLLOW_AFTER_COMBAT"],
+				desc = L["FOLLOW_AFTER_COMBAT_HELP"],
+				usage = "/EMA-follow aftercombat <on|off> <tag>",
+			},
+			strobeOn = {
+				type = "input",
+				name = L["FOLLOW_STROBING"],
+				desc = L["FOLLOW_STROBING_HELP"],
+				usage = "/EMA-follow strobeon <target> <tag>",
+				get = false,
+				set = "FollowStrobeOnCommand",
+			},
+			strobeOnMe = {
+				type = "input",
+				name = L["FOLLOW_STROBING_ME"],
+				desc = L["FOLLOW_STROBING_ME_HELP"],
+				usage = "/EMA-follow strobeonme <tag>",
+				get = false,
+				set = "FollowStrobeOnMeCommand",
+			},
+			strobeOff = {
+				type = "input",
+				name = L["FOLLOW_STROBING_END"],
+				desc = L["FOLLOW_STROBING_END_HELP"],
+				usage = "/EMA-follow strobeoff <tag>",
+				get = false,
+				set = "FollowStrobeOffCommand",
+			},
+			setmaster = {
+				type = "input",
+				name = L["FOLLOW_SET_MASTER"],
+				desc = L["FOLLOW_SET_MASTER_HELP"],
+				usage = "/EMA-follow setmaster <name> <tag>",
+				get = false,
+				set = "CommandSetFollowMaster",
+			},
+			train = {
+				type = "input",
+				name = L["TRAIN"],
+				desc = L["TRAIN_HELP"],
+				usage = "/EMA-follow train <tag>",
+				get = false,
+				set = "CommandFollowTrain",
+			},
+			me = {
+				type = "input",
+				name = L["FOLLOW_ME"],
+				desc = L["FOLLOW_ME_HELP"],
+				usage = "/EMA-follow me <tag>",
+				get = false,
+				set = "CommandFollowMe",
+			},
+			snw = {
+				type = "input",
+				name = L["SNW"],
+				desc = L["SNW_HELP"],
+				usage = "/EMA-follow snw",
+				get = false,
+				set = "SuppressNextFollowWarningCommand",
+			},
+		},
+	}
+	return configuration
+end
+
+local function DebugMessage( ... )
+	--EMA:Print( ... )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_FOLLOW_TARGET = "FollowTarget"
+EMA.COMMAND_AUTO_FOLLOW_AFTER_COMBAT = "AutoFollowAfterCombat"
+EMA.COMMAND_FOLLOW_STROBE_ON = "FollowStrobeOn"
+EMA.COMMAND_FOLLOW_STROBE_OFF = "FollowStrobeOff"
+EMA.COMMAND_SET_FOLLOW_MASTER = "FollowMaster"
+EMA.COMMAND_FOLLOW_TRAIN = "FollowTrain"
+EMA.COMMAND_FOLLOW_ME = "FollowMe"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SortTeamListOrdered( characterA, characterB )
+	local positionA = EMAApi.GetPositionForCharacterName ( characterA )
+	local positionB = EMAApi.GetPositionForCharacterName ( characterB )
+	return positionA < positionB
+end
+
+local function BuildAndSetTeamList()
+	EMAUtilities:ClearTable( EMA.teamList )
+	for characterName, order in EMAApi.TeamList() do
+		table.insert( EMA.teamList, characterName )
+		table.sort( EMA.teamList, SortTeamListOrdered )
+	end
+	EMA.settingsControl.dropdownFollowMaster:SetList( EMA.teamList )
+end
+
+local function SettingsCreateDisplayOptions( top )
+	-- Get positions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( true )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
+	local column2left = left + halfWidth
+	local left2 = left + thirdWidth
+	local left3 = left + (thirdWidth * 2)
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_AFTER_COMBAT"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxAutoFollowAfterCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["FOLLOW_AFTER_COMBAT"],
+		EMA.SettingsToggleAutoFollowAfterCombat,
+		L["FOLLOW_AFTER_COMBAT_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxDelayAutoFollowAfterCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["DELAY_FOLLOW_AFTER_COMBAT"],
+		EMA.SettingsToggleDelayAutoFollowAfterCombat
+
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.editBoxFollowAfterCombatDelaySeconds = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TIME_DELAY_FOLLOWING"]
+	)
+	EMA.settingsControl.editBoxFollowAfterCombatDelaySeconds:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowAfterCombatDelaySeconds )
+	movingTop = movingTop - editBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_MASTER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxUseFollowMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["DIFFERENT_TOON_FOLLOW"],
+		EMA.SettingsToggleUseFollowMaster,
+		L["DIFFERENT_TOON_FOLLOW_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.dropdownFollowMaster = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["NEW_FOLLOW_MASTER"]
+	)
+	BuildAndSetTeamList()
+	EMA.settingsControl.dropdownFollowMaster:SetCallback( "OnValueChanged", EMA.SettingsSetFollowMaster )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_BROKEN_WARNING"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxWarnWhenFollowBreaks = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["WARN_STOP_FOLLOWING"],
+		EMA.SettingsToggleWarnWhenFollowBreaks
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxOnlyWarnIfOutOfFollowRange = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ONLY_IF_OUTSIDE_RANGE"],
+		EMA.SettingsToggleOnlyWarnIfOutOfFollowRange,
+		L["ONLY_IF_OUTSIDE_RANGE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.editBoxFollowBrokenMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["FOLLOW_BROKEN_MESSAGE"]
+	)
+	EMA.settingsControl.editBoxFollowBrokenMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowBrokenMessage )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SEND_WARNING_AREA"]
+	)
+	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	EMA.settingsControl.labelDoNotWarnIf = EMAHelperSettings:CreateLabel(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["DO_NOT_WARN"]
+	)
+	movingTop = movingTop - labelHeight
+	EMA.settingsControl.checkBoxDoNotWarnInCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["IN_COMBAT"],
+		EMA.SettingsToggleDoNotWarnInCombat,
+		L["IN_COMBAT"]
+	)
+	EMA.settingsControl.checkBoxDoNotWarnMembersInCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		column2left,
+		movingTop,
+		L["ANY_MEMBER_IN_COMBAT"],
+		EMA.SettingsToggleDoNotWarnMembersInCombat
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxDoNotWarnFollowStrobing = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["FOLLOW_STROBING"],
+		EMA.SettingsToggleDoNotWarnFollowStrobing
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_STROBING"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.labelStrobeHelp = EMAHelperSettings:CreateLabel(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["FOLLOW_STROBING_EMA_FOLLOW_COMMANDS."]
+	)
+	movingTop = movingTop - labelHeight
+	EMA.settingsControl.checkBoxOverrideStrobeTargetWithMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["USE_MASTER_STROBE_TARGET"],
+		EMA.SettingsToggleOverrideStrobeTargetWithMaster
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.labelPauseStrobeHelp = EMAHelperSettings:CreateLabel(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["PAUSE_FOLLOW_STROBING"]
+	)
+	movingTop = movingTop - labelHeight
+	EMA.settingsControl.checkBoxPauseInCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["IN_COMBAT"],
+		EMA.SettingsTogglePauseInCombat
+	)
+	EMA.settingsControl.checkBoxPauseDrinking = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		column2left, --left,
+		movingTop,
+		L["DRINKING_EATING"],
+		EMA.SettingsTogglePauseDrinking
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxPauseIfInVehicle = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["IN_A_VEHICLE"],
+		EMA.SettingsTogglePauseIfInVehicle
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.editBoxFollowStrobePauseTag = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["GROUP_FOLLOW_STROBE"]
+	)
+	EMA.settingsControl.editBoxFollowStrobePauseTag:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowStrobePauseTag )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.editBoxFollowStrobeDelaySeconds = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["FREQUENCY"]
+	)
+	EMA.settingsControl.editBoxFollowStrobeDelaySeconds:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowStrobeDelaySeconds )
+	EMA.settingsControl.editBoxFollowStrobeDelaySecondsInCombat = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
+		halfWidth,
+		column2left,
+		movingTop,
+		L["FREQUENCY_COMABT"]
+	)
+	EMA.settingsControl.editBoxFollowStrobeDelaySecondsInCombat:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowStrobeDelaySecondsInCombat )
+	movingTop = movingTop - editBoxHeight
+	return movingTop
+end
+
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+end
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfDisplayOptions = SettingsCreateDisplayOptions( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfDisplayOptions )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	-- Set values.
+	EMA.settingsControl.checkBoxAutoFollowAfterCombat:SetValue( EMA.db.autoFollowAfterCombat )
+	EMA.settingsControl.checkBoxDelayAutoFollowAfterCombat:SetValue( EMA.db.useAfterCombatDelay )
+	EMA.settingsControl.editBoxFollowAfterCombatDelaySeconds:SetText( EMA.db.afterCombatDelay )
+	EMA.settingsControl.checkBoxWarnWhenFollowBreaks:SetValue( EMA.db.warnWhenFollowBreaks )
+	EMA.settingsControl.checkBoxOnlyWarnIfOutOfFollowRange:SetValue( EMA.db.onlyWarnIfOutOfFollowRange )
+	EMA.settingsControl.editBoxFollowBrokenMessage:SetText( EMA.db.followBrokenMessage )
+	EMA.settingsControl.checkBoxDoNotWarnInCombat:SetValue( EMA.db.doNotWarnFollowBreakInCombat )
+	EMA.settingsControl.checkBoxDoNotWarnMembersInCombat:SetValue( EMA.db.doNotWarnFollowBreakMembersInCombat )
+	EMA.settingsControl.checkBoxDoNotWarnFollowStrobing:SetValue( EMA.db.doNotWarnFollowStrobing )
+	EMA.settingsControl.checkBoxOverrideStrobeTargetWithMaster:SetValue( EMA.db.overrideStrobeTargetWithMaster )
+	EMA.settingsControl.checkBoxPauseInCombat:SetValue( EMA.db.strobePauseInCombat )
+	EMA.settingsControl.checkBoxPauseDrinking:SetValue( EMA.db.strobePauseIfDrinking )
+	EMA.settingsControl.checkBoxPauseIfInVehicle:SetValue( EMA.db.strobePauseIfInVehicle )
+	EMA.settingsControl.editBoxFollowStrobePauseTag:SetText( EMA.db.strobePauseTag )
+	EMA.settingsControl.editBoxFollowStrobeDelaySeconds:SetText( EMA.db.strobeFrequencySeconds )
+	EMA.settingsControl.editBoxFollowStrobeDelaySecondsInCombat:SetText( EMA.db.strobeFrequencySecondsInCombat )
+	EMA.settingsControl.dropdownWarningArea:SetValue( EMA.db.warningArea )
+	EMA.settingsControl.dropdownFollowMaster:SetValue( EMA.db.followMaster )
+	EMA.settingsControl.checkBoxUseFollowMaster:SetValue( EMA.db.useFollowMaster )
+	-- Set state.
+	EMA.settingsControl.checkBoxDelayAutoFollowAfterCombat:SetDisabled( not EMA.db.autoFollowAfterCombat )
+	EMA.settingsControl.editBoxFollowAfterCombatDelaySeconds:SetDisabled( not EMA.db.autoFollowAfterCombat or not EMA.db.useAfterCombatDelay )
+	EMA.settingsControl.dropdownFollowMaster:SetDisabled( not EMA.db.useFollowMaster )
+	EMA.settingsControl.editBoxFollowBrokenMessage:SetDisabled( not EMA.db.warnWhenFollowBreaks )
+	EMA.settingsControl.checkBoxOnlyWarnIfOutOfFollowRange:SetDisabled( not EMA.db.warnWhenFollowBreaks )
+	EMA.settingsControl.checkBoxDoNotWarnInCombat:SetDisabled( not EMA.db.warnWhenFollowBreaks )
+	EMA.settingsControl.checkBoxDoNotWarnMembersInCombat:SetDisabled( not EMA.db.warnWhenFollowBreaks )
+	EMA.settingsControl.checkBoxDoNotWarnFollowStrobing:SetDisabled( not EMA.db.warnWhenFollowBreaks )
+	EMA.settingsControl.dropdownWarningArea:SetDisabled( not EMA.db.warnWhenFollowBreaks )
+	EMA.settingsControl.labelDoNotWarnIf:SetDisabled( not EMA.db.warnWhenFollowBreaks )
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsToggleUseFollowMaster( event, checked )
+	EMA.db.useFollowMaster = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoFollowAfterCombat( event, checked )
+	EMA.db.autoFollowAfterCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDelayAutoFollowAfterCombat( event, checked )
+	EMA.db.useAfterCombatDelay = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedFollowAfterCombatDelaySeconds( event, text )
+	EMA.db.afterCombatDelay = tonumber( text )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleWarnWhenFollowBreaks( event, checked )
+	EMA.db.warnWhenFollowBreaks = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleOnlyWarnIfOutOfFollowRange( event, checked )
+	EMA.db.onlyWarnIfOutOfFollowRange = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedFollowBrokenMessage( event, text )
+	EMA.db.followBrokenMessage = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDoNotWarnInCombat( event, checked )
+	EMA.db.doNotWarnFollowBreakInCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDoNotWarnMembersInCombat( event, checked )
+	EMA.db.doNotWarnFollowBreakMembersInCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDoNotWarnFollowStrobing( event, checked )
+	EMA.db.doNotWarnFollowStrobing = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleOverrideStrobeTargetWithMaster( event, checked )
+	EMA.db.overrideStrobeTargetWithMaster = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsTogglePauseInCombat( event, checked )
+	EMA.db.strobePauseInCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsTogglePauseDrinking( event, checked )
+	EMA.db.strobePauseIfDrinking = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsTogglePauseIfInVehicle( event, checked )
+	EMA.db.strobePauseIfInVehicle = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedFollowStrobePauseTag( event, text )
+	EMA.db.strobePauseTag = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedFollowStrobeDelaySeconds( event, text )
+	EMA.db.strobeFrequencySeconds = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedFollowStrobeDelaySecondsInCombat( event, text )
+	EMA.db.strobeFrequencySecondsInCombat = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetWarningArea( event, value )
+	EMA.db.warningArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetFollowMaster( event, value )
+	EMA.db.followMaster = value
+	EMA:SettingsRefresh()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Key bindings.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:UPDATE_BINDINGS()
+	if InCombatLockdown() then
+		return
+	end
+	ClearOverrideBindings( EMA.keyBindingFrame )
+	local key1, key2 = GetBindingKey( "FOLLOWME" )
+	if key1 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowMe" )
+	end
+	if key2 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowMe" )
+	end
+	local key1, key2 = GetBindingKey( "FOLLOWSTROBEME" )
+	if key1 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowStrobeMe" )
+	end
+	if key2 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowStrobeMe" )
+	end
+	local key1, key2 = GetBindingKey( "FOLLOWSTROBEOFF" )
+	if key1 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowStrobeOff" )
+	end
+	if key2 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowStrobeOff" )
+	end
+		local key1, key2 = GetBindingKey( "FOLLOWTEAIN" )
+	if key1 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowTrain" )
+	end
+	if key2 then
+		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowTrain" )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	EMA.EMAExternalNoWarnNextBreak = false
+	EMA.EMAExternalNoWarnNextSecondBreak = false
+	-- An empty team list.
+	EMA.teamList = {}
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Current follow target.
+	EMA.currentFollowTarget = EMAApi.GetMasterName()
+	EMA:UpdateFollowTargetToFollowMaster()
+	-- Set to true if EMA initiated a follow.
+	EMA.EMASetFollowTarget = false
+	-- Following flag.
+	EMA.isFollowing = false
+	-- Strobing follow.
+	EMA.currentFollowStrobeTarget = EMAApi.GetMasterName()
+	EMA.followingStrobing = false
+	EMA.followStrobeTimer = nil
+	EMA.followingStrobingPaused = false
+	-- Not in combat flag.
+	EMA.outOfCombat = true
+	-- Character on taxi flag.
+	EMA.characterIsOnTaxi = false
+-- Key bindings.
+	EMAFollowSecureButtonInvite = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowMe", nil, "SecureActionButtonTemplate" )
+	EMAFollowSecureButtonInvite:SetAttribute( "type", "macro" )
+	EMAFollowSecureButtonInvite:SetAttribute( "macrotext", "/ema-follow me all" )
+	EMAFollowSecureButtonInvite:Hide()
+	EMAFollowSecureButtonInvite = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowStrobeMe", nil, "SecureActionButtonTemplate" )
+	EMAFollowSecureButtonInvite:SetAttribute( "type", "macro" )
+	EMAFollowSecureButtonInvite:SetAttribute( "macrotext", "/ema-follow strobeonme all" )
+	EMAFollowSecureButtonInvite:Hide()
+	EMAFollowSecureButtonInvite = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowStrobeOff", nil, "SecureActionButtonTemplate" )
+	EMAFollowSecureButtonInvite:SetAttribute( "type", "macro" )
+	EMAFollowSecureButtonInvite:SetAttribute( "macrotext", "/ema-follow strobeoff all" )
+	EMAFollowSecureButtonInvite:Hide()
+	EMAFollowSecureButtonInvite = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowTrain", nil, "SecureActionButtonTemplate" )
+	EMAFollowSecureButtonInvite:SetAttribute( "type", "macro" )
+	EMAFollowSecureButtonInvite:SetAttribute( "macrotext", "/ema-follow train all" )
+	EMAFollowSecureButtonInvite:Hide()
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	-- WoW events.
+	EMA:RegisterEvent( "AUTOFOLLOW_BEGIN" )
+	EMA:RegisterEvent( "AUTOFOLLOW_END" )
+	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
+	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
+	EMA:RegisterEvent( "PLAYER_CONTROL_GAINED" )
+	EMA:RegisterEvent( "UNIT_ENTERING_VEHICLE" )
+	EMA:RegisterEvent( "UNIT_EXITING_VEHICLE" )
+	EMA:RegisterEvent( "UI_ERROR_MESSAGE", "TEST_FOLLOW" )
+	-- Initialise key bindings.
+	EMA.keyBindingFrame = CreateFrame( "Frame", nil, UIParent )
+	EMA:RegisterEvent( "UPDATE_BINDINGS" )
+	EMA:UPDATE_BINDINGS()
+	-- EMA events.
+	if EMAApi.Taxi ~= nil then
+		EMA:RegisterMessage( EMAApi.Taxi.MESSAGE_TAXI_TAKEN, "CharacterOnTaxi" )
+	end
+	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_CHARACTER_ADDED, "OnTeamChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_CHARACTER_REMOVED, "OnTeamChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+end
+
+
+function EMA:TEST_FOLLOW(event, arg1, message, ...  )
+	--EMA:Print("test", message )
+	if message == ERR_INVALID_FOLLOW_TARGET_PVP_COMBAT or message == ERR_INVALID_FOLLOW_PVP_COMBAT then
+		--EMA:Print("test", message )
+
+		EMA:EMASendMessageToTeam( EMA.db.warningArea, "I can't follow You, Am engaged in PVP", false )
+	end
+end
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.warnWhenFollowBreaks = settings.warnWhenFollowBreaks
+		EMA.db.followBrokenMessage = settings.followBrokenMessage
+		EMA.db.autoFollowAfterCombat = settings.autoFollowAfterCombat
+		EMA.db.strobeFrequencySeconds = settings.strobeFrequencySeconds
+		EMA.db.strobeFrequencySecondsInCombat = settings.strobeFrequencySecondsInCombat
+		EMA.db.doNotWarnFollowBreakInCombat = settings.doNotWarnFollowBreakInCombat
+		EMA.db.doNotWarnFollowBreakMembersInCombat = settings.doNotWarnFollowBreakMembersInCombat
+		EMA.db.strobePauseInCombat = settings.strobePauseInCombat
+		EMA.db.strobePauseIfInVehicle = settings.strobePauseIfInVehicle
+		EMA.db.strobePauseIfDrinking = settings.strobePauseIfDrinking
+		EMA.db.strobePauseTag = settings.strobePauseTag
+		EMA.db.doNotWarnFollowStrobing = settings.doNotWarnFollowStrobing
+		EMA.db.warningArea = settings.warningArea
+		EMA.db.followMaster = settings.followMaster
+		EMA.db.useFollowMaster = settings.useFollowMaster
+		EMA.db.overrideStrobeTargetWithMaster = settings.overrideStrobeTargetWithMaster
+		EMA.db.useAfterCombatDelay = settings.useAfterCombatDelay
+		EMA.db.afterCombatDelay = settings.afterCombatDelay
+		EMA.db.onlyWarnIfOutOfFollowRange = settings.onlyWarnIfOutOfFollowRange
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Follow functionality.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:UNIT_ENTERING_VEHICLE()
+	if EMA.db.strobePauseIfInVehicle == true then
+		if EMA.followingStrobing == true then
+			if EMA.followingStrobingPaused == false then
+				EMA:FollowStrobingPause( true )
+			end
+		end
+	end
+end
+
+function EMA:UNIT_EXITING_VEHICLE()
+	if EMA.db.strobePauseIfInVehicle == true then
+		if EMA.followingStrobing == true then
+			if EMA.followingStrobingPaused == true then
+				EMA:FollowStrobingPause( false )
+			end
+		end
+	end
+end
+
+function EMA:AreTeamMembersInCombat()
+	local inCombat = false
+	for index, characterName in EMAApi.TeamListOrdered() do
+		-- Is the team member online?
+		if EMAApi.GetCharacterOnlineStatus( characterName ) == true then
+			-- Yes, is the character in combat?
+			if UnitAffectingCombat( Ambiguate( characterName, "none" ) ) then
+			inCombat = true
+				break
+			end
+		end
+	end
+	return inCombat
+end
+
+function EMA:IsFollowingStrobing()
+	return EMA.followingStrobing
+end
+
+function EMA:IsFollowingStrobingPaused()
+	return EMA.followingStrobingPaused
+end
+
+
+function EMA:CharacterOnTaxi()
+	EMA:SetNoFollowBrokenWarningNextBreak()
+	if EMA:IsFollowingStrobing() == true then
+		if EMA:IsFollowingStrobingPaused() == false then
+			EMA:FollowStrobingPause( true )
+			EMA.characterIsOnTaxi = true
+		end
+	end
+end
+
+
+function EMA:PLAYER_CONTROL_GAINED()
+	if EMA.characterIsOnTaxi == true then
+		EMA.characterIsOnTaxi = false
+		if EMA:IsFollowingStrobing() == true then
+			if EMA:IsFollowingStrobingPaused() == true then
+				EMA:FollowStrobingPause( false )
+			end
+		end
+	end
+end
+
+
+function EMA:SuppressNextFollowWarningCommand( info, parameters )
+	EMA:SuppressNextFollowWarning()
+end
+
+function EMA:SuppressNextFollowWarning()
+	-- Events are fired as follows for a /follow command.
+	if EMA.isFollowing == true then
+		EMA:SetNoFollowBrokenWarningNextBreak()
+		EMA:SetNoFollowBrokenWarningNextSecondBreak()
+	else
+		EMA:SetNoFollowBrokenWarningNextBreak()
+	end
+end
+
+function EMA:SetNoFollowBrokenWarningNextBreak()
+	EMA.EMAExternalNoWarnNextBreak = true
+end
+
+function EMA:SetNoFollowBrokenWarningNextSecondBreak()
+	EMA.EMAExternalNoWarnNextSecondBreak = true
+end
+
+
+function EMA:AUTOFOLLOW_BEGIN( event, target, ... )
+	EMA.currentFollowTarget = target
+	EMA.isFollowing = true
+end
+
+function EMA:AUTOFOLLOW_END( event, ... )
+	EMA.isFollowing = false
+	EMA:ScheduleTimer( "AutoFollowEndUpdate", 0.5 )
+end
+
+-- checks the follow system Msg, is there under 1 always 1 unless it fadeing.
+function EMA:AutoFollowEndUpdate()
+	local alpha = AutoFollowStatus:GetAlpha()
+	--EMA:Print("updatetest", test)
+	if alpha < 1 then
+		--EMA:Print("canSend")
+		EMA:AutoFollowEndSend()
+	end
+end
+
+function EMA:AutoFollowEndSend()
+	-- If warn if auto follow breaks is on...
+	local canWarn = false
+	if EMA.db.warnWhenFollowBreaks == true then
+		if EMA.EMASetFollowTarget == false then
+			canWarn = true
+		end
+	end
+	-- Do not warn if on Taxi
+	if UnitOnTaxi("player") == true then
+		--EMA:Print("taxi")
+		canWarn = false
+	end
+	--Do not warn if in combat?
+	if EMA.db.doNotWarnFollowBreakInCombat == true and EMA.outOfCombat == false then
+		--EMA:Print("Do Not warn in comabt")
+		canWarn = false
+	end
+	--Do not warn if a passenger in a vehicle.
+	if UnitInVehicle("Player") == true and UnitControllingVehicle("player") == false then
+		--EMA:Print("UnitInVehicle")
+		canWarn = false
+	end
+	-- Do not warn if any other members in combat?
+	if EMA.db.doNotWarnFollowBreakMembersInCombat == true and EMA:AreTeamMembersInCombat() == true or UnitAffectingCombat("player") == true then
+		--EMA:Print("doNotWarnFollowBreakMembersInCombat")
+		canWarn = false
+	end
+	-- Don't warn about follow breaking if follow strobing is on or paused.
+	if EMA.db.doNotWarnFollowStrobing == true then
+		if EMA.followingStrobing == true or EMA.followStrobingPaused == true then
+			--EMA:Print("FollowStrobing")
+			canWarn = false
+		end
+	end
+	-- Check to see if range warning is in effect. This olny works in a party it seems!!
+	if EMA.db.onlyWarnIfOutOfFollowRange == true then
+		if CheckInteractDistance( EMA.currentFollowTarget, 4 ) then
+			--EMA:Print("CheckInteractDistance")
+			canWarn = false
+		end
+	end
+	-- If allowed to warn, then warn.
+	if canWarn == true then
+		EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.followBrokenMessage, false )
+	end
+	EMA.EMASetFollowTarget = false
+end
+
+function EMA:PLAYER_REGEN_ENABLED()
+	EMA.outOfCombat = true
+	-- Is auto follow after combat on?
+	if EMA.db.autoFollowAfterCombat == true then
+		if EMA.db.useAfterCombatDelay == false then
+			EMA:FollowTarget( EMA.currentFollowTarget )
+		else
+			EMA:ScheduleTimer( "FollowTarget", tonumber( EMA.db.afterCombatDelay ), EMA.currentFollowTarget )
+		end
+	end
+	-- Is follow strobing on?
+	if EMA:IsFollowingStrobing() == true then
+		-- Pause follow strobing while in combat?
+		if EMA.db.strobePauseInCombat == true then
+			-- Un-pause follow strobing.
+			EMA:FollowStrobingPause( false )
+		else
+			-- Not pausing, so check strobe rate.
+			if EMA.db.strobeFrequencySeconds ~= EMA.db.strobeFrequencySecondsInCombat then
+				EMA:FollowStrobeOn( EMA.currentFollowStrobeTarget )
+			end
+		end
+	end
+end
+
+function EMA:PLAYER_REGEN_DISABLED()
+	EMA.outOfCombat = false
+	-- Is follow strobing on?
+	if EMA:IsFollowingStrobing() == true then
+		-- Pause follow strobing while in combat?
+		if EMA.db.strobePauseInCombat == true then
+			-- Pause follow strobing.
+			EMA:FollowStrobingPause( true )
+		else
+			-- Not pausing, so check strobe rate.
+			if EMA.db.strobeFrequencySeconds ~= EMA.db.strobeFrequencySecondsInCombat then
+				EMA:FollowStrobeOn( EMA.currentFollowStrobeTarget )
+			end
+		end
+	end
+end
+
+function EMA:AutoFollowAfterCombatCommand( info, parameters )
+	-- Get the on/off state and the tag of who to send to.
+	local state, tag = strsplit( " ", parameters )
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:AutoFollowAfterCombatSendCommand( state, tag )
+	else
+		EMA:DoToggleAutoFollowAfterCombat( state )
+	end
+end
+
+function EMA:AutoFollowAfterCombatSendCommand( state, tag )
+	EMA:EMASendCommandToTeam( EMA.COMMAND_AUTO_FOLLOW_AFTER_COMBAT, state, tag )
+end
+
+function EMA:AutoFollowAfterCombatReceiveCommand( state, tag )
+	-- If this character responds to this tag...
+	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
+		EMA:DoToggleAutoFollowAfterCombat( state )
+	end
+end
+
+function EMA:DoToggleAutoFollowAfterCombat( state )
+	-- Translate the on/off state from string to boolean/nil.
+	local setToOn = EMAUtilities:GetOnOrOffFromCommand( state, L["ON"], L["OFF"] )
+	-- If nil, then assume false.
+	if setToOn == nil then
+		setToOn = false
+	end
+	-- Then set the flag appropriately.
+	EMA:SettingsToggleAutoFollowAfterCombat( nil, setToOn )
+	-- Refresh the settings.
+	EMA:SettingsRefresh()
+end
+
+function EMA:GetCurrentFollowTarget()
+	return EMA.currentFollowTarget
+end
+
+function EMA:GetCurrentFollowStrobeTarget()
+	return EMA.currentFollowStrobeTarget
+end
+
+function EMA:UpdateFollowTargetToFollowMaster()
+	if EMA.db.useFollowMaster == true then
+		EMA.currentFollowTarget = EMAApi.GetMasterName()
+		if EMA.db.followMaster ~= "" then
+			if EMAApi.GetCharacterOnlineStatus( EMA.db.followMaster ) == true then
+				EMA.currentFollowTarget = EMA.db.followMaster
+			end
+		end
+	end
+end
+
+function EMA:OnMasterChanged()
+	if EMA.db.autoFollowAfterCombat == true then
+		EMA.currentFollowTarget = EMAApi.GetMasterName()
+		EMA:UpdateFollowTargetToFollowMaster()
+	end
+	if EMA.followingStrobing == true then
+		if EMA.db.overrideStrobeTargetWithMaster == true then
+			EMA.currentFollowStrobeTarget = EMAApi.GetMasterName()
+			EMA:FollowStrobeOn( EMA.currentFollowStrobeTarget )
+		end
+	end
+end
+
+function EMA:OnTeamChanged()
+	BuildAndSetTeamList()
+end
+
+function EMA:CommandFollowTrain( info, parameters )
+	local tag = parameters
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_TRAIN, tag )
+	end
+end
+
+function EMA:ReceiveCommandFollowTrain( tag )
+	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
+		local characterInFront = nil
+		for index, character in EMAApi.TeamListOrderedOnline() do
+			if character == EMA.characterName then
+				if characterInFront ~= nil then
+					FollowUnit( Ambiguate( characterInFront, "none" ), true )
+				end
+				return
+			else
+				if EMAApi.DoesCharacterHaveTag( character, tag ) then
+					characterInFront = character
+				end
+			end
+		end
+	end
+end
+
+function EMA:CommandFollowMe( info, parameters )
+	local tag = parameters
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_ME, tag )
+	end
+end
+
+function EMA:ReceiveCommandFollowMe( characterName, tag )
+	--EMA:Print("testfollowme", characterName, tag )
+	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
+		FollowUnit( Ambiguate( characterName, "none" ), true )
+	end
+end
+
+
+function EMA:CommandSetFollowMaster( info, parameters )
+	local target, tag = strsplit( " ", parameters )
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_FOLLOW_MASTER, target, tag )
+	else
+		EMA.db.followMaster = target
+		EMA:UpdateFollowTargetToFollowMaster()
+	end
+end
+
+function EMA:ReceiveCommandSetFollowMaster( target, tag )
+	if EMAPrivate.Tag.DoesCharacterHaveTag( EMA.characterName, tag ) then
+		EMA.db.followMaster = target
+		EMA:UpdateFollowTargetToFollowMaster()
+	end
+end
+
+function EMA:FollowMasterCommand( info, parameters )
+	-- The only parameter for this command is tag.  If there is a tag, send the command to all
+	-- the members, otherwise just this character.
+	local tag = parameters
+	-- Set the current follow target to the master.
+	EMA.currentFollowTarget = EMAApi.GetMasterName()
+	EMA:UpdateFollowTargetToFollowMaster()
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:FollowTargetSendCommand( EMA.currentFollowTarget, tag )
+	else
+		EMA:SuppressNextFollowWarning()
+		EMA:FollowTarget( EMA.currentFollowTarget )
+	end
+end
+
+function EMA:FollowTargetCommand( info, parameters )
+	local target, tag = strsplit( " ", parameters )
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:FollowTargetSendCommand( target, tag )
+	else
+		EMA.currentFollowTarget = target
+		EMA:SuppressNextFollowWarning()
+		EMA:FollowTarget( EMA.currentFollowTarget )
+	end
+end
+
+function EMA:FollowTargetSendCommand( target, tag )
+	EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_TARGET, target, tag )
+end
+
+function EMA:FollowTargetReceiveCommand( target, tag )
+	-- If this character responds to this tag...
+	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
+		-- Then follow the target specified.
+		EMA.currentFollowTarget = target
+		EMA:SuppressNextFollowWarning()
+		EMA:FollowTarget( EMA.currentFollowTarget )
+	end
+end
+
+function EMA:FollowStrobeOnMeCommand( info, parameters )
+	local tag = parameters
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:FollowStrobeOnSendCommand( EMA.characterName, tag )
+	else
+		EMA:FollowStrobeOn( EMA.characterName )
+	end
+end
+
+function EMA:FollowStrobeOnLastCommand( info, parameters )
+	local tag = parameters
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:FollowStrobeOnSendCommand( EMA.currentFollowStrobeTarget, tag )
+	else
+		EMA:FollowStrobeOn( EMA.currentFollowStrobeTarget )
+	end
+end
+
+function EMA:FollowStrobeOnCommand( info, parameters )
+	local target, tag = strsplit( " ", parameters )
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:FollowStrobeOnSendCommand( target, tag )
+	else
+		EMA:FollowStrobeOn( target )
+	end
+end
+
+function EMA:FollowStrobeOnSendCommand( target, tag )
+	EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_STROBE_ON, target, tag )
+end
+
+function EMA:FollowStrobeOnReceiveCommand( target, tag )
+	-- If this character responds to this tag...
+	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
+		-- Then follow the target specified - strobing.
+		EMA:FollowStrobeOn( target )
+	end
+end
+
+function EMA:FollowStrobeOffCommand( info, parameters )
+	local tag = parameters
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:FollowStrobeOffSendCommand( tag )
+	else
+		EMA:FollowStrobeOff()
+	end
+end
+
+function EMA:FollowStrobeOffSendCommand( tag )
+	EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_STROBE_OFF, tag )
+end
+
+function EMA:FollowStrobeOffReceiveCommand( tag )
+	-- If this character responds to this tag...
+	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
+		-- Then follow the target specified - turn off strobing.
+		EMA:FollowStrobeOff()
+		FollowUnit( "Player", true )
+	end
+end
+
+function EMA:FollowTarget( target )
+	-- Attempting to follow self?  Note: if target ever is party1, etc, then this will not catch the same character.
+	if target == EMA.characterName then
+		return
+	end
+	local canFollowTarget = true
+	-- If follow strobing and pause strobing if drinking then...
+	if EMA.followingStrobing == true and EMA.db.strobePauseIfDrinking == true then
+		-- And the character has the pause tag...
+		if EMAApi.DoesCharacterHaveTag( EMA.characterName, EMA.db.strobePauseTag ) == true then
+			-- Check player for drinking buff.
+			if EMAUtilities:DoesThisCharacterHaveBuff( L["DRINK"] ) == true then
+				-- Have drinking buff, do not allow follow.
+				canFollowTarget = false
+			end
+			if EMAUtilities:DoesThisCharacterHaveBuff( L["FOOD"] ) == true then
+				-- Have eating buff, do not allow follow.
+				canFollowTarget = false
+			end
+			if EMAUtilities:DoesThisCharacterHaveBuff( L["REFRESHMENT"] ) == true then
+				-- Eating Mage food Yum Yum Yum.
+				canFollowTarget = false
+			end
+		end
+	end
+	-- If follow strobing and strobing paused.
+	if EMA.followingStrobing == true and EMA.followingStrobingPaused == true then
+		-- Follow strobing is paused, do not follow target.
+		canFollowTarget = false
+	end
+	-- If allowed to follow the target, then...
+	if canFollowTarget == true then
+		-- Set the EMA set this flag toggle, so not to complain about follow broken after combat.
+		--if (EMA.db.autoFollowAfterCombat == true) or (EMA.followingStrobing == true) then
+		if 	EMA.followingStrobing == true then
+			EMA.EMASetFollowTarget = true
+		end
+		--EMA:Print( target )
+		-- Follow unit only works when in a party or raid for resolving against player names.
+		FollowUnit( Ambiguate( target, "none" ), true )
+	end
+end
+
+function EMA:FollowStrobeOn( target )
+	EMA.currentFollowStrobeTarget = target
+	-- Do the initial follow.
+    EMA:FollowTarget( EMA.currentFollowStrobeTarget )
+	-- If the timer is running, then
+	if EMA.followingStrobing == true then
+		EMA:FollowStrobeOff()
+	end
+	-- Set up a timer to do another follow command.
+	EMA.followingStrobing = true
+	local seconds = EMA.db.strobeFrequencySeconds
+	if InCombatLockdown() then
+		seconds = EMA.db.strobeFrequencySecondsInCombat
+	end
+	EMA.followStrobeTimer = EMA:ScheduleRepeatingTimer( "FollowTarget", tonumber( seconds ), EMA.currentFollowStrobeTarget )
+end
+
+function EMA:FollowStrobeOff()
+	-- Stop the timer from doing another follow command.
+	if EMA.followingStrobing == true then
+		EMA.followingStrobing = false
+		EMA:CancelTimer( EMA.followStrobeTimer )
+	end
+end
+
+function EMA:FollowStrobingPause( pause )
+	if pause == true then
+		-- Is follow strobing on?
+		if EMA.followingStrobing == true then
+			-- Yes, turn it off, if this character has a tag that matches the pause follow strobe tag.
+			if EMAApi.DoesCharacterHaveTag( EMA.characterName, EMA.db.strobePauseTag ) == true then
+				EMA.followingStrobingPaused = true
+			end
+		end
+	else
+		-- Is follow strobing paused?
+		if EMA.followingStrobingPaused == true then
+			-- Yes, turn it on, if this character has a tag that matches the pause follow strobe tag.
+			if EMAApi.DoesCharacterHaveTag( EMA.characterName, EMA.db.strobePauseTag ) == true then
+				EMA.followingStrobingPaused = false
+			end
+		end
+	end
+end
+
+-- A EMA command has been recieved.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if commandName == EMA.COMMAND_FOLLOW_TARGET then
+		EMA:FollowTargetReceiveCommand( ... )
+	end
+	if commandName == EMA.COMMAND_AUTO_FOLLOW_AFTER_COMBAT then
+		EMA:AutoFollowAfterCombatReceiveCommand( ... )
+	end
+	if commandName == EMA.COMMAND_FOLLOW_STROBE_ON then
+		EMA:FollowStrobeOnReceiveCommand( ... )
+	end
+	if commandName == EMA.COMMAND_FOLLOW_STROBE_OFF then
+		EMA:FollowStrobeOffReceiveCommand( ... )
+	end
+	if commandName == EMA.COMMAND_SET_FOLLOW_MASTER then
+		EMA:ReceiveCommandSetFollowMaster( ... )
+	end
+	if commandName == EMA.COMMAND_FOLLOW_TRAIN then
+		EMA:ReceiveCommandFollowTrain( ... )
+	end
+	if commandName == EMA.COMMAND_FOLLOW_ME then
+		EMA:ReceiveCommandFollowMe( characterName, ... )
+	end
+end
+
+EMAApi.Follow = {}
+EMAApi.Follow.IsFollowingStrobing = EMA.IsFollowingStrobing
+EMAApi.Follow.IsFollowingStrobingPaused = EMA.IsFollowingStrobingPaused
+EMAApi.Follow.GetCurrentFollowTarget = EMA.GetCurrentFollowTarget
+EMAApi.Follow.GetCurrentFollowStrobeTarget = EMA.GetCurrentFollowStrobeTarget
+EMAApi.Follow.SuppressNextFollowWarning = EMA.SuppressNextFollowWarning
diff --git a/EMA/Modules/Guild.lua b/EMA/Modules/Guild.lua
new file mode 100644
index 0000000..81786bc
--- /dev/null
+++ b/EMA/Modules/Guild.lua
@@ -0,0 +1,708 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "EMA" that is 								--
+--				Released under the MIT License 										--
+--				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Guild",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Get the EMA Utilities Library.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
+local AceGUI = LibStub( "AceGUI-3.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Guild"
+EMA.settingsDatabaseName = "GuildProfileDB"
+EMA.chatCommand = "ema-guild"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["INTERACTION"]
+EMA.moduleDisplayName = L["GUILD"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\GuildIcon.tga"
+-- order
+EMA.moduleOrder = 20
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		messageArea = EMAApi.DefaultMessageArea(),
+		showEMAGuildWindow = false,
+		GuildBoEItems = false,
+		GuildCRItems = false,
+		autoGuildItemsList = {},
+		adjustMoneyWithGuildBank = false,
+		goldAmountToKeepOnToon = 250,
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_ALL_SETTINGS"],
+				usage = "/EMA-Guild push",
+				get = false,
+				set = "EMASendSettings",
+				guiHidden = true,
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Popup Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function InitializePopupDialogs()
+	StaticPopupDialogs["EMAGuild_CONFIRM_REMOVE_Guild_ITEMS"] = {
+        text = L["REMOVE_GUILD_LIST"],
+        button1 = YES,
+        button2 = NO,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function()
+			EMA:RemoveItem()
+		end,
+    }
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- GBank Tab Dropdown Stuff
+-------------------------------------------------------------------------------------------------------------
+
+EMA.simpleAreaList = {}
+EMA.simpleGrpAreaList = {}
+
+function EMA:TabAreaList()
+	return pairs( EMA.simpleAreaList )
+end
+
+function EMA:RefreshTabDropDownList()
+	EMAUtilities:ClearTable( EMA.simpleAreaList )
+	for index = 1, GetNumGuildBankTabs() do
+		EMA.simpleAreaList[index] = L["GUILDTAB"]..L[" "]..index
+	end
+	table.sort( EMA.simpleAreaList )
+	EMA.settingsControl.tabNumListDropDownList:SetList( EMA.simpleAreaList )
+end
+
+------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+	EMA.autoGuildItemLink = nil
+	EMA.autoGuildBankTab = 1
+	EMA.GroupName = EMAApi.AllTag()
+	EMA.putItemsInGB = {}
+	-- Create the settings control.
+	EMA:SettingsCreate()
+	-- Initialse the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	EMA:RegisterEvent( "GUILDBANKFRAME_OPENED" ) -- Temp!
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
+	-- Update DropDownList
+	EMA:ScheduleTimer("RefreshTabDropDownList", 1 )
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+	-- AceHook-3.0 will tidy up the hooks for us.
+end
+
+function EMA:SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfInfo = EMA:SettingsCreateGuild( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsCreateGuild( top )
+	local buttonControlWidth = 85
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local GuildWidth = headingWidth
+	local movingTop = top
+	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["GUILD_LIST_HEADER"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxShowEMAGuildWindow = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["GUILD_LIST"],
+		EMA.SettingsToggleShowEMAGuildWindow,
+		L["GUILD_LIST_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.GuildItemsHighlightRow = 1
+	EMA.settingsControl.GuildItemsOffset = 1
+	local list = {}
+	list.listFrameName = "EMAGuildIteamsSettingsFrame"
+	list.parentFrame = EMA.settingsControl.widgetSettings.content
+	list.listTop = movingTop
+	list.listLeft = left
+	list.listWidth = GuildWidth
+	list.rowHeight = 15
+	list.rowsToDisplay = 10
+	list.columnsToDisplay = 3
+	list.columnInformation = {}
+	list.columnInformation[1] = {}
+	list.columnInformation[1].width = 40
+	list.columnInformation[1].alignment = "LEFT"
+	list.columnInformation[2] = {}
+	list.columnInformation[2].width = 30
+	list.columnInformation[2].alignment = "LEFT"
+	list.columnInformation[3] = {}
+	list.columnInformation[3].width = 30
+	list.columnInformation[3].alignment = "LEFT"
+	list.scrollRefreshCallback = EMA.SettingsScrollRefresh
+	list.rowClickCallback = EMA.SettingsGuildItemsRowClick
+	EMA.settingsControl.GuildItems = list
+	EMAHelperSettings:CreateScrollList( EMA.settingsControl.GuildItems )
+	movingTop = movingTop - list.listHeight - verticalSpacing
+	EMA.settingsControl.GuildItemsButtonRemove = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left,
+		movingTop,
+		L["REMOVE"],
+		EMA.SettingsGuildItemsRemoveClick
+	)
+	movingTop = movingTop -	buttonHeight - verticalSpacing
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ADD_ITEMS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.GuildItemsEditBoxGuildItem = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ITEM_DROP"]
+	)
+	EMA.settingsControl.GuildItemsEditBoxGuildItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedGuildItem )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.tabNumListDropDownList = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		dropBoxWidth,
+		left,
+		movingTop,
+		L["GB_TAB_LIST"]
+	)
+	EMA.settingsControl.tabNumListDropDownList:SetList( EMA.TabAreaList() )
+	EMA.settingsControl.tabNumListDropDownList:SetCallback( "OnValueChanged",  EMA.GBTabDropDownList )
+	--Group
+	EMA.settingsControl.GuildItemsEditBoxGuildTag = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		dropBoxWidth,
+		left + dropBoxWidth + horizontalSpacing,
+		movingTop,
+		L["GROUP_LIST"]
+	)
+	EMA.settingsControl.GuildItemsEditBoxGuildTag:SetList( EMAApi.GroupList() )
+	EMA.settingsControl.GuildItemsEditBoxGuildTag:SetCallback( "OnValueChanged",  EMA.GroupListDropDownList )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.GuildItemsButtonAdd = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left,
+		movingTop,
+		L["ADD"],
+		EMA.SettingsGuildItemsAddClick
+	)
+	movingTop = movingTop -	buttonHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["GB_OPTIONS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+--[[
+	EMA.settingsControl.checkBoxGuildBoEItems = EMAHelperSettings:CreateCheckBox(
+	EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["GUILD_BOE_ITEMS"],
+		EMA.SettingsToggleGuildBoEItems,
+		L["GUILD_BOE_ITEMS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxGuildCRItems = EMAHelperSettings:CreateCheckBox(
+	EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["GUILD_REAGENTS"],
+		EMA.SettingsToggleGuildCRItems,
+		L["GUILD_REAGENTS_HELP"]
+	)
+
+	movingTop = movingTop - checkBoxHeight
+]]
+	EMA.settingsControl.checkBoxAdjustMoneyOnToonViaGuildBank = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["GB_GOLD"],
+		EMA.SettingsToggleAdjustMoneyOnToonViaGuildBank,
+		L["GB_GOLD_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.editBoxGoldAmountToLeaveOnToon = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["GOLD_TO_KEEP"]
+	)
+	EMA.settingsControl.editBoxGoldAmountToLeaveOnToon:SetCallback( "OnEnterPressed", EMA.EditBoxChangedGoldAmountToLeaveOnToon )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	return movingTop
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Callbacks.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsScrollRefresh()
+	FauxScrollFrame_Update(
+		EMA.settingsControl.GuildItems.listScrollFrame,
+		EMA:GetGuildItemsMaxPosition(),
+		EMA.settingsControl.GuildItems.rowsToDisplay,
+		EMA.settingsControl.GuildItems.rowHeight
+	)
+	EMA.settingsControl.GuildItemsOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.GuildItems.listScrollFrame )
+	for iterateDisplayRows = 1, EMA.settingsControl.GuildItems.rowsToDisplay do
+		-- Reset.
+		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
+		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[3].textString:SetText( "" )
+		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
+		-- Get data.
+		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.GuildItemsOffset
+		if dataRowNumber <= EMA:GetGuildItemsMaxPosition() then
+			-- Put data information into columns.
+			local GuildItemsInformation = EMA:GetGuildItemsAtPosition( dataRowNumber )
+			EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[1].textString:SetText( GuildItemsInformation.name )
+			EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[2].textString:SetText( GuildItemsInformation.GBTab )
+			EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[3].textString:SetText( GuildItemsInformation.tag )
+			-- Highlight the selected row.
+			if dataRowNumber == EMA.settingsControl.GuildItemsHighlightRow then
+				EMA.settingsControl.GuildItems.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
+			end
+		end
+	end
+end
+
+function EMA:SettingsGuildItemsRowClick( rowNumber, columnNumber )
+	if EMA.settingsControl.GuildItemsOffset + rowNumber <= EMA:GetGuildItemsMaxPosition() then
+		EMA.settingsControl.GuildItemsHighlightRow = EMA.settingsControl.GuildItemsOffset + rowNumber
+		EMA:SettingsScrollRefresh()
+	end
+end
+
+function EMA:SettingsGuildItemsRemoveClick( event )
+	StaticPopup_Show( "EMAGuild_CONFIRM_REMOVE_Guild_ITEMS" )
+end
+
+function EMA:SettingsEditBoxChangedGuildItem( event, text )
+	EMA.autoGuildItemLink = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:GBTabDropDownList (event, value )
+	-- if nil or the blank group then don't get Name.
+	if value == " " or value == nil then
+		return
+	end
+	EMA.autoGuildBankTab = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:GroupListDropDownList (event, value )
+	-- if nil or the blank group then don't get Name.
+	if value == " " or value == nil then
+		return
+	end
+	for index, groupName in ipairs( EMAApi.GroupList() ) do
+		if index == value then
+			EMA.GroupName = groupName
+			break
+		end
+	end
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsGuildItemsAddClick( event )
+	if EMA.autoGuildItemLink ~= nil and EMA.autoGuildBankTab ~= nil and EMA.GroupName ~= nil then
+		EMA:AddItem( EMA.autoGuildItemLink, EMA.autoGuildBankTab, EMA.GroupName )
+		EMA.autoGuildItemLink = nil
+		EMA:SettingsRefresh()
+	end
+end
+
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+end
+
+function EMA:OnGroupAreasChanged( message )
+	EMA.settingsControl.GuildItemsEditBoxGuildTag:SetList( EMAApi.GroupList() )
+end
+
+function EMA:SettingsSetMessageArea( event, value )
+	EMA.db.messageArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowEMAGuildWindow( event, checked )
+	EMA.db.showEMAGuildWindow = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleGuildBoEItems(event, checked )
+	EMA.db.GuildBoEItems = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleGuildCRItems(event, checked )
+	EMA.db.GuildCRItems = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAdjustMoneyOnToonViaGuildBank( event, checked )
+	EMA.db.adjustMoneyWithGuildBank = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAdjustMoneyWithMasterOnGuild( event, checked )
+	EMA.db.adjustMoneyWithMasterOnGuild = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedGoldAmountToLeaveOnToon( event, text )
+	EMA.db.goldAmountToKeepOnToon = tonumber( text )
+	if EMA.db.goldAmountToKeepOnToon == nil then
+		EMA.db.goldAmountToKeepOnToon = 0
+	end
+	EMA:SettingsRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.messageArea = settings.messageArea
+		EMA.db.showEMAGuildWindow = settings.showEMAGuildWindow
+		EMA.db.GuildBoEItems = settings.GuildBoEItems
+		EMA.db.GuildCRItems = settings.GuildCRItems
+		EMA.db.autoGuildItemsList = EMAUtilities:CopyTable( settings.autoGuildItemsList )
+		EMA.db.adjustMoneyWithGuildBank = settings.adjustMoneyWithGuildBank
+		EMA.db.goldAmountToKeepOnToon = settings.goldAmountToKeepOnToon
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	EMA.settingsControl.checkBoxShowEMAGuildWindow:SetValue( EMA.db.showEMAGuildWindow )
+--	EMA.settingsControl.checkBoxGuildBoEItems:SetValue( EMA.db.GuildBoEItems )
+--	EMA.settingsControl.checkBoxGuildCRItems:SetValue( EMA.db.GuildCRItems )
+	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
+	EMA.settingsControl.checkBoxAdjustMoneyOnToonViaGuildBank:SetValue( EMA.db.adjustMoneyWithGuildBank )
+	EMA.settingsControl.editBoxGoldAmountToLeaveOnToon:SetText( tostring( EMA.db.goldAmountToKeepOnToon ) )
+	EMA.settingsControl.editBoxGoldAmountToLeaveOnToon:SetDisabled( not EMA.db.adjustMoneyWithGuildBank )
+	EMA.settingsControl.GuildItemsEditBoxGuildItem:SetDisabled( not EMA.db.showEMAGuildWindow )
+	EMA.settingsControl.GuildItemsEditBoxGuildTag:SetDisabled( not EMA.db.showEMAGuildWindow )
+	EMA.settingsControl.tabNumListDropDownList:SetDisabled( not EMA.db.showEMAGuildWindow )
+	EMA.settingsControl.GuildItemsButtonRemove:SetDisabled( not EMA.db.showEMAGuildWindow )
+	EMA.settingsControl.GuildItemsButtonAdd:SetDisabled( not EMA.db.showEMAGuildWindow )
+	EMA:SettingsScrollRefresh()
+
+end
+
+--Comms not sure if we going to use comms here.
+-- A EMA command has been received.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if characterName == self.characterName then
+		return
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Guild functionality.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:GetGuildItemsMaxPosition()
+	return #EMA.db.autoGuildItemsList
+end
+
+function EMA:GetGuildItemsAtPosition( position )
+	return EMA.db.autoGuildItemsList[position]
+end
+
+function EMA:AddItem( itemLink, GBTab, itemTag )
+	--EMA:Print("testDBAdd", itemLink, GBTab, itemTag )
+	-- Get some more information about the item.
+	local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo( itemLink )
+	-- If the item could be found.
+	if name ~= nil then
+		local itemInformation = {}
+		itemInformation.link = link
+		itemInformation.name = name
+		itemInformation.GBTab = GBTab
+		itemInformation.tag = itemTag
+			table.insert( EMA.db.autoGuildItemsList, itemInformation )
+			EMA:SettingsRefresh()
+			EMA:SettingsGuildItemsRowClick( 1, 1 )
+	end
+end
+
+function EMA:RemoveItem()
+	table.remove( EMA.db.autoGuildItemsList, EMA.settingsControl.GuildItemsHighlightRow )
+	EMA:SettingsRefresh()
+	EMA:SettingsGuildItemsRowClick( 1, 1 )
+end
+
+
+function EMA:GUILDBANKFRAME_OPENED()
+	if 	EMA.db.showEMAGuildWindow == true then
+		EMA:AddToGuildBankFromList()
+	end
+	if EMA.db.adjustMoneyWithGuildBank == true then
+		AddGoldToGuildBank()
+	end
+end
+
+function EMA:AddToGuildBankFromList()
+	local delay = 1.5
+	for position, itemInformation in pairs( EMA.db.autoGuildItemsList ) do
+		if EMAApi.IsCharacterInGroup(EMA.characterName, itemInformation.tag ) == true then
+			--EMA:Print("AddToGB", position, itemInformation.name, itemInformation.GBTab )
+			name, icon, isViewable, canDeposit, numWithdrawals, remainingWithdrawals = GetGuildBankTabInfo(itemInformation.GBTab)
+			if canDeposit == true then
+				for bag,slot,link in LibBagUtils:Iterate("BAGS", itemInformation.link ) do
+					if bag ~= nil then
+						delay = delay + 1.5
+						EMA:ScheduleTimer("PlaceItemInGuildBank", delay, bag, slot, itemInformation.GBTab )
+					end
+				end
+			end
+		end
+	end
+end
+
+function EMA:SelectBankTab( tab )
+	if GetCurrentGuildBankTab() == tab then
+	else
+		GuildBankTab_OnClick(_G["GuildBankTab" .. tab], "LeftButton", tab )
+	end
+end
+
+function EMA:PlaceItemInGuildBank(bag, slot, tab)
+	if GuildBankFrame:IsVisible() == true then
+		EMA:SelectBankTab( tab )
+		if GetCurrentGuildBankTab() == tab then
+			PickupContainerItem( bag,slot )
+			UseContainerItem( bag,slot )
+		end
+	end
+end
+
+---------
+function EMA:GuildBoEItems()
+	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+		return
+	end
+	for index, character in EMAApi.TeamListOrderedOnline() do
+		--EMA:Print("Team", character )
+		local teamCharacterName = ( Ambiguate( character, "short" ) )
+		local GuildPlayersName = GetUnitName("NPC")
+		if GuildPlayersName == teamCharacterName then
+			if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
+				for bag,slot,link in LibBagUtils:Iterate("BAGS") do
+					if bag ~= nil then
+						local _, _, locked, quality = GetContainerItemInfo(bag, slot)
+						-- quality is Uncommon (green) to  Epic (purple) 2 - 3 - 4
+						if quality ~= nil and locked == false then
+							if quality >= 2 and quality <= 4 then
+								-- tooltips scan is the olny way to find if the item is BoE in bags!
+								local isBoe = EMAUtilities:ToolTipBagScaner(link, bag, slot)
+								-- if the item is boe then add it to the Guild list!
+								if isBoe ~= ITEM_SOULBOUND then
+									--EMA:Print("test21", link, locked)
+									for iterateGuildSlots = 1, (MAX_Guild_ITEMS - 1) do
+										if GetGuildPlayerItemLink( iterateGuildSlots ) == nil then
+											PickupContainerItem( bag, slot )
+											ClickGuildButton( iterateGuildSlots )
+										end
+									end
+								end
+							end
+						end
+					end
+				end
+			end
+		end
+	end
+end
+
+function EMA:GuildCRItems()
+	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+		return
+	end
+	for index, character in EMAApi.TeamListOrderedOnline() do
+		--EMA:Print("Team", character )
+		local teamCharacterName = ( Ambiguate( character, "short" ) )
+		local GuildPlayersName = GetUnitName("NPC")
+		if GuildPlayersName == teamCharacterName then
+			if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
+				for bag,slot,itemLink in LibBagUtils:Iterate("BAGS") do
+					if itemLink then
+						-- using legion CraftingReagent API, as tooltip massess up some "items"
+						local _,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,isCraftingReagent = GetItemInfo(itemLink)
+						if isCraftingReagent == true then
+							--EMA:Print("GuildCraftingGoods", isCraftingReagent, itemLink)
+							-- tooltips scan is the olny way to find if the item is BOP in bags!
+							local isBop = EMAUtilities:TooltipScaner(itemLink)
+							--EMA:Print("testBOP", itemLink, isBop)
+							if isBop ~= ITEM_BIND_ON_PICKUP then
+							--EMA:Print("AddToGuild", itemLink)
+								for iterateGuildSlots = 1, (MAX_Guild_ITEMS - 1) do
+									if GetGuildPlayerItemLink( iterateGuildSlots ) == nil then
+										PickupContainerItem( bag, slot )
+										ClickGuildButton( iterateGuildSlots )
+									end
+								end
+							end
+						end
+					end
+				end
+			end
+		end
+	end
+end
+
+function AddGoldToGuildBank()
+	if not CanWithdrawGuildBankMoney() then
+		return
+	end
+	local moneyToKeepOnToon = tonumber( EMA.db.goldAmountToKeepOnToon ) * 10000
+	local moneyOnToon = GetMoney()
+	local moneyToDepositOrWithdraw = moneyOnToon - moneyToKeepOnToon
+	--EMA:Print(" testa", moneyToDepositOrWithdraw )
+	if moneyToDepositOrWithdraw == 0 then
+		return
+	end
+	if moneyToDepositOrWithdraw > 0 then
+	--	EMA:Print(" test", moneyToDepositOrWithdraw )
+		--DepositGuildBankMoney( moneyToDepositOrWithdraw )
+		EMA:ScheduleTimer("SendMoneyToGuild", 0.5, moneyToDepositOrWithdraw)
+	else
+		local takeoutmoney = -1 * moneyToDepositOrWithdraw
+	--	EMA:Print("takeout", takeoutmoney)
+		EMA:ScheduleTimer("TakeMoneyOut", 0.5, takeoutmoney )
+	end
+end
+
+
+function EMA:SendMoneyToGuild( money )
+	DepositGuildBankMoney( money )
+end
+
+function EMA:TakeMoneyOut( money )
+	WithdrawGuildBankMoney( money )
+end
\ No newline at end of file
diff --git a/EMA/Modules/Information.lua b/EMA/Modules/Information.lua
new file mode 100644
index 0000000..9ad3893
--- /dev/null
+++ b/EMA/Modules/Information.lua
@@ -0,0 +1,1586 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "EMA" that is 								--
+--				Released under the MIT License 										--
+--				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Information",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceTimer-3.0"
+)
+
+-- Get the EMA Utilities Library.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
+EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Information"
+EMA.settingsDatabaseName = "CurrProfileDB"
+EMA.chatCommand = "ema-information"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["DISPLAY"]
+EMA.moduleDisplayName = L["CURRENCY"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\SellIcon.tga"
+-- order
+EMA.moduleOrder = 3
+
+EMA.globalCurrencyFramePrefix = "EMAToonCurrencyListFrame"
+EMA.currTypes = {}
+EMA.simpleCurrList = {}
+
+-- Currency Identifiers. To add you own just add a new line at the bottom of this part
+-- http://www.wowhead.com/currencies
+-- Old Stuff
+--EMA.currTypes.DalaranJewelcraftingToken = 61
+EMA.currTypes.ChampionsSeal = 241
+--EMA.currTypes.IllustriousJewelcraftersToken = 361
+EMA.currTypes.TolBaradCommendation = 391
+EMA.currTypes.LesserCharmOfGoodFortune = 738
+EMA.currTypes.ElderCharmOfGoodFortune = 697
+EMA.currTypes.MoguRuneOfFate = 752
+EMA.currTypes.WarforgedSeal = 776
+EMA.currTypes.BloodyCoin = 789
+EMA.currTypes.TimelessCoin = 777
+--WoD Currency
+EMA.currTypes.GarrisonResources = 824
+EMA.currTypes.TemperedFate = 994
+EMA.currTypes.ApexisCrystal = 823
+EMA.currTypes.Darkmoon = 515
+EMA.currTypes.Oil = 1101
+EMA.currTypes.InevitableFate = 1129
+EMA.currTypes.TimeWalker = 1166
+EMA.currTypes.Valor = 1191
+--Legion Currency
+EMA.currTypes.OrderResources = 1220
+EMA.currTypes.AncientMana = 1155
+EMA.currTypes.NetherShard = 1226
+EMA.currTypes.SealofBrokenFate = 1273
+EMA.currTypes.ShadowyCoins = 1154
+EMA.currTypes.SightlessEye = 1149
+EMA.currTypes.TimeWornArtifact = 1268
+EMA.currTypes.CuriousCoin = 1275
+--7.2
+EMA.currTypes.LegionfallWarSupplies = 1342
+--7.2.5
+EMA.currTypes.CoinsOfAir = 1416
+--7.3
+EMA.currTypes.WakeningEssence = 1533
+EMA.currTypes.VeiledArgunite = 1508
+
+-------------------------------------- End of edit --------------------------------------------------------------
+
+function EMA:CurrencyIconAndName( id )
+	local fullName, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered, quality = GetCurrencyInfo(id)
+	local currName = strconcat(" |T"..icon..":20|t", L[" "]..fullName)
+	return currName
+end
+
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		currGold = true,
+		currGoldInGuildBank = false,
+		-- Currency default's
+		CcurrTypeOne = EMA.currTypes.OrderResources,
+		CcurrTypeOneName = EMA:CurrencyIconAndName(EMA.currTypes.OrderResources),
+		CcurrTypeTwo = EMA.currTypes.AncientMana,
+		CcurrTypeTwoName = EMA:CurrencyIconAndName(EMA.currTypes.AncientMana),
+		CcurrTypeThree = EMA.currTypes.TimeWalker,
+		CcurrTypeThreeName = EMA:CurrencyIconAndName(EMA.currTypes.TimeWalker),
+		CcurrTypeFour = EMA.currTypes.SightlessEye,
+		CcurrTypeFourName = EMA:CurrencyIconAndName(EMA.currTypes.SightlessEye),
+		CcurrTypeFive = 1,
+		CcurrTypeFiveName = "",
+		CcurrTypeSix = 1,
+		CcurrTypeSixName = "",
+		currencyFrameAlpha = 1.0,
+		currencyFramePoint = "CENTER",
+		currencyFrameRelativePoint = "CENTER",
+		currencyFrameXOffset = 0,
+		currencyFrameYOffset = 0,
+		currencyFrameBackgroundColourR = 1.0,
+		currencyFrameBackgroundColourG = 1.0,
+		currencyFrameBackgroundColourB = 1.0,
+		currencyFrameBackgroundColourA = 1.0,
+		currencyFrameBorderColourR = 1.0,
+		currencyFrameBorderColourG = 1.0,
+		currencyFrameBorderColourB = 1.0,
+		currencyFrameBorderColourA = 1.0,
+		currencyBorderStyle = L["BLIZZARD_TOOLTIP"],
+		currencyBackgroundStyle = L["BLIZZARD_DIALOG_BACKGROUND"],
+		currencyFontStyle = L["ARIAL_NARROW"],
+		currencyFontSize = 12,
+		currencyScale = 1,
+		currencyNameWidth = 60,
+		currencyPointsWidth = 50,
+		currencyGoldWidth = 140,
+		currencySpacingWidth = 3,
+		currencyLockWindow = false,
+		currOpenStartUpMaster = false,
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			show = {
+				type = "input",
+				name = L["SHOW_CURRENCY"],
+				desc = L["SHOW_CURRENCY_HELP"],
+				usage = "/EMA-curr show",
+				get = false,
+				set = "EMAToonRequestCurrency",
+			},
+			hide = {
+				type = "input",
+				name = L["HIDE_CURRENCY"],
+				desc = L["HIDE_CURRENCY_HELP"],
+				usage = "/EMA-curr hide",
+				get = false,
+				set = "EMAToonHideCurrency",
+			},
+			push = {
+				type = "input",
+				name = L["PUSH_ALL_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-curr push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+local function DebugMessage( ... )
+	--EMA:Print( ... )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_REQUEST_CURRENCY = "SendCurrency"
+EMA.COMMAND_HERE_IS_CURRENCY = "HereIsCurrency"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Variables used by module.
+-------------------------------------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfInfo = EMA:SettingsCreateCurrency( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+
+
+
+function EMA:SettingsCreateCurrency( top )
+	-- Get positions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local sliderHeight = EMAHelperSettings:GetSliderHeight()
+	local mediaHeight = EMAHelperSettings:GetMediaHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight() + 10
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local continueLabelHeight = 18
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( true )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local indent = horizontalSpacing * 12
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local thirdWidth = (headingWidth - (horizontalSpacing * 5)) / 5
+	local halfWidthSlider = (headingWidth - horizontalSpacing) / 2
+	local column2left = left + halfWidthSlider
+	local left2 = left + thirdWidth
+	local left3 = left + (thirdWidth * 1)
+	local right = left + halfWidth + horizontalSpacing
+	local movingTop = top
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CURRENCY_HEADER"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxCurrencyGold = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["GOLD"],
+		EMA.SettingsToggleCurrencyGold,
+		L["GOLD_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxCurrencyGoldInGuildBank = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["GOLD_GB"],
+		EMA.SettingsToggleCurrencyGoldInGuildBank,
+		L["GOLD_GB_HELP"]
+	)
+	--Currency One & Two
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.editBoxCurrencyTypeOneID = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		halfWidth,
+		left + indent,
+		movingTop,
+		L["CURRENCY"]..L[" "]..L["1"]
+	)
+	EMA.settingsControl.editBoxCurrencyTypeOneID:SetList( EMA.CurrDropDownBox() )
+	EMA.settingsControl.editBoxCurrencyTypeOneID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeOneID)
+	EMA.settingsControl.editBoxCurrencyTypeTwoID = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		halfWidth,
+		right + indent,
+		movingTop,
+		L["CURRENCY"]..L[" "]..L["2"]
+	)
+	EMA.settingsControl.editBoxCurrencyTypeTwoID:SetList( EMA.CurrDropDownBox() )
+	EMA.settingsControl.editBoxCurrencyTypeTwoID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeTwoID)
+	--Currency Three & Four
+	movingTop = movingTop - dropdownHeight
+	EMA.settingsControl.editBoxCurrencyTypeThreeID = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		halfWidth,
+		left + indent,
+		movingTop,
+		L["CURRENCY"]..L[" "]..L["3"]
+	)
+	EMA.settingsControl.editBoxCurrencyTypeThreeID:SetList( EMA.CurrDropDownBox() )
+	EMA.settingsControl.editBoxCurrencyTypeThreeID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeThreeID)
+	EMA.settingsControl.editBoxCurrencyTypeFourID = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		halfWidth,
+		right + indent,
+		movingTop,
+		L["CURRENCY"]..L[" "]..L["4"]
+	)
+	EMA.settingsControl.editBoxCurrencyTypeFourID:SetList( EMA.CurrDropDownBox() )
+	EMA.settingsControl.editBoxCurrencyTypeFourID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeFourID)
+	--Currency Five & Six
+	movingTop = movingTop - dropdownHeight
+	EMA.settingsControl.editBoxCurrencyTypeFiveID = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		halfWidth,
+		left + indent,
+		movingTop,
+		L["CURRENCY"]..L[" "]..L["5"]
+	)
+	EMA.settingsControl.editBoxCurrencyTypeFiveID:SetList( EMA.CurrDropDownBox() )
+	EMA.settingsControl.editBoxCurrencyTypeFiveID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeFiveID)
+	EMA.settingsControl.editBoxCurrencyTypeSixID = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		halfWidth,
+		right + indent,
+		movingTop,
+		L["CURRENCY"]..L[" "]..L["6"]
+	)
+	EMA.settingsControl.editBoxCurrencyTypeSixID:SetList( EMA.CurrDropDownBox() )
+	EMA.settingsControl.editBoxCurrencyTypeSixID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeSixID)
+	-- Other Stuff
+	movingTop = movingTop - dropdownHeight
+	EMA.settingsControl.currencyButtonShowList = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SHOW_CURRENCY"],
+		EMA.EMAToonRequestCurrency,
+		L["SHOW_CURRENCY_HELP"]
+	)
+	movingTop = movingTop - buttonHeight
+	EMA.settingsControl.checkBoxCurrencyOpenStartUpMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["CURR_STARTUP"],
+		EMA.SettingsToggleCurrencyOpenStartUpMaster,
+		L["CURR_STARTUP_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Create appearance & layout.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["APPEARANCE_LAYOUT_HEALDER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxCurrencyLockWindow = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["LOCK_CURR_LIST"],
+		EMA.SettingsToggleCurrencyLockWindow,
+		L["LOCK_CURR_LIST_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.currencyScaleSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SCALE"]
+	)
+	EMA.settingsControl.currencyScaleSlider:SetSliderValues( 0.5, 2, 0.01 )
+	EMA.settingsControl.currencyScaleSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeScale )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.currencyTransparencySlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TRANSPARENCY"]
+	)
+	EMA.settingsControl.currencyTransparencySlider:SetSliderValues( 0, 1, 0.01 )
+	EMA.settingsControl.currencyTransparencySlider:SetCallback( "OnValueChanged", EMA.SettingsChangeTransparency )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.currencyMediaBorder = EMAHelperSettings:CreateMediaBorder(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["BORDER_STYLE"]
+	)
+	EMA.settingsControl.currencyMediaBorder:SetCallback( "OnValueChanged", EMA.SettingsChangeBorderStyle )
+
+	EMA.settingsControl.currencyBorderColourPicker = EMAHelperSettings:CreateColourPicker(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left + 15,
+		movingTop - 15,
+		L["BORDER COLOUR"]
+	)
+	EMA.settingsControl.currencyBorderColourPicker:SetHasAlpha( true )
+	EMA.settingsControl.currencyBorderColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBorderColourPickerChanged )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMA.settingsControl.currencyMediaBackground = EMAHelperSettings:CreateMediaBackground(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["BACKGROUND"]
+	)
+	EMA.settingsControl.currencyMediaBackground:SetCallback( "OnValueChanged", EMA.SettingsChangeBackgroundStyle )
+	EMA.settingsControl.currencyBackgroundColourPicker = EMAHelperSettings:CreateColourPicker(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left + 15,
+		movingTop - 15,
+		L["BG_COLOUR"]
+	)
+	EMA.settingsControl.currencyBackgroundColourPicker:SetHasAlpha( true )
+	EMA.settingsControl.currencyBackgroundColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBackgroundColourPickerChanged )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	--Font
+	EMA.settingsControl.currencyMediaFont = EMAHelperSettings:CreateMediaFont(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["FONT"]
+	)
+	EMA.settingsControl.currencyMediaFont:SetCallback( "OnValueChanged", EMA.SettingsChangeFontStyle )
+	EMA.settingsControl.currencyFontSize = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		column2left,
+		movingTop,
+		L["FONT_SIZE"]
+	)
+	EMA.settingsControl.currencyFontSize:SetSliderValues( 8, 20 , 1 )
+	EMA.settingsControl.currencyFontSize:SetCallback( "OnValueChanged", EMA.SettingsChangeFontSize )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMA.settingsControl.currencySliderSpaceForName = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SPACE_FOR_NAME"]
+	)
+	EMA.settingsControl.currencySliderSpaceForName:SetSliderValues( 20, 200, 1 )
+	EMA.settingsControl.currencySliderSpaceForName:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceForName )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.currencySliderSpaceForGold = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SPACE_FOR_GOLD"]
+	)
+	EMA.settingsControl.currencySliderSpaceForGold:SetSliderValues( 20, 200, 1 )
+	EMA.settingsControl.currencySliderSpaceForGold:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceForGold )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.currencySliderSpaceForPoints = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SPACE_FOR_POINTS"]
+	)
+	EMA.settingsControl.currencySliderSpaceForPoints:SetSliderValues( 20, 200, 1 )
+	EMA.settingsControl.currencySliderSpaceForPoints:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceForPoints )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.currencySliderSpaceBetweenValues = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SPACE_BETWEEN_VALUES"]
+	)
+	EMA.settingsControl.currencySliderSpaceBetweenValues:SetSliderValues( 0, 20, 1 )
+	EMA.settingsControl.currencySliderSpaceBetweenValues:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceBetweenValues )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	return movingTop
+end
+
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	EMA.settingsControl.checkBoxCurrencyGold:SetValue( EMA.db.currGold )
+	EMA.settingsControl.checkBoxCurrencyGoldInGuildBank:SetValue( EMA.db.currGoldInGuildBank )
+	EMA.settingsControl.checkBoxCurrencyGoldInGuildBank:SetDisabled( not EMA.db.currGold )
+	EMA.settingsControl.editBoxCurrencyTypeOneID:SetValue( EMA.db.CcurrTypeOneName )
+	EMA.settingsControl.editBoxCurrencyTypeTwoID:SetValue ( EMA.db.CcurrTypeTwoName )
+	EMA.settingsControl.editBoxCurrencyTypeThreeID:SetValue ( EMA.db.CcurrTypeThreeName )
+	EMA.settingsControl.editBoxCurrencyTypeFourID:SetValue ( EMA.db.CcurrTypeFourName )
+	EMA.settingsControl.editBoxCurrencyTypeFiveID:SetValue ( EMA.db.CcurrTypeFiveName )
+	EMA.settingsControl.editBoxCurrencyTypeSixID:SetValue ( EMA.db.CcurrTypeSixName )
+	--state
+	EMA.settingsControl.checkBoxCurrencyOpenStartUpMaster:SetValue( EMA.db.currOpenStartUpMaster )
+	EMA.settingsControl.currencyTransparencySlider:SetValue( EMA.db.currencyFrameAlpha )
+	EMA.settingsControl.currencyScaleSlider:SetValue( EMA.db.currencyScale )
+	EMA.settingsControl.currencyMediaBorder:SetValue( EMA.db.currencyBorderStyle )
+	EMA.settingsControl.currencyMediaBackground:SetValue( EMA.db.currencyBackgroundStyle )
+	EMA.settingsControl.currencyBackgroundColourPicker:SetColor( EMA.db.currencyFrameBackgroundColourR, EMA.db.currencyFrameBackgroundColourG, EMA.db.currencyFrameBackgroundColourB, EMA.db.currencyFrameBackgroundColourA )
+	EMA.settingsControl.currencyBorderColourPicker:SetColor( EMA.db.currencyFrameBorderColourR, EMA.db.currencyFrameBorderColourG, EMA.db.currencyFrameBorderColourB, EMA.db.currencyFrameBorderColourA )
+	EMA.settingsControl.currencyMediaFont:SetValue( EMA.db.currencyFontStyle )
+	EMA.settingsControl.currencyFontSize:SetValue( EMA.db.currencyFontSize )
+	EMA.settingsControl.currencySliderSpaceForName:SetValue( EMA.db.currencyNameWidth )
+	EMA.settingsControl.currencySliderSpaceForGold:SetValue( EMA.db.currencyGoldWidth )
+	EMA.settingsControl.currencySliderSpaceForPoints:SetValue( EMA.db.currencyPointsWidth )
+	EMA.settingsControl.currencySliderSpaceBetweenValues:SetValue( EMA.db.currencySpacingWidth )
+	EMA.settingsControl.checkBoxCurrencyLockWindow:SetValue( EMA.db.currencyLockWindow )
+	if EMA.currencyListFrameCreated == true then
+		EMA:CurrencyListSetColumnWidth()
+		EMA:SettingsUpdateBorderStyle()
+		EMA:SettingsUpdateFontStyle()
+		EMA:CurrencyUpdateWindowLock()
+		EMAToonCurrencyListFrame:SetScale( EMA.db.currencyScale )
+		EMA:UpdateHendingText()
+		EMA:CurrencyListSetHeight()
+	end
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsToggleCurrencyGold( event, checked )
+	EMA.db.currGold = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleCurrencyGoldInGuildBank( event, checked )
+	EMA.db.currGoldInGuildBank = checked
+	EMA:SettingsRefresh()
+end
+
+
+function EMA:EditBoxChangedCurrencyTypeOneID( event, value )
+	local currName, id = EMA:MatchCurrValue(value)
+		EMA.db.CcurrTypeOne = id
+		EMA.db.CcurrTypeOneName = currName
+		EMA:EMAToonRequestCurrency()
+		EMA:SettingsRefresh()
+end
+
+
+function EMA:EditBoxChangedCurrencyTypeTwoID( event, value )
+	local currName, id = EMA:MatchCurrValue(value)
+		EMA.db.CcurrTypeTwo = id
+		EMA.db.CcurrTypeTwoName = currName
+		EMA:EMAToonRequestCurrency()
+		EMA:SettingsRefresh()
+end
+
+
+function EMA:EditBoxChangedCurrencyTypeThreeID( event, value )
+	local currName, id = EMA:MatchCurrValue(value)
+		EMA.db.CcurrTypeThree = id
+		EMA.db.CcurrTypeThreeName = currName
+		EMA:EMAToonRequestCurrency()
+		EMA:SettingsRefresh()
+end
+
+
+function EMA:EditBoxChangedCurrencyTypeFourID( event, value )
+	local currName, id = EMA:MatchCurrValue(value)
+		EMA.db.CcurrTypeFour = id
+		EMA.db.CcurrTypeFourName = currName
+		EMA:EMAToonRequestCurrency()
+		EMA:SettingsRefresh()
+end
+
+
+function EMA:EditBoxChangedCurrencyTypeFiveID( event, value )
+	local currName, id = EMA:MatchCurrValue(value)
+		EMA.db.CcurrTypeFive = id
+		EMA.db.CcurrTypeFiveName = currName
+		EMA:EMAToonRequestCurrency()
+		EMA:SettingsRefresh()
+end
+
+
+function EMA:EditBoxChangedCurrencyTypeSixID( event, value )
+	--EMA:Print("test", value)
+	local currName, id = EMA:MatchCurrValue(value)
+		EMA.db.CcurrTypeSix = id
+		EMA.db.CcurrTypeSixName = currName
+		EMA:EMAToonRequestCurrency()
+		EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleCurrencyOpenStartUpMaster( event, checked )
+	EMA.db.currOpenStartUpMaster = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeScale( event, value )
+	EMA.db.currencyScale = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeTransparency( event, value )
+	EMA.db.currencyFrameAlpha = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeBorderStyle( event, value )
+	EMA.db.currencyBorderStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeBackgroundStyle( event, value )
+	EMA.db.currencyBackgroundStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsBackgroundColourPickerChanged( event, r, g, b, a )
+	EMA.db.currencyFrameBackgroundColourR = r
+	EMA.db.currencyFrameBackgroundColourG = g
+	EMA.db.currencyFrameBackgroundColourB = b
+	EMA.db.currencyFrameBackgroundColourA = a
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsBorderColourPickerChanged( event, r, g, b, a )
+	EMA.db.currencyFrameBorderColourR = r
+	EMA.db.currencyFrameBorderColourG = g
+	EMA.db.currencyFrameBorderColourB = b
+	EMA.db.currencyFrameBorderColourA = a
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeFontStyle( event, value )
+	EMA.db.currencyFontStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeFontSize( event, value )
+	EMA.db.currencyFontSize = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeSliderSpaceForName( event, value )
+	EMA.db.currencyNameWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeSliderSpaceForGold( event, value )
+	EMA.db.currencyGoldWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeSliderSpaceForPoints( event, value )
+	EMA.db.currencyPointsWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeSliderSpaceBetweenValues( event, value )
+	EMA.db.currencySpacingWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleCurrencyLockWindow( event, checked )
+	EMA.db.currencyLockWindow = checked
+	EMA:CurrencyUpdateWindowLock()
+	EMA:SettingsRefresh()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	EMA.currencyTotalGold = 0
+	EMA.currencyListFrameCreated = false
+	EMA.currencyFrameCharacterInfo = {}
+	EMA.currentCurrencyValues = {}
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Create the currency list frame.
+	EMA:CreateEMAToonCurrencyListFrame()
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	-- WoW events.
+	--EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+	if EMA.db.currOpenStartUpMaster == true then
+		if EMAApi.IsCharacterTheMaster( self.characterName ) == true then
+			EMA:ScheduleTimer( "EMAToonRequestCurrency", 20 )
+		end
+	end
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.currGold = settings.currGold
+		EMA.db.currGoldInGuildBank = settings.currGoldInGuildBank
+		EMA.db.CcurrTypeOne = settings.CcurrTypeOne
+		EMA.db.CcurrTypeOneName = settings.CcurrTypeOneName
+		EMA.db.CcurrTypeTwo = settings.CcurrTypeTwo
+		EMA.db.CcurrTypeTwoName = settings.CcurrTypeTwoName
+		EMA.db.CcurrTypeThree = settings.CcurrTypeThree
+		EMA.db.CcurrTypeThreeName = settings.CcurrTypeThreeName
+		EMA.db.CcurrTypeFour = settings.CcurrTypeFour
+		EMA.db.CcurrTypeFourName = settings.CcurrTypeFourName
+		EMA.db.CcurrTypeFive = settings.CcurrTypeFive
+		EMA.db.CcurrTypeFiveName = settings.CcurrTypeFiveName
+		EMA.db.CcurrTypeSix = settings.CcurrTypeSix
+		EMA.db.CcurrTypeSixName = settings.CcurrTypeSixName
+		EMA.db.currOpenStartUpMaster = settings.currOpenStartUpMaster
+		EMA.db.currencyScale = settings.currencyScale
+		EMA.db.currencyFrameAlpha = settings.currencyFrameAlpha
+		EMA.db.currencyFramePoint = settings.currencyFramePoint
+		EMA.db.currencyFrameRelativePoint = settings.currencyFrameRelativePoint
+		EMA.db.currencyFrameXOffset = settings.currencyFrameXOffset
+		EMA.db.currencyFrameYOffset = settings.currencyFrameYOffset
+		EMA.db.currencyFrameBackgroundColourR = settings.currencyFrameBackgroundColourR
+		EMA.db.currencyFrameBackgroundColourG = settings.currencyFrameBackgroundColourG
+		EMA.db.currencyFrameBackgroundColourB = settings.currencyFrameBackgroundColourB
+		EMA.db.currencyFrameBackgroundColourA = settings.currencyFrameBackgroundColourA
+		EMA.db.currencyFrameBorderColourR = settings.currencyFrameBorderColourR
+		EMA.db.currencyFrameBorderColourG = settings.currencyFrameBorderColourG
+		EMA.db.currencyFrameBorderColourB = settings.currencyFrameBorderColourB
+		EMA.db.currencyFrameBorderColourA = settings.currencyFrameBorderColourA
+		EMA.db.currencyBorderStyle = settings.currencyBorderStyle
+		EMA.db.currencyBackgroundStyle = settings.currencyBackgroundStyle
+		EMA.db.currencyFontSize = settings.currencyFontSize
+		EMA.db.currencyFontStyle = settings.currencyFontStyle
+		EMA.db.currencyNameWidth = settings.currencyNameWidth
+		EMA.db.currencyPointsWidth = settings.currencyPointsWidth
+		EMA.db.currencyGoldWidth = settings.currencyGoldWidth
+		EMA.db.currencySpacingWidth = settings.currencySpacingWidth
+		EMA.db.currencyLockWindow = settings.currencyLockWindow
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+function EMA:CurrDropDownBox()
+	for name, id in pairs( EMA.currTypes ) do
+		local currName = EMA:CurrencyIconAndName( id )
+		EMA.simpleCurrList[currName] = currName
+	end
+	EMA.simpleCurrList[""] = ""
+	table.sort( EMA.simpleCurrList )
+	return EMA.simpleCurrList
+end
+
+
+function EMA:MatchCurrValue(value)
+	if value == "" then
+		return "", 0
+	end
+	for name, id in pairs( EMA.currTypes ) do
+		local currName = EMA:CurrencyIconAndName( id )
+		if value == currName then
+			return currName, id
+		end
+	end
+end
+
+function EMA:CreateEMAToonCurrencyListFrame()
+	-- The frame.
+	local frame = CreateFrame( "Frame", "EMAToonCurrencyListWindowFrame", UIParent )
+	frame.obj = EMA
+	frame:SetFrameStrata( "LOW" )
+	frame:SetToplevel( false )
+	frame:SetClampedToScreen( true )
+	frame:EnableMouse( true )
+	frame:SetMovable( true )
+	frame:RegisterForDrag( "LeftButton" )
+	frame:SetScript( "OnDragStart",
+		function( this )
+			if IsAltKeyDown() then
+				this:StartMoving()
+			end
+		end )
+	frame:SetScript( "OnDragStop",
+		function( this )
+			this:StopMovingOrSizing()
+			local point, relativeTo, relativePoint, xOffset, yOffset = this:GetPoint()
+			EMA.db.currencyFramePoint = point
+			EMA.db.currencyFrameRelativePoint = relativePoint
+			EMA.db.currencyFrameXOffset = xOffset
+			EMA.db.currencyFrameYOffset = yOffset
+		end	)
+	frame:SetWidth( 500 )
+	frame:SetHeight( 200 )
+	frame:ClearAllPoints()
+	frame:SetPoint( EMA.db.currencyFramePoint, UIParent, EMA.db.currencyFrameRelativePoint, EMA.db.currencyFrameXOffset, EMA.db.currencyFrameYOffset )
+	frame:SetBackdrop( {
+		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+		tile = true, tileSize = 10, edgeSize = 10,
+		insets = { left = 3, right = 3, top = 3, bottom = 3 }
+	} )
+
+	-- Create the title for the frame.
+	local titleName = frame:CreateFontString( "EMAToonCurrencyListWindowFrameTitleText", "OVERLAY", "GameFontNormal" )
+	titleName:SetPoint( "TOPLEFT", frame, "TOPLEFT", 3, -8 )
+	titleName:SetTextColor( NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1.0 )
+	titleName:SetText( L["CURRENCY"] )
+	titleName:SetWidth( 200 )
+	titleName:SetJustifyH( "LEFT" )
+	titleName:SetWordWrap( false )
+	frame.titleName = titleName
+
+	-- Create the headings.
+	local left = 10
+	local spacing = 50
+	local width = 50
+	local top = -30
+	local parentFrame = frame
+	local r = 1.0
+	local g = 0.96
+	local b = 0.41
+	local a = 1.0
+	-- Set the characters name font string.
+	local frameCharacterName = EMA.globalCurrencyFramePrefix.."TitleCharacterName"
+	local frameCharacterNameText = parentFrame:CreateFontString( frameCharacterName.."Text", "OVERLAY", "GameFontNormal" )
+	frameCharacterNameText:SetText( L["NAME"] )
+	frameCharacterNameText:SetTextColor( r, g, b, a )
+	frameCharacterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameCharacterNameText:SetWidth( width * 2.5 )
+	frameCharacterNameText:SetJustifyH( "LEFT" )
+	frame.characterNameText = frameCharacterNameText
+	left = left + (spacing * 2)
+	-- Set the Gold font string.
+	local frameGold = EMA.globalCurrencyFramePrefix.."TitleGold"
+	local frameGoldText = parentFrame:CreateFontString( frameGold.."Text", "OVERLAY", "GameFontNormal" )
+	frameGoldText:SetText( L["GOLD"] )
+	frameGoldText:SetTextColor( r, g, b, a )
+	frameGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameGoldText:SetWidth( width )
+	frameGoldText:SetJustifyH( "CENTER" )
+	frame.GoldText = frameGoldText
+	left = left + spacing
+	-- Set the TypeOne font string.
+	local frameTypeOne = EMA.globalCurrencyFramePrefix.."TitleTypeOne"
+	local frameTypeOneText = parentFrame:CreateFontString( frameTypeOne.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeOneText:SetText( L["CURR"]..L["1"] )
+	frameTypeOneText:SetTextColor( r, g, b, a )
+	frameTypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeOneText:SetWidth( width )
+	frameTypeOneText:SetJustifyH( "CENTER" )
+	frame.TypeOneText = frameTypeOneText
+	left = left + spacing
+	-- Set the TypeTwo font string.
+	local frameTypeTwo = EMA.globalCurrencyFramePrefix.."TitleTypeTwo"
+	local frameTypeTwoText = parentFrame:CreateFontString( frameTypeTwo.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeTwoText:SetText( L["CURR"]..L["2"] )
+	frameTypeTwoText:SetTextColor( r, g, b, a )
+	frameTypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeTwoText:SetWidth( width )
+	frameTypeTwoText:SetJustifyH( "CENTER" )
+	frame.TypeTwoText = frameTypeTwoText
+	left = left + spacing
+	-- Set the TypeThree font string.
+	local frameTypeThree = EMA.globalCurrencyFramePrefix.."TitleTypeThree"
+	local frameTypeThreeText = parentFrame:CreateFontString( frameTypeThree.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeThreeText:SetText( L["CURR"]..L["3"] )
+	frameTypeThreeText:SetTextColor( r, g, b, a )
+	frameTypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeThreeText:SetWidth( width )
+	frameTypeThreeText:SetJustifyH( "CENTER" )
+	frame.TypeThreeText = frameTypeThreeText
+	left = left + spacing
+	-- Set the TypeFour font string.
+	local frameTypeFour = EMA.globalCurrencyFramePrefix.."TitleTypeFour"
+	local frameTypeFourText = parentFrame:CreateFontString( frameTypeFour.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeFourText:SetText( L["CURR"]..L["4"] )
+	frameTypeFourText:SetTextColor( r, g, b, a )
+	frameTypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeFourText:SetWidth( width )
+	frameTypeFourText:SetJustifyH( "CENTER" )
+	frame.TypeFourText = frameTypeFourText
+	left = left + spacing
+	-- Set the TypeFive font string.
+	local frameTypeFive = EMA.globalCurrencyFramePrefix.."TitleTypeFive"
+	local frameTypeFiveText = parentFrame:CreateFontString( frameTypeFive.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeFiveText:SetText( L["CURR"]..L["5"] )
+	frameTypeFiveText:SetTextColor( r, g, b, a )
+	frameTypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeFiveText:SetWidth( width )
+	frameTypeFiveText:SetJustifyH( "CENTER" )
+	frame.TypeFiveText = frameTypeFiveText
+	left = left + spacing
+	-- Set the TypeSix font string.
+	local frameTypeSix = EMA.globalCurrencyFramePrefix.."TitleTypeSix"
+	local frameTypeSixText = parentFrame:CreateFontString( frameTypeSix.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeSixText:SetText( L["CURR"]..L["6"] )
+	frameTypeSixText:SetTextColor( r, g, b, a )
+	frameTypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeSixText:SetWidth( width )
+	frameTypeSixText:SetJustifyH( "CENTER" )
+	frame.TypeSixText = frameTypeSixText
+	left = left + spacing
+	-- Set the Total Gold font string.
+	left = 10
+	top = -50
+	local frameTotalGoldTitle = EMA.globalCurrencyFramePrefix.."TitleTotalGold"
+	local frameTotalGoldTitleText = parentFrame:CreateFontString( frameTotalGoldTitle.."Text", "OVERLAY", "GameFontNormal" )
+	frameTotalGoldTitleText:SetText( L["TOTAL"] )
+	frameTotalGoldTitleText:SetTextColor( r, g, b, a )
+	frameTotalGoldTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTotalGoldTitleText:SetWidth( width )
+	frameTotalGoldTitleText:SetJustifyH( "LEFT" )
+	frame.TotalGoldTitleText = frameTotalGoldTitleText
+
+	local frameTotalGoldGuildTitle = EMA.globalCurrencyFramePrefix.."TitleTotalGoldGuild"
+	local frameTotalGoldGuildTitleText = parentFrame:CreateFontString( frameTotalGoldGuildTitle.."Text", "OVERLAY", "GameFontNormal" )
+	frameTotalGoldGuildTitleText:SetText( L["GUILD"] )
+	frameTotalGoldGuildTitleText:SetTextColor( r, g, b, a )
+	frameTotalGoldGuildTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTotalGoldGuildTitleText:SetWidth( width )
+	frameTotalGoldGuildTitleText:SetJustifyH( "LEFT" )
+	frame.TotalGoldGuildTitleText = frameTotalGoldGuildTitleText
+
+	local frameTotalGold = EMA.globalCurrencyFramePrefix.."TotalGold"
+	local frameTotalGoldText = parentFrame:CreateFontString( frameTotalGold.."Text", "OVERLAY", "GameFontNormal" )
+	frameTotalGoldText:SetText( "0" )
+	frameTotalGoldText:SetTextColor( r, g, b, a )
+	frameTotalGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTotalGoldText:SetWidth( width )
+	frameTotalGoldText:SetJustifyH( "RIGHT" )
+	frame.TotalGoldText = frameTotalGoldText
+
+	local frameTotalGoldGuild = EMA.globalCurrencyFramePrefix.."TotalGoldGuild"
+	local frameTotalGoldGuildText = parentFrame:CreateFontString( frameTotalGoldGuild.."Text", "OVERLAY", "GameFontNormal" )
+	frameTotalGoldGuildText:SetText( "0" )
+	frameTotalGoldGuildText:SetTextColor( r, g, b, a )
+	frameTotalGoldGuildText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTotalGoldGuildText:SetWidth( width )
+	frameTotalGoldGuildText:SetJustifyH( "RIGHT" )
+	frame.TotalGoldGuildText = frameTotalGoldGuildText
+
+	-- Set frame width.
+	frame:SetWidth( left + 10 )
+
+	-- Set transparency of the the frame (and all its children).
+	frame:SetAlpha( EMA.db.currencyFrameAlpha )
+
+	-- Set scale.
+	frame:SetScale( EMA.db.currencyScale )
+
+	-- Set the global frame reference for this frame.
+	EMAToonCurrencyListFrame = frame
+
+	-- Close.
+	local closeButton = CreateFrame( "Button", EMA.globalCurrencyFramePrefix.."ButtonClose", frame, "UIPanelCloseButton" )
+	closeButton:SetScript( "OnClick", function() EMAToonCurrencyListFrame:Hide() end )
+	closeButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", 0, 0 )
+	frame.closeButton = closeButton
+
+	-- Update.
+	local updateButton = CreateFrame( "Button", EMA.globalCurrencyFramePrefix.."ButtonUpdate", frame, "UIPanelButtonTemplate" )
+	updateButton:SetScript( "OnClick", function() EMA:EMAToonRequestCurrency() end )
+	updateButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -30, -4 )
+	updateButton:SetHeight( 22 )
+	updateButton:SetWidth( 55 )
+	updateButton:SetText( L["UPDATE"] )
+
+	frame.updateButton = updateButton
+
+	EMA:SettingsUpdateBorderStyle()
+	EMA:CurrencyUpdateWindowLock()
+	EMA:SettingsUpdateFontStyle()
+	EMAToonCurrencyListFrame:Hide()
+	EMA.currencyListFrameCreated = true
+	EMA:UpdateHendingText()
+	EMA:CurrencyListSetHeight()
+end
+
+function EMA:UpdateHendingText()
+	local parentFrame = EMAToonCurrencyListFrame
+	-- Type One
+	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeOne )
+	if icon ~= nil then
+		local iconTextureString = strconcat(" |T"..icon..":20|t")
+			parentFrame.TypeOneText:SetText( iconTextureString )
+	end
+	-- Type Two
+	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeTwo )
+	if icon ~= nil then
+		local iconTextureString = strconcat(" |T"..icon..":20|t")
+			parentFrame.TypeTwoText:SetText( iconTextureString )
+	end
+	-- Type Three
+	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeThree )
+	if icon ~= nil then
+		local iconTextureString = strconcat(" |T"..icon..":20|t")
+			parentFrame.TypeThreeText:SetText( iconTextureString )
+	end
+	-- Type Four
+	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeFour )
+	if icon ~= nil then
+		local iconTextureString = strconcat(" |T"..icon..":20|t")
+			parentFrame.TypeFourText:SetText( iconTextureString )
+	end
+	-- Type Five
+	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeFive )
+	if icon ~= nil then
+		local iconTextureString = strconcat(" |T"..icon..":20|t")
+			parentFrame.TypeFiveText:SetText( iconTextureString )
+	end
+	-- Type six
+	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeSix )
+	if icon ~= nil then
+		local iconTextureString = strconcat(" |T"..icon..":20|t")
+			parentFrame.TypeSixText:SetText( iconTextureString )
+	end
+end
+
+function EMA:CurrencyUpdateWindowLock()
+	if EMA.db.currencyLockWindow == false then
+		EMAToonCurrencyListFrame:EnableMouse( true )
+	else
+		EMAToonCurrencyListFrame:EnableMouse( false )
+	end
+end
+
+function EMA:SettingsUpdateBorderStyle()
+	local borderStyle = EMA.SharedMedia:Fetch( "border", EMA.db.currencyBorderStyle )
+	local backgroundStyle = EMA.SharedMedia:Fetch( "background", EMA.db.currencyBackgroundStyle )
+	local frame = EMAToonCurrencyListFrame
+	frame:SetBackdrop( {
+		bgFile = backgroundStyle,
+		edgeFile = borderStyle,
+		tile = true, tileSize = frame:GetWidth(), edgeSize = 10,
+		insets = { left = 3, right = 3, top = 3, bottom = 3 }
+	} )
+	frame:SetBackdropColor( EMA.db.currencyFrameBackgroundColourR, EMA.db.currencyFrameBackgroundColourG, EMA.db.currencyFrameBackgroundColourB, EMA.db.currencyFrameBackgroundColourA )
+	frame:SetBackdropBorderColor( EMA.db.currencyFrameBorderColourR, EMA.db.currencyFrameBorderColourG, EMA.db.currencyFrameBorderColourB, EMA.db.currencyFrameBorderColourA )
+	--frame:ClearAllPoints()
+	frame:SetAlpha( EMA.db.currencyFrameAlpha )
+	frame:SetPoint( EMA.db.currencyFramePoint, UIParent, EMA.db.currencyFrameRelativePoint, EMA.db.currencyFrameXOffset, EMA.db.currencyFrameYOffset )
+end
+
+function EMA:SettingsUpdateFontStyle()
+	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.currencyFontStyle )
+	local textSize = EMA.db.currencyFontSize
+	local frame = EMAToonCurrencyListFrame
+	frame.titleName:SetFont( textFont , textSize , "OUTLINE")
+	frame.characterNameText:SetFont( textFont , textSize , "OUTLINE")
+	frame.GoldText:SetFont( textFont , textSize , "OUTLINE")
+	frame.TotalGoldGuildTitleText:SetFont( textFont , textSize , "OUTLINE")
+	frame.TotalGoldGuildText:SetFont( textFont , textSize , "OUTLINE")
+	frame.TotalGoldText:SetFont( textFont , textSize , "OUTLINE")
+	frame.TotalGoldTitleText:SetFont( textFont , textSize , "OUTLINE")
+	for characterName, currencyFrameCharacterInfo in pairs( EMA.currencyFrameCharacterInfo ) do
+		--EMA:Print("test", characterName)
+		--currencyFrameCharacterInfo.characterNameText:SetFont( textFont , textSize , "OUTLINE")
+		currencyFrameCharacterInfo.characterNameText:SetFont( textFont , textSize , "OUTLINE")
+		currencyFrameCharacterInfo.GoldText:SetFont( textFont , textSize , "OUTLINE")
+		currencyFrameCharacterInfo.TypeOneText:SetFont( textFont , textSize , "OUTLINE")
+		currencyFrameCharacterInfo.TypeTwoText:SetFont( textFont , textSize , "OUTLINE")
+		currencyFrameCharacterInfo.TypeThreeText:SetFont( textFont , textSize , "OUTLINE")
+		currencyFrameCharacterInfo.TypeFourText:SetFont( textFont , textSize , "OUTLINE")
+		currencyFrameCharacterInfo.TypeFiveText:SetFont( textFont , textSize , "OUTLINE")
+		currencyFrameCharacterInfo.TypeSixText:SetFont( textFont , textSize , "OUTLINE")
+	end
+end
+
+
+function EMA:CurrencyListSetHeight()
+	local additionalLines = 0
+	local addHeight = 0
+	if EMA.db.currGold == true then
+		if EMA.db.currGoldInGuildBank == true then
+			additionalLines = 2
+			addHeight = 7
+		else
+			additionalLines = 1
+			addHeight = 5
+		end
+	end
+	EMAToonCurrencyListFrame:SetHeight( 56 + (( EMAApi.GetTeamListMaximumOrderOnline() + additionalLines) * 15) + addHeight )
+end
+
+function EMA:CurrencyListSetColumnWidth()
+	local nameWidth = EMA.db.currencyNameWidth
+	local pointsWidth = EMA.db.currencyPointsWidth
+	local goldWidth = EMA.db.currencyGoldWidth
+	local spacingWidth = EMA.db.currencySpacingWidth
+	local frameHorizontalSpacing = 10
+	local numberOfPointsColumns = 0
+	local parentFrame = EMAToonCurrencyListFrame
+	local headingRowTopPoint = -30
+	local left = frameHorizontalSpacing
+	local haveGold = 0
+	-- Heading rows.
+	parentFrame.characterNameText:SetWidth( nameWidth )
+	parentFrame.characterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
+	left = left + nameWidth + spacingWidth
+ 	if EMA.db.currGold == true then
+		parentFrame.GoldText:SetWidth( goldWidth )
+		parentFrame.GoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
+		left = left + goldWidth + (spacingWidth * 3)
+		parentFrame.GoldText:Show()
+		haveGold = 1
+	else
+		parentFrame.GoldText:Hide()
+		haveGold = 0
+	end
+	if EMA.db.CcurrTypeOneName == "" then
+		parentFrame.TypeOneText:Hide()
+	else
+		parentFrame.TypeOneText:SetWidth( pointsWidth )
+		parentFrame.TypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
+		left = left + pointsWidth + spacingWidth
+		numberOfPointsColumns = numberOfPointsColumns + 1
+		parentFrame.TypeOneText:Show()
+	end
+	if EMA.db.CcurrTypeTwoName == "" then
+		parentFrame.TypeTwoText:Hide()
+	else
+		parentFrame.TypeTwoText:SetWidth( pointsWidth )
+		parentFrame.TypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
+		left = left + pointsWidth + spacingWidth
+		numberOfPointsColumns = numberOfPointsColumns + 1
+		parentFrame.TypeTwoText:Show()
+	end
+	if EMA.db.CcurrTypeThreeName == "" then
+		parentFrame.TypeThreeText:Hide()
+	else
+		parentFrame.TypeThreeText:SetWidth( pointsWidth )
+		parentFrame.TypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
+		left = left + pointsWidth + spacingWidth
+		numberOfPointsColumns = numberOfPointsColumns + 1
+		parentFrame.TypeThreeText:Show()
+	end
+	if EMA.db.CcurrTypeFourName == "" then
+		parentFrame.TypeFourText:Hide()
+	else
+		parentFrame.TypeFourText:SetWidth( pointsWidth )
+		parentFrame.TypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
+		left = left + pointsWidth + spacingWidth
+		numberOfPointsColumns = numberOfPointsColumns + 1
+		parentFrame.TypeFourText:Show()
+	end
+	if EMA.db.CcurrTypeFiveName == "" then
+		parentFrame.TypeFiveText:Hide()
+	else
+		parentFrame.TypeFiveText:SetWidth( pointsWidth )
+		parentFrame.TypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
+		left = left + pointsWidth + spacingWidth
+		numberOfPointsColumns = numberOfPointsColumns + 1
+		parentFrame.TypeFiveText:Show()
+	end
+	if EMA.db.CcurrTypeSixName == "" then
+		parentFrame.TypeSixText:Hide()
+	else
+		parentFrame.TypeSixText:SetWidth( pointsWidth )
+		parentFrame.TypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
+		left = left + pointsWidth + spacingWidth
+		numberOfPointsColumns = numberOfPointsColumns + 1
+		parentFrame.TypeSixText:Show()
+	end
+	-- Character rows.
+	for characterName, currencyFrameCharacterInfo in pairs( EMA.currencyFrameCharacterInfo ) do
+		if EMAPrivate.Team.GetCharacterOnlineStatus (characterName) == true then
+			local left = frameHorizontalSpacing
+			local characterRowTopPoint = currencyFrameCharacterInfo.characterRowTopPoint
+				currencyFrameCharacterInfo.characterNameText:SetWidth( nameWidth )
+				currencyFrameCharacterInfo.characterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
+				left = left + nameWidth + spacingWidth
+			if EMA.db.currGold == true then
+				currencyFrameCharacterInfo.GoldText:SetWidth( goldWidth )
+				currencyFrameCharacterInfo.GoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
+				left = left + goldWidth + (spacingWidth * 3)
+				currencyFrameCharacterInfo.GoldText:Show()
+			else
+				currencyFrameCharacterInfo.GoldText:Hide()
+			end
+			if EMA.db.CcurrTypeOneName == "" then
+				currencyFrameCharacterInfo.TypeOneText:Hide()
+			else
+				currencyFrameCharacterInfo.TypeOneText:SetWidth( pointsWidth )
+				currencyFrameCharacterInfo.TypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
+				left = left + pointsWidth + spacingWidth
+				currencyFrameCharacterInfo.TypeOneText:Show()
+			end
+			if EMA.db.CcurrTypeTwoName == "" then
+				currencyFrameCharacterInfo.TypeTwoText:Hide()
+			else
+				currencyFrameCharacterInfo.TypeTwoText:SetWidth( pointsWidth )
+				currencyFrameCharacterInfo.TypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
+				left = left + pointsWidth + spacingWidth
+				currencyFrameCharacterInfo.TypeTwoText:Show()
+			end
+			if EMA.db.CcurrTypeThreeName == "" then
+				currencyFrameCharacterInfo.TypeThreeText:Hide()
+			else
+				currencyFrameCharacterInfo.TypeThreeText:SetWidth( pointsWidth )
+				currencyFrameCharacterInfo.TypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
+				left = left + pointsWidth + spacingWidth
+				currencyFrameCharacterInfo.TypeThreeText:Show()
+			end
+			if EMA.db.CcurrTypeFourName == "" then
+				currencyFrameCharacterInfo.TypeFourText:Hide()
+			else
+				currencyFrameCharacterInfo.TypeFourText:SetWidth( pointsWidth )
+				currencyFrameCharacterInfo.TypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
+				left = left + pointsWidth + spacingWidth
+				currencyFrameCharacterInfo.TypeFourText:Show()
+			end
+			if EMA.db.CcurrTypeFiveName == "" then
+				currencyFrameCharacterInfo.TypeFiveText:Hide()
+			else
+				currencyFrameCharacterInfo.TypeFiveText:SetWidth( pointsWidth )
+				currencyFrameCharacterInfo.TypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
+				left = left + pointsWidth + spacingWidth
+				currencyFrameCharacterInfo.TypeFiveText:Show()
+
+			end
+			if EMA.db.CcurrTypeSixName == "" then
+				currencyFrameCharacterInfo.TypeSixText:Hide()
+			else
+				currencyFrameCharacterInfo.TypeSixText:SetWidth( pointsWidth )
+				currencyFrameCharacterInfo.TypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
+				left = left + pointsWidth + spacingWidth
+				currencyFrameCharacterInfo.TypeSixText:Show()
+			end
+		end
+	end
+	-- Parent frame width and title.
+	local finalParentWidth = frameHorizontalSpacing + nameWidth + spacingWidth + (haveGold * (goldWidth + (spacingWidth * 3))) + (numberOfPointsColumns * (pointsWidth + spacingWidth)) + frameHorizontalSpacing
+	if finalParentWidth < 95 then
+		finalParentWidth = 95
+	end
+	local widthOfCloseAndUpdateButtons = 70
+	parentFrame.titleName:SetWidth( finalParentWidth - widthOfCloseAndUpdateButtons - frameHorizontalSpacing - frameHorizontalSpacing )
+	parentFrame.titleName:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", frameHorizontalSpacing, -9 )
+	if EMA.db.currGold == true then
+		if numberOfPointsColumns > 1 then
+			parentFrame.titleName:SetText( L["EMA_CURRENCY"] )
+		else
+			parentFrame.titleName:SetText( L["CURRENCY"] )
+		end
+	else
+		if numberOfPointsColumns < 2 then
+			parentFrame.titleName:SetText( "" )
+		end
+		if numberOfPointsColumns == 2 then
+			parentFrame.titleName:SetText( L["CURR"] )
+		end
+		if (numberOfPointsColumns >= 3) and (numberOfPointsColumns <= 4) then
+			parentFrame.titleName:SetText( L["CURRENCY"] )
+		end
+		if numberOfPointsColumns > 4 then
+			parentFrame.titleName:SetText( L["EMA_CURRENCY"] )
+		end
+	end
+	parentFrame:SetWidth( finalParentWidth )
+	-- Total Gold.
+	local nameLeft = frameHorizontalSpacing
+	local goldLeft = frameHorizontalSpacing + nameWidth + spacingWidth
+	--local guildTop = -35 - ((EMAApi.GetTeamListMaximumOrder() + 1) * 15) - 5
+	--local goldTop = -35 - ((EMAApi.GetTeamListMaximumOrder() + 1) * 15) - 7
+	local guildTop = -35 - ((EMAApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 5
+	local goldTop = -35 - ((EMAApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 7
+	if EMA.db.currGold == true then
+		if EMA.db.currGoldInGuildBank == true then
+			parentFrame.TotalGoldGuildTitleText:SetWidth( nameWidth )
+			parentFrame.TotalGoldGuildTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", nameLeft, guildTop )
+			parentFrame.TotalGoldGuildTitleText:Show()
+			parentFrame.TotalGoldGuildText:SetWidth( goldWidth )
+			parentFrame.TotalGoldGuildText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", goldLeft, guildTop )
+			parentFrame.TotalGoldGuildText:Show()
+			--goldTop = -35 - ((EMAApi.GetTeamListMaximumOrder() + 2) * 15) - 5
+			goldTop = -35 - ((EMAApi.GetTeamListMaximumOrderOnline() + 2) * 15) - 5
+		else
+			parentFrame.TotalGoldGuildTitleText:Hide()
+			parentFrame.TotalGoldGuildText:Hide()
+		end
+		parentFrame.TotalGoldTitleText:SetWidth( nameWidth )
+		parentFrame.TotalGoldTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", nameLeft, goldTop )
+		parentFrame.TotalGoldTitleText:Show()
+		parentFrame.TotalGoldText:SetWidth( goldWidth )
+		parentFrame.TotalGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", goldLeft, goldTop )
+		parentFrame.TotalGoldText:Show()
+	else
+		parentFrame.TotalGoldTitleText:Hide()
+		parentFrame.TotalGoldText:Hide()
+		parentFrame.TotalGoldGuildTitleText:Hide()
+		parentFrame.TotalGoldGuildText:Hide()
+	end
+end
+
+
+
+
+function EMA:CreateEMACurrencyFrameInfo( characterName, parentFrame )
+	--EMA.Print("makelist", characterName)
+	--if EMAPrivate.Team.GetCharacterOnlineStatus (characterName) == true then
+	local left = 10
+	local spacing = 50
+	local width = 50
+	local top = 0
+	--local top = -35 + (-15 * EMAApi.GetPositionForCharacterName( characterName ))
+	-- WHAT THE HELL IS GOING ON HERE! Ebony!
+		local height1 = -35 + ( -15 * EMAApi.GetPositionForCharacterName( characterName) )
+		local height2 = -35 + ( -15 * EMAApi.GetPositionForCharacterNameOnline( characterName) )
+		if height1 < height2 then
+			--EMA:Print("greater than ", characterName )
+			top = height2
+		elseif height1 > height2 then
+			top = height2
+		else
+			top = height2
+		end
+	--EMA:Print("Top", top)
+	-- Create the table to hold the status bars for this character.
+	EMA.currencyFrameCharacterInfo[characterName] = {}
+	-- Get the character info table.
+	local currencyFrameCharacterInfo = EMA.currencyFrameCharacterInfo[characterName]
+	currencyFrameCharacterInfo.characterRowTopPoint = top
+	-- Set the characters name font string.
+	local frameCharacterName = EMA.globalCurrencyFramePrefix.."CharacterName"
+	local frameCharacterNameText = parentFrame:CreateFontString( frameCharacterName.."Text", "OVERLAY", "GameFontNormal" )
+	frameCharacterNameText:SetText( Ambiguate( characterName , "none" ) )
+	frameCharacterNameText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	frameCharacterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameCharacterNameText:SetWidth( width * 2.5 )
+	frameCharacterNameText:SetJustifyH( "LEFT" )
+	currencyFrameCharacterInfo.characterNameText = frameCharacterNameText
+	left = left + (spacing * 2)
+	-- Set the Gold font string.
+	local frameGold = EMA.globalCurrencyFramePrefix.."Gold"
+	local frameGoldText = parentFrame:CreateFontString( frameGold.."Text", "OVERLAY", "GameFontNormal" )
+	frameGoldText:SetText( "0" )
+	frameGoldText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	frameGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameGoldText:SetWidth( width )
+	frameGoldText:SetJustifyH( "RIGHT" )
+	currencyFrameCharacterInfo.GoldText = frameGoldText
+	left = left + spacing
+	-- Set the TypeOne font string.
+	local frameTypeOne = EMA.globalCurrencyFramePrefix.."TypeOne"
+	local frameTypeOneText = parentFrame:CreateFontString( frameTypeOne.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeOneText:SetText( "0" )
+	frameTypeOneText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	frameTypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeOneText:SetWidth( width )
+	frameTypeOneText:SetJustifyH( "CENTER" )
+	currencyFrameCharacterInfo.TypeOneText = frameTypeOneText
+	left = left + spacing
+	-- Set the TypeTwo font string.
+	local frameTypeTwo = EMA.globalCurrencyFramePrefix.."TypeTwo"
+	local frameTypeTwoText = parentFrame:CreateFontString( frameTypeTwo.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeTwoText:SetText( "0" )
+	frameTypeTwoText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	frameTypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeTwoText:SetWidth( width )
+	frameTypeTwoText:SetJustifyH( "CENTER" )
+	currencyFrameCharacterInfo.TypeTwoText = frameTypeTwoText
+	left = left + spacing
+		-- Set the TypeThree font string.
+	local frameTypeThree = EMA.globalCurrencyFramePrefix.."TypeThree"
+	local frameTypeThreeText = parentFrame:CreateFontString( frameTypeThree.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeThreeText:SetText( "0" )
+	frameTypeThreeText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	frameTypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeThreeText:SetWidth( width )
+	frameTypeThreeText:SetJustifyH( "CENTER" )
+	currencyFrameCharacterInfo.TypeThreeText = frameTypeThreeText
+	left = left + spacing
+	-- Set the TypeFour font string.
+	local frameTypeFour = EMA.globalCurrencyFramePrefix.."TypeFour"
+	local frameTypeFourText = parentFrame:CreateFontString( frameTypeFour.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeFourText:SetText( "0" )
+	frameTypeFourText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	frameTypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeFourText:SetWidth( width )
+	frameTypeFourText:SetJustifyH( "CENTER" )
+	currencyFrameCharacterInfo.TypeFourText = frameTypeFourText
+	left = left + spacing
+	-- Set the TypeFive font string.
+	local frameTypeFive = EMA.globalCurrencyFramePrefix.."TypeFive"
+	local frameTypeFiveText = parentFrame:CreateFontString( frameTypeFive.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeFiveText:SetText( "0" )
+	frameTypeFiveText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	frameTypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeFiveText:SetWidth( width )
+	frameTypeFiveText:SetJustifyH( "CENTER" )
+	currencyFrameCharacterInfo.TypeFiveText = frameTypeFiveText
+	left = left + spacing
+	-- Set the TypeSix font string.
+	local frameTypeSix = EMA.globalCurrencyFramePrefix.."TypeSix"
+	local frameTypeSixText = parentFrame:CreateFontString( frameTypeSix.."Text", "OVERLAY", "GameFontNormal" )
+	frameTypeSixText:SetText( "0" )
+	frameTypeSixText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
+	frameTypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
+	frameTypeSixText:SetWidth( width )
+	frameTypeSixText:SetJustifyH( "CENTER" )
+	currencyFrameCharacterInfo.TypeSixText = frameTypeSixText
+	left = left + spacing
+
+	EMA:SettingsUpdateFontStyle()
+end
+
+function EMA:EMAToonHideCurrency()
+	EMAToonCurrencyListFrame:Hide()
+end
+
+function EMA:EMAToonRequestCurrency()
+	-- Colour Light Red.
+	local r = 1.0
+	local g = 0.42
+	local b = 0.42
+	local a = 0.6
+	for characterName, currencyFrameCharacterInfo in pairs( EMA.currencyFrameCharacterInfo ) do
+		--EMA.Print("DoRequestCurrency", characterName)
+		-- Change Hight if a new member joins the team or leaves the team.
+		local height1 = currencyFrameCharacterInfo.characterRowTopPoint
+		local height2 = -35 + ( -15 * EMAApi.GetPositionForCharacterNameOnline( characterName) )
+			if height1 < height2 then
+				currencyFrameCharacterInfo.characterRowTopPoint = height2
+			elseif height1 > height2 then
+				currencyFrameCharacterInfo.characterRowTopPoint = height2
+			end
+		if EMAApi.GetCharacterOnlineStatus ( characterName ) == false then
+			-- Hides currency for offline members.
+			--EMA.Print("offlineRemove", characterName )
+			currencyFrameCharacterInfo.characterNameText:Hide()
+			currencyFrameCharacterInfo.GoldText:Hide()
+			currencyFrameCharacterInfo.TypeOneText:Hide()
+			currencyFrameCharacterInfo.TypeTwoText:Hide()
+			currencyFrameCharacterInfo.TypeThreeText:Hide()
+			currencyFrameCharacterInfo.TypeFourText:Hide()
+			currencyFrameCharacterInfo.TypeFiveText:Hide()
+			currencyFrameCharacterInfo.TypeSixText:Hide()
+		else
+			currencyFrameCharacterInfo.characterNameText:Show()
+			currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a )
+			currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a )
+			currencyFrameCharacterInfo.TypeOneText:SetTextColor( r, g, b, a )
+			currencyFrameCharacterInfo.TypeTwoText:SetTextColor( r, g, b, a )
+			currencyFrameCharacterInfo.TypeThreeText:SetTextColor( r, g, b, a )
+			currencyFrameCharacterInfo.TypeFourText:SetTextColor( r, g, b, a )
+			currencyFrameCharacterInfo.TypeFiveText:SetTextColor( r, g, b, a )
+			currencyFrameCharacterInfo.TypeSixText:SetTextColor( r, g, b, a )
+		end
+	end
+	EMA.currencyTotalGold = 0
+	if EMA.db.currGoldInGuildBank == true then
+		if IsInGuild() then
+			EMA.currencyTotalGold = GetGuildBankMoney()
+		end
+	end
+	EMA:EMASendCommandToTeam( EMA.COMMAND_REQUEST_CURRENCY, "" )
+	EMA.SettingsRefresh()
+
+end
+
+function EMA:DoSendCurrency( characterName, dummyValue )
+	--EMA:Print("Test2")
+	if EMAApi.GetCharacterOnlineStatus ( characterName ) == true then
+	table.wipe( EMA.currentCurrencyValues )
+	EMA.currentCurrencyValues.currGold = GetMoney()
+	-- CurrencyValues
+	EMA.currentCurrencyValues.currTypeOne = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeOne ) )
+	EMA.currentCurrencyValues.currTypeTwo = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeTwo ) )
+	EMA.currentCurrencyValues.currTypeThree = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeThree ) )
+	EMA.currentCurrencyValues.currTypeFour	= select( 2, GetCurrencyInfo( EMA.db.CcurrTypeFour ) )
+	EMA.currentCurrencyValues.currTypeFive = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeFive ) )
+	EMA.currentCurrencyValues.currTypeSix = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeSix ) )
+	-- Max CurrencyValues
+	EMA.currentCurrencyValues.currMaxTypeOne = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeOne ) )
+	EMA.currentCurrencyValues.currMaxTypeTwo = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeTwo ) )
+	EMA.currentCurrencyValues.currMaxTypeThree = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeThree ) )
+	EMA.currentCurrencyValues.currMaxTypeFour	= select( 6, GetCurrencyInfo( EMA.db.CcurrTypeFour ) )
+	EMA.currentCurrencyValues.currMaxTypeFive = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeFive ) )
+	EMA.currentCurrencyValues.currMaxTypeSix = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeSix ) )
+	EMA:EMASendCommandToToon( characterName, EMA.COMMAND_HERE_IS_CURRENCY, EMA.currentCurrencyValues )
+	else
+		return
+	end
+end
+
+function EMA:DoShowToonsCurrency( characterName, currencyValues )
+	--EMA.Print("DoShowCurrency", characterName, currencyValues.currTypeOne, currencyValues.currMaxTypeOne )
+	local parentFrame = EMAToonCurrencyListFrame
+	-- Get (or create and get) the character information.
+	local currencyFrameCharacterInfo = EMA.currencyFrameCharacterInfo[characterName]
+		--EMA.Print("Frame", characterName)
+	if currencyFrameCharacterInfo == nil then
+		EMA:CreateEMACurrencyFrameInfo( characterName, parentFrame )
+		currencyFrameCharacterInfo = EMA.currencyFrameCharacterInfo[characterName]
+	end
+	-- Colour white.
+	local r = 1.0
+	local g = 1.0
+	local b = 1.0
+	local a = 1.0
+	local v = 0
+
+	currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a )
+	currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a )
+	currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a )
+	if currencyValues.currTypeOne == currencyValues.currMaxTypeOne and currencyValues.currTypeOne > 0 then
+		--EMA:Print("SetRed")
+		currencyFrameCharacterInfo.TypeOneText:SetTextColor( r, v, v, a )
+	else
+		--EMA:Print("SetWhite")
+		currencyFrameCharacterInfo.TypeOneText:SetTextColor( r, g, b, a )
+	end
+
+	if currencyValues.currTypeTwo == currencyValues.currMaxTypeTwo and currencyValues.currTypeTwo > 0 then
+		currencyFrameCharacterInfo.TypeTwoText:SetTextColor( r, v, v, a )
+	else
+		currencyFrameCharacterInfo.TypeTwoText:SetTextColor( r, g, b, a )
+	end
+	if currencyValues.currTypeThree == currencyValues.currMaxTypeThree and currencyValues.currTypeThree > 0 then
+		currencyFrameCharacterInfo.TypeThreeText:SetTextColor( r, v, v, a )
+	else
+		currencyFrameCharacterInfo.TypeThreeText:SetTextColor( r, g, b, a )
+	end
+
+	if currencyValues.currTypeFour == currencyValues.currMaxTypeFour and currencyValues.currTypeFour > 0 then
+		currencyFrameCharacterInfo.TypeFourText:SetTextColor( r, v, v, a )
+	else
+		currencyFrameCharacterInfo.TypeFourText:SetTextColor( r, g, b, a )
+	end
+
+	if currencyValues.currTypeFive == currencyValues.currMaxTypeFive and currencyValues.currTypeFive > 0 then
+		currencyFrameCharacterInfo.TypeFiveText:SetTextColor( r, v, v, a )
+	else
+		currencyFrameCharacterInfo.TypeFiveText:SetTextColor( r, g, b, a )
+	end
+
+	if currencyValues.currTypeSix == currencyValues.currMaxTypeSix and currencyValues.currTypeSix > 0 then
+		currencyFrameCharacterInfo.TypeSixText:SetTextColor( r, v, v, a )
+	else
+		currencyFrameCharacterInfo.TypeSixText:SetTextColor( r, g, b, a )
+	end
+	currencyFrameCharacterInfo.GoldText:SetText( EMAUtilities:FormatMoneyString( currencyValues.currGold ) )
+	--currencyFrameCharacterInfo.GoldText:SetText( GetCoinTextureString( currencyValues.currGold ) )
+	currencyFrameCharacterInfo.TypeOneText:SetText( currencyValues.currTypeOne )
+	currencyFrameCharacterInfo.TypeTwoText:SetText( currencyValues.currTypeTwo )
+	currencyFrameCharacterInfo.TypeThreeText:SetText( currencyValues.currTypeThree )
+	currencyFrameCharacterInfo.TypeFourText:SetText( currencyValues.currTypeFour )
+	currencyFrameCharacterInfo.TypeFiveText:SetText( currencyValues.currTypeFive )
+	currencyFrameCharacterInfo.TypeSixText:SetText( currencyValues.currTypeSix )
+	-- Total gold.
+	EMA.currencyTotalGold = EMA.currencyTotalGold + currencyValues.currGold
+	parentFrame.TotalGoldText:SetText( EMAUtilities:FormatMoneyString( EMA.currencyTotalGold ) )
+	--parentFrame.TotalGoldText:SetText( GetCoinTextureString( EMA.currencyTotalGold ) )
+	if IsInGuild() then
+		parentFrame.TotalGoldGuildText:SetText( EMAUtilities:FormatMoneyString( GetGuildBankMoney() ) )
+		--parentFrame.TotalGoldGuildText:SetText( GetCoinTextureString( GetGuildBankMoney() ) )
+	end
+	-- Update width of currency list.
+	EMA:CurrencyListSetColumnWidth()
+	EMAToonCurrencyListFrame:Show()
+end
+
+-- A EMA command has been received.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if commandName == EMA.COMMAND_REQUEST_CURRENCY then
+		EMA:DoSendCurrency( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_HERE_IS_CURRENCY then
+		EMA:DoShowToonsCurrency( characterName, ... )
+	end
+end
diff --git a/EMA/Modules/Interaction.lua b/EMA/Modules/Interaction.lua
new file mode 100644
index 0000000..dc64dd8
--- /dev/null
+++ b/EMA/Modules/Interaction.lua
@@ -0,0 +1,815 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "EMA" that is 								--
+--				Released under the MIT License 										--
+--				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Interaction",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Get the EMA Utilities Library.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local LibAuras = LibStub:GetLibrary("LibAuras")
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Interaction"
+EMA.settingsDatabaseName = "InteractionProfileDB"
+EMA.chatCommand = "ema-Interaction"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["INTERACTION"]
+EMA.moduleDisplayName = L["INTERACTION"]
+-- Icon
+ EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\InteractionIcon.tga"
+-- order
+EMA.moduleOrder = 60
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		takeMastersTaxi = true,
+		requestTaxiStop = true,
+		changeTexiTime = 2,
+		--Mount
+		mountWithTeam = false,
+		dismountWithTeam = false,
+		dismountWithMaster = false,
+		mountInRange = false,
+		--Loot
+		autoLoot = false,
+		tellBoERare = false,
+		tellBoEEpic = false,
+		messageArea = EMAApi.DefaultMessageArea(),
+		warningArea = EMAApi.DefaultWarningArea()
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-interaction push",
+				get = false,
+				set = "EMASendSettings",
+				order = 4,
+				guiHidden = true,
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_TAKE_TAXI = "EMATaxiTakeTaxi"
+EMA.COMMAND_EXIT_TAXI = "EMATaxiExitTaxi"
+EMA.COMMAND_CLOSE_TAXI = "EMACloseTaxi"
+EMA.COMMAND_MOUNT_ME = "EMAMountMe"
+EMA.COMMAND_MOUNT_DISMOUNT = "EMAMountDisMount"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-- Taxi has been taken, no parameters.
+EMA.MESSAGE_TAXI_TAKEN = "EMATaxiTaxiTaken"
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Taxi
+	EMA.EMATakesTaxi = false
+	EMA.EMALeavsTaxi = false
+	EMA.TaxiFrameName = TaxiFrame
+	-- Mount
+	EMA.castingMount = nil
+	EMA.isMounted = nil
+	EMA.responding = false
+	--7.3.5 code Remove!
+	EMA.mountName = nil
+	-- Create the settings control.
+	EMA:SettingsCreate()
+	-- Initialse the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	--EMA:DisableAutoLoot()
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	-- Hook the TaketaxiNode function.
+	EMA:SecureHook( "TakeTaxiNode" )
+	EMA:SecureHook( "TaxiRequestEarlyLanding" )
+	EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" )
+	EMA:RegisterEvent( "UNIT_SPELLCAST_START" )
+	EMA:RegisterEvent( "UNIT_SPELLCAST_SUCCEEDED" )
+	EMA:RegisterEvent( "LOOT_READY" )
+	EMA:RegisterEvent( "TAXIMAP_OPENED" )
+	EMA:RegisterEvent("TAXIMAP_CLOSED")
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+	-- AceHook-3.0 will tidy up the hooks for us.
+end
+
+function EMA:SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfInfo = EMA:SettingsCreateTaxi( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsCreateTaxi( top )
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local iconSize = EMAHelperSettings:GetIconHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local sliderHeight = EMAHelperSettings:GetSliderHeight()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local halfWidthSlider = (headingWidth - horizontalSpacing) / 2
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local leftIcon = left + iconSize
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["TAXI_OPTIONS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxTakeMastersTaxi = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TAKE_TEAMS_TAXI"],
+		EMA.SettingsToggleTakeTaxi,
+		L["TAKE_TEAMS_TAXI_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxrequestStop = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["REQUEST_TAXI_STOP"],
+		EMA.SettingsTogglerequestStop,
+		L["REQUEST_TAXI_STOP_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.changeTexiTime = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["CLONES_TO_TAKE_TAXI_AFTER"]
+	)
+	EMA.settingsControl.changeTexiTime:SetSliderValues( 0, 5, 0.5 )
+	EMA.settingsControl.changeTexiTime:SetCallback( "OnValueChanged", EMA.SettingsChangeTaxiTimer )
+	-- Mount
+	movingTop = movingTop - sliderHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MOUNT_OPTIONS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxMountWithTeam = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["MOUNT_WITH_TEAM"],
+		EMA.SettingsToggleMountWithTeam,
+		L["MOUNT_WITH_TEAM_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxDismountWithTeam = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["DISMOUNT_WITH_TEAM"],
+		EMA.SettingsToggleDisMountWithTeam,
+		L["DISMOUNT_WITH_TEAM_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxDismountWithMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ONLY_DISMOUNT_WITH_MASTER"],
+		EMA.SettingsToggleDisMountWithMaster,
+		L["ONLY_DISMOUNT_WITH_MASTER_HELP"]
+	)
+	--[[
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxMountInRange = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ONLY_MOUNT_WHEN_IN_RANGE"],
+		EMA.SettingsToggleMountInRange,
+		L["ONLY_MOUNT_WHEN_IN_RANGE_HELP"]
+	)
+	]]
+	-- Loot
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["LOOT_OPTIONS"] , movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxAutoLoot = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ENABLE_AUTO_LOOT"],
+		EMA.SettingsToggleAutoLoot,
+		L["ENABLE_AUTO_LOOT_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxTellBoERare = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TELL_TEAM_BOE_RARE"],
+		EMA.SettingsToggleTellBoERare,
+		L["TELL_TEAM_BOE_RARE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxTellBoEEpic = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TELL_TEAM_BOE_EPIC"] ,
+		EMA.SettingsToggleTellBoEEpic,
+		L["TELL_TEAM_BOE_EPIC_HELP"]
+	)
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SEND_WARNING_AREA"]
+	)
+	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	return movingTop
+end
+
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+end
+
+function EMA:SettingsSetMessageArea( event, value )
+	EMA.db.messageArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetWarningArea( event, value )
+	EMA.db.warningArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleTakeTaxi( event, checked )
+	EMA.db.takeMastersTaxi = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsTogglerequestStop( event, checked )
+	EMA.db.requestTaxiStop = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeTaxiTimer( event, value )
+	EMA.db.changeTexiTime = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+-- Mount
+function EMA:SettingsToggleMountWithTeam( event, checked )
+	EMA.db.mountWithTeam = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDisMountWithTeam( event, checked )
+	EMA.db.dismountWithTeam = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDisMountWithMaster( event, checked )
+	EMA.db.dismountWithMaster = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleMountInRange( event, checked )
+	EMA.db.mountInRange = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoLoot( event, checked )
+	EMA.db.autoLoot = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleTellBoERare( event, checked )
+	EMA.db.tellBoERare = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleTellBoEEpic( event, checked )
+	EMA.db.tellBoEEpic = checked
+	EMA:SettingsRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.takeMastersTaxi = settings.takeMastersTaxi
+		EMA.db.requestTaxiStop = settings.requestTaxiStop
+		EMA.db.changeTexiTime = settings.changeTexiTime
+
+		EMA.db.mountWithTeam = settings.mountWithTeam
+		EMA.db.dismountWithTeam = settings.dismountWithTeam
+		EMA.db.dismountWithMaster = settings.dismountWithMaster
+		--EMA.db.mountInRange = settings.mountInRange
+
+		EMA.db.autoLoot = settings.autoLoot
+		EMA.db.tellBoERare = settings.tellBoERare
+		EMA.db.tellBoEEpic = settings.tellBoEEpic
+
+		EMA.db.messageArea = settings.messageArea
+		EMA.db.warningArea = settings.warningArea
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	EMA.settingsControl.checkBoxTakeMastersTaxi:SetValue( EMA.db.takeMastersTaxi )
+	EMA.settingsControl.checkBoxrequestStop:SetValue( EMA.db.requestTaxiStop )
+	EMA.settingsControl.changeTexiTime:SetValue( EMA.db.changeTexiTime )
+	EMA.settingsControl.checkBoxMountWithTeam:SetValue( EMA.db.mountWithTeam )
+	EMA.settingsControl.checkBoxDismountWithTeam:SetValue( EMA.db.dismountWithTeam )
+	EMA.settingsControl.checkBoxDismountWithMaster:SetValue( EMA.db.dismountWithMaster )
+	--EMA.settingsControl.checkBoxMountInRange:SetValue( EMA.db.mountInRange )
+	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
+	EMA.settingsControl.dropdownWarningArea:SetValue( EMA.db.warningArea )
+	EMA.settingsControl.checkBoxAutoLoot:SetValue( EMA.db.autoLoot )
+	EMA.settingsControl.checkBoxTellBoERare:SetValue( EMA.db.tellBoERare )
+	EMA.settingsControl.checkBoxTellBoEEpic:SetValue( EMA.db.tellBoEEpic )
+	-- Set state.
+	EMA.settingsControl.checkBoxDismountWithTeam:SetDisabled( not EMA.db.mountWithTeam )
+	EMA.settingsControl.checkBoxDismountWithMaster:SetDisabled( not EMA.db.dismountWithTeam or not EMA.db.mountWithTeam )
+	--EMA.settingsControl.checkBoxMountInRange:SetDisabled( not EMA.db.mountWithTeam )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMATaxi Functionality.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:TAXIMAP_OPENED(event, ...)
+	local uiMapSystem = ...
+	if (uiMapSystem == Enum.UIMapSystem.Taxi) then
+		EMA.TaxiFrameName = TaxiFrame
+	else
+		EMA.TaxiFrameName = FlightMapFrame
+	end
+end
+
+-- Take a taxi.
+local function TakeTaxi( sender, nodeName )
+	-- If the take masters taxi option is on.
+	if EMA.db.takeMastersTaxi == true then
+		-- If the sender was not this character and is the master then...
+		if sender ~= EMA.characterName then
+			-- Find the index of the taxi node to fly to.
+			local nodeIndex = nil
+			for iterateNodes = 1, NumTaxiNodes() do
+				if TaxiNodeName( iterateNodes ) == nodeName then
+					nodeIndex = iterateNodes
+					break
+				end
+			end
+			-- If a node index was found...
+			if nodeIndex ~= nil then
+				-- Send a message to any listeners that a taxi is being taken.
+				EMA:SendMessage( EMA.MESSAGE_TAXI_TAKEN )
+				-- Take a taxi.
+				EMA.EMATakesTaxi = true
+				EMA:ScheduleTimer( "TakeTimedTaxi", EMA.db.changeTexiTime , nodeIndex )
+				--GetNumRoutes( nodeIndex )
+				--TakeTaxiNode( nodeIndex )
+			else
+				-- Tell the master that this character could not take the same flight.
+				EMA:EMASendMessageToTeam( EMA.db.messageArea,  L["I_AM_UNABLE_TO_FLY_TO_A"]( nodeName ), false )
+			end
+		end
+	end
+end
+
+function EMA.TakeTimedTaxi( event, nodeIndex, ...)
+	if nodeIndex ~= nil then
+		GetNumRoutes( nodeIndex )
+		TakeTaxiNode( nodeIndex )
+	end
+end
+
+-- Called after the character has just taken a flight (hooked function).
+function EMA:TakeTaxiNode( taxiNodeIndex )
+	-- If the take masters taxi option is on.
+	if EMA.db.takeMastersTaxi == true then
+		-- Get the name of the node flown to.
+		local nodeName = TaxiNodeName( taxiNodeIndex )
+		if EMA.EMATakesTaxi == false then
+			-- Tell the other characters about the taxi.
+			EMA:EMASendCommandToTeam( EMA.COMMAND_TAKE_TAXI, nodeName )
+		end
+		EMA.EMATakesTaxi = false
+	end
+end
+
+local function LeaveTaxi ( sender )
+	if EMA.db.requestTaxiStop == true then
+		if sender ~= EMA.characterName then
+			EMA.EMALeavsTaxi = true
+			TaxiRequestEarlyLanding()
+			EMA:EMASendMessageToTeam( EMA.db.messageArea,  L["REQUESTED_STOP_X"]( sender ), false )
+		end
+	end
+end
+
+function EMA.TaxiRequestEarlyLanding( sender )
+	-- If the take masters taxi option is on.
+	--EMA:Print("test")
+	if EMA.db.requestTaxiStop == true then
+		if UnitOnTaxi( "player" ) and CanExitVehicle() == true then
+			if EMA.EMALeavsTaxi == false then
+				-- Send a message to any listeners that a taxi is being taken.
+				EMA:EMASendCommandToTeam ( EMA.COMMAND_EXIT_TAXI )
+			end
+		end
+		EMA.EMALeavsTaxi = false
+	end
+end
+
+function EMA:TAXIMAP_CLOSED( event, ... )
+	local EMATaxiFrame = EMA.TaxiFrameName
+	if EMATaxiFrame:IsVisible() then
+		EMA:EMASendCommandToTeam ( EMA.COMMAND_CLOSE_TAXI )
+	end
+end
+
+local function CloseTaxiMapFrame()
+	if EMA.EMATakesTaxi == false then
+		CloseTaxiMap()
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Mount Functionality.
+-------------------------------------------------------------------------------------------------------------
+-- Pre 8.0 used to give spall Name. --  UNIT_SPELLCAST_START - no longer provide spell name and rank.
+--EMA:UNIT_SPELLCAST_START(event, unitID, spell, rank, lineID, spellID, ...  )
+
+function EMA:PLAYER_ENTERING_WORLD(event, ... )
+	if IsMounted() then
+		local mountIDs = C_MountJournal.GetMountIDs()
+		for i = 1, #mountIDs do
+			local creatureName, spellID, icon, active = C_MountJournal.GetMountInfoByID(mountIDs[i])
+			if active then
+				--EMA:Print("alreadyMounted", spellID )
+				EMA.isMounted = spellID
+				EMA:RegisterEvent("UNIT_AURA")
+			end
+		end
+	end
+end
+
+function EMA:UNIT_SPELLCAST_START(event, unitID, lineID, spellID,  ...  )
+	--EMA:Print("Looking for Spells.", unitID, spellID)
+	if unitID == "player" then
+	local mountIDs = C_MountJournal.GetMountIDs()
+		for i = 1, #mountIDs do
+			--local name , id, icon, active = C_MountJournal.GetMountInfoByID(i)
+			local creatureName,mountSpellID,_,_,_,_,_,_,_,_,_,mountID = C_MountJournal.GetMountInfoByID(mountIDs[i])
+			--EMA:Print("Test", spellID, "vs", mountSpellID, "name", creatureName)
+			if spellID == mountSpellID then
+				--EMA:Print("SendtoTeam", "name", creatureName, "id", mountID)
+				if IsShiftKeyDown() == false then
+					if EMA.responding == false then
+						EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_ME, creatureName, mountID )
+						EMA.castingMount = spellID
+						break
+					end
+				end
+			end
+		end
+	end
+end
+
+
+function EMA:UNIT_SPELLCAST_SUCCEEDED(event, unitID, lineID, spellID, ... )
+	if EMA.db.mountWithTeam == false  or EMA.castingMount == nil or unitID ~= "player" then
+		return
+	end
+	--EMA:Print("Looking for Spells Done", spellID, EMA.castingMount)
+	if spellID == EMA.castingMount then
+		--EMA:Print("Mounted!", EMA.isMounted)
+		EMA.isMounted = spellID
+		EMA.mountName = spell
+		EMA:RegisterEvent("UNIT_AURA")
+	end
+end
+
+
+function EMA:UNIT_AURA(event, unitID, ... )
+	--EMA:Print("tester", unitID, EMA.isMounted)
+	if unitID ~= "player" or EMA.isMounted == nil or EMA.db.dismountWithTeam == false then
+        return
+    end
+	--EMA:Print("auraTrack", unitID, EMA.isMounted, EMA.mountName )
+	if not LibAuras:UnitAura(unitID, EMA.isMounted ) then
+		--EMA:Print("I have Dismounted - Send to team!")
+		if EMA.db.dismountWithMaster == true then
+			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+				if IsShiftKeyDown() == false then
+						--EMA:Print("test")
+					EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_DISMOUNT )
+					EMA:UnregisterEvent("UNIT_AURA")
+				end
+			end
+		else
+			if IsShiftKeyDown() == false then
+				EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_DISMOUNT )
+				EMA:UnregisterEvent("UNIT_AURA")
+			end
+		end
+	end
+end
+
+function EMA:TeamMount(characterName, name, mountID)
+	--EMA:Print("testTeamMount", characterName, name, mountID )
+	EMA.responding = true
+	--mount with team truned off.
+	if EMA.db.mountWithTeam == false then
+		return
+	end
+	-- already mounted.
+	if IsMounted() then
+		return
+	end
+	-- Checks if character is in range.
+	if EMA.db.mountInRange == true then
+		if UnitIsVisible(Ambiguate(characterName, "none") ) == false then
+			--EMA:Print("UnitIsNotVisible", characterName)
+			return
+		end
+	end
+	-- Checks done now the fun stuff!
+	--Do i have the same mount as master?
+	hasMount = false
+	local creatureName, spellID, icon, active, isUsable, sourceType, isFavorite, isFactionSpecific, faction, hideOnChar, isCollected, mountID = C_MountJournal.GetMountInfoByID(mountID)
+	local x_creatureDisplayID, x_descriptionText, x_sourceText, x_isSelfMount, x_mountTypeID, x_uiModelSceneID = C_MountJournal.GetMountInfoExtraByID(mountID)
+	if isUsable == true then
+		--EMA:Print("i have this Mount", creatureName)
+		hasMount = true
+		mount = mountID
+	else
+		--EMA:Print("i DO NOT have Mount", creatureName)
+		for i = 1, C_MountJournal.GetNumMounts() do
+			local creatureName, spellID, icon, active, isUsable, sourceType, isFavorite, isFactionSpecific, faction, hideOnChar, isCollected,   mountID = C_MountJournal.GetMountInfoByID(i)
+			--EMA:Print("looking for a mount i can use", i)
+			if isUsable == true then
+				local creatureDisplayID, descriptionText, sourceText, isSelfMount, mountTypeID, uiModelSceneID = C_MountJournal.GetMountInfoExtraByID(mountID)
+				-- EMA:Print("looking for a mount i can use of type", x_mountTypeID, mountTypeID, i, creatureName, spellID)
+				-- mount a similar type of mount, e.g. if mounting a flying mount, also mount a flying mount
+				if x_mountTypeID == mountTypeID then
+					mount = mountID
+					hasMount = true
+					break
+				end
+			end
+		end
+	end
+
+	--EMA:Print("test1420", mount, name)
+	-- for unsupported mounts.
+	if hasMount == true then
+		--EMA:Print("test14550", mount, name )
+		if name == "Random" then  -- name doesn't seem to be set anywhere...
+			C_MountJournal.SummonByID(0)
+			EMA.responding = false
+		else
+			--EMA:Print("test1054" )
+			C_MountJournal.SummonByID( mount )
+			EMA.responding = false
+		end
+		if IsMounted() == false then
+			EMA:ScheduleTimer( "AmNotMounted", 2 )
+		end
+	end
+end
+
+function EMA:AmNotMounted()
+	if IsMounted() == false then
+		--EMA:Print("test")
+		EMA:EMASendMessageToTeam( EMA.db.warningArea, L["I_AM_UNABLE_TO_MOUNT"], false )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMALoot Functionality.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:LOOT_READY( event, ... )
+	if EMA.db.autoLoot == true then
+		EMA:doLoot()
+	end
+end
+
+function EMA:doLoot( tries )
+	--EMA:DisableAutoLoot()
+	if tries == nil then
+		tries = 0
+	end
+	local numloot = GetNumLootItems()
+	if numloot ~= 0 then
+		for slot = 1, numloot do
+			_, name, _, _, lootQuality, locked = GetLootSlotInfo(slot)
+			--EMA:Print("items", slot, locked, name, tries)
+			if locked ~= nil and not locked then
+				if EMA.db.tellBoERare == true then
+					if lootQuality == 3 then
+						EMA:ScheduleTimer( "TellTeamEpicBoE", 1 , name)
+					end
+				end
+				if EMA.db.tellBoEEpic == true then
+					if lootQuality == 4 then
+						EMA:ScheduleTimer( "TellTeamEpicBoE", 1 , name)
+					end
+				end
+				---EMA:Print("canLoot", "slot", slot, "name", name )
+				LootSlot(slot)
+
+				numloot = GetNumLootItems()
+			end
+		end
+		tries = tries + 1
+		if tries < 8 then
+			EMA:doLootLoop( tries )
+		else
+			CloseLoot()
+		end
+	end
+end
+
+function EMA:doLootLoop( tries )
+	--EMA:Print("loop", tries)
+	EMA:ScheduleTimer("doLoot", 0.8, tries )
+end
+
+function EMA:DisableAutoLoot()
+	if EMA.db.autoLoot == true then
+		if GetCVar("autoLootDefault") == "1" then
+			--EMA:Print("testSetOFF")
+			SetCVar( "autoLootDefault", 0 )
+		end
+	end
+end
+
+
+function EMA:TellTeamEpicBoE( name )
+	local _, itemName, itemRarity, _, _, itemType, itemSubType = GetItemInfo( name )
+	--EMA:Print("loottest", itemName, itemRarity , itemType , itemSubType )
+	if itemName ~= nil then
+		if itemType == WEAPON or itemType == ARMOR or itemSubType == EJ_LOOT_SLOT_FILTER_ARTIFACT_RELIC then
+			local _, isBop = EMAUtilities:TooltipScaner(itemName)
+			if isBop == ITEM_BIND_ON_EQUIP then
+				EMA:Print("test", isBop )
+				local rarity = nil
+				if itemRarity == 4 then
+					rarity = L["EPIC"]
+				else
+					rarity = L["RARE"]
+				end
+				--EMA:Print("I have looted a Epic BOE Item: ", rarity, itemName )
+				EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_LOOTED_X_Y_ITEM"]( rarity, itemName ), false )
+			end
+		end
+	end
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA Commands functionality.
+-------------------------------------------------------------------------------------------------------------
+
+
+-- A EMA command has been received.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if characterName ~= self.characterName then
+		-- If the command was to take a taxi...
+		if commandName == EMA.COMMAND_TAKE_TAXI then
+			-- If not already on a taxi...
+			if not UnitOnTaxi( "player" ) then
+				-- And if the taxi frame is open...
+				local EMATaxiFrame = EMA.TaxiFrameName
+				if EMATaxiFrame:IsVisible() then
+					TakeTaxi( characterName, ... )
+				end
+			end
+		end
+		if commandName == EMA.COMMAND_EXIT_TAXI then
+			if UnitOnTaxi ( "player") then
+				LeaveTaxi ( characterName, ... )
+			end
+		end
+		if commandName == EMA.COMMAND_CLOSE_TAXI then
+			CloseTaxiMapFrame()
+		end
+
+		if commandName == EMA.COMMAND_MOUNT_ME then
+			--EMA:Print("command")
+			EMA:TeamMount( characterName, ... )
+		end
+		-- Dismount if mounted!
+		if commandName == EMA.COMMAND_MOUNT_DISMOUNT then
+			--EMA:Print("time to Dismount")
+			if IsMounted() then
+				Dismount()
+			end
+		end
+	end
+end
+
+EMAApi.Taxi = {}
+EMAApi.Taxi.MESSAGE_TAXI_TAKEN = EMA.MESSAGE_TAXI_TAKEN
diff --git a/EMA/Modules/ItemUse.lua b/EMA/Modules/ItemUse.lua
new file mode 100644
index 0000000..5479847
--- /dev/null
+++ b/EMA/Modules/ItemUse.lua
@@ -0,0 +1,1453 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "EMA" that is 								--
+--				Released under the MIT License 										--
+--				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"ItemUse",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Get the EMA Utilities Library.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local LibActionButton = LibStub( "EMALibActionButton-1.0" )
+local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
+EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "ItemUse"
+EMA.settingsDatabaseName = "ItemUseProfileDB"
+EMA.chatCommand = "ema-itemuse"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core"  )
+EMA.parentDisplayName = L["DISPLAY"]
+EMA.moduleDisplayName = L["ITEM_USE"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\ItemUseIcon.tga"
+-- order
+EMA.moduleOrder = 1
+
+
+-- EMA key bindings.
+BINDING_HEADER_EMAITEMUSE = L["ITEM-USE"]
+BINDING_NAME_ITEMUSE1 = L["ITEM"]..L[" "]..L["1"]
+BINDING_NAME_ITEMUSE2 = L["ITEM"]..L[" "]..L["2"]
+BINDING_NAME_ITEMUSE3 = L["ITEM"]..L[" "]..L["3"]
+BINDING_NAME_ITEMUSE4 = L["ITEM"]..L[" "]..L["4"]
+BINDING_NAME_ITEMUSE5 = L["ITEM"]..L[" "]..L["5"]
+BINDING_NAME_ITEMUSE6 = L["ITEM"]..L[" "]..L["6"]
+BINDING_NAME_ITEMUSE7 = L["ITEM"]..L[" "]..L["7"]
+BINDING_NAME_ITEMUSE8 = L["ITEM"]..L[" "]..L["8"]
+BINDING_NAME_ITEMUSE9 = L["ITEM"]..L[" "]..L["9"]
+BINDING_NAME_ITEMUSE10 = L["ITEM"]..L[" "]..L["10"]
+BINDING_NAME_ITEMUSE11 = L["ITEM"]..L[" "]..L["11"]
+BINDING_NAME_ITEMUSE12 = L["ITEM"]..L[" "]..L["12"]
+BINDING_NAME_ITEMUSE13 = L["ITEM"]..L[" "]..L["13"]
+BINDING_NAME_ITEMUSE14 = L["ITEM"]..L[" "]..L["14"]
+BINDING_NAME_ITEMUSE15 = L["ITEM"]..L[" "]..L["15"]
+BINDING_NAME_ITEMUSE16 = L["ITEM"]..L[" "]..L["16"]
+BINDING_NAME_ITEMUSE17 = L["ITEM"]..L[" "]..L["17"]
+BINDING_NAME_ITEMUSE18 = L["ITEM"]..L[" "]..L["18"]
+BINDING_NAME_ITEMUSE19 = L["ITEM"]..L[" "]..L["19"]
+BINDING_NAME_ITEMUSE20 = L["ITEM"]..L[" "]..L["20"]
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		showItemUse = true,
+		showItemUseOnMasterOnly = false,
+		hideItemUseInCombat = false,
+		showItemCount = true,
+		borderStyle = L["BLIZZARD_TOOLTIP"],
+		backgroundStyle = L["BLIZZARD_DIALOG_BACKGROUND"],
+		itemUseScale = 1,
+		itemUseTitleHeight = 3,
+		itemUseVerticalSpacing = 3,
+		itemUseHorizontalSpacing = 2,
+		autoAddQuestItemsToBar = false,
+		autoAddArtifactItemsToBar = false,
+		autoAddSatchelsItemsToBar = false,
+		hideClearButton = false,
+		itemBarsSynchronized = true,
+		numberOfItems = 10,
+		numberOfRows = 2,
+		messageArea = EMAApi.DefaultWarningArea(),
+		itemsAdvanced = {},
+		itemsSoted = {},
+		framePoint = "BOTTOMRIGHT",
+		frameRelativePoint = "BOTTOMRIGHT",
+		frameXOffset = 0,
+		frameYOffset = 70,
+		frameAlpha = 1.0,
+		frameBackgroundColourR = 1.0,
+		frameBackgroundColourG = 1.0,
+		frameBackgroundColourB = 1.0,
+		frameBackgroundColourA = 1.0,
+		frameBorderColourR = 1.0,
+		frameBorderColourG = 1.0,
+		frameBorderColourB = 1.0,
+		frameBorderColourA = 1.0,
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-item-use push",
+				get = false,
+				set = "EMASendSettings",
+			},
+			hide = {
+				type = "input",
+				name = L["HIDE_ITEM_BAR"],
+				desc = L["HIDE_ITEM_BAR_HELP"],
+				usage = "/EMA-item-use hide",
+				get = false,
+				set = "HideItemUseCommand",
+			},
+			show = {
+				type = "input",
+				name = L["SHOW_ITEM_BAR"],
+				desc = L["SHOW_ITEM_BAR_HELP"],
+				usage = "/EMA-item-use show",
+				get = false,
+				set = "ShowItemUseCommand",
+			},
+			clear = {
+				type = "input",
+				name = L["CLEAR_ITEM_BAR"],
+				desc = L["CLEAR_ITEM_BAR_HELP"],
+				usage = "/EMA-item-use clear",
+				get = false,
+				set = "ClearItemUseCommand",
+			},
+		},
+	}
+	return configuration
+end
+
+local function DebugMessage( ... )
+	--EMA:Print( ... )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_ITEMBAR_BUTTON = "EMACommandItemBarButton"
+EMA.COMMAND_ITEMUSE_SYNC = "EMACommandItemBarSync"
+EMA.COMMAND_ITEM_COUNT = "EMACommandItemBarCount"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Variables used by module.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.globalFramePrefix = "EMAItemUse"
+EMA.itemContainer = {}
+EMA.itemUseCreated = false
+EMA.itemSize = 40
+EMA.refreshItemUseControlsPending = false
+EMA.refreshUpdateItemsInBarPending = false
+EMA.refreshUpdateBindingsPending = false
+EMA.updateSettingsAfterCombat = false
+EMA.maximumNumberOfItems = 20
+EMA.maximumNumberOfRows = 20
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Item Bar.
+-------------------------------------------------------------------------------------------------------------
+
+local function CanDisplayItemUse()
+	local canShow = false
+	if EMA.db.showItemUse == true then
+		if EMA.db.showItemUseOnMasterOnly == true then
+			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+				canShow = true
+			end
+		else
+			canShow = true
+		end
+	end
+	return canShow
+end
+
+local function CreateEMAItemUseFrame()
+	-- The frame.	EMAItemUseWindowFrame
+	local frame = CreateFrame( "Frame", "EMAItemUseWindowFrame" , UIParent, "SecureHandlerStateTemplate" )
+
+	frame:SetAttribute("_onstate-page", [[
+		self:SetAttribute("state", newstate)
+		control:ChildUpdate("state", newstate)
+	]])
+	RegisterStateDriver(frame, "page", "[mod:alt]0;0")
+	frame.parentObject = EMA
+	frame:SetFrameStrata( "LOW" )
+	frame:SetToplevel( true )
+	frame:SetClampedToScreen( true )
+	frame:EnableMouse( true )
+	frame:SetMovable( true )
+
+	frame:RegisterForDrag( "LeftButton" )
+	frame:SetScript( "OnDragStart",
+			--function( this )
+		function( self,button )
+			if IsAltKeyDown() then
+				self:StartMoving()
+			end
+		end )
+	frame:SetScript( "OnDragStop",
+		--function( this )
+		function(self,button)
+			self:StopMovingOrSizing()
+			local point, relativeTo, relativePoint, xOffset, yOffset = self:GetPoint()
+			EMA.db.framePoint = point
+			EMA.db.frameRelativePoint = relativePoint
+			EMA.db.frameXOffset = xOffset
+			EMA.db.frameYOffset = yOffset
+		end	)
+	frame:SetBackdrop( {
+		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+		tile = true, tileSize = 10, edgeSize = 10,
+		insets = { left = 3, right = 3, top = 3, bottom = 3 }
+	} )
+	frame:SetPoint( EMA.db.framePoint, nil, EMA.db.frameRelativePoint, EMA.db.frameXOffset, EMA.db.frameYOffset )
+	frame:ClearAllPoints()
+	-- Clear Button
+		local updateButton = CreateFrame( "Button", "ButtonUpdate", frame, "UIPanelButtonTemplate" )
+		updateButton:SetScript( "OnClick", function() EMA.ClearButton() end )
+		updateButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -4, -3 )
+		updateButton:SetHeight( 20 )
+		updateButton:SetWidth( 65 )
+		updateButton:SetText( L["CLEAR_BUTT"] )
+		updateButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(updateButton, "clear", true) end)
+		updateButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
+		ClearUpdateButton = updateButton
+	-- Sync Button
+		local syncButton = CreateFrame( "Button", "ButtonSync", frame, "UIPanelButtonTemplate" )
+		syncButton:SetScript( "OnClick", function() EMA.SyncButton() end )
+		syncButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -71, -3 )
+		syncButton:SetHeight( 20 )
+		syncButton:SetWidth( 65 )
+		syncButton:SetText( L["SYNC_BUTT"] )
+		syncButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(updateButton, "sync", true) end)
+		syncButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
+		SyncUpdateButton = syncButton
+
+
+	-- Set transparency of the the frame (and all its children).
+	frame:SetAlpha(EMA.db.frameAlpha)
+	-- Set the global frame reference for this frame.
+	EMAItemUseFrame = frame
+	-- Remove unsued items --test
+	EMA:SettingsUpdateBorderStyle()
+	EMA.itemUseCreated = true
+	EMA.UpdateHeight()
+end
+
+function EMA:ShowTooltip(frame, info, show)
+	if show then
+		GameTooltip:SetOwner(frame, "ANCHOR_TOP")
+		GameTooltip:SetPoint("TOPLEFT", frame, "TOPRIGHT", 16, 0)
+		GameTooltip:ClearLines()
+		if info == "clear" then
+			GameTooltip:AddLine(L["TOOLTIP_NOLONGER_IN_BAGS"], 1, 0.82, 0, 1)
+		elseif info == "sync" then
+			GameTooltip:AddLine(L["TOOLTIP_SYNCHRONISE"], 1, 0.82, 0, 1)
+		end
+		GameTooltip:Show()
+	else
+	GameTooltip:Hide()
+	end
+end
+
+
+function EMA:UpdateHeight()
+	if EMA.db.hideClearButton == false then
+		EMA.db.itemUseTitleHeight = 2
+		local newHeight = EMA.db.itemUseTitleHeight + 20
+		ClearUpdateButton:Show()
+		SyncUpdateButton:Show()
+		return newHeight
+	else
+		EMA.db.itemUseTitleHeight = 2
+		oldHeight = EMA.db.itemUseTitleHeight
+		ClearUpdateButton:Hide()
+		SyncUpdateButton:Hide()
+		return oldHeight
+	end
+end
+
+
+function EMA:ShowItemUseCommand()
+	EMA.db.showItemUse = true
+	EMA:SetItemUseVisibility()
+	EMA:SettingsRefresh()
+end
+
+function EMA:HideItemUseCommand()
+	EMA.db.showItemUse = false
+	EMA:SetItemUseVisibility()
+	EMA:SettingsRefresh()
+end
+
+function EMA:ClearItemUseCommand()
+	EMAUtilities:ClearTable(EMA.db.itemsAdvanced)
+	EMA:SettingsRefresh()
+	EMA:Print(L["ITEM_BAR_CLEARED"])
+end
+
+function EMA:SetItemUseVisibility()
+	local frame = EMAItemUseFrame
+	if CanDisplayItemUse() == true then
+		frame:ClearAllPoints()
+		frame:SetPoint( EMA.db.framePoint, UIParent, EMA.db.frameRelativePoint, EMA.db.frameXOffset, EMA.db.frameYOffset )
+		frame:SetAlpha( EMA.db.frameAlpha )
+		frame:Show()
+	else
+		frame:Hide()
+	end
+end
+
+function EMA:SettingsUpdateBorderStyle()
+	local borderStyle = EMA.SharedMedia:Fetch( "border", EMA.db.borderStyle )
+	local backgroundStyle = EMA.SharedMedia:Fetch( "background", EMA.db.backgroundStyle )
+	local frame = EMAItemUseFrame
+	frame:SetBackdrop( {
+		bgFile = backgroundStyle,
+		edgeFile = borderStyle,
+		tile = true, tileSize = frame:GetWidth(), edgeSize = 10,
+		insets = { left = 3, right = 3, top = 3, bottom = 3 }
+	} )
+	frame:SetBackdropColor( EMA.db.frameBackgroundColourR, EMA.db.frameBackgroundColourG, EMA.db.frameBackgroundColourB, EMA.db.frameBackgroundColourA )
+	frame:SetBackdropBorderColor( EMA.db.frameBorderColourR, EMA.db.frameBorderColourG, EMA.db.frameBorderColourB, EMA.db.frameBorderColourA )
+end
+
+-- updates after the quest has been handed in,
+function EMA:UpdateQuestItemsInBar()
+	local state = "0"
+	for iterateItems = 1, EMA.maximumNumberOfItems, 1 do
+		local itemContainer = EMA.itemContainer[iterateItems]
+		if itemContainer == nil then
+			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
+			itemContainer = EMA.itemContainer[iterateItems]
+		end
+		local containerButton = itemContainer["container"]
+		local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
+		local kind = itemInfo.kind
+		local action = itemInfo.action
+		if kind == "item" then
+			local itemLink,_,_,_,_,questItem = GetItemInfo( action )
+			--EMA:Print("Checking Item...", itemLink, action)
+			if questItem == "Quest" then
+				if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+					if EMA:IsInInventory( itemLink ) == false then
+					--EMA:Print("NOT IN BAGS", itemLink)
+						EMA.db.itemsAdvanced[iterateItems] = nil
+						EMA:EMASendUpdate( iterateItems, "empty", nil )
+					end
+				end
+			end
+		end
+	end
+end
+
+function EMA:UpdateItemsInBar()
+	local state = "0"
+    local parentFrame = EMAItemUseFrame
+	for iterateItems = 1, EMA.maximumNumberOfItems, 1 do
+		local itemContainer = EMA.itemContainer[iterateItems]
+		if itemContainer == nil then
+			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
+			itemContainer = EMA.itemContainer[iterateItems]
+		end
+		local containerButton = itemContainer["container"]
+		local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
+		local kind = itemInfo.kind
+		local action = itemInfo.action
+		if kind == "item" and not tonumber( action ) then
+			action = action:sub(6)
+		end
+        --EMA:Print(state, kind, action)
+		if kind == "mount" or kind == "battlepet" then
+            containerButton:ClearStates()
+		else
+		containerButton:SetState(state, kind, action)
+        end
+	end
+end
+
+function EMA:AddItemToItemDatabase( itemNumber, kind, action )
+    if kind == "mount" or kind == "battlepet" then
+        return
+    end
+	if EMA.db.itemsAdvanced[itemNumber] == nil then
+		EMA.db.itemsAdvanced[itemNumber] = {}
+	end
+	EMA.db.itemsAdvanced[itemNumber].kind = kind
+	EMA.db.itemsAdvanced[itemNumber].action = action
+end
+
+function EMA:GetItemFromItemDatabase( itemNumber )
+	if EMA.db.itemsAdvanced[itemNumber] == nil then
+		EMA.db.itemsAdvanced[itemNumber] = {}
+		EMA.db.itemsAdvanced[itemNumber].kind = "empty"
+		EMA.db.itemsAdvanced[itemNumber].action = "empty"
+	end
+	return EMA.db.itemsAdvanced[itemNumber]
+end
+
+function EMA:OnButtonContentsChanged( event, button, state, type, value, ... )
+    if type == "mount" or type == "battlepet" then
+		return
+    end
+    EMA:AddItemToItemDatabase( button.itemNumber, type, value )
+    EMA:EMASendUpdate(button.itemNumber, type, value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:OnButtonUpdate( event, button, ... )
+	--EMA:Print( event, button, ...)
+end
+
+function EMA:OnButtonState( event, button, ... )
+	--EMA:Print( event, button, ...)
+end
+
+function EMA:OnButtonUsable( event, button, ... )
+	--EMA:Print( event, button, ...)
+end
+
+function EMA:CreateEMAItemUseItemContainer( itemNumber, parentFrame )
+	EMA.itemContainer[itemNumber] = {}
+	local itemContainer = EMA.itemContainer[itemNumber]
+	local containerButtonName = EMA.globalFramePrefix.."ContainerButton"..itemNumber
+    local buttonConfig = {
+        outOfRangeColoring = "button",
+        tooltip = "enabled",
+        showGrid = true,
+        colors = {
+            range = { 0.8, 0.1, 0.1 },
+            mana = { 0.5, 0.5, 1.0 }
+        },
+        hideElements = {
+            macro = false,
+            hotkey = false,
+            equipped = false,
+        },
+        keyBoundTarget = false,
+        clickOnDown = false,
+        flyoutDirection = "UP",
+    }
+	local containerButton = LibActionButton:CreateButton( itemNumber, containerButtonName, EMAItemUseWindowFrame, buttonConfig )
+	containerButton:SetState( "0", "empty", nil)
+	containerButton.itemNumber = itemNumber
+	itemContainer["container"] = containerButton
+end
+
+--ebony test Using the wowapi and not the scanning of tooltips
+function EMA:CheckForQuestItemAndAddToBar()
+	for iterateQuests = 1, GetNumQuestLogEntries() do
+		--EMA:AddQuestUseableItems() -- Adds Special Quest Useable Items
+		local questLogTitleText,_,_,isHeader, _, _, _, questID = GetQuestLogTitle(iterateQuests)
+		  	if not isHeader then
+			--EMA:Print("test", questItemLink, iterateQuests, questLogTitleText, questID )
+			local questItemLink, questItemIcon, questItemCharges = GetQuestLogSpecialItemInfo( iterateQuests )
+			if questItemLink ~= nil then
+				local itemName = GetItemInfo(questItemLink)
+				local questname, rank = GetItemSpell(questItemLink) -- Only means to detect if the item is usable
+				if questname then
+					if EMAUtilities:DoItemLinksContainTheSameItem( questItemLink, questItemLink ) == true then
+						--EMA:Print("addItem", questItemLink )
+						EMA:AddAnItemToTheBarIfNotExists( questItemLink, false)
+					end
+				end
+			end
+		end
+	end
+end
+
+
+function EMA:AddQuestUseableItems()
+	for bag = 0, NUM_BAG_SLOTS do
+		for slot = 1, GetContainerNumSlots(bag) do
+			local texture, count, locked, quality, readable, lootable, link, isFiltered, hasNoValue, itemID = GetContainerItemInfo(bag, slot)
+			if link then
+				local tooltipText = EMAUtilities:TooltipScaner( link )
+				if tooltipText == ITEM_BIND_QUEST then
+					local questname, rank = GetItemSpell( link ) -- Only means to detect if the item is usable
+					if questname then
+						EMA:AddAnItemToTheBarIfNotExists( link, false)
+					end
+				end
+			end
+		end
+	end
+end
+
+
+
+
+
+
+
+
+-- Add satchels to item bar.
+function EMA:CheckForSatchelsItemAndAddToBar()
+	for bag = 0, NUM_BAG_SLOTS do
+		for slot = 1, GetContainerNumSlots(bag) do
+			local texture, count, locked, quality, readable, lootable, link, isFiltered, hasNoValue, itemID = GetContainerItemInfo(bag, slot)
+			if link then
+				local tooltipText = EMAUtilities:TooltipScaner( link )
+				if tooltipText == LOCKED then
+					EMA:AddAnItemToTheBarIfNotExists( link, false )
+				end
+			end
+		end
+	end
+end
+
+-- Removes unused items.
+function EMA:ClearButton()
+	local state = "0"
+	for iterateItems = 1, EMA.db.numberOfItems, 1 do
+		local itemContainer = EMA.itemContainer[iterateItems]
+		if itemContainer == nil then
+			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
+			itemContainer = EMA.itemContainer[iterateItems]
+		end
+		local containerButton = itemContainer["container"]
+		local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
+		local kind = itemInfo.kind
+		local action = itemInfo.action
+		if kind == "item" then
+			local name, itemLink,_,_,_,itemType,questItem = GetItemInfo( action )
+			if itemLink and itemLink:match("item:%d") then
+				local _ , tooltipTextTwo = EMAUtilities:TooltipScaner( itemLink )
+				if tooltipTextTwo == nil or tooltipTextTwo ~= "Unique" then
+					if EMA:IsInInventory( name ) == false then
+						EMA.db.itemsAdvanced[iterateItems] = nil
+						EMA:EMASendUpdate( iterateItems, "empty", nil	)
+						EMA:SettingsRefresh()
+					end
+				end
+			end
+		end
+	end
+end
+
+-- Sync Buttion
+function EMA:SyncButton()
+	local dataTable = {}
+	for iterateItems = 1, EMA.db.numberOfItems, 1 do
+	local itemContainer = EMA.itemContainer[iterateItems]
+		if itemContainer == nil then
+			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
+			itemContainer = EMA.itemContainer[iterateItems]
+		end
+			local containerButton = itemContainer["container"]
+			local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
+			local kind = itemInfo.kind
+			local action = itemInfo.action
+			data = {}
+			data.button = iterateItems
+			data.type = kind
+			data.action = action
+			table.insert( dataTable, data )
+	end
+	EMA:EMASendCommandToTeam( EMA.COMMAND_ITEMUSE_SYNC, dataTable)
+	if EMA.db.showItemCount == true then
+		EMA:GetEMAItemCount()
+	end
+end
+
+
+-- Adds artifact power items to item bar.
+function EMA:CheckForArtifactItemAndAddToBar()
+	for bag = 0, NUM_BAG_SLOTS do
+		for slot = 1, GetContainerNumSlots(bag) do
+			local itemLink = GetContainerItemLink(bag, slot)
+			if itemLink and itemLink:match("item:%d") then
+				local tooltipText = EMAUtilities:TooltipScaner(itemLink)
+				if tooltipText and tooltipText:match(ARTIFACT_POWER) then
+					EMA:AddAnItemToTheBarIfNotExists( itemLink, false )
+				end
+			end
+		end
+	end
+end
+
+--Checks the item is in the Toon players bag
+function EMA:IsInInventory(itemLink)
+	for bag = 0,4,1 do
+		for slot = 1,GetContainerNumSlots(bag),1 do
+			--EMA:Debug( "Bags OK. checking", itemLink )
+			local _,_,_,_,_,_,_,_,_,Link = GetContainerItemInfo(bag,slot)
+			if Link then
+				--EMA:Debug( "Bags OK. checking", itemLink, Link )
+				local itemString = GetItemInfo( Link )
+				--EMA:Debug( "Bags OK. checking", itemLink, itemString )
+				if itemLink == itemString then
+					--EMA:Print( "True" )
+					return true
+				end
+			end
+		end
+	end
+	return false
+end
+
+
+function EMA:AddAnItemToTheBarIfNotExists( itemLink, startsQuest)
+	local itemInfo
+	local barItemId
+	local iterateItems
+	local alreadyExists = false
+	local itemId = EMAUtilities:GetItemIdFromItemLink( itemLink )
+	for iterateItems = 1, EMA.db.numberOfItems, 1 do
+		local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
+			--EMA:Print("check", itemLink, itemInfo.action)
+		if itemInfo.kind == "item" and itemInfo.action == itemId then
+			alreadyExists = true
+		--	EMA:Print("test", itemLink )
+			return
+		end
+	end
+	if alreadyExists == false then
+		--EMA:Print("test2", itemLink )
+		for iterateItems = 1, EMA.db.numberOfItems, 1 do
+			itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
+			--Checks the items we talking about is in the bags of the player.
+			if itemInfo.kind == "empty" then
+				EMA:AddItemToItemDatabase( iterateItems, "item", itemId )
+				EMA:EMASendUpdate( iterateItems, "item", itemId )
+				EMA:SettingsRefresh()
+					-- TODO: to we need this?
+					if startsQuest then
+						EMA:EMASendMessageToTeam( EMA.db.messageArea, L["NEW_QUEST_ITEM"], false )
+					end
+				return
+			end
+		end
+	end
+end
+
+function EMA:RefreshItemUseControls()
+	if InCombatLockdown() then
+		EMA.refreshItemUseControlsPending = true
+		return
+	end
+	local parentFrame = EMAItemUseFrame
+	local positionLeft
+	local positionTop
+	local itemsPerRow = EMA.db.numberOfItems / EMA.db.numberOfRows
+	local row
+	local rowLeftModifier
+	for iterateItems = 1, EMA.maximumNumberOfItems, 1 do
+		local itemContainer = EMA.itemContainer[iterateItems]
+		if itemContainer ~= nil then
+			local containerButton = itemContainer["container"]
+			containerButton:Hide()
+		end
+	end
+	for iterateItems = 1, EMA.db.numberOfItems, 1 do
+		local itemContainer = EMA.itemContainer[iterateItems]
+		if itemContainer == nil then
+			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
+			itemContainer = EMA.itemContainer[iterateItems]
+		end
+		local containerButton = itemContainer["container"]
+		row = math.floor((iterateItems - 1) / itemsPerRow)
+		rowLeftModifier = math.floor((iterateItems-1) % itemsPerRow)
+		positionLeft = 6 + (EMA.itemSize * rowLeftModifier) + (EMA.db.itemUseHorizontalSpacing * rowLeftModifier)
+		local getHeight = EMA.UpdateHeight()
+		positionTop = -getHeight - (EMA.db.itemUseVerticalSpacing * 2) - (row * EMA.itemSize) - (row * EMA.db.itemUseVerticalSpacing)
+		containerButton:SetWidth( EMA.itemSize )
+		containerButton:SetHeight( EMA.itemSize )
+		containerButton:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
+		containerButton:Show()
+	end
+	EMA:UpdateEMAItemUseDimensions()
+end
+
+function EMA:UpdateEMAItemUseDimensions()
+	local frame = EMAItemUseFrame
+	local itemsPerRow = EMA.db.numberOfItems / EMA.db.numberOfRows
+	frame:SetWidth( 5 + (EMA.db.itemUseHorizontalSpacing * (3 + itemsPerRow-1)) + (EMA.itemSize * itemsPerRow) )
+	local getHeight = EMA.UpdateHeight()
+	frame:SetHeight( getHeight + (EMA.itemSize * EMA.db.numberOfRows) + (EMA.db.itemUseVerticalSpacing * EMA.db.numberOfRows) + (EMA.db.itemUseVerticalSpacing * 3))
+	frame:SetScale( EMA.db.itemUseScale )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Communications
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:EMASendUpdate( button, type, action )
+	--EMA:Print("testDataDebug", button, type, action )
+	EMA:EMASendCommandToTeam( EMA.COMMAND_ITEMBAR_BUTTON, button, type, action )
+end
+
+function EMA:ReceiveButtonData(characterName, button, type, action)
+	--EMA:Print("ReceiveButtonDataDebug", button, type, action )
+	EMA:AddItemToItemDatabase( button, type, action )
+	EMA:SettingsRefresh()
+end
+
+function EMA:ReceiveSync(characterName, data)
+	--EMA:Print("ReceiveSync", data)
+	for id, data in pairs( data ) do
+		--EMA:Print("ID", id, data.button, data.type, data.action )
+		EMA:AddItemToItemDatabase( data.button, data.type, data.action )
+		EMA:SettingsRefresh()
+	end
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateOptions( top )
+	-- Get positions.
+    local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local mediaHeight = EMAHelperSettings:GetMediaHeight()
+	local sliderHeight = EMAHelperSettings:GetSliderHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
+	local column2left = left + halfWidth
+	local left2 = left + thirdWidth
+	local left3 = left + (thirdWidth * 2)
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ITEM_USE_OPTIONS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsCheckBoxShowItemUse = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SHOW_ITEM_BAR"],
+		EMA.SettingsToggleShowItemUse,
+		L["SHOW_ITEM_BAR_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxShowItemUseOnlyOnMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ONLY_ON_MASTER"],
+		EMA.SettingsToggleShowItemUseOnlyOnMaster,
+		L["ONLY_ON_MASTER_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxShowItemCount = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SHOW_ITEM_COUNT"],
+		EMA.SettingsToggleShowItemCount,
+		L["SHOW_ITEM_COUNT_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxItemBarsSynchronized = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["KEEP_BARS_SYNCHRONIZED"],
+		EMA.SettingsToggleItemBarsSynchronized,
+		L["KEEP_BARS_SYNCHRONIZED_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxAutoAddQuestItem = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ADD_QUEST_ITEMS_TO_BAR"],
+		EMA.SettingsToggleAutoAddQuestItem,
+		L["ADD_QUEST_ITEMS_TO_BAR_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxAutoAddArtifactItem = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ADD_ARTIFACT_ITEMS"],
+		EMA.SettingsToggleAutoAddArtifactItem,
+		L["ADD_ARTIFACT_ITEMS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ADD_SATCHEL_ITEMS"],
+		EMA.SettingsToggleAutoAddSatchelsItem,
+		L["ADD_SATCHEL_ITEMS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxHideClearButton = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["HIDE_BUTTONS"],
+		EMA.SettingsToggleHideClearButton,
+		L["HIDE_BUTTONS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsCheckBoxHideItemUseInCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["HIDE_IN_COMBAT"],
+		EMA.SettingsToggleHideItemUseInCombat,
+		L["HIDE_IN_COMBAT_HELP_IU"]
+	)
+	movingTop = movingTop - checkBoxHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsItemUseNumberOfItems = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["NUMBER_OF_ITEMS"]
+	)
+	EMA.settingsControl.displayOptionsItemUseNumberOfItems:SetSliderValues( 1, EMA.maximumNumberOfItems, 1 )
+	EMA.settingsControl.displayOptionsItemUseNumberOfItems:SetCallback( "OnValueChanged", EMA.SettingsChangeNumberOfItems )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsItemUseNumberOfRows = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["NUMBER_OF_ROWS"]
+	)
+	EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetSliderValues( 1, EMA.maximumNumberOfRows, 1 )
+	EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetCallback( "OnValueChanged", EMA.SettingsChangeNumberOfRows )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["APPEARANCE_LAYOUT_HEALDER"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.displayOptionsItemUseScaleSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SCALE"]
+	)
+	EMA.settingsControl.displayOptionsItemUseScaleSlider:SetSliderValues( 0.5, 2, 0.01 )
+	EMA.settingsControl.displayOptionsItemUseScaleSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeScale )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsItemUseTransparencySlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TRANSPARENCY"]
+	)
+	EMA.settingsControl.displayOptionsItemUseTransparencySlider:SetSliderValues( 0, 1, 0.01 )
+	EMA.settingsControl.displayOptionsItemUseTransparencySlider:SetCallback( "OnValueChanged", EMA.SettingsChangeTransparency )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsItemUseMediaBorder = EMAHelperSettings:CreateMediaBorder(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["BORDER_STYLE"]
+	)
+	EMA.settingsControl.displayOptionsItemUseMediaBorder:SetCallback( "OnValueChanged", EMA.SettingsChangeBorderStyle )
+	EMA.settingsControl.displayOptionsBorderColourPicker = EMAHelperSettings:CreateColourPicker(
+		EMA.settingsControl,
+		halfWidth,
+		column2left + 15,
+		movingTop - 15,
+		L["BORDER COLOUR"]
+	)
+	EMA.settingsControl.displayOptionsBorderColourPicker:SetHasAlpha( true )
+	EMA.settingsControl.displayOptionsBorderColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBorderColourPickerChanged )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMA.settingsControl.displayOptionsItemUseMediaBackground = EMAHelperSettings:CreateMediaBackground(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["BACKGROUND"]
+	)
+	EMA.settingsControl.displayOptionsItemUseMediaBackground:SetCallback( "OnValueChanged", EMA.SettingsChangeBackgroundStyle )
+	EMA.settingsControl.displayOptionsBackgroundColourPicker = EMAHelperSettings:CreateColourPicker(
+		EMA.settingsControl,
+		halfWidth,
+		column2left + 15,
+		movingTop - 15,
+		L["BG_COLOUR"]
+	)
+	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetHasAlpha( true )
+	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBackgroundColourPickerChanged )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MESSAGES_HEADER"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+    EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CLEAR_ITEM_BAR"], movingTop, false )
+    movingTop = movingTop - headingHeight
+    EMA.settingsControl.buttonClearItemBar = EMAHelperSettings:CreateButton(
+        EMA.settingsControl,
+        headingWidth,
+        left,
+        movingTop,
+        L["CLEAR_ITEM_BAR"],
+        EMA.ClearItemUseCommand,
+		L["CLEAR_ITEM_BAR_HELP"]
+    )
+    movingTop = movingTop - buttonHeight - verticalSpacing
+	return movingTop
+end
+
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+end
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfOptions = SettingsCreateOptions( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfOptions )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	-- Values.
+	EMA.settingsControl.displayOptionsCheckBoxShowItemUse:SetValue( EMA.db.showItemUse )
+	EMA.settingsControl.displayOptionsCheckBoxShowItemUseOnlyOnMaster:SetValue( EMA.db.showItemUseOnMasterOnly )
+	EMA.settingsControl.displayOptionsCheckBoxHideItemUseInCombat:SetValue( EMA.db.hideItemUseInCombat )
+	EMA.settingsControl.displayOptionsCheckBoxShowItemCount:SetValue( EMA.db.showItemCount )
+	EMA.settingsControl.displayOptionsItemUseNumberOfItems:SetValue( EMA.db.numberOfItems )
+	EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetValue( EMA.db.numberOfRows )
+	EMA.settingsControl.displayOptionsCheckBoxAutoAddQuestItem:SetValue( EMA.db.autoAddQuestItemsToBar )
+	EMA.settingsControl.displayOptionsCheckBoxAutoAddArtifactItem:SetValue( EMA.db.autoAddArtifactItemsToBar )
+	EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem:SetValue( EMA.db.autoAddSatchelsItemsToBar )
+	EMA.settingsControl.displayOptionsCheckBoxHideClearButton:SetValue( EMA.db.hideClearButton )
+	EMA.settingsControl.displayOptionsCheckBoxItemBarsSynchronized:SetValue( EMA.db.itemBarsSynchronized )
+	EMA.settingsControl.displayOptionsItemUseScaleSlider:SetValue( EMA.db.itemUseScale )
+	EMA.settingsControl.displayOptionsItemUseTransparencySlider:SetValue( EMA.db.frameAlpha )
+	EMA.settingsControl.displayOptionsItemUseMediaBorder:SetValue( EMA.db.borderStyle )
+	EMA.settingsControl.displayOptionsItemUseMediaBackground:SetValue( EMA.db.backgroundStyle )
+	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
+	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetColor( EMA.db.frameBackgroundColourR, EMA.db.frameBackgroundColourG, EMA.db.frameBackgroundColourB, EMA.db.frameBackgroundColourA )
+	EMA.settingsControl.displayOptionsBorderColourPicker:SetColor( EMA.db.frameBorderColourR, EMA.db.frameBorderColourG, EMA.db.frameBorderColourB, EMA.db.frameBorderColourA )
+	-- State.
+	-- Trying to change state in combat lockdown causes taint. Let's not do that. Eventually it would be nice to have a "proper state driven item list",
+	-- but this workaround is enough for now.
+	if not InCombatLockdown() then
+		EMA.settingsControl.displayOptionsCheckBoxShowItemUseOnlyOnMaster:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsCheckBoxHideItemUseInCombat:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsCheckBoxShowItemCount:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsItemUseNumberOfItems:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsCheckBoxAutoAddQuestItem:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsCheckBoxAutoAddArtifactItem:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsCheckBoxHideClearButton:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsCheckBoxItemBarsSynchronized:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsItemUseScaleSlider:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsItemUseTransparencySlider:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsItemUseMediaBorder:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsItemUseMediaBackground:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.dropdownMessageArea:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsBackgroundColourPicker:SetDisabled( not EMA.db.showItemUse )
+		EMA.settingsControl.displayOptionsBorderColourPicker:SetDisabled( not EMA.db.showItemUse )
+		if EMA.itemUseCreated == true then
+			EMA:RefreshItemUseControls()
+			EMA:SettingsUpdateBorderStyle()
+			EMA:SetItemUseVisibility()
+			EMA:UpdateItemsInBar()
+			EMA:UpdateHeight()
+		end
+	else
+		EMA.updateSettingsAfterCombat = true
+	end
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsToggleShowItemUse( event, checked )
+	EMA.db.showItemUse = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHideItemUseInCombat( event, checked )
+	EMA.db.hideItemUseInCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowItemCount( event, checked )
+	EMA.db.showItemCount = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowItemUseOnlyOnMaster( event, checked )
+	EMA.db.showItemUseOnMasterOnly = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoAddQuestItem( event, checked )
+	EMA.db.autoAddQuestItemsToBar = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoAddArtifactItem( event, checked )
+	EMA.db.autoAddArtifactItemsToBar = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoAddSatchelsItem( event, checked )
+	EMA.db.autoAddSatchelsItemsToBar = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHideClearButton(event, checked )
+	EMA.db.hideClearButton = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleItemBarsSynchronized( event, checked )
+	EMA.db.itemBarsSynchronized = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeNumberOfItems( event, value )
+	EMA.db.numberOfItems = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeNumberOfRows( event, value )
+	EMA.db.numberOfRows= tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeScale( event, value )
+	EMA.db.itemUseScale = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeTransparency( event, value )
+	EMA.db.frameAlpha = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeBorderStyle( event, value )
+	EMA.db.borderStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeBackgroundStyle( event, value )
+	EMA.db.backgroundStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetMessageArea( event, value )
+	EMA.db.messageArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:OnMasterChanged( message, characterName )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsBackgroundColourPickerChanged( event, r, g, b, a )
+	EMA.db.frameBackgroundColourR = r
+	EMA.db.frameBackgroundColourG = g
+	EMA.db.frameBackgroundColourB = b
+	EMA.db.frameBackgroundColourA = a
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsBorderColourPickerChanged( event, r, g, b, a )
+	EMA.db.frameBorderColourR = r
+	EMA.db.frameBorderColourG = g
+	EMA.db.frameBorderColourB = b
+	EMA.db.frameBorderColourA = a
+	EMA:SettingsRefresh()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Create the item use frame.
+	CreateEMAItemUseFrame()
+	EMA:RefreshItemUseControls()
+	EMA:SettingsUpdateBorderStyle()
+	EMA:SetItemUseVisibility()
+	EMA:UpdateItemsInBar()
+	EMA.sharedInvData = {}
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
+	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
+	EMA:RegisterEvent( "BAG_UPDATE_DELAYED" )
+	EMA:RegisterEvent( "ITEM_PUSH" )
+	EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" )
+	EMA:RegisterEvent( "UNIT_QUEST_LOG_CHANGED", "QUEST_UPDATE" )
+	EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_Registered" )
+    EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_SetGlobal" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+	EMA:RefreshItemUseControls()
+	EMA:UpdateItemsInBar()
+	EMA.keyBindingFrame = CreateFrame( "Frame", nil, UIParent )
+	EMA:RegisterEvent( "UPDATE_BINDINGS" )
+	EMA:UPDATE_BINDINGS()
+	LibActionButton.RegisterCallback( EMA, "OnButtonContentsChanged", "OnButtonContentsChanged" )
+	LibActionButton.RegisterCallback( EMA, "OnButtonUpdate", "OnButtonUpdate" )
+	LibActionButton.RegisterCallback( EMA, "OnButtonState", "OnButtonState" )
+	LibActionButton.RegisterCallback( EMA, "OnButtonUsable", "OnButtonUsable" )
+	EMA:SecureHook( GameTooltip , "SetHyperlink", "AddTooltipInfo" )
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.showItemUse = settings.showItemUse
+		EMA.db.showItemUseOnMasterOnly = settings.showItemUseOnMasterOnly
+		EMA.db.hideItemUseInCombat = settings.hideItemUseInCombat
+		EMA.db.showItemCount = settings.showItemCount
+		EMA.db.borderStyle = settings.borderStyle
+		EMA.db.backgroundStyle = settings.backgroundStyle
+		EMA.db.itemUseScale = settings.itemUseScale
+		EMA.db.itemUseTitleHeight = settings.itemUseTitleHeight
+		EMA.db.itemUseVerticalSpacing = settings.itemUseVerticalSpacing
+		EMA.db.itemUseHorizontalSpacing = settings.itemUseHorizontalSpacing
+		EMA.db.autoAddQuestItemsToBar = settings.autoAddQuestItemsToBar
+		EMA.db.autoAddArtifactItemsToBar = settings.autoAddArtifactItemsToBar
+		EMA.db.autoAddSatchelsItemsToBar = settings.autoAddSatchelsItemsToBar
+		EMA.db.hideClearButton = settings.hideClearButton
+		EMA.db.itemBarsSynchronized = settings.itemBarsSynchronized
+		EMA.db.numberOfItems = settings.numberOfItems
+		EMA.db.numberOfRows = settings.numberOfRows
+		EMA.db.messageArea = settings.messageArea
+		if EMA.db.itemBarsSynchronized == true then
+		 EMA.db.itemsAdvanced = EMAUtilities:CopyTable( settings.itemsAdvanced )
+		end
+		EMA.db.frameAlpha = settings.frameAlpha
+		EMA.db.framePoint = settings.framePoint
+		EMA.db.frameRelativePoint = settings.frameRelativePoint
+		EMA.db.frameXOffset = settings.frameXOffset
+		EMA.db.frameYOffset = settings.frameYOffset
+		EMA.db.frameBackgroundColourR = settings.frameBackgroundColourR
+		EMA.db.frameBackgroundColourG = settings.frameBackgroundColourG
+		EMA.db.frameBackgroundColourB = settings.frameBackgroundColourB
+		EMA.db.frameBackgroundColourA = settings.frameBackgroundColourA
+		EMA.db.frameBorderColourR = settings.frameBorderColourR
+		EMA.db.frameBorderColourG = settings.frameBorderColourG
+		EMA.db.frameBorderColourB = settings.frameBorderColourB
+		EMA.db.frameBorderColourA = settings.frameBorderColourA
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+function EMA:PLAYER_REGEN_ENABLED()
+	if EMA.db.hideItemUseInCombat == true then
+		EMA:SetItemUseVisibility()
+	end
+	if EMA.refreshItemUseControlsPending == true then
+		EMA:RefreshItemUseControls()
+		EMA.refreshItemUseControlsPending = false
+	end
+	if EMA.refreshUpdateItemsInBarPending == true then
+		EMA:UpdateItemsInBar()
+		EMA.refreshUpdateItemsInBarPending = false
+	end
+	if EMA.refreshUpdateBindingsPending == true then
+		EMA:UPDATE_BINDINGS()
+		EMA.refreshUpdateBindingsPending = false
+	end
+	if EMA.updateSettingsAfterCombat == true then
+		EMA:SettingsRefresh()
+		EMA.updateSettingsAfterCombat = false
+	end
+end
+
+function EMA:PLAYER_REGEN_DISABLED()
+	if EMA.db.hideItemUseInCombat == true then
+		EMAItemUseFrame:Hide()
+	end
+end
+
+function EMA:BAG_UPDATE_DELAYED()
+	if not InCombatLockdown() then
+	--	EMA:UpdateItemsInBar()
+	--	EMA:UpdateQuestItemsInBar()
+		-- ItemCount
+		EMA:GetEMAItemCount()
+	end
+end
+function EMA:QUEST_UPDATE()
+	if not InCombatLockdown() then
+		EMA:UpdateQuestItemsInBar()
+	end
+end
+
+function EMA:ITEM_PUSH()
+	if EMA.db.showItemUse == false then
+		return
+	end
+	if EMA.db.autoAddQuestItemsToBar == true then
+		EMA:ScheduleTimer( "CheckForQuestItemAndAddToBar", 1 )
+	end
+	if EMA.db.autoAddArtifactItemsToBar == true then
+		EMA:ScheduleTimer( "CheckForArtifactItemAndAddToBar", 1 )
+	end
+	if EMA.db.autoAddSatchelsItemsToBar == true then
+		EMA:ScheduleTimer( "CheckForSatchelsItemAndAddToBar", 1 )
+	end
+
+end
+
+function EMA:PLAYER_ENTERING_WORLD( event, ... )
+	EMA:ScheduleTimer( "GetEMAItemCount", 0.5 )
+end
+
+local function GetMaxItemCountFromItemID(itemID)
+	if itemID == nil then
+		return 0
+	end
+	if EMA.sharedInvData == nil then
+		return 0
+	end
+	local count = 0
+	for itemName, data in pairs( EMA.sharedInvData ) do
+		for id, itemData in pairs( data ) do
+			if itemID == itemData.item then
+				count = count + itemData.itemCount
+			end
+		end
+	end
+	return count
+end
+
+
+function EMA:AddTooltipInfo( toolTip, itemID )
+	if EMA.db.showItemUse == false or EMA.db.showItemCount == false then
+		return
+	end
+	EMA:AddToTooltip( toolTip, itemID )
+	toolTip:Show()
+end
+
+function EMA:AddToTooltip(toolTip, itemID)
+	local totalCount = 0
+	if itemID ~= nil then
+		local count = GetMaxItemCountFromItemID(itemID)
+		if count > 0 then
+			toolTip:AddLine(" ")
+			toolTip:AddDoubleLine(L["TEAM_BAGS"], L["BAG_BANK"], 1,0.82,0,1,0.82,0)
+			for characterName, position in EMAApi.TeamList() do
+				local count, bankCount = EMA:GetItemCountFromItemID( characterName, itemID )
+				if count ~= nil then
+				toolTip:AddDoubleLine(Ambiguate(characterName, "none"), count..L[" "]..L["("]..bankCount..L[")"], 1,1,1,1,1,1)
+					totalCount = totalCount + count
+				end
+			end
+		end
+	end
+	if totalCount > 1 then
+		toolTip:AddLine(" ")
+		toolTip:AddDoubleLine(L["TOTAL"], totalCount, 1,0.82,0,1,1,1,1)
+	end
+end
+
+function EMA:GetEMAItemCount()
+	if EMA.db.showItemUse == false or EMA.db.showItemCount == false then
+		return
+	end
+	local iteminfo = {}
+	for iterateItems , itemInfo in pairs( EMA.db.itemsAdvanced ) do
+		local itemID = itemInfo.action
+		if itemID ~= nil then
+			local itemName = GetItemInfo( itemID )
+			local countBags = GetItemCount( itemID )
+			local countTotal = GetItemCount( itemID , true)
+			local countBank = ( countTotal - countBags )
+			if itemName ~= nil then
+				iteminfo[itemName] = {}
+				table.insert( iteminfo[itemName], { itemID = itemID, countBags = countBags, countBank = countBank } )
+			end
+		end
+	end
+	EMA:EMASendCommandToTeam( EMA.COMMAND_ITEM_COUNT, iteminfo )
+end
+
+function EMA:ReceiveItemCount( characterName, dataTable )
+	if InCombatLockdown() then
+		return
+    end
+	--EMA:Print("ReceiveItemCount", characterName )
+	for itemName, info in pairs( dataTable ) do
+		for i, data in pairs( info ) do
+		if EMA.sharedInvData[characterName..itemName] == nil then
+			EMA.sharedInvData[characterName..itemName] = {}
+		else
+			EMAUtilities:ClearTable( EMA.sharedInvData[characterName..itemName] )
+
+		end
+		table.insert(EMA.sharedInvData[characterName..itemName], {name = characterName, item = data.itemID, itemCount = data.countBags, bankCount = data.countBank } )
+		end
+	end
+	LibActionButton:UpdateAllButtons()
+end
+
+function EMA:GetItemCountFromItemID( characterName, itemID )
+	if EMA.db.showItemUse == false or EMA.db.showItemCount == false then
+		return
+	end
+	local count = nil
+	local countBank = nil
+	for itemName, data in pairs( EMA.sharedInvData ) do
+		for id, itemData in pairs( data ) do
+			--EMA:Print("testaaa", itemID, "vs", itemData.item)
+			if itemID == itemData.item and characterName == itemData.name then
+				--EMA:Print("Found", characterName, itemData.itemCount )
+				count = itemData.itemCount
+				countBank = itemData.bankCount
+			end
+		end
+	end
+	return count, countBank
+
+end
+
+function EMA:UPDATE_BINDINGS()
+	if InCombatLockdown() then
+		EMA.refreshUpdateBindingsPending = true
+		return
+    end
+	ClearOverrideBindings( EMA.keyBindingFrame )
+	for iterateItems = 1, EMA.maximumNumberOfItems, 1 do
+		local containerButtonName = EMA.globalFramePrefix.."ContainerButton"..iterateItems
+		local key1, key2 = GetBindingKey( "ITEMUSE"..iterateItems )
+		if key1 then
+			SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, containerButtonName )
+		end
+		if key2 then
+			SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, containerButtonName )
+		end
+	end
+end
+
+
+
+function EMA:LibSharedMedia_Registered()
+end
+
+function EMA:LibSharedMedia_SetGlobal()
+end
+
+-- A EMA command has been recieved.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if EMAApi.IsCharacterInTeam(characterName) == true then
+		if commandName == EMA.COMMAND_ITEMBAR_BUTTON then
+			EMA:ReceiveButtonData( characterName, ... )
+		end
+		if commandName == EMA.COMMAND_ITEMUSE_SYNC then
+			EMA:ReceiveSync( characterName, ... )
+		end
+		if commandName == EMA.COMMAND_ITEM_COUNT then
+			EMA:ReceiveItemCount( characterName, ... )
+		end
+	end
+end
+
+--EMA QUEST API
+EMAApi.GetMaxItemCountFromItemID = GetMaxItemCountFromItemID
+EMAApi.QuestTest = EMA.CheckForQuestItemAndAddToBar
\ No newline at end of file
diff --git a/EMA/Modules/Modules.xml b/EMA/Modules/Modules.xml
new file mode 100644
index 0000000..893efba
--- /dev/null
+++ b/EMA/Modules/Modules.xml
@@ -0,0 +1,30 @@
+<!--
+				EMA - ( Ebony's MultiBoxing Assistant )
+				Current Author: Jennifer Cally (Ebony)
+				License: MIT License 2018 Jennifer Cally
+
+				Some Code Used from 'Jamba' that is
+				Released under 	the MIT License
+				'Jamba' Copyright 2008-2015  Michael "Jafula" Miller
+-->
+
+<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd" xmlns="http://www.blizzard.com/wow/ui/">
+	<Script file="Sell.lua" />
+	<Script file="Purchase.lua" />
+
+	<Script file="Toon.lua" />
+	<Script file="Talk.lua" />
+
+	<Script file="Follow.lua" />
+
+	<Script file="Interaction.lua" />
+	<Script file="Trade.lua" />
+	<Script file="Guild.lua" />
+
+	<Script file="Quest.lua" />
+	<Script file="QuestWatcher.lua" />
+
+	<Script file="DisplayTeam.lua" />
+	<Script file="Information.lua" />
+	<Script file="ItemUse.lua" />
+</Ui>
diff --git a/EMA/Modules/Purchase.lua b/EMA/Modules/Purchase.lua
new file mode 100644
index 0000000..6cde9fa
--- /dev/null
+++ b/EMA/Modules/Purchase.lua
@@ -0,0 +1,627 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Purchase",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0"
+)
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
+local AceGUI = LibStub:GetLibrary( "AceGUI-3.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Purchase"
+EMA.settingsDatabaseName = "PurchaseProfileDB"
+EMA.chatCommand = "ema-purchase"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["VENDER"]
+EMA.moduleDisplayName = L["PURCHASE"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\SellIcon.tga"
+-- order
+EMA.moduleOrder = 60
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		autoBuy = false,
+		autoBuyOverflow = true,
+		messageArea = EMAApi.DefaultMessageArea(),
+		autoBuyItems = {}
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_ALL_SETTINGS"],
+				usage = "/EMA-purchase push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Purchase Management.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	EMA.settingsControl.checkBoxAutoBuy:SetValue( EMA.db.autoBuy )
+	EMA.settingsControl.checkBoxAutoBuyOverflow:SetValue( EMA.db.autoBuyOverflow )
+	EMA.settingsControl.editBoxTag:SetText( EMA.autoBuyItemTag )
+	EMA.settingsControl.editBoxAmount:SetText( EMA.autoBuyAmount )
+	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
+	EMA.settingsControl.checkBoxAutoBuyOverflow:SetDisabled( not EMA.db.autoBuy )
+	EMA.settingsControl.editBoxItem:SetDisabled( not EMA.db.autoBuy )
+	EMA.settingsControl.editBoxTag:SetDisabled( not EMA.db.autoBuy )
+	EMA.settingsControl.editBoxAmount:SetDisabled( not EMA.db.autoBuy )
+	EMA.settingsControl.buttonRemove:SetDisabled( not EMA.db.autoBuy )
+	EMA.settingsControl.buttonAdd:SetDisabled( not EMA.db.autoBuy )
+	EMA:SettingsScrollRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.autoBuy = settings.autoBuy
+		EMA.db.autoBuyOverflow = settings.autoBuyOverflow
+		EMA.db.messageArea = settings.messageArea
+		EMA.db.autoBuyItems = EMAUtilities:CopyTable( settings.autoBuyItems )
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateOptions( top )
+	-- Position and size constants.
+	local buttonControlWidth = 105
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local left2 = left + halfWidth + horizontalSpacing
+	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PURCHASE_ITEMS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxAutoBuy = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["AUTO_BUY_ITEMS"],
+		EMA.SettingsToggleAutoBuyItems
+	)
+	EMA.settingsControl.checkBoxAutoBuyOverflow = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left2,
+		movingTop,
+		L["OVERFLOW"],
+		EMA.SettingsToggleAutoBuyItemsOverflow
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.highlightRow = 1
+	EMA.settingsControl.offset = 1
+	local list = {}
+	list.listFrameName = "EMAPurchaseSettingsFrame"
+	list.parentFrame = EMA.settingsControl.widgetSettings.content
+	list.listTop = movingTop
+	list.listLeft = left
+	list.listWidth = headingWidth
+	list.rowHeight = 20
+	list.rowsToDisplay = 8
+	list.columnsToDisplay = 3
+	list.columnInformation = {}
+	list.columnInformation[1] = {}
+	list.columnInformation[1].width = 60
+	list.columnInformation[1].alignment = "LEFT"
+	list.columnInformation[2] = {}
+	list.columnInformation[2].width = 10
+	list.columnInformation[2].alignment = "RIGHT"
+	list.columnInformation[3] = {}
+	list.columnInformation[3].width = 30
+	list.columnInformation[3].alignment = "LEFT"
+	list.scrollRefreshCallback = EMA.SettingsScrollRefresh
+	list.rowClickCallback = EMA.SettingsRowClick
+	EMA.settingsControl.list = list
+	EMAHelperSettings:CreateScrollList( EMA.settingsControl.list )
+	movingTop = movingTop - list.listHeight - verticalSpacing
+	EMA.settingsControl.buttonRemove = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left,
+		movingTop,
+		L["REMOVE"],
+		EMA.SettingsRemoveClick,
+		L["REMOVE_VENDER_LIST"]
+	)
+	movingTop = movingTop -	buttonHeight - verticalSpacing
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ADD_ITEM"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.editBoxItem = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ITEM_DROP"]
+	)
+	EMA.settingsControl.editBoxItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedItem )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.editBoxTag = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		dropBoxWidth,
+		left,
+		movingTop,
+		L["GROUP_LIST"]
+	)
+	EMA.settingsControl.editBoxTag:SetList( EMAApi.GroupList() )
+	EMA.settingsControl.editBoxTag:SetCallback( "OnValueChanged",  EMA.GroupDropDownList )
+	EMA.settingsControl.editBoxAmount = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControl,
+		dropBoxWidth,
+		left + dropBoxWidth + horizontalSpacing,
+		movingTop,
+		L["AMOUNT"]
+	)
+	EMA.settingsControl.editBoxAmount:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedAmount )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.buttonAdd = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left,
+		movingTop,
+		L["ADD"],
+		EMA.SettingsAddClick
+	)
+	movingTop = movingTop -	buttonHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PURCHASE_MSG"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	return movingTop
+end
+
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+end
+
+function EMA:OnGroupAreasChanged( message )
+	EMA.settingsControl.editBoxTag:SetList( EMAApi.GroupList() )
+end
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfSettings = SettingsCreateOptions( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfSettings )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Callbacks.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsScrollRefresh()
+	FauxScrollFrame_Update(
+		EMA.settingsControl.list.listScrollFrame,
+		EMA:GetItemsMaxPosition(),
+		EMA.settingsControl.list.rowsToDisplay,
+		EMA.settingsControl.list.rowHeight
+	)
+	EMA.settingsControl.offset = FauxScrollFrame_GetOffset( EMA.settingsControl.list.listScrollFrame )
+	for iterateDisplayRows = 1, EMA.settingsControl.list.rowsToDisplay do
+		-- Reset.
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetText( "" )
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
+		-- Get data.
+		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.offset
+		if dataRowNumber <= EMA:GetItemsMaxPosition() then
+			-- Put data information into columns.
+			local itemInformation = EMA:GetItemAtPosition( dataRowNumber )
+			EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetText( itemInformation.name )
+			EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( itemInformation.amount )
+			EMA.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetText( itemInformation.tag )
+			-- Highlight the selected row.
+			if dataRowNumber == EMA.settingsControl.highlightRow then
+				EMA.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
+			end
+		end
+	end
+end
+
+function EMA:SettingsRowClick( rowNumber, columnNumber )
+	if EMA.settingsControl.offset + rowNumber <= EMA:GetItemsMaxPosition() then
+		EMA.settingsControl.highlightRow = EMA.settingsControl.offset + rowNumber
+		EMA:SettingsScrollRefresh()
+	end
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsSetMessageArea( event, value )
+	EMA.db.messageArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoBuyItems( event, checked )
+	EMA.db.autoBuy = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoBuyItemsOverflow( event, checked )
+	EMA.db.autoBuyOverflow = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRemoveClick( event )
+	StaticPopup_Show( "EMAPURCHASE_CONFIRM_REMOVE_AUTO_BUY_ITEM" )
+end
+
+function EMA:SettingsEditBoxChangedItem( event, text )
+	EMA.autoBuyItemLink = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:GroupDropDownList (event, value )
+	-- if nil or the blank group then don't get Name.
+	if value == " " or value == nil then
+		return
+	end
+	for index, groupName in ipairs( EMAApi.GroupList() ) do
+		if index == value then
+			EMA.autoBuyItemTag = groupName
+			break
+		end
+	end
+	EMA:SettingsRefresh()
+end
+
+
+
+
+
+function EMA:SettingsEditBoxChangedAmount( event, text )
+	if not text or text:trim() == "" or text:find( "^(%d+)$" ) == nil then
+		EMA:Print( L["NUM_ERROR"] )
+		return
+	end
+	EMA.autoBuyAmount = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsAddClick( event )
+	if EMA.autoBuyItemLink ~= nil and EMA.autoBuyItemTag ~= nil then
+		EMA:AddItem( EMA.autoBuyItemLink, EMA.autoBuyItemTag, EMA.autoBuyAmount )
+		EMA.autoBuyItemLink = nil
+		EMA.settingsControl.editBoxItem:SetText( "" )
+		EMA:SettingsRefresh()
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Popup Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialize Popup Dialogs.
+local function InitializePopupDialogs()
+	StaticPopupDialogs["EMAPURCHASE_CONFIRM_REMOVE_AUTO_BUY_ITEM"] = {
+        text = L["BUY_POPUP_ACCEPT"],
+        button1 = YES,
+        button2 = NO,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function()
+			EMA:RemoveItem()
+		end,
+    }
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	EMA.autoBuyItemTag = EMAApi.AllTag()
+	EMA.autoBuyItemLink = nil
+	EMA.autoBuyAmount = 20
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	EMA:RegisterEvent( "MERCHANT_SHOW" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMAPurchase functionality.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:GetItemsMaxPosition()
+	return #EMA.db.autoBuyItems
+end
+
+function EMA:GetItemAtPosition( position )
+	return EMA.db.autoBuyItems[position]
+end
+
+function EMA:AddItem( itemLink, itemTag, amountToBuy )
+	-- Get some more information about the item.
+	local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo( itemLink )
+	-- If the item could be found.
+	if name ~= nil then
+		local itemInformation = {}
+		itemInformation.link = itemLink
+		itemInformation.name = name
+		itemInformation.tag = itemTag
+		itemInformation.amount = amountToBuy
+		table.insert( EMA.db.autoBuyItems, itemInformation )
+		EMA:SettingsRefresh()
+		EMA:SettingsRowClick( 1, 1 )
+	end
+end
+
+function EMA:RemoveItem()
+	table.remove( EMA.db.autoBuyItems, EMA.settingsControl.highlightRow )
+	EMA:SettingsRefresh()
+	EMA:SettingsRowClick( 1, 1 )
+end
+
+function EMA:MERCHANT_SHOW()
+	if EMA.db.autoBuy == true then
+		EMA:DoMerchantAutoBuy()
+	end
+end
+
+-- A EMA command has been recieved.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+end
+
+function EMA:DoMerchantAutoBuy()
+	-- Flags will be set if the character does not have enough bag space or money.
+	local outOfBagSpace = false
+	local outOfMoney = false
+	local outOfOtherCurrency = false
+	-- Iterate all the wanted items...
+	for position, itemInfoTable in pairs( EMA.db.autoBuyItems ) do
+		local maxItemAmount = tonumber( itemInfoTable.amount )
+		local itemTag = itemInfoTable.tag
+		local itemLink = itemInfoTable.link
+		-- Does this character have the item tag?  No, don't buy.
+		if EMAApi.IsCharacterInGroup( EMA.characterName, itemTag ) then
+			-- Does the merchant have the item in stock?
+			local itemIndexMerchant = EMA:DoesMerchantHaveItemInStock( itemLink )
+			if itemIndexMerchant ~= nil then
+				-- Yes, item is in stock, how many does the character need?
+				local amountNeeded = EMA:GetAmountNeededForItemTopUp( itemLink, maxItemAmount )
+				-- Need more than 0 items, buy them.
+				if amountNeeded > 0 then
+					-- Attempt to buy the items.
+					local noFreeBagSpace, notEnoughMoney, notEnoughOtherCurrency = EMA:BuyItemFromMerchant( itemIndexMerchant, amountNeeded )
+					-- Set flags if problems occurred.
+					if noFreeBagSpace then
+						outOfBagSpace = true
+					end
+					if notEnoughMoney then
+						outOfMoney = true
+					end
+					if notEnoughOtherCurrency then
+						outOfOtherCurrency = true
+					end
+				end
+			end
+		end
+	end
+	-- If there was a problem, tell the master.
+	if outOfBagSpace then
+		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ERROR_BAGS_FULL"], false )
+	end
+	if outOfMoney then
+		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ERROR_GOLD"], false )
+	end
+	if outOfOtherCurrency then
+		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ERROR_CURR"], false )
+	end
+end
+
+function EMA:DoesMerchantHaveItemInStock( itemLink )
+	-- The index of the item to be found in the merchants inventory; initially nil, not found.
+	local indexOfItemToFind = nil
+	-- Get the name of the item to find from the item link.
+	local itemNameToFind = GetItemInfo( itemLink )
+	-- How many items does the merchant have?
+	local numberMerchantItems = GetMerchantNumItems()
+	-- Iterate all the merchants items...
+	for merchantIndex = 1, numberMerchantItems do
+		-- Is there an item link for this item.
+		local merchantItemLink = GetMerchantItemLink( merchantIndex )
+		if merchantItemLink then
+			-- Yes, get the item name.
+			local itemNameMerchant = GetItemInfo( merchantItemLink )
+			if itemNameMerchant == itemNameToFind then
+				indexOfItemToFind = merchantIndex
+				break
+			end
+		end
+	end
+	-- Return the index into the merchants inventory of the item.
+	return indexOfItemToFind
+end
+
+function EMA:GetAmountNeededForItemTopUp( itemLink, maxItemAmount )
+	-- The amount of the item needed to top up the item.
+	local amountNeeded = 0
+	-- How much of this item does the character have in it's bags?
+	local amountInBags = GetItemCount( itemLink )
+	-- Does the character need more?
+	if amountInBags < maxItemAmount then
+		-- Yes, how much more?
+		amountNeeded = maxItemAmount - amountInBags
+	end
+	-- Return the amount needed.
+	return amountNeeded
+end
+
+function EMA:BuyItemFromMerchant( itemIndexMerchant, amountToBuy )
+	-- Flags will be set if the character does not have enough bag space or money.
+	local noFreeBagSpace = false
+	local notEnoughMoney = false
+	local notEnoughOtherCurrency = false
+	-- Processing variables.
+	local buyThisAmount = 0
+	local amountLeftToBuy = amountToBuy
+	local actualAmountToBuy = 0
+	local costToBuy = 0
+	local moneyAvailable = 0
+	-- Get information about the item from the merchant.
+	local name, texture, price, itemsPerStack, numberAvailable, isUsable, extendedCost = GetMerchantItemInfo( itemIndexMerchant )
+	local maximumCanBuyAtATime = GetMerchantItemMaxStack( itemIndexMerchant )
+	-- Loop buying stacks from the merchant until the required number has been purchased.
+	repeat
+		-- Still need to buy more than the maximum?
+		if amountLeftToBuy >= maximumCanBuyAtATime then
+			-- Yes, buy the maximum amount.
+			buyThisAmount = maximumCanBuyAtATime
+		else
+			-- No, just buy the amount left.
+			buyThisAmount = amountLeftToBuy
+		end
+		-- Attempt to buy this amount from the merchant; although actual amount bought may differ,
+		-- depending on merchant stock and over buy flag.
+		-- How many does the merchant have left?
+		numberAvailable = select( 5, GetMerchantItemInfo( itemIndexMerchant ) )
+		-- Calculate how many to buy depending on the stacksize and whether over buying is allowed.
+		actualAmountToBuy = buyThisAmount
+		if EMA.db.autoBuyOverflow == true then
+			actualAmountToBuy = ceil(actualAmountToBuy)
+		else
+			actualAmountToBuy = floor(actualAmountToBuy)
+		end
+		-- If requesting more than the number available, then just buy as much as possible.
+		-- If numberAvailable is -1 then there is unlimited stock available.
+		if numberAvailable ~= -1 then
+			if actualAmountToBuy > numberAvailable then
+				actualAmountToBuy = numberAvailable
+			end
+		end
+		-- Does the character have enough money?
+		costToBuy = actualAmountToBuy * price
+		moneyAvailable = GetMoney()
+		if moneyAvailable < costToBuy then
+			notEnoughMoney = true
+		end
+		-- Is there enough free space for this item in the characters bags?
+		--TODO - need to find items family type and compare to each container.
+		local numFreeSlots, numTotalSlots = LibBagUtils:CountSlots("BAGS", 0)
+        if numFreeSlots == 0 then
+            noFreeBagSpace = true
+        end
+		-- Buy from the merchant, if there is a valid amount to buy and the character has enough money.
+		if (actualAmountToBuy > 0) and (not notEnoughMoney) then
+			BuyMerchantItem( itemIndexMerchant, actualAmountToBuy )
+		end
+		-- How much left to buy?
+		amountLeftToBuy = amountLeftToBuy - buyThisAmount
+	until (amountLeftToBuy == 0 or noFreeBagSpace == true)
+	-- TODO
+	-- Return the success flags.
+	return noFreeBagSpace, notEnoughMoney, notEnoughOtherCurrency
+end
diff --git a/EMA/Modules/Quest.lua b/EMA/Modules/Quest.lua
new file mode 100644
index 0000000..b636e81
--- /dev/null
+++ b/EMA/Modules/Quest.lua
@@ -0,0 +1,2083 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Quest",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local AceGUI = LibStub( "AceGUI-3.0" )
+EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
+
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Quest"
+EMA.settingsDatabaseName = "QuestProfileDB"
+EMA.chatCommand = "ema-quest"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["QUEST"]
+EMA.moduleDisplayName = L["QUEST"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\QuestIcon.tga"
+EMA.moduleCompletionIcon = "Interface\\Addons\\EMA\\Media\\QuestCompletionIcon.tga"
+-- order
+EMA.moduleOrder = 50
+EMA.moduleCompletionOrder = 1
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		mirrorMasterQuestSelectionAndDeclining = true,
+		acceptQuests = true,
+		slaveMirrorMasterAccept = true,
+		allAutoSelectQuests = false,
+		doNotAutoAccept = true,
+		allAcceptAnyQuest = false,
+		onlyAcceptQuestsFrom = false,
+		hideStaticPopup = false,
+		acceptFromTeam = false,
+		acceptFromNpc = false,
+		acceptFromFriends = false,
+		acceptFromParty = false,
+		acceptFromRaid = false,
+		acceptFromGuild = false,
+		masterAutoShareQuestOnAccept = false,
+		slaveAutoAcceptEscortQuest = true,
+		showEMAQuestLogWithWoWQuestLog = true,
+		enableAutoQuestCompletion = true,
+		noChoiceAllDoNothing = false,
+		noChoiceSlaveCompleteQuestWithMaster = true,
+		noChoiceAllAutoCompleteQuest = false,
+		hasChoiceSlaveDoNothing = false,
+		hasChoiceSlaveCompleteQuestWithMaster = true,
+		hasChoiceSlaveChooseSameRewardAsMaster = false,
+		hasChoiceSlaveMustChooseOwnReward = true,
+		hasChoiceSlaveRewardChoiceModifierConditional = false,
+		hasChoiceCtrlKeyModifier = false,
+		hasChoiceShiftKeyModifier = false,
+		hasChoiceAltKeyModifier = false,
+		hasChoiceOverrideUseSlaveRewardSelected = true,
+		messageArea = EMAApi.DefaultMessageArea(),
+		warningArea = EMAApi.DefaultWarningArea(),
+		framePoint = "CENTER",
+		frameRelativePoint = "CENTER",
+		frameXOffset = 0,
+		frameYOffset = 0,
+		overrideQuestAutoSelectAndComplete = false,
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = "group",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-quest push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_SELECT_GOSSIP_OPTION = "EMASelectGossipOption"
+EMA.COMMAND_SELECT_GOSSIP_ACTIVE_QUEST = "EMASelectGossipActiveQuest"
+EMA.COMMAND_SELECT_GOSSIP_AVAILABLE_QUEST = "EMASelectGossipAvailableQuest"
+EMA.COMMAND_SELECT_ACTIVE_QUEST = "EMASelectActiveQuest"
+EMA.COMMAND_SELECT_AVAILABLE_QUEST = "EMASelectAvailableQuest"
+EMA.COMMAND_ACCEPT_QUEST = "EMAAcceptQuest"
+EMA.COMMAND_COMPLETE_QUEST = "EMACompleteQuest"
+EMA.COMMAND_CHOOSE_QUEST_REWARD = "EMAChooseQuestReward"
+EMA.COMMAND_DECLINE_QUEST = "EMADeclineQuest"
+EMA.COMMAND_SELECT_QUEST_LOG_ENTRY = "EMASelectQuestLogEntry"
+EMA.COMMAND_QUEST_TRACK = "EMAQuestTrack"
+EMA.COMMAND_ABANDON_QUEST = "EMAAbandonQuest"
+EMA.COMMAND_ABANDON_ALL_QUESTS = "EMAAbandonAllQuests"
+EMA.COMMAND_TRACK_ALL_QUESTS = "EMATrackAllQuests"
+EMA.COMMAND_UNTRACK_ALL_QUESTS = "EMAUnTrackAllQuests"
+EMA.COMMAND_SHARE_ALL_QUESTS = "EMAShareAllQuests"
+EMA.COMMAND_TOGGLE_AUTO_SELECT = "EMAToggleAutoSelect"
+EMA.COMMAND_LOG_COMPLETE_QUEST = "EMALogCompleteQuest"
+EMA.COMMAND_ACCEPT_QUEST_FAKE = "EMAAcceptQuestFake"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Popup Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialize Popup Dialogs.
+local function InitializePopupDialogs()
+   -- Asks If you like to Abandon on all toons
+   StaticPopupDialogs["EMAQUEST_ABANDON_ALL_TOONS"] = {
+        text = L["ABANDON_QUESTS_TEAM"],
+        button1 = L["JUST_ME"],
+        button2 = L["ALL_TEAM"],
+        button3 = NO,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function( self )
+			--EMA:Print("Button1")
+			AbandonQuest()
+		end,
+		OnAlt = function ( self )
+			--EMA:Print("Button3")
+
+		end,
+		OnCancel = function( self, data )
+			--EMA:Print("Button2")
+			EMA:EMASendCommandToTeam( EMA.COMMAND_ABANDON_QUEST, data.questID, data.title)
+		end,
+    }
+   -- Asks If you like to Track on all toons
+   StaticPopupDialogs["EMA_QUEST_TRACK_ALL_TOONS"] = {
+        text = L["TRACK_QUEST_ON_TEAM"],
+        button1 = YES,
+        button2 = NO,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function( self, data )
+			EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, data.questID, data.title, true )
+		end,
+		OnCancel = function( self )
+		end,
+    }
+	StaticPopupDialogs["EMA_QUEST_UNTRACK_ALL_TOONS"] = {
+        text = L["UNTRACK_QUEST_ON_TEAM"],
+        button1 = YES,
+        button2 = NO,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function( self, data )
+			EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, data.questID, data.title, false )
+		end,
+		OnCancel = function( self )
+		end,
+    }
+	StaticPopupDialogs["EMA_ABANDON_ALL_TOON_QUEST"] = {
+        text = L["ABANDON_ALL_QUESTS"],
+        button1 = L["YES_IAM_SURE"],
+        button2 = NO,
+        timeout = 0,
+		showAlert = 1,
+		whileDead = true,
+		hideOnEscape = true,
+		OnAccept = function()
+			EMA:DoAbandonAllQuestsFromAllToons()
+		end,
+    }
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:DebugMessage( ... )
+	--EMA:Print( ... )
+end
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Create the settings control.
+	EMA:SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+	-- Create the EMA Quest Log frame.
+	EMA:CreateEMAMiniQuestLogFrame()
+	-- An empty table to hold the available and active quests at an npc.
+	EMA.gossipQuests = {}
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	-- No internal commands active.
+	EMA.isInternalCommand = false
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+    -- Quest events.
+	EMA:RegisterEvent( "QUEST_ACCEPTED" )
+    EMA:RegisterEvent( "QUEST_DETAIL" )
+    EMA:RegisterEvent( "QUEST_COMPLETE" )
+    EMA:RegisterEvent( "QUEST_ACCEPT_CONFIRM" )
+	EMA:RegisterEvent( "GOSSIP_SHOW" )
+	EMA:RegisterEvent( "QUEST_GREETING" )
+	EMA:RegisterEvent( "QUEST_PROGRESS" )
+	EMA:RegisterEvent( "CHAT_MSG_SYSTEM", "QUEST_FAIL" )
+   -- Quest post hooks.
+    EMA:SecureHook( "SelectGossipOption" )
+    EMA:SecureHook( "SelectGossipActiveQuest" )
+    EMA:SecureHook( "SelectGossipAvailableQuest" )
+    EMA:SecureHook( "SelectActiveQuest" )
+    EMA:SecureHook( "SelectAvailableQuest" )
+    EMA:SecureHook( "AcceptQuest" )
+	EMA:SecureHook( "AcknowledgeAutoAcceptQuest" )
+    EMA:SecureHook( "CompleteQuest" )
+	EMA:SecureHook( "GetQuestReward" )
+	EMA:SecureHook( "ToggleFrame" )
+	EMA:SecureHook( "ToggleQuestLog" )
+	EMA:SecureHook( WorldMapFrame, "Hide", "QuestLogFrameHide" )
+	EMA:SecureHook( "ShowQuestComplete" )
+	EMA:SecureHook( "QuestMapQuestOptions_AbandonQuest" )
+	EMA:SecureHook( "QuestMapQuestOptions_TrackQuest" )
+
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+	-- AceHook-3.0 will tidy up the hooks for us.
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsCreate()
+	EMA.settingsControl = {}
+	EMA.settingsControlCompletion = {}
+	-- Create the settings panels.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControlCompletion,
+		L["COMPLETION"],
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleCompletionIcon,
+		EMA.moduleCompletionOrder
+	)
+	-- Create the quest controls.
+	local bottomOfQuestOptions = EMA:SettingsCreateQuestControl( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfQuestOptions )
+	local bottomOfQuestCompletionOptions = EMA:SettingsCreateQuestCompletionControl( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControlCompletion.widgetSettings.content:SetHeight( -bottomOfQuestCompletionOptions )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+function EMA:SettingsCreateQuestControl( top )
+	-- Get positions and dimensions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local radioBoxHeight = EMAHelperSettings:GetRadioBoxHeight()
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local indent = horizontalSpacing * 10
+	local indentContinueLabel = horizontalSpacing * 22
+	local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local middle = left + halfWidth
+	local column1Left = left
+	local column1LeftIndent = left + indentContinueLabel
+	local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing
+	local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, "", movingTop, false )
+	movingTop = movingTop - headingHeight
+	-- Create a heading for information.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, EMA.moduleDisplayName..L[" "]..L["INFORMATION"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	-- Information line 1.
+	EMA.settingsControl.labelQuestInformation1 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["QUESTINFORMATIONONE"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	-- Information line 2.
+	EMA.settingsControl.labelQuestInformation2 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["QUESTINFORMATIONTWO"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	-- Information line 3.
+	EMA.settingsControl.labelQuestInformation3 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["QUESTINFORMATIONTHREE"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	-- Create a heading for quest selection.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["QUEST_HEADER"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	-- Radio box: Minion select, accept and decline quest with master.
+	EMA.settingsControl.checkBoxMirrorMasterQuestSelectionAndDeclining = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["MIRROR_QUEST"],
+		EMA.SettingsToggleMirrorMasterQuestSelectionAndDeclining,
+		L["MIRROR_QUEST_HELP"]
+	)
+	EMA.settingsControl.checkBoxMirrorMasterQuestSelectionAndDeclining:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Radio box: All auto select quests.
+	EMA.settingsControl.checkBoxAllAutoSelectQuests = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["AUTO_SELECT_QUESTS"],
+		EMA.SettingsToggleAllAutoSelectQuests,
+		L["AUTO_SELECT_QUESTS_HELP"]
+	)
+	EMA.settingsControl.checkBoxAllAutoSelectQuests:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Check box: Accept quests.
+	EMA.settingsControl.checkBoxAcceptQuests = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["ACCEPT_QUESTS"],
+		EMA.SettingsToggleAcceptQuests,
+		L["ACCEPT_QUESTS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Radio box: Minion accept quest with master.
+	EMA.settingsControl.checkBoxMinionMirrorMasterAccept = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left + indent,
+		movingTop,
+		L["ACCEPT_QUEST_WITH_TEAM"],
+		EMA.SettingsToggleMinionMirrorMasterAccept,
+		L["ACCEPT_QUEST_WITH_TEAM_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Information line 3.
+	EMA.settingsControl.labelQuestInformationAuto = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["QUEST_INFORMATION_AUTO"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	-- Radio box: All auto accept any quest.
+	EMA.settingsControl.checkBoxDoNotAutoAccept = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left + indent,
+		movingTop,
+		L["DONOT_AUTO_ACCEPT_QUESTS"],
+		EMA.SettingsToggleDoNotAutoAccept
+	)
+	EMA.settingsControl.checkBoxDoNotAutoAccept:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Radio box: All auto accept any quest.
+	EMA.settingsControl.checkBoxAllAcceptAnyQuest = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left + indent,
+		movingTop,
+		L["AUTO_ACCEPT_QUESTS"],
+		EMA.SettingsToggleAllAcceptAnyQuest,
+		L["AUTO_ACCEPT_QUESTS_HELP"]
+	)
+	EMA.settingsControl.checkBoxAllAcceptAnyQuest:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Radio box: Choose who to auto accept quests from.
+	EMA.settingsControl.checkBoxOnlyAcceptQuestsFrom = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left + indent,
+		movingTop,
+		L["AUTO_ACCEPT_QUESTS_LIST"],
+		EMA.SettingsToggleOnlyAcceptQuestsFrom,
+		L["AUTO_ACCEPT_QUESTS_LIST_HELP"]
+	)
+	EMA.settingsControl.checkBoxOnlyAcceptQuestsFrom:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Check box: Team.
+	EMA.settingsControl.checkBoxAcceptFromTeam = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxThirdWidth,
+		column1LeftIndent,
+		movingTop,
+		L["TEAM"],
+		EMA.SettingsToggleAcceptFromTeam,
+		L["TEAM_QUEST_HELP"]
+	)
+	-- Check box: NPC.
+	EMA.settingsControl.checkBoxAcceptFromNpc = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxThirdWidth,
+		column2LeftIndent,
+		movingTop,
+		L["NPC"],
+		EMA.SettingsToggleAcceptFromNpc,
+		L["NPC_HELP"]
+	)
+	-- Check box: Friends.
+	EMA.settingsControl.checkBoxAcceptFromFriends = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxThirdWidth,
+		column3LeftIndent,
+		movingTop,
+		L["FRIENDS"],
+		EMA.SettingsToggleAcceptFromFriends,
+		L["FRIENDS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Check box: Party.
+	EMA.settingsControl.checkBoxAcceptFromParty = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxThirdWidth,
+		column1LeftIndent,
+		movingTop,
+		L["PARTY"],
+		EMA.SettingsToggleAcceptFromParty,
+		L["QUEST_GROUP_HELP"]
+
+	)
+	-- Check box: Guild.
+	--movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxAcceptFromGuild = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxThirdWidth,
+		column2LeftIndent,
+		movingTop,
+		L["GUILD"],
+		EMA.SettingsToggleAcceptFromGuild,
+		L["GUILD_HELP"]
+	)
+-- TODO Change To Community's
+	-- Check box: Raid.
+	EMA.settingsControl.checkBoxAcceptFromRaid = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		checkBoxThirdWidth,
+		column3LeftIndent,
+		movingTop,
+		L["PH_RAID"],
+		EMA.SettingsToggleAcceptFromRaid,
+		L["PH_RAID_HELP"]
+	)
+	-- Check box: Master auto share quest on accept.
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxMasterAutoShareQuestOnAccept = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["MASTER_SHARE_QUESTS"],
+		EMA.SettingsToggleMasterAutoShareQuestOnAccept,
+		L["MASTER_SHARE_QUESTS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Check box: Minion auto accept escort quest from master.
+	EMA.settingsControl.checkBoxMinionAutoAcceptEscortQuest = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["ACCEPT_ESCORT_QUEST"],
+		EMA.SettingsToggleMinionAutoAcceptEscortQuest,
+		L["ACCEPT_ESCORT_QUEST_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Create a heading for other options.
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["OTHER"]..L[" "]..L["OPTIONS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	-- Check box: Override quest auto select and auto complete.
+	EMA.settingsControl.checkBoxOverrideQuestAutoSelectAndComplete = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["HOLD_SHIFT_TO_OVERRIDE"],
+		EMA.SettingsToggleOverrideQuestAutoSelectAndComplete,
+		L["HOLD_SHIFT_TO_OVERRIDE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Check box: Show EMA quest log with WoW quest log.
+	EMA.settingsControl.checkBoxShowEMAQuestLogWithWoWQuestLog = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["SHOW_PANEL_UNDER_QUESTLOG"],
+		EMA.SettingsToggleShowEMAQuestLogWithWoWQuestLog,
+		L["SHOW_PANEL_UNDER_QUESTLOG_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Message area.
+	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+	movingTop = movingTop - dropdownHeight
+	-- Warning area.
+	EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["SEND_WARNING_AREA"]
+	)
+	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
+	movingTop = movingTop - dropdownHeight
+	return movingTop
+end
+
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+end
+
+function EMA:SettingsCreateQuestCompletionControl( top )
+	-- Get positions and dimensions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local radioBoxHeight = EMAHelperSettings:GetRadioBoxHeight()
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local indent = horizontalSpacing * 10
+	local indentContinueLabel = horizontalSpacing * 18
+	local indentSpecial = indentContinueLabel + 9
+	local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3
+	local column1Left = left
+	local column1LeftIndent = left + indentContinueLabel
+	local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing
+	local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControlCompletion, "", movingTop, false )
+	movingTop = movingTop - headingHeight
+	-- Create a heading for quest completion.
+	EMAHelperSettings:CreateHeading( EMA.settingsControlCompletion, L["QUEST_COMPLETION"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	-- Check box: Enable auto quest completion.
+	EMA.settingsControlCompletion.checkBoxEnableAutoQuestCompletion = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["ENABLE_QUEST_COMPLETION"],
+		EMA.SettingsToggleEnableAutoQuestCompletion,
+		L["ENABLE_QUEST_COMPLETION_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControlCompletion, L["NOREWARDS_OR_ONEREWARD"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	-- Radio box: No choice, minion do nothing.
+	EMA.settingsControlCompletion.checkBoxNoChoiceAllDoNothing = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["QUEST_DO_NOTHING"],
+		EMA.SettingsToggleNoChoiceAllDoNothing,
+		L["QUEST_DO_NOTHING_HELP"]
+	)
+	EMA.settingsControlCompletion.checkBoxNoChoiceAllDoNothing:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Radio box: No choice, minion complete quest with master.
+	EMA.settingsControlCompletion.checkBoxNoChoiceMinionCompleteQuestWithMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["COMPLETE_QUEST_WITH_TEAM"],
+		EMA.SettingsToggleNoChoiceMinionCompleteQuestWithMaster,
+		L["COMPLETE_QUEST_WITH_TEAM_HELP"]
+	)
+	EMA.settingsControlCompletion.checkBoxNoChoiceMinionCompleteQuestWithMaster:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Radio box: No Choice, all automatically complete quest.
+	EMA.settingsControlCompletion.checkBoxNoChoiceAllAutoCompleteQuest = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["AUTO_COMPLETE_QUEST"],
+		EMA.SettingsToggleNoChoiceAllAutoCompleteQuest,
+		L["AUTO_COMPLETE_QUEST_HELP"]
+	)
+	EMA.settingsControlCompletion.checkBoxNoChoiceAllAutoCompleteQuest:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControlCompletion, L["MORE_THEN_ONE_REWARD"], movingTop, false )
+	movingTop = movingTop - headingHeight
+
+	-- Radio box: Has choice, minion do nothing.
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionDoNothing = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["QUEST_DO_NOTHING"] ,
+		EMA.SettingsToggleHasChoiceMinionDoNothing,
+		L["QUEST_DO_NOTHING_HELP"]
+	)
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionDoNothing:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Radio box: Has choice, minion complete quest with master.
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionCompleteQuestWithMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["COMPLETE_QUEST_WITH_TEAM"],
+		EMA.SettingsToggleHasChoiceMinionCompleteQuestWithMaster,
+		L["COMPLETE_QUEST_WITH_TEAM_HELP"]
+	)
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionCompleteQuestWithMaster:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Radio box: Has choice, minion must choose own reward.
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionMustChooseOwnReward = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left + indent,
+		movingTop,
+		L["MUST_CHOOSE_OWN_REWARD"],
+		EMA.SettingsToggleHasChoiceMinionMustChooseOwnReward,
+		L["MUST_CHOOSE_OWN_REWARD_HELP"]
+	)
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionMustChooseOwnReward:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Radio box: Has choice, minion choose same reward as master.
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionChooseSameRewardAsMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left + indent,
+		movingTop,
+		L["CHOOSE_SAME_REWARD"],
+		EMA.SettingsToggleHasChoiceMinionChooseSameRewardAsMaster,
+		L["CHOOSE_SAME_REWARD_HELP"]
+	)
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionChooseSameRewardAsMaster:SetType( "radio" )
+	movingTop = movingTop - radioBoxHeight
+	-- Radio box: Has choice, minion reward choice depends on modifier key pressed down.
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionRewardChoiceModifierConditional = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left + indent,
+		movingTop,
+		L["MODIFIER_CHOOSE_SAME_REWARD"],
+		EMA.SettingsToggleHasChoiceMinionRewardChoiceModifierConditional,
+		L["MODIFIER_CHOOSE_SAME_REWARD_HELP"]
+	)
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionRewardChoiceModifierConditional:SetType( "radio" )
+
+	movingTop = movingTop - radioBoxHeight
+	-- Check box: Ctrl modifier key.
+	EMA.settingsControlCompletion.checkBoxHasChoiceCtrlKeyModifier = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		checkBoxThirdWidth,
+		column1LeftIndent,
+		movingTop,
+		L["CTRL"],
+		EMA.SettingsToggleHasChoiceCtrlKeyModifier
+	)
+	-- Check box: Shift modifier key.
+	EMA.settingsControlCompletion.checkBoxHasChoiceShiftKeyModifier = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		checkBoxThirdWidth,
+		column2LeftIndent,
+		movingTop,
+		L["SHIFT"],
+		EMA.SettingsToggleHasChoiceShiftKeyModifier
+	)
+	-- Check box: Alt modifier key.
+	EMA.settingsControlCompletion.checkBoxHasChoiceAltKeyModifier = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		checkBoxThirdWidth,
+		column3LeftIndent,
+		movingTop,
+		L["ALT"],
+		EMA.SettingsToggleHasChoiceAltKeyModifier
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Check box: Has choice, override, if minion already has reward selected, choose that reward.
+	EMA.settingsControlCompletion.checkBoxHasChoiceOverrideUseMinionRewardSelected = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlCompletion,
+		headingWidth,
+		column1Left + indent,
+		movingTop,
+		L["OVERRIDE_REWARD_SELECTED"],
+		EMA.SettingsToggleHasChoiceOverrideUseMinionRewardSelected,
+		L["OVERRIDE_REWARD_SELECTED_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	return movingTop
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings functionality.
+-------------------------------------------------------------------------------------------------------------
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.mirrorMasterQuestSelectionAndDeclining = settings.mirrorMasterQuestSelectionAndDeclining
+		EMA.db.allAutoSelectQuests = settings.allAutoSelectQuests
+		EMA.db.acceptQuests = settings.acceptQuests
+		EMA.db.slaveMirrorMasterAccept = settings.slaveMirrorMasterAccept
+		EMA.db.doNotAutoAccept = settings.doNotAutoAccept
+		EMA.db.allAcceptAnyQuest = settings.allAcceptAnyQuest
+		EMA.db.onlyAcceptQuestsFrom = settings.onlyAcceptQuestsFrom
+		EMA.db.acceptFromTeam = settings.acceptFromTeam
+		EMA.db.acceptFromNpc = settings.acceptFromNpc
+		EMA.db.acceptFromFriends = settings.acceptFromFriends
+		EMA.db.acceptFromParty = settings.acceptFromParty
+		EMA.db.acceptFromRaid = settings.acceptFromRaid
+		EMA.db.acceptFromGuild = settings.acceptFromGuild
+		EMA.db.masterAutoShareQuestOnAccept = settings.masterAutoShareQuestOnAccept
+		EMA.db.slaveAutoAcceptEscortQuest = settings.slaveAutoAcceptEscortQuest
+		EMA.db.showEMAQuestLogWithWoWQuestLog = settings.showEMAQuestLogWithWoWQuestLog
+		EMA.db.enableAutoQuestCompletion = settings.enableAutoQuestCompletion
+		EMA.db.noChoiceAllDoNothing = settings.noChoiceAllDoNothing
+		EMA.db.noChoiceSlaveCompleteQuestWithMaster = settings.noChoiceSlaveCompleteQuestWithMaster
+		EMA.db.noChoiceAllAutoCompleteQuest = settings.noChoiceAllAutoCompleteQuest
+		EMA.db.hasChoiceSlaveDoNothing = settings.hasChoiceSlaveDoNothing
+		EMA.db.hasChoiceSlaveCompleteQuestWithMaster = settings.hasChoiceSlaveCompleteQuestWithMaster
+		EMA.db.hasChoiceSlaveChooseSameRewardAsMaster = settings.hasChoiceSlaveChooseSameRewardAsMaster
+		EMA.db.hasChoiceSlaveMustChooseOwnReward = settings.hasChoiceSlaveMustChooseOwnReward
+		EMA.db.hasChoiceSlaveRewardChoiceModifierConditional = settings.hasChoiceSlaveRewardChoiceModifierConditional
+		EMA.db.hasChoiceCtrlKeyModifier = settings.hasChoiceCtrlKeyModifier
+		EMA.db.hasChoiceShiftKeyModifier = settings.hasChoiceShiftKeyModifier
+		EMA.db.hasChoiceAltKeyModifier = settings.hasChoiceAltKeyModifier
+		EMA.db.hasChoiceOverrideUseSlaveRewardSelected = settings.hasChoiceOverrideUseSlaveRewardSelected
+		EMA.db.messageArea = settings.messageArea
+		EMA.db.warningArea = settings.warningArea
+		EMA.db.overrideQuestAutoSelectAndComplete = settings.overrideQuestAutoSelectAndComplete
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	-- Quest general and acceptance options.
+	EMA.settingsControl.checkBoxMirrorMasterQuestSelectionAndDeclining:SetValue( EMA.db.mirrorMasterQuestSelectionAndDeclining )
+	EMA.settingsControl.checkBoxAllAutoSelectQuests:SetValue( EMA.db.allAutoSelectQuests )
+	EMA.settingsControl.checkBoxAcceptQuests:SetValue( EMA.db.acceptQuests )
+	EMA.settingsControl.checkBoxMinionMirrorMasterAccept:SetValue( EMA.db.slaveMirrorMasterAccept )
+	EMA.settingsControl.checkBoxDoNotAutoAccept:SetValue( EMA.db.doNotAutoAccept )
+	EMA.settingsControl.checkBoxAllAcceptAnyQuest:SetValue( EMA.db.allAcceptAnyQuest )
+	EMA.settingsControl.checkBoxOnlyAcceptQuestsFrom:SetValue( EMA.db.onlyAcceptQuestsFrom )
+	EMA.settingsControl.checkBoxAcceptFromTeam:SetValue( EMA.db.acceptFromTeam )
+	EMA.settingsControl.checkBoxAcceptFromNpc:SetValue( EMA.db.acceptFromNpc )
+	EMA.settingsControl.checkBoxAcceptFromFriends:SetValue( EMA.db.acceptFromFriends )
+	EMA.settingsControl.checkBoxAcceptFromParty:SetValue( EMA.db.acceptFromParty )
+	EMA.settingsControl.checkBoxAcceptFromRaid:SetValue( EMA.db.acceptFromRaid )
+	EMA.settingsControl.checkBoxAcceptFromGuild:SetValue( EMA.db.acceptFromGuild )
+	EMA.settingsControl.checkBoxMasterAutoShareQuestOnAccept:SetValue( EMA.db.masterAutoShareQuestOnAccept )
+	EMA.settingsControl.checkBoxMinionAutoAcceptEscortQuest:SetValue( EMA.db.slaveAutoAcceptEscortQuest )
+	EMA.settingsControl.checkBoxShowEMAQuestLogWithWoWQuestLog:SetValue( EMA.db.showEMAQuestLogWithWoWQuestLog )
+	EMA.settingsControl.checkBoxOverrideQuestAutoSelectAndComplete:SetValue( EMA.db.overrideQuestAutoSelectAndComplete )
+	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
+	EMA.settingsControl.dropdownWarningArea:SetValue( EMA.db.warningArea )
+	-- Quest completion options.
+	EMA.settingsControlCompletion.checkBoxEnableAutoQuestCompletion:SetValue( EMA.db.enableAutoQuestCompletion )
+	EMA.settingsControlCompletion.checkBoxNoChoiceAllDoNothing:SetValue( EMA.db.noChoiceAllDoNothing )
+	EMA.settingsControlCompletion.checkBoxNoChoiceMinionCompleteQuestWithMaster:SetValue( EMA.db.noChoiceSlaveCompleteQuestWithMaster )
+	EMA.settingsControlCompletion.checkBoxNoChoiceAllAutoCompleteQuest:SetValue( EMA.db.noChoiceAllAutoCompleteQuest )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionDoNothing:SetValue( EMA.db.hasChoiceSlaveDoNothing )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionCompleteQuestWithMaster:SetValue( EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionChooseSameRewardAsMaster:SetValue( EMA.db.hasChoiceSlaveChooseSameRewardAsMaster )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionMustChooseOwnReward:SetValue( EMA.db.hasChoiceSlaveMustChooseOwnReward )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionRewardChoiceModifierConditional:SetValue( EMA.db.hasChoiceSlaveRewardChoiceModifierConditional )
+	EMA.settingsControlCompletion.checkBoxHasChoiceCtrlKeyModifier:SetValue( EMA.db.hasChoiceCtrlKeyModifier )
+	EMA.settingsControlCompletion.checkBoxHasChoiceShiftKeyModifier:SetValue( EMA.db.hasChoiceShiftKeyModifier )
+	EMA.settingsControlCompletion.checkBoxHasChoiceAltKeyModifier:SetValue( EMA.db.hasChoiceAltKeyModifier )
+	EMA.settingsControlCompletion.checkBoxHasChoiceOverrideUseMinionRewardSelected:SetValue( EMA.db.hasChoiceOverrideUseSlaveRewardSelected )
+	-- Ensure correct state (general and acceptance options).
+	EMA.settingsControl.checkBoxMinionMirrorMasterAccept:SetDisabled( not EMA.db.acceptQuests )
+	EMA.settingsControl.checkBoxDoNotAutoAccept:SetDisabled( not EMA.db.acceptQuests )
+	EMA.settingsControl.checkBoxAllAcceptAnyQuest:SetDisabled( not EMA.db.acceptQuests )
+	EMA.settingsControl.checkBoxOnlyAcceptQuestsFrom:SetDisabled( not EMA.db.acceptQuests )
+	EMA.settingsControl.checkBoxAcceptFromTeam:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
+	EMA.settingsControl.checkBoxAcceptFromNpc:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
+	EMA.settingsControl.checkBoxAcceptFromFriends:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
+	EMA.settingsControl.checkBoxAcceptFromParty:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
+	EMA.settingsControl.checkBoxAcceptFromRaid:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
+	EMA.settingsControl.checkBoxAcceptFromGuild:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
+	-- Ensure correct state (completion options).
+	EMA.settingsControlCompletion.checkBoxNoChoiceAllDoNothing:SetDisabled( not EMA.db.enableAutoQuestCompletion )
+	EMA.settingsControlCompletion.checkBoxNoChoiceMinionCompleteQuestWithMaster:SetDisabled( not EMA.db.enableAutoQuestCompletion )
+	EMA.settingsControlCompletion.checkBoxNoChoiceAllAutoCompleteQuest:SetDisabled( not EMA.db.enableAutoQuestCompletion )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionDoNothing:SetDisabled( not EMA.db.enableAutoQuestCompletion )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionCompleteQuestWithMaster:SetDisabled( not EMA.db.enableAutoQuestCompletion )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionChooseSameRewardAsMaster:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionMustChooseOwnReward:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
+	EMA.settingsControlCompletion.checkBoxHasChoiceMinionRewardChoiceModifierConditional:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
+	EMA.settingsControlCompletion.checkBoxHasChoiceCtrlKeyModifier:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster or not EMA.db.hasChoiceSlaveRewardChoiceModifierConditional )
+	EMA.settingsControlCompletion.checkBoxHasChoiceShiftKeyModifier:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster or not EMA.db.hasChoiceSlaveRewardChoiceModifierConditional )
+	EMA.settingsControlCompletion.checkBoxHasChoiceAltKeyModifier:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster or not EMA.db.hasChoiceSlaveRewardChoiceModifierConditional )
+	EMA.settingsControlCompletion.checkBoxHasChoiceOverrideUseMinionRewardSelected:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsToggleMirrorMasterQuestSelectionAndDeclining( event, checked )
+	EMA.db.mirrorMasterQuestSelectionAndDeclining = checked
+	EMA.db.allAutoSelectQuests = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAllAutoSelectQuests( event, checked )
+	EMA.db.allAutoSelectQuests = checked
+	EMA.db.mirrorMasterQuestSelectionAndDeclining = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAcceptQuests( event, checked )
+	EMA.db.acceptQuests = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleMinionMirrorMasterAccept( event, checked )
+	EMA.db.slaveMirrorMasterAccept = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleOverrideQuestAutoSelectAndComplete( event, checked )
+	EMA.db.overrideQuestAutoSelectAndComplete = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDoNotAutoAccept( event, checked )
+	EMA.db.doNotAutoAccept = checked
+	EMA.db.allAcceptAnyQuest = not checked
+	EMA.db.onlyAcceptQuestsFrom = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAllAcceptAnyQuest( event, checked )
+	EMA.db.allAcceptAnyQuest = checked
+	EMA.db.onlyAcceptQuestsFrom = not checked
+	EMA.db.doNotAutoAccept = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleOnlyAcceptQuestsFrom( event, checked )
+	EMA.db.onlyAcceptQuestsFrom = checked
+	EMA.db.allAcceptAnyQuest = not checked
+	EMA.db.doNotAutoAccept = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAcceptFromTeam( event, checked )
+	EMA.db.acceptFromTeam = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAcceptFromNpc( event, checked )
+	EMA.db.acceptFromNpc = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAcceptFromFriends( event, checked )
+	EMA.db.acceptFromFriends = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAcceptFromParty( event, checked )
+	EMA.db.acceptFromParty = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAcceptFromRaid( event, checked )
+	EMA.db.acceptFromRaid = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAcceptFromGuild( event, checked )
+	EMA.db.acceptFromGuild = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleMasterAutoShareQuestOnAccept( event, checked )
+	EMA.db.masterAutoShareQuestOnAccept = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleMinionAutoAcceptEscortQuest( event, checked )
+	EMA.db.slaveAutoAcceptEscortQuest = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowEMAQuestLogWithWoWQuestLog( event, checked )
+	EMA.db.showEMAQuestLogWithWoWQuestLog = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleEnableAutoQuestCompletion( event, checked )
+	EMA.db.enableAutoQuestCompletion = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleNoChoiceAllDoNothing( event, checked )
+	EMA.db.noChoiceAllDoNothing = checked
+	EMA.db.noChoiceSlaveCompleteQuestWithMaster = not checked
+	EMA.db.noChoiceAllAutoCompleteQuest = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleNoChoiceMinionCompleteQuestWithMaster( event, checked )
+	EMA.db.noChoiceSlaveCompleteQuestWithMaster = checked
+	EMA.db.noChoiceAllDoNothing = not checked
+	EMA.db.noChoiceAllAutoCompleteQuest = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleNoChoiceAllAutoCompleteQuest( event, checked )
+	EMA.db.noChoiceAllAutoCompleteQuest = checked
+	EMA.db.noChoiceAllDoNothing = not checked
+	EMA.db.noChoiceSlaveCompleteQuestWithMaster = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceMinionDoNothing( event, checked )
+	EMA.db.hasChoiceSlaveDoNothing = checked
+	EMA.db.hasChoiceAquireBestQuestRewardForCharacter = not checked
+	EMA.db.hasChoiceSlaveCompleteQuestWithMaster = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceMinionCompleteQuestWithMaster( event, checked )
+	EMA.db.hasChoiceSlaveCompleteQuestWithMaster = checked
+	EMA.db.hasChoiceAquireBestQuestRewardForCharacter = not checked
+	EMA.db.hasChoiceSlaveDoNothing = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceAquireBestQuestRewardForCharacter( event, checked )
+	EMA.db.hasChoiceAquireBestQuestRewardForCharacter = checked
+	EMA.db.hasChoiceSlaveCompleteQuestWithMaster = not checked
+	EMA.db.hasChoiceSlaveDoNothing = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceMinionChooseSameRewardAsMaster( event, checked )
+	EMA.db.hasChoiceSlaveChooseSameRewardAsMaster = checked
+	EMA.db.hasChoiceSlaveMustChooseOwnReward = not checked
+	EMA.db.hasChoiceSlaveRewardChoiceModifierConditional = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceMinionMustChooseOwnReward( event, checked )
+	EMA.db.hasChoiceSlaveMustChooseOwnReward = checked
+	EMA.db.hasChoiceSlaveChooseSameRewardAsMaster = not checked
+	EMA.db.hasChoiceSlaveRewardChoiceModifierConditional = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceMinionRewardChoiceModifierConditional( event, checked )
+	EMA.db.hasChoiceSlaveRewardChoiceModifierConditional = checked
+	EMA.db.hasChoiceSlaveChooseSameRewardAsMaster = not checked
+	EMA.db.hasChoiceSlaveMustChooseOwnReward = not checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceCtrlKeyModifier( event, checked )
+	EMA.db.hasChoiceCtrlKeyModifier = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceShiftKeyModifier( event, checked )
+	EMA.db.hasChoiceShiftKeyModifier = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceAltKeyModifier( event, checked )
+	EMA.db.hasChoiceAltKeyModifier = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHasChoiceOverrideUseMinionRewardSelected( event, checked )
+	EMA.db.hasChoiceOverrideUseSlaveRewardSelected = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetMessageArea( event, messageAreaValue )
+	EMA:DebugMessage( event, messageAreaValue )
+	EMA.db.messageArea = messageAreaValue
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetWarningArea( event, messageAreaValue )
+	EMA.db.warningArea = messageAreaValue
+	EMA:SettingsRefresh()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- NPC QUEST PROCESSING - SELECTING AND DECLINING
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:ChurnNpcGossip()
+    EMA:DebugMessage( "ChurnNpcGossip" )
+	-- GetGossipAvailableQuests and GetGossipActiveQuests are returning nil in some cases, so do this as well.
+	-- GetGossipAvailableQuests() now returns 6 elements per quest and GetGossipActiveQuests() returns 4. title, level, isTrivial, isDaily, ...
+	-- Patch 5.0.4 added isLegendary.
+	-- title1, level1, isLowLevel1, isDaily1, isRepeatable1, isLegendary1, title2, level2, isLowLevel2, isDaily2, isRepeatable2, isLegendary2 = GetGossipAvailableQuests()
+	-- title1, level1, isLowLevel1, isComplete1, isLegendary1, title2, level2, isLowLevel2, isComplete2, isLegendary2 = GetGossipActiveQuests()
+	local numberAvailableQuestInfo = 6
+	local numberActiveQuestInfo = 5
+    local index
+    EMA:DebugMessage( "GetNumAvailableQuests", GetNumAvailableQuests() )
+    EMA:DebugMessage( "GetNumActiveQuests", GetNumActiveQuests() )
+    EMA:DebugMessage( "GetGossipAvailableQuests", GetGossipAvailableQuests() )
+    EMA:DebugMessage( "GetGossipActiveQuests", GetGossipActiveQuests() )
+    for index = 0, GetNumAvailableQuests() do
+		SelectAvailableQuest( index )
+	end
+    for index = 0, GetNumActiveQuests() do
+		SelectActiveQuest( index )
+	end
+	EMAUtilities:ClearTable( EMA.gossipQuests )
+	local availableQuestsData = { GetGossipAvailableQuests() }
+	local iterateQuests = 1
+	local questIndex = 1
+	while( availableQuestsData[iterateQuests] ) do
+		local questInformation = {}
+		questInformation.type = "available"
+		questInformation.index = questIndex
+		questInformation.name = availableQuestsData[iterateQuests]
+		questInformation.level = availableQuestsData[iterateQuests + 1]
+		table.insert( EMA.gossipQuests, questInformation )
+		iterateQuests = iterateQuests + numberAvailableQuestInfo
+		questIndex = questIndex + 1
+	end
+	local activeQuestsData = { GetGossipActiveQuests() }
+	iterateQuests = 1
+	while( activeQuestsData[iterateQuests] ) do
+		local questInformation = {}
+		questInformation.type = "active"
+		questInformation.index = questIndex
+		questInformation.name = activeQuestsData[iterateQuests]
+		questInformation.level = activeQuestsData[iterateQuests + 1]
+		questInformation.isComplete = activeQuestsData[iterateQuests + 3]
+		table.insert( EMA.gossipQuests, questInformation )
+		iterateQuests = iterateQuests + numberActiveQuestInfo
+		questIndex = questIndex + 1
+	end
+	for index, questInformation in ipairs( EMA.gossipQuests ) do
+		if questInformation.type == "available" then
+			SelectGossipAvailableQuest( questInformation.index )
+		end
+		-- If this is an active quest...
+		if questInformation.type == "active" then
+			-- If this quest has been completed...
+			if questInformation.isComplete then
+				-- Complete it.
+				SelectGossipActiveQuest( questInformation.index )
+			end
+		end
+	end
+
+end
+
+function EMA:CanAutomateAutoSelectAndComplete()
+	if EMA.db.overrideQuestAutoSelectAndComplete == true then
+		if IsShiftKeyDown() then
+		   return false
+		else
+		   return true
+		end
+	end
+	return true
+ end
+
+function EMA:GOSSIP_SHOW()
+	if EMA.db.allAutoSelectQuests == true and EMA:CanAutomateAutoSelectAndComplete() == true then
+        EMA:ChurnNpcGossip()
+	end
+end
+
+function EMA:QUEST_GREETING()
+	if EMA.db.allAutoSelectQuests == true and EMA:CanAutomateAutoSelectAndComplete() == true then
+		EMA:ChurnNpcGossip()
+	end
+end
+
+function EMA:QUEST_PROGRESS()
+	if EMA.db.allAutoSelectQuests == true and EMA:CanAutomateAutoSelectAndComplete() == true then
+		if IsQuestCompletable() then
+
+			if QuestFrame:IsShown() == true then
+				EMA.isInternalCommand = true
+				CompleteQuest()
+				EMA.isInternalCommand = false
+			else
+				EMA:Print( "NO QUEST PAGE CAN NOT HAND IN" )
+			end
+		end
+	end
+end
+
+function EMA:SelectGossipOption( gossipIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		if EMA.isInternalCommand == false then
+            EMA:DebugMessage( "SelectGossipOption" )
+			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_GOSSIP_OPTION, gossipIndex )
+		end
+	end
+end
+
+function EMA:DoSelectGossipOption( sender, gossipIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		EMA.isInternalCommand = true
+        EMA:DebugMessage( "DoSelectGossipOption" )
+		SelectGossipOption( gossipIndex )
+		EMA.isInternalCommand = false
+	end
+end
+
+function EMA:SelectGossipActiveQuest( gossipIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		if EMA.isInternalCommand == false then
+            EMA:DebugMessage( "SelectGossipActiveQuest" )
+			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_GOSSIP_ACTIVE_QUEST, gossipIndex )
+		end
+	end
+end
+
+function EMA:DoSelectGossipActiveQuest( sender, gossipIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		EMA.isInternalCommand = true
+        EMA:DebugMessage( "DoSelectGossipActiveQuest" )
+		SelectGossipActiveQuest( gossipIndex )
+		EMA.isInternalCommand = false
+	end
+end
+
+function EMA:SelectGossipAvailableQuest( gossipIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		if EMA.isInternalCommand == false then
+            EMA:DebugMessage( "SelectGossipAvailableQuest" )
+			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_GOSSIP_AVAILABLE_QUEST, gossipIndex )
+		end
+	end
+end
+
+function EMA:DoSelectGossipAvailableQuest( sender, gossipIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		EMA.isInternalCommand = true
+        EMA:DebugMessage( "DoSelectGossipAvailableQuest" )
+		SelectGossipAvailableQuest( gossipIndex )
+		EMA.isInternalCommand = false
+	end
+end
+
+function EMA:SelectActiveQuest( questIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		if EMA.isInternalCommand == false then
+            EMA:DebugMessage( "SelectActiveQuest" )
+			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_ACTIVE_QUEST, questIndex )
+		end
+	end
+end
+
+function EMA:DoSelectActiveQuest( sender, questIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		EMA.isInternalCommand = true
+        EMA:DebugMessage( "DoSelectActiveQuest" )
+		SelectActiveQuest( questIndex )
+		EMA.isInternalCommand = false
+	end
+end
+
+function EMA:SelectAvailableQuest( questIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		if EMA.isInternalCommand == false then
+            EMA:DebugMessage( "SelectAvailableQuest" )
+			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_AVAILABLE_QUEST, questIndex )
+		end
+	end
+end
+
+function EMA:DoSelectAvailableQuest( sender, questIndex )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		EMA.isInternalCommand = true
+        EMA:DebugMessage( "DoSelectAvailableQuest" )
+		SelectAvailableQuest( questIndex )
+		EMA.isInternalCommand = false
+	end
+end
+
+function EMA:QUEST_FINISHED(...)
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		if EMA.isInternalCommand == false then
+			--EMA:Print( "DeclineQuest" )
+			EMA:DebugMessage( "DeclineQuest" )
+			EMA:ScheduleTimer("EMASendCommandToTeam", 0.5, EMA.COMMAND_DECLINE_QUEST )
+		end
+	end
+end
+
+function EMA:DoDeclineQuest( sender )
+	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
+		--EMA:Print("DoDeclineQuest", sender )
+		EMA.isInternalCommand = true
+        EMA:DebugMessage( "DoDeclineQuest" )
+		HideUIPanel(QuestFrame)
+		EMA.isInternalCommand = false
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- NPC QUEST PROCESSING - COMPLETING
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:CompleteQuest()
+	if EMA.db.enableAutoQuestCompletion == true then
+		if EMA.isInternalCommand == false then
+            EMA:DebugMessage( "CompleteQuest" )
+			EMA:EMASendCommandToTeam( EMA.COMMAND_COMPLETE_QUEST )
+		end
+	end
+end
+
+function EMA:DoCompleteQuest( sender )
+	if EMA.db.enableAutoQuestCompletion == true then
+		EMA.isInternalCommand = true
+        EMA:DebugMessage( "DoCompleteQuest" )
+		CompleteQuest()
+		EMA.isInternalCommand = false
+	end
+end
+
+function EMA:QUEST_COMPLETE()
+    EMA:DebugMessage( "QUEST_COMPLETE" )
+	if EMA.db.enableAutoQuestCompletion == true then
+		if (EMA.db.hasChoiceAquireBestQuestRewardForCharacter == true) and (GetNumQuestChoices() > 1) then
+			local bestQuestItemIndex = nil
+			if bestQuestItemIndex ~= nil and bestQuestItemIndex > 0 then
+				local questItemChoice = _G["QuestInfoItem"..bestQuestItemIndex]
+				QuestInfoItem_OnClick( questItemChoice )
+				QuestInfoFrame.itemChoice = bestQuestItemIndex
+				if EMA.db.hasChoiceAquireBestQuestRewardForCharacterAndGet == true then
+					GetQuestReward( bestQuestItemIndex )
+				end
+			end
+		elseif (EMA.db.noChoiceAllAutoCompleteQuest == true) and (GetNumQuestChoices() <= 1) then
+			GetQuestReward( GetNumQuestChoices() )
+		end
+	end
+end
+
+
+function EMA:QUEST_FAIL( event, message, ... )
+	--EMA:Print("QUEST_FAIL", message )
+	local questName = GetTitleText()
+	if questName ~= nil then
+		local questInvFull = string.format( ERR_QUEST_FAILED_BAG_FULL_S, questName )
+		--EMA:Print("A", questInvFull )
+		if  message == questInvFull  then
+			--EMA:Print("test")
+			EMA:EMASendMessageToTeam( EMA.db.warningArea, L["INVENTORY_IS_FULL_CAN_NOT_HAND_IN_QUEST"]( questName ), false )
+		end
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- IN THE FIELD QUEST PROCESSING - COMPLETING
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:ShowQuestComplete( questIndex )
+    EMA:DebugMessage( "ShowQuestComplete" )
+	if EMA.db.enableAutoQuestCompletion == false then
+		return
+	end
+	if EMA.isInternalCommand == true then
+		return
+	end
+	local questName = select( 1, GetQuestLogTitle( questIndex ) )
+	EMA:EMASendCommandToTeam( EMA.COMMAND_LOG_COMPLETE_QUEST, questName )
+end
+
+function EMA:DoShowQuestComplete( sender, questName )
+    EMA:DebugMessage( "DoShowQuestComplete" )
+	if EMA.db.enableAutoQuestCompletion == false then
+		return
+	end
+	EMA.isInternalCommand = true
+	local questIndex = EMA:GetQuestLogIndexByName( questName )
+	if questIndex ~= 0 then
+		ShowQuestComplete( questIndex )
+	end
+	EMA.isInternalCommand = false
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- NPC QUEST PROCESSING - REWARDS
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:CheckForOverrideAndChooseQuestReward( questIndex )
+	-- Yes, override if minion has reward selected?
+	if (EMA.db.hasChoiceOverrideUseSlaveRewardSelected == true) and (QuestInfoFrame.itemChoice > 0) then
+		-- Yes, choose minions reward.
+		GetQuestReward( QuestInfoFrame.itemChoice )
+	else
+		-- No, choose masters reward.
+		GetQuestReward( questIndex )
+	end
+end
+
+function EMA:CheckForOverrideAndDoNotChooseQuestReward( questIndex )
+	-- Yes, override if minion has reward selected?
+	if QuestInfoFrame.itemChoice ~= nil then
+		if (EMA.db.hasChoiceOverrideUseSlaveRewardSelected == true) and (QuestInfoFrame.itemChoice > 0) then
+			-- Yes, choose minions reward.
+			GetQuestReward( QuestInfoFrame.itemChoice )
+		end
+	end
+end
+
+function EMA:AreCorrectConditionalKeysPressed()
+	local failTest = false
+	if EMA.db.hasChoiceCtrlKeyModifier == true and not IsControlKeyDown() then
+		failTest = true
+	end
+	if EMA.db.hasChoiceShiftKeyModifier == true and not IsShiftKeyDown() then
+		failTest = true
+	end
+	if EMA.db.hasChoiceAltKeyModifier == true and not IsAltKeyDown() then
+		failTest = true
+	end
+	return not failTest
+end
+
+function EMA:GetQuestReward( questIndex )
+	if EMA.db.enableAutoQuestCompletion == true then
+		if (EMA.db.noChoiceSlaveCompleteQuestWithMaster == true) or (EMA.db.hasChoiceSlaveCompleteQuestWithMaster == true) or (EMA.db.hasChoiceAquireBestQuestRewardForCharacter == true) then
+			if EMA.isInternalCommand == false then
+                EMA:DebugMessage( "GetQuestReward" )
+				EMA:EMASendCommandToTeam( EMA.COMMAND_CHOOSE_QUEST_REWARD, questIndex, EMA:AreCorrectConditionalKeysPressed(), EMA.db.hasChoiceAquireBestQuestRewardForCharacter )
+			end
+		end
+	end
+end
+
+function EMA:DoChooseQuestReward( sender, questIndex, modifierKeysPressed, rewardPickedAlready )
+	local numberOfQuestRewards = GetNumQuestChoices()
+	if EMA.db.enableAutoQuestCompletion == true then
+		if (EMA.db.noChoiceSlaveCompleteQuestWithMaster == true) or (EMA.db.hasChoiceSlaveCompleteQuestWithMaster == true) or (EMA.db.hasChoiceAquireBestQuestRewardForCharacter == true) then
+			EMA.isInternalCommand = true
+            EMA:DebugMessage( "DoChooseQuestReward" )
+            EMA:DebugMessage( "Quest has ", numberOfQuestRewards, " reward choices." )
+			-- How many reward choices does this quest have?
+			if numberOfQuestRewards <= 1 then
+				-- One or less.
+				if EMA.db.noChoiceSlaveCompleteQuestWithMaster == true then
+					GetQuestReward( questIndex )
+				end
+			else
+				-- More than one.
+				if EMA.db.hasChoiceSlaveCompleteQuestWithMaster == true then
+					-- Choose same as master?
+					if EMA.db.hasChoiceSlaveChooseSameRewardAsMaster == true then
+						EMA:CheckForOverrideAndChooseQuestReward( questIndex )
+					-- Choose same as master, conditional keys?
+					elseif EMA.db.hasChoiceSlaveRewardChoiceModifierConditional == true then
+						if modifierKeysPressed == true then
+							EMA:CheckForOverrideAndChooseQuestReward( questIndex )
+						else
+							EMA:CheckForOverrideAndDoNotChooseQuestReward( questIndex )
+						end
+					end
+				end
+				if (EMA.db.hasChoiceAquireBestQuestRewardForCharacter == true) and (rewardPickedAlready == true) then
+					if QuestInfoFrame.itemChoice > 0 then
+						-- Yes, choose minions reward.
+						GetQuestReward( QuestInfoFrame.itemChoice )
+					end
+				end
+			end
+			EMA.isInternalCommand = false
+		end
+	end
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- NPC QUEST PROCESSING - ACCEPTING
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:QUEST_ACCEPTED( ... )
+	local event, questIndex =  ...
+	if EMA.db.acceptQuests == true then
+		if EMA.db.masterAutoShareQuestOnAccept == true then
+			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+				if EMA.isInternalCommand == false then
+					SelectQuestLogEntry( questIndex )
+						if GetQuestLogPushable() and GetNumSubgroupMembers() > 0 then
+							EMA:EMASendMessageToTeam( EMA.db.messageArea, "Pushing newly accepted quest.", false )
+							QuestLogPushQuest()
+						end
+				end
+			end
+		end
+	end
+end
+
+function EMA:AcceptQuest()
+	if EMA.db.acceptQuests == true then
+		if EMA.db.slaveMirrorMasterAccept == true then
+			if EMA.isInternalCommand == false then
+                EMA:DebugMessage( "AcceptQuest" )
+				EMA:EMASendCommandToTeam( EMA.COMMAND_ACCEPT_QUEST )
+			end
+		end
+	end
+end
+
+function EMA:DoAcceptQuest( sender )
+	if EMA.db.acceptQuests == true and EMA.db.slaveMirrorMasterAccept == true then
+	local questName = GetTitleText()
+	local questIndex = EMA:GetQuestLogIndexByName( questName )
+
+		--Only works if the quest frame is open. Stops sending a blank quest. Tell the team a char not got the quest window open???? <<<<<< TODO
+		if QuestFrame:IsShown() == true then
+			--EMA:Print( "DoAcceptQuest", questName, questIndex, sender)
+			EMA.isInternalCommand = true
+			EMA:DebugMessage( "DoAcceptQuest" )
+			EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ACCEPTED_QUEST_QN"]( questName ), false )
+			AcceptQuest()
+			HideUIPanel( QuestFrame )
+			AcceptQuest()
+			EMA.isInternalCommand = false
+		end
+	end
+end
+
+-- Auto quest magic!
+function EMA:AcknowledgeAutoAcceptQuest()
+	if EMA.db.acceptQuests == true then
+		if EMA.db.slaveMirrorMasterAccept == true then
+			if EMA.isInternalCommand == false then
+                EMA:DebugMessage( "MagicAutoAcceptQuestGrrrr", QuestGetAutoAccept() )
+				EMA:EMASendCommandToTeam( EMA.COMMAND_ACCEPT_QUEST_FAKE )
+			end
+		end
+	end
+end
+
+function EMA:DoMagicAutoAcceptQuestGrrrr()
+	if EMA.db.acceptQuests == true and EMA.db.slaveMirrorMasterAccept == true and QuestFrame:IsVisible() then
+	local questIndex = EMA:GetQuestLogIndexByName( questName )
+		EMA.isInternalCommand = true
+		EMA:DebugMessage( "DoMagicAutoAcceptQuestGrrrr" )
+		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["AUTO_ACCEPTED_PICKUPQUEST_QN"]( GetTitleText() ), false )
+		AcknowledgeAutoAcceptQuest()
+		HideUIPanel( QuestFrame )
+		EMA.isInternalCommand = false
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- QUEST PROCESSING - AUTO ACCEPTING
+-------------------------------------------------------------------------------------------------------------
+
+--TODO: this could do with some work with Friends.
+function EMA:CanAutoAcceptSharedQuestFromPlayer()
+	local canAccept = false
+	if EMA.db.allAcceptAnyQuest == true then
+		canAccept = true
+	elseif EMA.db.onlyAcceptQuestsFrom == true then
+		local questSourceName, questSourceRealm = UnitName( "npc" )
+		local character = EMAUtilities:AddRealmToNameIfNotNil( questSourceName, questSourceRealm )
+		if EMA.db.acceptFromTeam == true then
+			if EMAApi.IsCharacterInTeam( character ) == true then
+				canAccept = true
+			end
+		end
+		if EMA.db.acceptFromFriends == true then
+			for friendIndex = 1, GetNumFriends() do
+				local friendName = GetFriendInfo( friendIndex )
+				if questSourceName == friendName then
+					canAccept = true
+					break
+				end
+			end
+		end
+		if EMA.db.acceptFromParty == true then
+			if UnitInParty( "npc" ) then
+				EMA:DebugMessage( "test" )
+				canAccept = true
+			end
+		end
+		if EMA.db.acceptFromRaid == true then
+			if UnitInRaid( "npc" ) then
+				canAccept = true
+			end
+		end
+		if EMA.db.acceptFromGuild == true then
+			if UnitIsInMyGuild( "npc" ) then
+				canAccept = true
+			end
+		end
+	end
+	return canAccept
+end
+
+function EMA:QUEST_DETAIL()
+    EMA:DebugMessage( "QUEST_DETAIL" )
+	if EMA.db.acceptQuests == true then
+		-- Who is this quest from.
+		if UnitIsPlayer( "npc" ) then
+			-- Quest is shared from a player.
+			if EMA:CanAutoAcceptSharedQuestFromPlayer() == true then
+				--TODO: is this even needed??? Can auto quests be shared from other players?? unsure so we add it in anyway.
+				if ( QuestFrame.autoQuest ) then
+					AcknowledgeAutoAcceptQuest()
+				else
+					EMA.isInternalCommand = true
+					EMA:EMASendMessageToTeam( EMA.db.messageArea, L["AUTOMATICALLY_ACCEPTED_QUEST"]( GetTitleText() ), false )
+					AcceptQuest()
+					EMA.isInternalCommand = false
+				end
+			end
+		else
+			-- Quest is from an NPC.
+			if (EMA.db.allAcceptAnyQuest == true) or ((EMA.db.onlyAcceptQuestsFrom == true) and (EMA.db.acceptFromNpc == true)) then
+				--AutoQuest is Accepted no need to accept it again.
+				if ( QuestFrame.autoQuest ) then
+					AcknowledgeAutoAcceptQuest()
+				else
+					EMA.isInternalCommand = true
+					--EMA:DebugMessage( "QUEST_DETAIL - auto accept is: ", QuestGetAutoAccept() )
+					EMA:EMASendMessageToTeam( EMA.db.messageArea, L["AUTOMATICALLY_ACCEPTED_QUEST"]( GetTitleText() ), false )
+					AcceptQuest()
+					HideUIPanel( QuestFrame )
+					EMA.isInternalCommand = false
+				end
+			end
+		end
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMA QUEST CONTEXT MENU
+-------------------------------------------------------------------------------------------------------------
+
+local function EMAApiAbandonQuests(questID, questText)
+	--EMA:Print(questID, questText)
+	title = questText
+	local data = {}
+	data.questID = questID
+	data.title = questText
+	StaticPopup_Hide( "ABANDON_QUEST" )
+	StaticPopup_Hide( "ABANDON_QUEST_WITH_ITEMS" )
+	StaticPopup_Show( "EMAQUEST_ABANDON_ALL_TOONS", title, nil, data )
+end
+
+local function EMAApiUnTrackQuests(questID, questText)
+	--EMA:Print("test", questID, questText)
+	EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, questID, questText, false )
+end
+
+
+
+function EMA:QuestMapQuestOptions_AbandonQuest(questID)
+	if EMAApi.GetTeamListMaximumOrderOnline() > 1 then
+		local lastQuestIndex = GetQuestLogSelection()
+		--EMA:Print("SetAbandonQuest", lastQuestIndex, questID)
+		title = GetAbandonQuestName()
+		local data = {}
+		data.questID = questID
+		data.title = title
+		StaticPopup_Hide( "ABANDON_QUEST" )
+		StaticPopup_Hide( "ABANDON_QUEST_WITH_ITEMS" )
+		StaticPopup_Show( "EMAQUEST_ABANDON_ALL_TOONS", title, nil, data )
+	end
+end
+
+function EMA:QuestObjectiveTracker_UntrackQuest(dropDownButton, questID)
+	--EMA:Print("test", questID)
+	EMA:QuestMapQuestOptions_TrackQuest(questID)
+end
+
+function EMA:QuestMapQuestOptions_TrackQuest(questID)
+	if EMAApi.GetTeamListMaximumOrderOnline() > 1 then
+		--EMA:Print("test", questID)
+		local questLogIndex = GetQuestLogIndexByID(questID)
+		local title = GetQuestLogTitle( questLogIndex )
+		local data = {}
+		data.questID = questID
+		data.title = title
+		if ( IsQuestWatched(questLogIndex) ) then
+			--EMA:Print("TrackingQuest")
+			StaticPopup_Show( "EMA_QUEST_TRACK_ALL_TOONS", title, nil, data )
+		else
+			--EMA:Print("UnTrackQuest")
+			StaticPopup_Show( "EMA_QUEST_UNTRACK_ALL_TOONS", title, nil, data )
+		end
+	end
+end
+
+function EMA:QuestMapQuestOptions_EMA_DoQuestTrack( sender, questID, title, track )
+	--EMA:Print("test1.5", sender, questID, title, track)
+	local questLogIndex = GetQuestLogIndexByID( questID )
+	if questLogIndex ~= 0 then
+		if track then
+			EMA:EMADoQuest_TrackQuest( questID, questLogIndex )
+		else
+			EMA:EMADoQuest_UnTrackQuest( questID, questLogIndex )
+		end
+	else
+		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["QUESTLOG_DO_NOT_HAVE_QUEST"]( title ), false )
+	end
+end
+
+function EMA:EMADoQuest_TrackQuest(questID, questLogIndex)
+	--EMA:Print("test", questID, questLogIndex )
+	if ( not IsQuestWatched(questID) ) then
+		AddQuestWatch(questLogIndex, true)
+		QuestSuperTracking_OnQuestTracked(questID)
+	end
+end
+
+
+function EMA:EMADoQuest_UnTrackQuest(questID, questLogIndex)
+	--EMA:Print("test2", questID, questLogIndex )
+	if ( IsQuestWatched(questLogIndex) ) then
+		QuestObjectiveTracker_UntrackQuest(nil, questID)
+	end
+end
+
+function EMA:QuestMapQuestOptions_EMA_DoAbandonQuest( sender, questID, title )
+	local questLogIndex = GetQuestLogIndexByID( questID )
+	if questLogIndex ~= 0 then
+		local lastQuestIndex = GetQuestLogSelection();
+		SelectQuestLogEntry(GetQuestLogIndexByID(questID));
+		SetAbandonQuest();
+		AbandonQuest();
+		SelectQuestLogEntry(lastQuestIndex);
+		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["QUESTLOG_HAVE_ABANDONED_QUEST"]( title ), false )
+	end
+end
+
+-- EMA ALL menu at the bottom of quest WorldMap Quest Log
+
+
+function EMA:CreateEMAMiniQuestLogFrame()
+    EMAMiniQuestLogFrame = CreateFrame( "Frame", "EMAMiniQuestLogFrame", QuestMapFrame )
+    local frame = EMAMiniQuestLogFrame
+	frame:SetWidth( 470 )
+	frame:SetHeight( 40 )
+	frame:SetFrameStrata( "HIGH" )
+	frame:SetToplevel( true )
+	frame:SetClampedToScreen( true )
+	frame:EnableMouse( true )
+	frame:SetMovable( true )
+	frame:ClearAllPoints()
+	frame:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOMRIGHT", 0,-35)
+		frame:SetBackdrop( {
+		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+		edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
+		tile = true, tileSize = 15, edgeSize = 15,
+		insets = { left = 5, right = 5, top = 5, bottom = 5 }
+	} )
+	table.insert( UISpecialFrames, "EMAQuestLogWindowFrame" )
+	-- abandon ALL button
+	local abandonButton = CreateFrame( "Button", "abandonButton", frame, "UIPanelButtonTemplate" )
+	abandonButton:SetScript( "OnClick", function()  StaticPopup_Show("EMA_ABANDON_ALL_TOON_QUEST") end )
+	abandonButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 10 , -10)
+	abandonButton:SetHeight( 20 )
+	abandonButton:SetWidth( 150 )
+	abandonButton:SetText( L["ABANDON_ALL"] )
+	abandonButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(trackButton, true, L["ABANDON_ALL_TOOLTIP"]) end)
+	abandonButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
+	abandonQuestLogWindowAbandonFrameButton = abandonButton
+	-- Share All Button
+	local shareButton = CreateFrame( "Button", "shareButton", frame, "UIPanelButtonTemplate" )
+	shareButton:SetScript( "OnClick", function()  EMA:DoShareAllQuestsFromAllToons() end )
+	shareButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 160, -10)
+	shareButton:SetHeight( 20 )
+	shareButton:SetWidth( 100 )
+	shareButton:SetText( L["SHARE_ALL"] )
+	shareButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(shareButton, true, L["SHARE_ALL_TOOLTIP"]) end)
+	shareButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
+	shareQuestLogWindowFrameShareButton = shareButton
+	--Track All Button
+	local trackButton = CreateFrame( "Button", "trackButton", frame, "UIPanelButtonTemplate" )
+	trackButton:SetScript( "OnClick", function()  EMA:DoTrackAllQuestsFromAllToons() end )
+	trackButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 260, -10)
+	trackButton:SetHeight( 20 )
+	trackButton:SetWidth( 100 )
+	trackButton:SetText( L["TRACK_ALL"] )
+	trackButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(trackButton, true, L["TRACK_ALL_TOOLTIP"]) end)
+	trackButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
+	EMAQuestLogWindowFrameTrackButton = trackButton
+	-- Untrack All
+	local unTrackButton = CreateFrame( "Button", "unTrackButton", frame, "UIPanelButtonTemplate" )
+	unTrackButton:SetScript( "OnClick", function()  EMA:DoUnTrackAllQuestsFromAllToons() end )
+	unTrackButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 360, -10)
+	unTrackButton:SetHeight( 20 )
+	unTrackButton:SetWidth( 100 )
+	unTrackButton:SetText( L["UNTRACK_ALL"] )
+	unTrackButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(trackButton, true, L["UNTRACK_ALL_TOOLTIP"]) end)
+	unTrackButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
+	EMAQuestLogWindowFrameUnTrackButton = unTrackButton
+end
+
+
+function EMA:ShowTooltip(frame, show, text)
+	if show then
+		GameTooltip:SetOwner(frame, "ANCHOR_TOP")
+		GameTooltip:SetPoint("TOPLEFT", frame, "TOPRIGHT", 16, 0)
+		GameTooltip:ClearLines()
+		GameTooltip:AddLine( text , 1, 0.82, 0, 1)
+		GameTooltip:Show()
+	else
+	GameTooltip:Hide()
+	end
+end
+
+function EMA:DoAbandonAllQuestsFromAllToons()
+	EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ABANDONING_ALLQUEST"], false )
+	EMA:DoAbandonAllQuestsFromThisToon()
+	EMA:ScheduleTimer("EMASendCommandToTeam" , 2, EMA.COMMAND_ABANDON_ALL_QUESTS)
+end
+
+function EMA:DoAbandonAllQuestsFromThisToon()
+	EMA.iterateQuests = 0
+	EMA:IterateQuests("AbandonNextQuest", 0.5)
+end
+
+function EMA.AbandonNextQuest()
+	local title, isHeader, questID = EMA:GetRelevantQuestInfo(EMA.iterateQuests)
+	if isHeader == false and questID ~= 0 then
+		local canAbandon = CanAbandonQuest(questID)
+		if canAbandon then
+			EMA:EMASendCommandToTeam( EMA.COMMAND_ABANDON_QUEST, questID, title)
+			if (EMA.iterateQuests ~= GetNumQuestLogEntries()) then
+				-- decrement quest count as we have removed one if not last quest
+				EMA.iterateQuests = EMA.iterateQuests - 1
+			end
+		end
+	end
+	EMA:IterateQuests("AbandonNextQuest", 0.5)
+end
+
+function EMA.DoShareAllQuestsFromAllToons()
+	EMA:EMASendMessageToTeam( EMA.db.messageArea, L["SHARING_QUEST_TO_ALLMINIONS"], false )
+	EMA:DoShareAllQuestsFromThisToon()
+	EMA:ScheduleTimer("EMASendCommandToTeam" , 2,  EMA.COMMAND_SHARE_ALL_QUESTS)
+end
+
+function EMA.DoShareAllQuestsFromThisToon()
+	EMA.iterateQuests = 0
+	EMA:IterateQuests("ShareNextQuest", 1)
+end
+
+function EMA.ShareNextQuest()
+	local title, isHeader, questID = EMA:GetRelevantQuestInfo(EMA.iterateQuests)
+	if GetQuestLogPushable() then
+		if isHeader == false and questID ~= 0 then
+			QuestMapQuestOptions_ShareQuest(questID)
+		end
+	end
+	EMA:IterateQuests("ShareNextQuest", 1)
+end
+
+
+function EMA:DoTrackAllQuestsFromAllToons()
+	EMA:EMASendMessageToTeam( EMA.db.messageArea, L["TRACKING_QUEST_TO_ALLMINIONS"], false )
+	EMA:DoTrackAllQuestsFromThisToon()
+	EMA:ScheduleTimer("EMASendCommandToTeam", 1, EMA.COMMAND_TRACK_ALL_QUESTS)
+end
+
+function EMA:DoTrackAllQuestsFromThisToon()
+	EMA.iterateQuests = 0
+	EMA:IterateQuests("TrackNextQuest", 0.5)
+end
+
+function EMA.TrackNextQuest()
+
+	local title, isHeader, questID = EMA:GetRelevantQuestInfo(EMA.iterateQuests)
+
+	if isHeader == false and questID ~= 0 then
+		EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, questID, title, true )
+	end
+
+	EMA:IterateQuests("TrackNextQuest", 0.5)
+end
+
+function EMA:DoUnTrackAllQuestsFromAllToons()
+	EMA:EMASendMessageToTeam( EMA.db.messageArea, L["UNTRACKING_QUESTS_ALLMINIONS"], false )
+	EMA:DoUnTrackAllQuestsFromThisToon()
+	EMA:ScheduleTimer("EMASendCommandToTeam", 1, EMA.COMMAND_UNTRACK_ALL_QUESTS)
+end
+
+function EMA:DoUnTrackAllQuestsFromThisToon()
+	EMA.iterateQuests = 0
+	EMA:IterateQuests("UnTrackNextQuest", 0.5)
+end
+
+
+function EMA.UnTrackNextQuest()
+	local title, isHeader, questID = EMA:GetRelevantQuestInfo(EMA.iterateQuests)
+		if isHeader == false and questID ~= 0 then
+			EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, questID, title, false )
+		end
+	EMA:IterateQuests("UnTrackNextQuest", 0.5)
+end
+
+function EMA:IterateQuests(methodToCall, timer)
+	EMA.iterateQuests = EMA.iterateQuests + 1
+		if EMA.iterateQuests <= GetNumQuestLogEntries() then
+			EMA:ScheduleTimer( methodToCall, timer )
+		end
+end
+
+function EMA:GetRelevantQuestInfo(questLogIndex)
+    local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questLogIndex )
+	return title, isHeader, questID
+end
+
+function EMA:ToggleFrame( frame )
+	if frame == WorldMapFrame then
+		EMA:ToggleQuestLog()
+	end
+end
+
+function EMA:ToggleQuestLog()
+	-- This sorts out hooking on L or marcioMenu button
+	if EMA.db.showEMAQuestLogWithWoWQuestLog == true then
+		if WorldMapFrame:IsVisible() and QuestMapFrame:IsVisible() then
+			EMA:ToggleShowQuestCommandWindow( true )
+		else
+			EMA:ToggleShowQuestCommandWindow( false )
+		end
+	end
+end
+
+function EMA:QuestLogFrameHide()
+	if EMA.db.showEMAQuestLogWithWoWQuestLog == true then
+		EMA:ToggleShowQuestCommandWindow( false )
+	end
+end
+
+function EMA:ToggleShowQuestCommandWindow( show )
+    if show == true then
+		EMAMiniQuestLogFrame:Show()
+    else
+		EMAMiniQuestLogFrame:Hide()
+    end
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- ESCORT QUEST
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:QUEST_ACCEPT_CONFIRM( event, senderName, questName )
+    EMA:DebugMessage( "QUEST_ACCEPT_CONFIRM" )
+	if EMA.db.acceptQuests == true then
+		if EMA.db.slaveAutoAcceptEscortQuest == true then
+			EMA:EMASendMessageToTeam( EMA.db.messageArea, L["AUTOMATICALLY_ACCEPTED_ESCORT_QUEST"]( questName ), false )
+			EMA.isInternalCommand = true
+			ConfirmAcceptQuest()
+			EMA.isInternalCommand = false
+			StaticPopup_Hide( "QUEST_ACCEPT" )
+		end
+	end
+end
+
+function EMA:GetQuestLogIndexByName( questName )
+	for iterateQuests = 1, GetNumQuestLogEntries() do
+        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateQuests )
+		if not isHeader then
+			if title == questName then
+				return iterateQuests
+			end
+		end
+	end
+	return 0
+end
+
+function EMA:AutoSelectToggleCommand( info, parameters )
+	local toggle, tag = strsplit( " ", parameters )
+	if tag ~= nil and tag:trim() ~= "" then
+		EMA:EMASendCommandToTeam( EMA.COMMAND_TOGGLE_AUTO_SELECT, toggle, tag )
+	else
+		EMA:AutoSelectToggle( toggle )
+	end
+end
+
+function EMA:DoAutoSelectToggle( sender, toggle, tag )
+	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) == true then
+		EMA:AutoSelectToggle( toggle )
+	end
+end
+
+function EMA:AutoSelectToggle( toggle )
+	if toggle == L["TOGGLE"] then
+		if EMA.db.allAutoSelectQuests == true then
+			toggle = L["OFF"]
+		else
+			toggle = L["ON"]
+		end
+	end
+	if toggle == L["ON"] then
+		EMA.db.mirrorMasterQuestSelectionAndDeclining = false
+		EMA.db.allAutoSelectQuests = true
+	elseif toggle == L["OFF"] then
+		EMA.db.mirrorMasterQuestSelectionAndDeclining = true
+		EMA.db.allAutoSelectQuests = false
+	end
+	EMA:SettingsRefresh()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- COMMAND MANAGEMENT
+-------------------------------------------------------------------------------------------------------------
+
+-- A EMA command has been recieved.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+    EMA:DebugMessage( 'got a command', characterName, commandName, ... )
+	if commandName == EMA.COMMAND_TOGGLE_AUTO_SELECT then
+		EMA:DoAutoSelectToggle( characterName, ... )
+	end
+-- Want to action track and abandon command on the same character tat sent the command.
+	if commandName == EMA.COMMAND_QUEST_TRACK then
+		EMA:QuestMapQuestOptions_EMA_DoQuestTrack( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_ABANDON_QUEST then
+		EMA:QuestMapQuestOptions_EMA_DoAbandonQuest( characterName, ... )
+	end
+
+
+
+	 -- If this character sent this command, don't action it.
+	if characterName == EMA.characterName then
+		return
+	end
+	if commandName == EMA.COMMAND_UNTRACK_ALL_QUESTS then
+		EMA:DoUnTrackAllQuestsFromThisToon()
+	end
+	if commandName == EMA.COMMAND_ABANDON_ALL_QUESTS then
+		EMA:DoAbandonAllQuestsFromThisToon()
+	end
+	if commandName == EMA.COMMAND_TRACK_ALL_QUESTS then
+		EMA:DoTrackAllQuestsFromThisToon()
+	end
+
+	if commandName == EMA.COMMAND_SHARE_ALL_QUESTS then
+		EMA:DoShareAllQuestsFromThisToon()
+	end
+	if commandName == EMA.COMMAND_ACCEPT_QUEST then
+		EMA:DoAcceptQuest( characterName, ...  )
+	end
+	if commandName == EMA.COMMAND_SELECT_GOSSIP_OPTION then
+		EMA:DoSelectGossipOption( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_SELECT_GOSSIP_ACTIVE_QUEST then
+		EMA:DoSelectGossipActiveQuest( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_SELECT_GOSSIP_AVAILABLE_QUEST then
+		EMA:DoSelectGossipAvailableQuest( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_SELECT_ACTIVE_QUEST then
+		EMA:DoSelectActiveQuest( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_SELECT_AVAILABLE_QUEST then
+		EMA:DoSelectAvailableQuest( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_DECLINE_QUEST then
+		EMA:ScheduleTimer("DoDeclineQuest" , 1, characterName, ... )
+	end
+	if commandName == EMA.COMMAND_COMPLETE_QUEST then
+		EMA:DoCompleteQuest( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_CHOOSE_QUEST_REWARD then
+		EMA:DoChooseQuestReward( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_LOG_COMPLETE_QUEST then
+		EMA:DoShowQuestComplete( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_ACCEPT_QUEST_FAKE then
+		EMA:DoMagicAutoAcceptQuestGrrrr( characterName, ... )
+	end
+end
+
+EMAApi.EMAApiAbandonQuest = EMAApiAbandonQuests
+EMAApi.EMAApiUnTrackQuest = EMAApiUnTrackQuests
\ No newline at end of file
diff --git a/EMA/Modules/QuestWatcher.lua b/EMA/Modules/QuestWatcher.lua
new file mode 100644
index 0000000..ff93671
--- /dev/null
+++ b/EMA/Modules/QuestWatcher.lua
@@ -0,0 +1,2499 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"QuestWatcher",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
+
+local EMAQuestMapQuestOptionsDropDown = CreateFrame("Frame", "EMAQuestMapQuestOptionsDropDown", EMAQuestWatcherFrame, "UIDropDownMenuTemplate")
+
+--  Constants and Locale for this module.
+EMA.moduleName = "QuestWatcher"
+EMA.settingsDatabaseName = "QuestWatcherProfileDB"
+EMA.chatCommand = "ema-quest-watcher"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["QUEST"]
+EMA.moduleDisplayName = L["TRACKER"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\QuestTrackerIcon.tga"
+-- order
+EMA.moduleOrder = 20
+
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		enableQuestWatcher = true,
+		watcherFramePoint = "RIGHT",
+		watcherFrameRelativePoint = "RIGHT",
+		watcherFrameXOffset = 0,
+		watcherFrameYOffset = 50,
+		watcherFrameAlpha = 1.0,
+		watcherFrameScale = 1.0,
+		borderStyle = L["BLIZZARD_TOOLTIP"],
+		backgroundStyle = L["BLIZZARD_DIALOG_BACKGROUND"],
+		watchFontStyle = L["ARIAL_NARROW"],
+		watchFontSize = 14,
+		hideQuestWatcherInCombat = false,
+		enableQuestWatcherOnMasterOnly = false,
+		watchFrameBackgroundColourR = 0.0,
+		watchFrameBackgroundColourG = 0.0,
+		watchFrameBackgroundColourB = 0.0,
+		watchFrameBackgroundColourA = 0.0,
+		watchFrameBorderColourR = 0.0,
+		watchFrameBorderColourG = 0.0,
+		watchFrameBorderColourB = 0.0,
+		watchFrameBorderColourA = 0.0,
+		watcherListLines = 20,
+		watcherFrameWidth = 340,
+		unlockWatcherFrame = true,
+		hideBlizzardWatchFrame = true,
+		doNotHideCompletedObjectives = true,
+		showCompletedObjectivesAsDone = true,
+		hideQuestIfAllComplete = false,
+		showFrame = true,
+		--messageArea = EMAApi.DefaultMessageArea(),
+		--sendProgressChatMessages = false,
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = "group",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			show = {
+				type = "input",
+				name = L["SHOW_QUEST_WATCHER"],
+				desc = L["SHOW_QUEST_WATCHER_HELP"],
+				usage = "/EMA-quest-watcher show",
+				get = false,
+				set = "ShowFrameCommand",
+			},
+			hide = {
+				type = "input",
+				name = L["HIDE_QUEST_WATCHER"] ,
+				desc = L["HIDE_QUEST_WATCHER_HELP"] ,
+				usage = "/EMA-quest-watcher hide",
+				get = false,
+				set = "HideFrameCommand",
+			},
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-quest-watcher push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE = "JQWObjUpd"
+EMA.COMMAND_UPDATE_QUEST_WATCHER_LIST = "JQWLstUpd"
+EMA.COMMAND_QUEST_WATCH_REMOVE_QUEST = "JQWRmveQst"
+EMA.COMMAND_AUTO_QUEST_COMPLETE = "JQWAtQstCmplt"
+EMA.COMMAND_REMOVE_AUTO_QUEST_COMPLETE = "JQWRmvAtQstCmplt"
+EMA.COMMAND_AUTO_QUEST_OFFER = "JQWAqQstOfr"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:DebugMessage( ... )
+	--EMA:Print( ... )
+end
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	EMA.currentAutoQuestPopups = {}
+	EMA.countAutoQuestPopUpFrames = 0
+	EMA.questWatcherFrameCreated = false
+	-- Create the settings control.
+	EMA:SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControlWatcher.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Create the quest watcher frame.
+	EMA:CreateQuestWatcherFrame()
+	EMA:SetQuestWatcherVisibility()
+	-- Quest watcher.
+	EMA.questWatchListOfQuests = {}
+	EMA.questWatchCache = {}
+	EMA.questWatchObjectivesList = {}
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	-- Register for the EMA master changed message.
+	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
+	--EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+    -- Quest events.
+	-- Watcher events.
+	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
+	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
+	EMA:RegisterEvent( "QUEST_WATCH_UPDATE" )
+	EMA:RegisterEvent( "QUEST_LOG_UPDATE")
+	EMA:RegisterEvent( "QUEST_WATCH_LIST_CHANGED", "QUEST_WATCH_UPDATE" )
+	-- For in the field auto quests. And Bonus Quests.
+	EMA:RegisterEvent("QUEST_ACCEPTED", "QUEST_WATCH_UPDATE")
+	EMA:RegisterEvent("QUEST_REMOVED", "RemoveQuestsNotBeingWatched")
+	EMA:RegisterEvent( "QUEST_AUTOCOMPLETE" )
+	EMA:RegisterEvent( "QUEST_COMPLETE" )
+	EMA:RegisterEvent( "QUEST_DETAIL" )
+	EMA:RegisterEvent( "SCENARIO_UPDATE" )
+	EMA:RegisterEvent( "SCENARIO_CRITERIA_UPDATE" )
+	EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" )
+   -- Quest post hooks.
+    EMA:SecureHook( "SelectActiveQuest" )
+	EMA:SecureHook( "GetQuestReward" )
+	EMA:SecureHook( "AddQuestWatch" )
+	EMA:SecureHook( "RemoveQuestWatch" )
+	EMA:SecureHook( "AbandonQuest" )
+	EMA:SecureHook( "SetAbandonQuest" )
+	-- Update the quest watcher for watched quests.
+	EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, false, "all" )
+	--EMA:ScheduleTimer( "EMAQuestWatcherScenarioUpdate", 1, false )
+	EMA:UpdateUnlockWatcherFrame()
+	-- To Hide After elv changes. --ebony
+	EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
+	if EMA.db.enableQuestWatcher == true then
+		EMA:QuestWatcherQuestListScrollRefresh()
+	end
+	EMAQuestMapQuestOptionsDropDown.questID = 0
+	EMAQuestMapQuestOptionsDropDown.questText = nil
+	UIDropDownMenu_Initialize(EMAQuestMapQuestOptionsDropDown, EMAQuestMapQuestOptionsDropDown_Initialize, "MENU")
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+	-- AceHook-3.0 will tidy up the hooks for us.
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:OnMasterChanged( message, characterName )
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	EMA:SetQuestWatcherVisibility()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsCreate()
+	EMA.settingsControlWatcher = {}
+	-- Create the settings panels.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControlWatcher,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	-- Create the quest controls.
+	local bottomOfQuestWatcherOptions = EMA:SettingsCreateQuestWatcherControl( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControlWatcher.widgetSettings.content:SetHeight( -bottomOfQuestWatcherOptions )
+end
+
+function EMA:SettingsCreateQuestWatcherControl( top )
+	-- Get positions and dimensions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local radioBoxHeight = EMAHelperSettings:GetRadioBoxHeight()
+	local mediaHeight = EMAHelperSettings:GetMediaHeight()
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local sliderHeight = EMAHelperSettings:GetSliderHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( true )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidthSlider = (headingWidth - horizontalSpacing) / 2
+	local indent = horizontalSpacing * 10
+	local indentContinueLabel = horizontalSpacing * 18
+	local indentSpecial = indentContinueLabel + 9
+	local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3
+	local column1Left = left
+	local column2Left = left + halfWidthSlider
+	local column1LeftIndent = left + indentContinueLabel
+	local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing
+	local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControlWatcher, "", movingTop, false )
+	movingTop = movingTop - headingHeight
+	-- Create a heading for quest completion.
+	EMAHelperSettings:CreateHeading( EMA.settingsControlWatcher, L["QUEST_TRACKER_HEADER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	-- Check box: Enable auto quest completion.
+	EMA.settingsControlWatcher.checkBoxEnableQuestWatcher = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["ENABLE_TRACKER"],
+		EMA.SettingsToggleEnableQuestWatcher,
+		L["ENABLE_TRACKER_HELP"]
+	)
+
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		left,
+		movingTop,
+		L["UNLOCK_TRACKER"],
+		EMA.SettingsToggleUnlockWatcherFrame,
+		L["UNLOCK_TRACKER_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWatcher.checkBoxHideBlizzardWatchFrame = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		left,
+		movingTop,
+		L["HIDE_BLIZZ_OBJ_TRACKER"],
+		EMA.SettingsToggleHideBlizzardWatchFrame,
+		L["HIDE_BLIZZ_OBJ_TRACKER_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWatcher.checkBoxEnableQuestWatcherMasterOnly = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["SHOW_JOT_ON_MASTER"],
+		EMA.SettingsToggleEnableQuestWatcherMasterOnly,
+		L["SHOW_JOT_ON_MASTER_HELP"]
+
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWatcher.displayOptionsCheckBoxHideQuestWatcherInCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		column1Left,
+		movingTop,
+		L["HIDE_JOT_IN_COMBAT"],
+		EMA.SettingsToggleHideQuestWatcherInCombat,
+		L["HIDE_JOT_IN_COMBAT_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWatcher.checkBoxShowCompletedObjectivesAsDone = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		left,
+		movingTop,
+		L["SHOW_COMPLETED_OBJ_DONE"],
+		EMA.SettingsShowCompletedObjectivesAsDone,
+		L["SHOW_COMPLETED_OBJ_DONE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWatcher.checkBoxHideQuestIfAllComplete = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		left,
+		movingTop,
+		L["HIDE_OBJ_COMPLETED"],
+		EMA.SettingsHideQuestIfAllComplete,
+		L["HIDE_OBJ_COMPLETED_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+--[[
+	EMA.settingsControlWatcher.checkBoxSendProgressChatMessages = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		left,
+		movingTop,
+		L["SEND_PROGRESS_MESSAGES"],
+		EMA.SettingsToggleSendProgressChatMessages,
+		L["SEND_PROGRESS_MESSAGES_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	-- Message area.
+	EMA.settingsControlWatcher.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControlWatcher.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControlWatcher.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+
+	movingTop = movingTop - dropdownHeight
+]]
+	EMAHelperSettings:CreateHeading( EMA.settingsControlWatcher, L["APPEARANCE_LAYOUT_HEALDER"], movingTop, true )
+	movingTop = movingTop - headingHeight - verticalSpacing
+		-- Information line 1.
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherInformation1 = EMAHelperSettings:CreateContinueLabel(
+		EMA.settingsControlWatcher,
+		headingWidth,
+		left,
+		movingTop,
+		L["QUESTWACHERINFORMATIONONE"]
+	)
+	movingTop = movingTop - labelContinueHeight
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["LINES_TO_DISPLAY"]
+	)
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetSliderValues( 5, 50, 1 )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeWatchLines )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		column2Left,
+		movingTop,
+		L["TRACKER_WIDTH"]
+	)
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetSliderValues( 250, 600, 5 )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeWatchFrameWidth )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder = EMAHelperSettings:CreateMediaBorder(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["BORDER_STYLE"]
+	)
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder:SetCallback( "OnValueChanged", EMA.SettingsChangeBorderStyle )
+	EMA.settingsControlWatcher.questWatchBorderColourPicker = EMAHelperSettings:CreateColourPicker(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		column2Left + 15,
+		movingTop - 15,
+		L["BORDER COLOUR"]
+	)
+	EMA.settingsControlWatcher.questWatchBorderColourPicker:SetHasAlpha( true )
+	EMA.settingsControlWatcher.questWatchBorderColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsQuestWatchBorderColourPickerChanged )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground = EMAHelperSettings:CreateMediaBackground(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		column1Left,
+		movingTop,
+		L["BACKGROUND"]
+	)
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground:SetCallback( "OnValueChanged", EMA.SettingsChangeBackgroundStyle )
+	EMA.settingsControlWatcher.questWatchBackgroundColourPicker = EMAHelperSettings:CreateColourPicker(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		column2Left + 15,
+		movingTop - 15,
+		L["BG_COLOUR"]
+	)
+	EMA.settingsControlWatcher.questWatchBackgroundColourPicker:SetHasAlpha( true )
+	EMA.settingsControlWatcher.questWatchBackgroundColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsQuestWatchBackgroundColourPickerChanged )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMA.settingsControlWatcher.questWatchMediaFont = EMAHelperSettings:CreateMediaFont(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		left,
+		movingTop,
+		L["FONT"]
+	)
+	EMA.settingsControlWatcher.questWatchMediaFont:SetCallback( "OnValueChanged", EMA.SettingsChangeFontStyle )
+	EMA.settingsControlWatcher.questWatchFontSize = EMAHelperSettings:CreateSlider(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		column2Left,
+		movingTop,
+		L["FONT_SIZE"]
+	)
+	EMA.settingsControlWatcher.questWatchFontSize:SetSliderValues( 8, 20 , 1 )
+	EMA.settingsControlWatcher.questWatchFontSize:SetCallback( "OnValueChanged", EMA.SettingsChangeFontSize )
+	movingTop = movingTop - mediaHeight - verticalSpacing
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		column1Left,
+		movingTop,
+		L["SCALE"]
+	)
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetSliderValues( 0.5, 2, 0.01 )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeScale )
+	--movingTop = movingTop - sliderHeight - verticalSpacing
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider = EMAHelperSettings:CreateSlider(
+		EMA.settingsControlWatcher,
+		halfWidthSlider,
+		column2Left,
+		movingTop,
+		L["TRANSPARENCY"]
+	)
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetSliderValues( 0, 1, 0.01 )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetCallback( "OnValueChanged", EMA.SettingsChangeTransparency )
+	movingTop = movingTop - sliderHeight - verticalSpacing
+	return movingTop
+end
+--[[
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControlWatcher.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+end
+]]
+-------------------------------------------------------------------------------------------------------------
+-- Watcher frame.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:CanDisplayQuestWatcher()
+	-- Do not show is quest watcher disabled.
+	if EMA.db.enableQuestWatcher == false then
+		return false
+	end
+	-- Do not show if user has hidden frame.
+	if EMA.db.showFrame == false then
+		return false
+	end
+	-- Do not show if master only and not the master.
+	if EMA.db.enableQuestWatcherOnMasterOnly == true then
+		if EMAApi.IsCharacterTheMaster( EMA.characterName ) == false then
+			return false
+		end
+	end
+	-- Show if at least one line in the watch list.
+	if EMA:CountLinesInQuestWatchList() > 0 then
+		return true
+	end
+	-- Show if at least one auto quest popup.
+	if EMA:HasAtLeastOneAutoQuestPopup() == true then
+		return true
+	end
+	-- Nothing to show.
+	return false
+end
+
+local function Title_OnMouseDown(frame)
+	if IsAltKeyDown() then
+		frame:GetParent():StartMoving()
+	end
+end
+
+local function MoverSizer_OnMouseUp(mover)
+	local frame = mover:GetParent()
+	frame:StopMovingOrSizing()
+	local point, relativeTo, relativePoint, xOffset, yOffset = frame:GetPoint()
+	EMA.db.watcherFramePoint = point
+	EMA.db.watcherFrameRelativePoint = relativePoint
+	EMA.db.watcherFrameXOffset = xOffset
+	EMA.db.watcherFrameYOffset = yOffset
+end
+
+
+function EMA:CreateQuestWatcherFrame()
+	-- The frame.
+	local frame = CreateFrame( "Frame", "EMAQuestWatcherWindowFrame", UIParent )
+	frame.obj = EMA
+	frame:SetFrameStrata( "BACKGROUND" )
+	frame:SetClampedToScreen( true )
+	frame:EnableMouse( false )
+	frame:SetMovable( true )
+	frame:ClearAllPoints()
+	frame:SetPoint( EMA.db.watcherFramePoint, UIParent, EMA.db.watcherFrameRelativePoint, EMA.db.watcherFrameXOffset, EMA.db.watcherFrameYOffset )
+	frame:SetBackdrop( {
+		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
+		tile = true, tileSize = 10, edgeSize = 10,
+		insets = { left = 3, right = 3, top = 3, bottom = 3 }
+	} )
+	-- Create the title for the questWaster list frame.
+    local titleButton = CreateFrame( "Button", "EMAQuestWatcherWindowFrameTitle", frame )
+	titleButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", -5, -4 )
+	titleButton:SetWidth( EMA.db.watcherFrameWidth - 100 )
+	titleButton:SetHeight( 20 )
+	titleButton:SetScript("OnMouseDown", Title_OnMouseDown)
+	titleButton:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
+	titleButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(titleButton, "headerMouseOver", true) end)
+	titleButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
+	titleButton.titleName = titleButton:CreateFontString( titleButton:GetName().."Text", "OVERLAY", "GameFontNormal" )
+	titleButton.titleName:SetJustifyH( "CENTER" )
+	titleButton.titleName:SetAllPoints( titleButton )
+	titleButton.titleName:SetTextColor( 1.00, 1.00, 1.00 )
+    titleButton.titleName:SetText( L["TRACKER_TITLE_NAME"] )
+	frame.titleName =  titleButton.titleName
+
+	-- Update button.
+	local updateButton = CreateFrame( "Button", "EMAQuestWatcherWindowFrameButtonUpdate", frame, "UIPanelButtonGrayTemplate" )
+	updateButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -5, -4 )
+	updateButton:SetHeight( 20 )
+	updateButton:SetWidth( 100 )
+	updateButton:SetText( L["UPDATE"] )
+	updateButton:SetScript( "OnClick", EMA.EMAQuestWatchListUpdateButtonClicked )
+	updateButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(updateButton, "update", true) end)
+	updateButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
+	-- Add an area for the "in the field quest" notifications.
+	frame.fieldNotificationsTop = -24
+	frame.fieldNotifications = CreateFrame( "Frame", "EMAQuestWatcherFieldQuestFrame", frame )
+	frame.fieldNotifications:SetFrameStrata( "BACKGROUND" )
+	frame.fieldNotifications:SetClampedToScreen( true )
+	frame.fieldNotifications:EnableMouse( false )
+	frame.fieldNotifications:ClearAllPoints()
+	frame.fieldNotifications:SetPoint( "TOPLEFT", frame, "TOPLEFT", 0, frame.fieldNotificationsTop )
+	frame.fieldNotifications:Show()
+	-- Set transparency of the the frame (and all its children).
+	frame:SetAlpha( EMA.db.watcherFrameAlpha )
+	-- List.
+	local topOfList = frame.fieldNotificationsTop
+	local list = {}
+	list.listFrameName = "EMAQuestWatcherQuestListFrame"
+	list.parentFrame = frame
+	list.listTop = topOfList
+	list.listLeft = 2
+	list.listWidth = EMA.db.watcherFrameWidth
+	list.rowHeight = 19
+	list.rowsToDisplay = EMA.db.watcherListLines
+	list.columnsToDisplay = 2
+	list.columnInformation = {}
+	list.columnInformation[1] = {}
+	list.columnInformation[1].width = 80
+	list.columnInformation[1].alignment = "LEFT"
+	list.columnInformation[2] = {}
+	list.columnInformation[2].width = 20
+	list.columnInformation[2].alignment = "CENTER"
+	list.scrollRefreshCallback = EMA.QuestWatcherQuestListScrollRefresh
+	list.rowClickCallback = EMA.QuestWatcherQuestListRowClick
+	list.rowRightClickCallback = EMA.QuestWatcherQuestListRowRightClick
+	list.rowMouseOverCallBack_OnEnter = EMA.QuestWatcherQuestListRowOnEnter
+	list.rowMouseOverCallBack_OnLeave = EMA.QuestWatcherQuestListRowOnLeave
+	frame.questWatchList = list
+	EMAHelperSettings:CreateScrollList( frame.questWatchList )
+	-- Change appearance from default.
+	frame.questWatchList.listFrame:SetBackdropColor( 0.0, 0.0, 0.0, 0.0 )
+	frame.questWatchList.listFrame:SetBackdropBorderColor( 0.0, 0.0, 0.0, 0.0 )
+	-- Disable mouse on columns so click-through works.
+	for iterateDisplayRows = 1, frame.questWatchList.rowsToDisplay do
+		for iterateDisplayColumns = 1, frame.questWatchList.columnsToDisplay do
+			if InCombatLockdown() == false then
+				frame.questWatchList.rows[iterateDisplayRows].columns[iterateDisplayColumns]:EnableMouse( false )
+			end
+		end
+	end
+	-- Position and size constants (once list height is known).
+	frame.questWatchListBottom = topOfList - list.listHeight
+	frame.questWatchListHeight = list.listHeight
+	frame.questWatchHighlightRow = 1
+	frame.questWatchListOffset = 1
+	-- Set the global frame reference for this frame.
+	EMAQuestWatcherFrame = frame
+	EMAQuestWatcherFrame.autoQuestPopupsHeight = 0
+	EMA:SettingsUpdateBorderStyle()
+	EMA:SettingsUpdateFontStyle()
+	EMA.questWatcherFrameCreated = true
+end
+
+function EMA:ShowTooltip(frame, info, show)
+	if show then
+		GameTooltip:SetOwner(frame, "ANCHOR_TOP")
+		GameTooltip:SetPoint("TOPLEFT", frame, "TOPRIGHT", 16, 0)
+		GameTooltip:ClearLines()
+		if info == "headerMouseOver" then
+			GameTooltip:AddLine(L["HEADER_MOUSE_OVER_QUESTWATCHER"], 1, 0.82, 0, 1)
+		elseif info == "update" then
+			GameTooltip:AddLine(L["UPDATE_MOUSE_OVER_QUESTWATCHER"], 1, 0.82, 0, 1)
+		end
+		GameTooltip:Show()
+	else
+	GameTooltip:Hide()
+	end
+end
+
+
+function EMA:SettingsUpdateBorderStyle()
+	local borderStyle = EMA.SharedMedia:Fetch( "border", EMA.db.borderStyle )
+	local backgroundStyle = EMA.SharedMedia:Fetch( "background", EMA.db.backgroundStyle )
+	local frame = EMAQuestWatcherFrame
+	frame:SetBackdrop( {
+		bgFile = backgroundStyle,
+		edgeFile = borderStyle,
+		tile = true, tileSize = frame:GetWidth(), edgeSize = 10,
+		insets = { left = 3, right = 3, top = 3, bottom = 3 }
+	} )
+	frame:SetBackdropColor( EMA.db.watchFrameBackgroundColourR, EMA.db.watchFrameBackgroundColourG, EMA.db.watchFrameBackgroundColourB, EMA.db.watchFrameBackgroundColourA )
+	frame:SetBackdropBorderColor( EMA.db.watchFrameBorderColourR, EMA.db.watchFrameBorderColourG, EMA.db.watchFrameBorderColourB, EMA.db.watchFrameBorderColourA )
+end
+
+function EMA:SettingsUpdateFontStyle()
+	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.watchFontStyle )
+	local textSize = EMA.db.watchFontSize
+	local frame = EMAQuestWatcherFrame
+	frame.titleName:SetFont( textFont , textSize , "OUTLINE")
+end
+
+
+function EMA:UpdateQuestWatcherDimensions()
+	if InCombatLockdown() == true then
+		return
+	end
+		local frame = EMAQuestWatcherFrame
+		frame:SetWidth( frame.questWatchList.listWidth + 4 )
+		frame:SetHeight( frame.questWatchListHeight + 40 )
+		-- Field notifications.
+		frame.fieldNotifications:SetWidth( frame.questWatchList.listWidth + 4 )
+		frame.fieldNotifications:SetHeight( EMAQuestWatcherFrame.autoQuestPopupsHeight )
+		-- List.
+		frame.questWatchList.listTop = frame.fieldNotificationsTop - EMAQuestWatcherFrame.autoQuestPopupsHeight
+		frame.questWatchList.listFrame:SetPoint( "TOPLEFT", frame.questWatchList.parentFrame, "TOPLEFT", frame.questWatchList.listLeft, frame.questWatchList.listTop )
+		-- Scale.
+		frame:SetScale( EMA.db.watcherFrameScale )
+end
+
+function EMA:SetQuestWatcherVisibility()
+	if InCombatLockdown() == true then
+		return
+	end
+	if EMA:CanDisplayQuestWatcher() == true then
+		EMA:UpdateQuestWatcherDimensions()
+		EMAQuestWatcherFrame:ClearAllPoints()
+		EMAQuestWatcherFrame:SetPoint( EMA.db.watcherFramePoint, UIParent, EMA.db.watcherFrameRelativePoint, EMA.db.watcherFrameXOffset, EMA.db.watcherFrameYOffset )
+		EMAQuestWatcherFrame:SetAlpha( EMA.db.watcherFrameAlpha )
+		EMAQuestWatcherFrame:Show()
+	else
+		EMAQuestWatcherFrame:Hide()
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings functionality.
+-------------------------------------------------------------------------------------------------------------
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.enableQuestWatcher = settings.enableQuestWatcher
+		EMA.db.watcherFrameAlpha = settings.watcherFrameAlpha
+		EMA.db.watcherFramePoint = settings.watcherFramePoint
+		EMA.db.watcherFrameRelativePoint = settings.watcherFrameRelativePoint
+		EMA.db.watcherFrameXOffset = settings.watcherFrameXOffset
+		EMA.db.watcherFrameYOffset = settings.watcherFrameYOffset
+		EMA.db.borderStyle = settings.borderStyle
+		EMA.db.backgroundStyle = settings.backgroundStyle
+		EMA.db.watchFontStyle = settings.watchFontStyle
+		EMA.db.watchFontSize = settings.watchFontSize
+		EMA.db.hideQuestWatcherInCombat = settings.hideQuestWatcherInCombat
+		EMA.db.watcherFrameScale = settings.watcherFrameScale
+		EMA.db.enableQuestWatcherOnMasterOnly = settings.enableQuestWatcherOnMasterOnly
+		EMA.db.watchFrameBackgroundColourR = settings.watchFrameBackgroundColourR
+		EMA.db.watchFrameBackgroundColourG = settings.watchFrameBackgroundColourG
+		EMA.db.watchFrameBackgroundColourB = settings.watchFrameBackgroundColourB
+		EMA.db.watchFrameBackgroundColourA = settings.watchFrameBackgroundColourA
+		EMA.db.watchFrameBorderColourR = settings.watchFrameBorderColourR
+		EMA.db.watchFrameBorderColourG = settings.watchFrameBorderColourG
+		EMA.db.watchFrameBorderColourB = settings.watchFrameBorderColourB
+		EMA.db.watchFrameBorderColourA = settings.watchFrameBorderColourA
+		EMA.db.watcherListLines = settings.watcherListLines
+		EMA.db.watcherFrameWidth = settings.watcherFrameWidth
+		EMA.db.unlockWatcherFrame = settings.unlockWatcherFrame
+		EMA.db.hideBlizzardWatchFrame = settings.hideBlizzardWatchFrame
+		EMA.db.doNotHideCompletedObjectives = settings.doNotHideCompletedObjectives
+		EMA.db.showCompletedObjectivesAsDone = settings.showCompletedObjectivesAsDone
+		EMA.db.hideQuestIfAllComplete = settings.hideQuestIfAllComplete
+--		EMA.db.showFrame = settings.showFrame
+--		EMA.db.sendProgressChatMessages = settings.sendProgressChatMessages
+--		EMA.db.messageArea = settings.messageArea
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		EMA:UpdateUnlockWatcherFrame()
+		--EMA:UpdateHideBlizzardWatchFrame()
+		EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"] ( characterName ) )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	-- Quest watcher options.
+	EMA.settingsControlWatcher.checkBoxEnableQuestWatcher:SetValue( EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder:SetValue( EMA.db.borderStyle )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground:SetValue( EMA.db.backgroundStyle )
+
+	EMA.settingsControlWatcher.questWatchMediaFont:SetValue( EMA.db.watchFontStyle )
+	EMA.settingsControlWatcher.questWatchFontSize:SetValue( EMA.db.watchFontSize )
+
+	EMA.settingsControlWatcher.displayOptionsCheckBoxHideQuestWatcherInCombat:SetValue( EMA.db.hideQuestWatcherInCombat )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetValue( EMA.db.watcherFrameAlpha )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetValue( EMA.db.watcherFrameScale )
+	EMA.settingsControlWatcher.checkBoxEnableQuestWatcherMasterOnly:SetValue( EMA.db.enableQuestWatcherOnMasterOnly )
+	EMA.settingsControlWatcher.questWatchBackgroundColourPicker:SetColor( EMA.db.watchFrameBackgroundColourR, EMA.db.watchFrameBackgroundColourG, EMA.db.watchFrameBackgroundColourB, EMA.db.watchFrameBackgroundColourA )
+	EMA.settingsControlWatcher.questWatchBorderColourPicker:SetColor( EMA.db.watchFrameBorderColourR, EMA.db.watchFrameBorderColourG, EMA.db.watchFrameBorderColourB, EMA.db.watchFrameBorderColourA )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetValue( EMA.db.watcherListLines )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetValue( EMA.db.watcherFrameWidth )
+	EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame:SetValue( EMA.db.unlockWatcherFrame )
+	EMA.settingsControlWatcher.checkBoxHideBlizzardWatchFrame:SetValue( EMA.db.hideBlizzardWatchFrame )
+	EMA.settingsControlWatcher.checkBoxShowCompletedObjectivesAsDone:SetValue( EMA.db.showCompletedObjectivesAsDone  )
+	EMA.settingsControlWatcher.checkBoxHideQuestIfAllComplete:SetValue( EMA.db.hideQuestIfAllComplete )
+--	EMA.settingsControlWatcher.dropdownMessageArea:SetValue( EMA.db.messageArea )
+--	EMA.settingsControlWatcher.checkBoxSendProgressChatMessages:SetValue( EMA.db.sendProgressChatMessages )
+	-- Quest watcher state.
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.questWatchMediaFont:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.questWatchFontSize:SetDisabled( not EMA.db.enableQuestWatcher )
+
+	EMA.settingsControlWatcher.displayOptionsCheckBoxHideQuestWatcherInCombat:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.checkBoxEnableQuestWatcherMasterOnly:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.questWatchBackgroundColourPicker:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.questWatchBorderColourPicker:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.checkBoxHideBlizzardWatchFrame:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.checkBoxShowCompletedObjectivesAsDone:SetDisabled( not EMA.db.enableQuestWatcher )
+	EMA.settingsControlWatcher.checkBoxHideQuestIfAllComplete:SetDisabled( not EMA.db.enableQuestWatcher )
+--	EMA.settingsControlWatcher.dropdownMessageArea:SetDisabled( not EMA.db.enableQuestWatcher )
+--	EMA.settingsControlWatcher.checkBoxSendProgressChatMessages:SetDisabled( not EMA.db.enableQuestWatcher )
+	if EMA.questWatcherFrameCreated == true and InCombatLockdown() == false then
+		EMA:SettingsUpdateBorderStyle()
+		EMA:SettingsUpdateFontStyle()
+		EMA:SetQuestWatcherVisibility()
+	end
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsToggleEnableQuestWatcher( event, checked )
+	EMA.db.enableQuestWatcher = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeBorderStyle( event, value )
+	EMA.db.borderStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeBackgroundStyle( event, value )
+	EMA.db.backgroundStyle = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeFontStyle( event, value )
+	EMA.db.watchFontStyle = value
+	EMA:SettingsRefresh()
+	EMA:EMAQuestWatcherUpdate( false, "all" )
+end
+
+function EMA:SettingsChangeFontSize( event, value )
+	EMA.db.watchFontSize = value
+	EMA:SettingsRefresh()
+	EMA:EMAQuestWatcherUpdate( false, "all" )
+end
+
+function EMA:SettingsToggleHideQuestWatcherInCombat( event, checked )
+	EMA.db.hideQuestWatcherInCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeTransparency( event, value )
+	EMA.db.watcherFrameAlpha = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeScale( event, value )
+	EMA.db.watcherFrameScale = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeWatchLines( event, value )
+	EMA.db.watcherListLines = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsChangeWatchFrameWidth( event, value )
+	EMA.db.watcherFrameWidth = tonumber( value )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleEnableQuestWatcherMasterOnly( event, checked )
+	EMA.db.enableQuestWatcherOnMasterOnly = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsQuestWatchBackgroundColourPickerChanged( event, r, g, b, a )
+	EMA.db.watchFrameBackgroundColourR = r
+	EMA.db.watchFrameBackgroundColourG = g
+	EMA.db.watchFrameBackgroundColourB = b
+	EMA.db.watchFrameBackgroundColourA = a
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsQuestWatchBorderColourPickerChanged( event, r, g, b, a )
+	EMA.db.watchFrameBorderColourR = r
+	EMA.db.watchFrameBorderColourG = g
+	EMA.db.watchFrameBorderColourB = b
+	EMA.db.watchFrameBorderColourA = a
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleUnlockWatcherFrame( event, checked )
+	EMA.db.unlockWatcherFrame = checked
+	EMA:UpdateUnlockWatcherFrame()
+	EMA:SettingsRefresh()
+end
+--[[
+function EMA:SettingsToggleSendProgressChatMessages( event, checked )
+	EMA.db.sendProgressChatMessages = checked
+	EMA:SettingsRefresh()
+end
+]]
+function EMA:SettingsToggleShowFrame( event, checked )
+	EMA.db.showFrame = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:ShowFrameCommand( info, parameters )
+	EMA.db.showFrame = true
+	EMA:SettingsRefresh()
+end
+
+function EMA:HideFrameCommand( info, parameters )
+	EMA.db.showFrame = false
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetMessageArea( event, messageAreaValue )
+	EMA.db.messageArea = messageAreaValue
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleHideBlizzardWatchFrame( event, checked )
+	EMA.db.hideBlizzardWatchFrame = checked
+	--EMA:UpdateHideBlizzardWatchFrame()
+	EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsShowCompletedObjectivesAsDone( event, checked )
+	EMA.db.showCompletedObjectivesAsDone = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsHideQuestIfAllComplete( event, checked )
+	EMA.db.hideQuestIfAllComplete = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsDoNotHideCompletedObjectives( event, checked )
+	EMA.db.doNotHideCompletedObjectives = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:UpdateUnlockWatcherFrame()
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	if EMA.db.unlockWatcherFrame == true then
+		EMAQuestWatcherFrame:EnableMouse( true )
+	else
+		EMAQuestWatcherFrame:EnableMouse( false )
+	end
+end
+
+function EMA:UpdateHideBlizzardWatchFrame()
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	if EMA.db.hideBlizzardWatchFrame == true then
+		if ObjectiveTrackerFrame:IsVisible() then
+            ObjectiveTrackerFrame:Hide()
+		end
+	else
+        ObjectiveTrackerFrame:Show()
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- QUEST WATCHING HOOKS
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SelectActiveQuest( questIndex )
+    EMA:DebugMessage("select active quest", questIndex)
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	EMA:SetActiveQuestForQuestWatcherCache( questIndex )
+end
+
+function EMA:GetQuestReward( itemChoice )
+	if EMA.db.enableQuestWatcher == false then
+		return
+    end
+	local questJustCompletedName = GetTitleText()
+    EMA:DebugMessage( "GetQuestReward: ", questIndex, questJustCompletedName )
+    local questIndex = EMA:GetQuestLogIndexByName( questJustCompletedName )
+    local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex )
+    EMA:DebugMessage( "GetQuestReward after GetQuestLogTitle: ", questIndex, questJustCompletedName, questID )
+	EMA:RemoveQuestFromWatchList( questID )
+end
+
+function EMA:AddQuestWatch( questIndex )
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	--EMA:UpdateHideBlizzardWatchFrame()
+	EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
+	EMA:EMAQuestWatcherUpdate( true,  "all" )
+	--EMA:EMAQuestWatcherScenarioUpdate( true )
+end
+
+function EMA:RemoveQuestWatch( questIndex )
+	if EMA.db.enableQuestWatcher == false then
+		return
+    end
+    EMA:DebugMessage( "RemoveQuestWatch", questIndex )
+	--EMA:UpdateHideBlizzardWatchFrame()
+    EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
+	local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex )
+    EMA:DebugMessage( "About to call RemoveQuestFromWatchList with value:", questID )
+	EMA:RemoveQuestFromWatchList( questID )
+end
+
+function EMA:SetAbandonQuest()
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	local questName = GetAbandonQuestName()
+	if questName ~= nil then
+		local questIndex = EMA:GetQuestLogIndexByName( questName )
+		EMA:SetActiveQuestForQuestWatcherCache( questIndex )
+	end
+end
+
+function EMA:AbandonQuest()
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	-- Wait a bit for the correct information to come through from the server...
+	EMA:ScheduleTimer( "AbandonQuestDelayed", 1 )
+end
+
+
+function EMA:QUEST_WATCH_UPDATE( event, ... )
+	--EMA:Print("test4")
+	if EMA.db.enableQuestWatcher == true then
+		-- Wait a bit for the correct information to come through from the server...
+		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, true, "all" )
+	end
+end
+
+
+function EMA:QUEST_LOG_UPDATE( event, ... )
+	--EMA:Print("QuestTestUpdates")
+	if EMA.db.enableQuestWatcher == true then
+		-- Wait a bit for the correct information to come through from the server...
+		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, true, "all" )
+	end
+end
+
+
+function EMA:SCENARIO_UPDATE( event, ... )
+	--EMA:Print("test2")
+	if EMA.db.enableQuestWatcher == true then
+
+		EMA:RemoveQuestsNotBeingWatched()
+		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, true, "scenario" )
+	end
+end
+
+
+function EMA:SCENARIO_CRITERIA_UPDATE( event, ... )
+	--EMA:Print("test3.5")
+	if EMA.db.enableQuestWatcher == true then
+		-- Wait a bit for the correct information to come through from the server...
+		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, true, "scenario" )
+
+	end
+end
+
+function EMA:PLAYER_ENTERING_WORLD( event, ... )
+	--EMA:Print("test4")
+	if EMA.db.enableQuestWatcher == true then
+		EMA:RemoveQuestsNotBeingWatched()
+		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, false, "all" )
+	end
+end
+
+
+function EMA:PLAYER_REGEN_ENABLED( event, ... )
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	if EMA.db.hideQuestWatcherInCombat == true then
+		EMA:SetQuestWatcherVisibility()
+	end
+end
+
+function EMA:PLAYER_REGEN_DISABLED( event, ... )
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	if EMA.db.hideQuestWatcherInCombat == true then
+		EMAQuestWatcherFrame:Hide()
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- QUEST WATCHING
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:AbandonQuestDelayed()
+	EMA:RemoveCurrentQuestFromWatcherCache()
+	EMA:RemoveQuestsNotBeingWatched()
+end
+
+function EMA:EMAQuestWatchListUpdateButtonClicked()
+	EMA:RemoveQuestsNotBeingWatched()
+	EMA:EMASendCommandToTeam( EMA.COMMAND_UPDATE_QUEST_WATCHER_LIST )
+end
+
+function EMA:DoQuestWatchListUpdate( characterName )
+	EMA:EMAQuestWatcherUpdate( false, "all" )
+	--EMA:EMAQuestWatcherScenarioUpdate( false )
+end
+
+
+function EMA:GetQuestObjectiveCompletion( text )
+	if text == nil then
+		return L["N/A"], L["N/A"]
+	end
+	local makeString = nil
+	local dig1, dig2 = string.match( text, "(%d*)/(%d*)")
+	if (dig1  and dig2) then
+		local arg1, arg2 = string.match(text, "(.-%S)%s(.*)")
+		--EMA:Print("testm", arg1, "A", arg2)
+		makeString = dig1..L["/"]..dig2
+	end
+	if makeString ~= nil then
+		local arg1, arg2 = string.match(text, "(.-%S)%s(.*)")
+		local textFind = string.find(arg1, "(%d*)")
+		--EMA:Print("text", textFind)
+		if textFind then
+			return makeString, arg2
+		else
+			return makeString, text
+		end
+	else
+		return L["DONE"] , text
+	end
+end
+
+function EMA:QuestWatchGetObjectiveText( questIndex, objectiveIndex )
+	local objectiveFullText, objectiveType, objectiveFinished = GetQuestLogLeaderBoard( objectiveIndex, questIndex )
+	local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText )
+	return objectiveText
+end
+
+
+
+
+-------------------------------------------------------------------------------------------------------------
+-- QUEST WATCH CACHE
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:IsQuestObjectiveInCache( questID, objectiveIndex )
+	local key = questID..objectiveIndex
+	if EMA.questWatchCache[key] == nil then
+		return false
+	end
+	return true
+end
+
+function EMA:AddQuestObjectiveToCache( questID, objectiveIndex, amountCompleted, objectiveFinished )
+	local key = questID..objectiveIndex
+	EMA.questWatchCache[key] = {}
+	EMA.questWatchCache[key].questID = questID
+	EMA.questWatchCache[key].amountCompleted = amountCompleted
+	EMA.questWatchCache[key].objectiveFinished = objectiveFinished
+end
+
+function EMA:GetQuestCachedValues( questID, objectiveIndex )
+	local key = questID..objectiveIndex
+	return EMA.questWatchCache[key].amountCompleted, EMA.questWatchCache[key].objectiveFinished
+end
+
+function EMA:UpdateQuestCachedValues( questID, objectiveIndex, amountCompleted, objectiveFinished )
+	local key = questID..objectiveIndex
+	EMA.questWatchCache[key].amountCompleted = amountCompleted
+	EMA.questWatchCache[key].objectiveFinished = objectiveFinished
+end
+
+function EMA:QuestCacheUpdate( questID, objectiveIndex, amountCompleted, objectiveFinished )
+	if EMA:IsQuestObjectiveInCache( questID, objectiveIndex ) == false then
+		EMA:AddQuestObjectiveToCache( questID, objectiveIndex, amountCompleted, objectiveFinished )
+		return true
+	end
+	local cachedAmountCompleted, cachedObjectiveFinished = EMA:GetQuestCachedValues( questID, objectiveIndex )
+	if cachedAmountCompleted == amountCompleted and cachedObjectiveFinished == objectiveFinished then
+		return false
+	end
+	EMA:UpdateQuestCachedValues( questID, objectiveIndex, amountCompleted, objectiveFinished )
+	return true
+end
+
+function EMA:SetActiveQuestForQuestWatcherCache( questIndex )
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	if questIndex ~= nil then
+        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex )
+		EMA.currentQuestForQuestWatcherID = questID
+	else
+		EMA.currentQuestForQuestWatcherID = nil
+	end
+end
+
+function EMA:RemoveQuestFromWatcherCache( questID )
+    EMA:DebugMessage( "RemoveQuestFromWatcherCache", questID )
+	for key, questInfo in pairs( EMA.questWatchCache ) do
+		if questInfo.questID == questID then
+			EMA.questWatchCache[key].questID = nil
+			EMA.questWatchCache[key].amountCompleted = nil
+			EMA.questWatchCache[key].objectiveFinished = nil
+			EMA.questWatchCache[key] = nil
+			EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_REMOVE_QUEST, questID )
+		end
+	end
+end
+
+function EMA:RemoveCurrentQuestFromWatcherCache()
+	if EMA.db.enableQuestWatcher == false then
+		return
+    end
+    EMA:DebugMessage( "RemoveCurrentQuestFromWatcherCache", EMA.currentQuestForQuestWatcherID )
+	if EMA.currentQuestForQuestWatcherID == nil then
+		return
+	end
+	EMA:RemoveQuestFromWatcherCache( EMA.currentQuestForQuestWatcherID )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- AUTO QUEST COMMUNICATION
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:IsCompletedAutoCompleteFieldQuest( questIndex, isComplete )
+	-- Send an isComplete true flag if the quest is completed and is an in the field autocomplete quest.
+	if isComplete and isComplete > 0 then
+		if GetQuestLogIsAutoComplete( questIndex ) then
+			isComplete = true
+		else
+			isComplete = false
+		end
+	else
+		isComplete = false
+	end
+	return isComplete
+end
+
+function EMA:QUEST_AUTOCOMPLETE( event, questID, ... )
+	-- In the field autocomplete quest event.
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	EMA:EMASendCommandToTeam( EMA.COMMAND_AUTO_QUEST_COMPLETE, questID )
+end
+
+function EMA:DoAutoQuestFieldComplete( characterName, questID )
+	EMA:EMAAddAutoQuestPopUp( questID, "COMPLETE", characterName )
+end
+
+function EMA:QUEST_COMPLETE()
+	if EMA.db.enableQuestWatcher == false then
+		return
+    end
+	EMA:EMASendCommandToTeam( EMA.COMMAND_REMOVE_AUTO_QUEST_COMPLETE, questID )
+end
+
+function EMA:DoRemoveAutoQuestFieldComplete( characterName, questID )
+	EMA:EMARemoveAutoQuestPopUp( questID, characterName )
+end
+
+function EMA:QUEST_DETAIL()
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	if QuestGetAutoAccept() and QuestIsFromAreaTrigger() then
+		EMA:EMASendCommandToTeam( EMA.COMMAND_AUTO_QUEST_OFFER, GetQuestID() )
+	end
+end
+
+function EMA:DoAutoQuestFieldOffer( characterName, questID )
+	EMA:EMAAddAutoQuestPopUp( questID, "OFFER", characterName )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- QUEST WATCH COMMUNICATION
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:EMAQuestWatcherScenarioUpdate(useCache)
+	-- Scenario information
+	local isInScenario = C_Scenario.IsInScenario()
+	if isInScenario == true then
+		-- Hacky hacky to get Scenario to show at the top of the list.
+		if useCache == false then
+			EMAUtilities:ClearTable( EMA.questWatchObjectivesList )
+		end
+		--local useCache = false
+		local scenarioName, currentStage, numStages, flags, _, _, _, xp, money = C_Scenario.GetInfo()
+		--EMA:Print("scenario", scenarioName, currentStage, numStages)
+			for StagesIndex = 1, currentStage do
+				--EMA:Print("Player is on Stage", currentStage)
+				local stageName, stageDescription, numCriteria, _, _, _, numSpells, spellInfo, weightedProgress = C_Scenario.GetStepInfo()
+				--EMA:Print("test match", numCriteria)
+				if numCriteria == 0 then
+					--EMA:Print("test match 0")
+					if (weightedProgress) then
+						--EMA:Print("Checking Progress", weightedProgress)
+						local questID = 1001
+						local criteriaIndex = 0
+						local maxProgress = 100
+						--Placeholder does not work on borkenshore questlines......
+						--local totalQuantity = 100
+						local completed = false
+						local amountCompleted = tostring(weightedProgress).."/"..(maxProgress)
+						local name = "Scenario:"..stageName.." "..currentStage.."/"..numStages
+						--EMA:Print("scenarioProgressInfo", questID, name, criteriaIndex, stageDescription , amountCompleted , totalQuantity, completed )
+						--EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, numCriteria, stageDescription , amountCompleted , totalQuantity, completed )
+						EMA:DoQuestWatchObjectiveUpdate( EMA.CharacterName, questID, name, numCriteria, stageDescription , amountCompleted , totalQuantity, completed )
+					else
+						--EMA:Print("ScenarioDONE", stageDescription)
+						local questID = 1001
+						local criteriaIndex = 1
+						local completed = false
+						local amountCompleted = tostring(0).."/"..(1)
+						local name = "Scenario:"..stageName.." "..currentStage.."/"..numStages
+						--EMA:Print("scenarioProgressInfo", questID, name, criteriaIndex, stageDescription , amountCompleted , totalQuantity, completed )
+						EMA:DoQuestWatchObjectiveUpdate( EMA.characterName, questID, name, numCriteria, stageDescription , amountCompleted , totalQuantity, completed )
+					end
+
+				else
+				for criteriaIndex = 1, numCriteria do
+				local criteriaString, criteriaType, completed, quantity, totalQuantity, flags, assetID, quantityString, criteriaID, duration, elapsed = C_Scenario.GetCriteriaInfo(criteriaIndex)
+				--Ebony to fix a bug with character trial quest (this might be a blizzard bug) TODO relook at somepoint in beta.
+					if (criteriaString) then
+						local questID = 1001
+						local amountCompleted = tostring( quantity ).."/"..( totalQuantity )
+						--EMA:Print("Stages", numStages)
+						local name = nil
+							if (numStages) > 1 then
+								local textName = "Scenario:"..stageName.." "..currentStage.."/"..numStages
+								newName = textName
+							else
+								local textName = "Scenario:"..stageName
+								newName = textName
+							end
+							local name = newName
+							--EMA:Print("test", questID, name, criteriaIndex, criteriaString , amountCompleted , completed, completed)
+							EMA:DoQuestWatchObjectiveUpdate( EMA.characterName, questID, name, criteriaIndex, criteriaString , amountCompleted , completed, completed )
+						end
+					end
+				end
+			end
+		end
+	-- SCENARIO_BONUS
+		local tblBonusSteps = C_Scenario.GetBonusSteps()
+		if #tblBonusSteps > 0 then
+			--EMA:Print("BonusTest", #tblBonusSteps )
+		for i = 1, #tblBonusSteps do
+			local bonusStepIndex = tblBonusSteps[i]
+			--EMA:Print("bonusIndex", bonusStepIndex)
+			local stageName, stageDescription, numCriteria = C_Scenario.GetStepInfo(bonusStepIndex)
+			--EMA:Print("bonusInfo", numCriteria, stageName, stageDescription)
+			for criteriaIndex = 1, numCriteria do
+				--EMA:Print("Player has", numCriteria, "Criterias", "and is checking", criteriaIndex)
+				local criteriaString, criteriaType, completed, quantity, totalQuantity, flags, assetID, quantityString, criteriaID = C_Scenario.GetCriteriaInfoByStep(bonusStepIndex, criteriaIndex)
+				local questID = assetID
+				local amountCompleted = tostring(quantity).."/"..(totalQuantity)
+				local name = "ScenarioBouns:"..stageName --.." "..currentStage.."/"..numStages
+				--EMA:Print("scenarioBouns", questID, name, criteriaIndexa, criteriaString , amountCompleted , totalQuantity, completed )
+				EMA:DoQuestWatchObjectiveUpdate( EMA.characterName, questID, name, criteriaIndex, criteriaString , amountCompleted , completed, completed )
+			end
+		end
+	end
+end
+
+function EMA:EMAQuestWatcherQuestLogUpdate( useCache )
+	for i = 1, GetNumQuestLogEntries() do
+		local questID, title, questLogIndex, numObjectives, requiredMoney, isComplete, startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isBounty, isStory, isOnMap, hasLocalPOI, isHidden = GetQuestWatchInfo(i)
+		if questID ~= nil then
+		--EMA:Print("EMAQuestData", questID, title, questLogIndex, numObjectives, requiredMoney, isComplete, startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isBounty, isStory, isOnMap, hasLocalPOI, isHidden)
+			if numObjectives > 0 then
+				for iterateObjectives = 1, numObjectives do
+					--EMA:Print( "NumObjs:", numObjectives )
+					local objectiveFullText, objectiveType, objectiveFinished = GetQuestLogLeaderBoard( iterateObjectives, questLogIndex )
+					local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText, objectiveType )
+					if objectiveType == "progressbar" then
+						local progress = GetQuestProgressBarPercent( questID )
+						objectiveText = "ProgressBar"..": "..objectiveText
+						amountCompleted = tostring(progress)..L["%"]
+					end
+					if objectiveFullText ~= nil then
+						--EMA:Print("test2", questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete )
+						if (EMA:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then
+							EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, title, iterateObjectives, objectiveText, amountCompleted, isComplete, isComplete )
+						end
+					end
+				end
+			else
+				local objectiveFullText = GetQuestLogCompletionText(questLogIndex)
+				local iterateObjectives = 0
+				local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText )
+				local objectiveFinished = true
+				--EMA:Print("test3", questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete )
+				if (EMA:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then
+					EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, title, iterateObjectives, objectiveText, amountCompleted, isComplete, isComplete )
+				end
+			end
+		end
+	end
+end
+
+function EMA:EMAQuestWatcherWorldQuestUpdate( useCache )
+	--EMA:Print("fireworldquestUpdate")
+	for i = 1, GetNumQuestLogEntries() do
+		local title, level, suggestedGroup, isHeader, isCollapsed, _ , frequency, questID = GetQuestLogTitle(i)
+		local isInArea, isOnMap, numObjectives = GetTaskInfo(questID)
+		local isComplete = EMA:IsCompletedAutoCompleteFieldQuest( questIndex, isComplete )
+			if isInArea and isOnMap then
+			for iterateObjectives = 1, numObjectives do
+				--EMA:Print("test", questID, iterateObjectives, isComplete)
+				local objectiveFullText, objectiveType, objectiveFinished = GetQuestObjectiveInfo( questID, iterateObjectives, isComplete )
+				local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText )
+				if objectiveType == "progressbar"  then
+					local objectiveText = "ProgressBar"
+					local progress = GetQuestProgressBarPercent( questID )
+					local amountCompleted = tostring(progress)..L["%"]
+					--EMA:Print("QuestPercent", title, objectiveText, amountCompleted )
+					local name = tostring("Bonus:")..(title)
+					--EMA:Print("BarQuest", questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete)
+					if (EMA:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then
+						EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete )
+					end
+			else
+				local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText )
+				if (EMA:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then
+					--EMA:Print( "UPDATE:", "cache:", useCache, "QuestID", questID, "ObjectID", iterateObjectives )
+					--EMA:Print("sendingquestdata", objectiveText, amountCompleted, finished )
+					local name = tostring("Bonus:")..(title)
+					EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete )
+					end
+				end
+			end
+		end
+	end
+end
+
+function EMA:EMAQuestWatcherUpdate( useCache, questType )
+	if EMA.db.enableQuestWatcher == false then
+		return
+	end
+	--EMA:Print("updateQuestList", useCache, questType )
+	if questType == "scenario" or "all" then
+		EMA:EMAQuestWatcherScenarioUpdate(useCache)
+	end
+	if questType == "quest" or "all" then
+		EMA:EMAQuestWatcherQuestLogUpdate( useCache )
+	end
+	if questType == "worldQuest" or "all" then
+		EMA:EMAQuestWatcherWorldQuestUpdate( useCache )
+	end
+end
+
+-- Gathers messages from team.
+function EMA:DoQuestWatchObjectiveUpdate( characterName, questID, questName, objectiveIndex, objectiveText, amountCompleted, objectiveFinished, isComplete )
+	EMA:UpdateQuestWatchList( questID, questName, objectiveIndex, objectiveText, characterName, amountCompleted, objectiveFinished, isComplete )
+end
+
+function EMA:UpdateQuestWatchList( questID, questName, objectiveIndex, objectiveText, characterName, amountCompleted, objectiveFinished, isComplete )
+    --local characterName = (( Ambiguate( name, "none" ) ))
+	--EMA:Print( "UpdateQuestWatchList", questID, questName, objectiveIndex, objectiveText, characterName, amountCompleted, objectiveFinished, isComplete )
+	local questHeaderPosition = EMA:GetQuestHeaderInWatchList( questID, questName, characterName )
+	local objectiveHeaderPosition = EMA:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, "", questHeaderPosition )
+	local characterPosition = EMA:GetCharacterInWatchList( questID, objectiveIndex, characterName, amountCompleted, objectiveHeaderPosition, objectiveFinished )
+	local totalAmountCompleted = EMA:GetTotalCharacterAmountFromWatchList( questID, objectiveIndex )
+	objectiveHeaderPosition = EMA:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, totalAmountCompleted, questHeaderPosition )
+	-- isComplete piggybacks on the quest watch update, so we are always displaying a complete quest button (in case the QUEST_AUTOCOMPLETE event does not fire).
+	if isComplete == true then
+		EMA:DoAutoQuestFieldComplete( characterName, questID )
+	end
+	if EMA.db.hideQuestIfAllComplete == true then
+		EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
+	end
+	EMA:QuestWatcherQuestListScrollRefresh()
+	EMA:SetQuestWatcherVisibility()
+end
+
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:RemoveQuestFromWatchList( questID )
+	EMA:RemoveQuestFromWatcherCache( questID )
+	EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_REMOVE_QUEST, questID )
+end
+
+function EMA:DoRemoveQuestFromWatchList( characterName, questID )
+	-- Remove character lines for this character.
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		if questWatchInfo.questID == questID and questWatchInfo.character == characterName then
+			EMA:RemoveQuestWatchInfo( questWatchInfo.key )
+		end
+	end
+	-- See if any character lines left, if none, then remove quest completely.
+	local found = false
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		if questWatchInfo.questID == questID and questWatchInfo.type == "CHARACTER_AMOUNT" then
+			found = true
+		end
+	end
+	if found == false then
+		for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+			local questWatchInfo = questWatchInfoContainer.info
+			if questWatchInfo.questID == questID then
+				EMA:RemoveQuestWatchInfo( questWatchInfo.key )
+			end
+		end
+	else
+		-- Still some character lines left, update the total amount of objectives to reflect lost team member.
+		-- Find any remaining quest objective headers.
+		for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+			local questWatchInfo = questWatchInfoContainer.info
+			if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" then
+				questWatchInfo.amount = EMA:GetTotalCharacterAmountFromWatchList( questID, questWatchInfo.objectiveIndex )
+				-- If all done auto-collapse when complete, collapse objective header.
+				if (questWatchInfo.amount == L["DONE"]) and (EMA.db.doNotHideCompletedObjectives == true) then
+					questWatchInfo.childrenAreHidden = true
+				end
+			end
+			if questWatchInfo.questID == questID and questWatchInfo.type == "QUEST_HEADER" then
+				EMA:UpdateTeamQuestCountRemoveCharacter( questWatchInfo, characterName )
+				if EMA.db.hideQuestIfAllComplete == true then
+					EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
+				end
+			end
+		end
+	end
+	-- Remove any auto quest buttons.
+	EMA:DoRemoveAutoQuestFieldComplete( characterName, questID )
+	EMA:QuestWatcherQuestListScrollRefresh()
+	EMA:SetQuestWatcherVisibility()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- QUEST WATCH DISPLAY LIST LOGIC
+-------------------------------------------------------------------------------------------------------------
+
+
+function EMA:GetTotalCharacterAmountFromWatchList( questID, objectiveIndex )
+	local amount = 0
+	local total = 0
+	local countCharacters = 0
+	local countDones = 0
+	local questType = nil
+	local amountOverTotal = nil
+	local ProgressQuest = nil
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		local position = questWatchInfoContainer.position
+		if questWatchInfo.questID == questID and questWatchInfo.type == "CHARACTER_AMOUNT" and questWatchInfo.objectiveIndex == objectiveIndex then
+			countCharacters = countCharacters + 1
+			local amountCompletedText = questWatchInfo.amount
+			if amountCompletedText == L["DONE"] then
+				countDones = countDones + 1
+			end
+			local arg1, arg2 = string.match(amountCompletedText, "(%d*)/(%d*)")
+			if (arg1 ~= nil) and (arg2 ~= nil) then
+				if strtrim( arg1 ) ~= "" and strtrim( arg2 ) ~= "" then
+					amount = amount + tonumber( arg1 )
+					total = total + tonumber( arg2 )
+				end
+			else
+				local arg1 = string.match(amountCompletedText, "(%d*)")
+				if (arg1 ~= nil) then
+					if strtrim( arg1 ) ~= "" then
+						amount = amount
+						total = total + tonumber( arg1 )
+						ProgressQuest = true
+					end
+				end
+			end
+		end
+		if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" and string.find( questWatchInfo.information, "ProgressBar" ) then
+			questType = "ProgressBar"
+		end
+	end
+	if countCharacters == 0 then
+		return L["DONE"]
+	end
+	if questType == "ProgressBar" and ProgressQuest == true then
+		local totalChars = (100 * countCharacters)
+		local maths = (total / totalChars) * 100
+		amountOverTotal = maths..L["%"]
+	else
+		if amount == total then
+			amountOverTotal = L["DONE"]
+		else
+			amountOverTotal = string.format( "%s/%s", amount, total )
+		end
+    end
+	EMA:DebugMessage( "AMTOT:", amountOverTotal )
+		if amountOverTotal == "0/0" then
+			--EMA:Print("test", countDones, countCharacters)
+			if countDones == countCharacters then
+				amountOverTotal = L["DONE"]
+			else
+				amountOverTotal = L["N/A"]
+			end
+		end
+	return amountOverTotal
+end
+
+function EMA:RemoveQuestsNotBeingWatched()
+	EMA:UpdateAllQuestsInWatchList()
+	for checkQuestID, value in pairs( EMA.questWatchListOfQuests ) do
+		local found = false
+		for iterateWatchedQuests = 1, GetNumQuestWatches() do
+			local questIndex = GetQuestIndexForWatch( iterateWatchedQuests )
+			if questIndex ~= nil then
+                local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex )
+				if checkQuestID == questID then
+					found = true
+				end
+			end
+		end
+		if found == false then
+			EMA:RemoveQuestFromWatchList( checkQuestID )
+		end
+	end
+end
+
+function EMA:UpdateAllQuestsInWatchList()
+	table.wipe( EMA.questWatchListOfQuests )
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		-- TODO- whats going on here?
+		EMA.questWatchListOfQuests[questWatchInfoContainer.info.questID] = true
+	end
+end
+
+function EMA:GetCharacterInWatchList( questID, objectiveIndex, characterName, amountCompleted, objectiveHeaderPosition, objectiveFinished )
+	local characterPosition = -1
+	local characterQuestWatchInfo
+	if objectiveFinished then
+		if EMA.db.showCompletedObjectivesAsDone == true then
+			amountCompleted = L["DONE"]
+		end
+	end
+	-- Try and find the character line.
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		local position = questWatchInfoContainer.position
+		if questWatchInfo.questID == questID and questWatchInfo.type == "CHARACTER_AMOUNT" and questWatchInfo.objectiveIndex == objectiveIndex and questWatchInfo.character == characterName then
+			-- Character line found.  Update information.
+			questWatchInfo.amount = amountCompleted
+			characterQuestWatchInfo = questWatchInfo
+			characterPosition = position
+			break
+		end
+	end
+	-- Was not found, add character line.
+	if characterPosition == -1 then
+		-- Only if not completed or user wants to show completed.
+		if ((objectiveFinished == nil) or (objectiveFinished == false)) or (EMA.db.doNotHideCompletedObjectives == true) then
+			local questWatchInfo = EMA:CreateQuestWatchInfo( questID, "CHARACTER_AMOUNT", objectiveIndex, characterName, characterName, amountCompleted )
+			EMA:InsertQuestWatchInfoToListAfterPosition( questWatchInfo, objectiveHeaderPosition )
+			return objectiveHeaderPosition + 1
+		end
+		return -1
+	else
+		-- Character line was found.  Remove it if objective finished?
+		if (objectiveFinished) and (EMA.db.doNotHideCompletedObjectives == false) then
+			EMA:RemoveQuestWatchInfo( characterQuestWatchInfo.key )
+			return -1
+		end
+	end
+	return -1
+end
+
+function EMA:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, totalAmountCompleted, questHeaderPosition )
+	--EMA:Print("testposition", questName, "oT", objectiveText, questHeaderPosition)
+	if strtrim( objectiveText ) == "" then
+		objectiveText = questName
+	end
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		local position = questWatchInfoContainer.position
+		if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" and questWatchInfo.objectiveIndex == objectiveIndex then
+			questWatchInfo.information = objectiveText
+			questWatchInfo.amount = totalAmountCompleted
+			-- If all done auto-collapse when complete, collapse objective header.
+			if (questWatchInfo.amount == L["DONE"]) and (EMA.db.doNotHideCompletedObjectives == true) then
+				questWatchInfo.childrenAreHidden = true
+			end
+			return position
+		end
+	end
+	local questWatchInfo = EMA:CreateQuestWatchInfo( questID, "OBJECTIVE_HEADER", objectiveIndex, "", objectiveText, totalAmountCompleted )
+	-- Hide the team list by default.
+	questWatchInfo.childrenAreHidden = true
+	EMA:InsertQuestWatchInfoToListAfterPosition( questWatchInfo, questHeaderPosition )
+	return questHeaderPosition + 1
+end
+
+function EMA:GetQuestItemFromQuestID(findQuestID)
+	for iterateQuests=1,GetNumQuestLogEntries() do
+		local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID = GetQuestLogTitle(iterateQuests)
+		--if title ~= nil then
+		if not isHeader then
+			if findQuestID == questID then
+				local questItemLink, questItemIcon, questItemCharges = GetQuestLogSpecialItemInfo( iterateQuests )
+				if questItemLink then
+					--EMA:Print("Item", questItemLink, questItemIcon, questID)
+					return questItemLink, questItemIcon
+				else
+					return nil, nil
+				end
+			end
+		end
+	end
+end
+
+local function GetInlineFactionIcon()
+	local faction = UnitFactionGroup("player");
+	local coords = faction == "Horde" and QUEST_TAG_TCOORDS.HORDE or QUEST_TAG_TCOORDS.ALLIANCE;
+	return CreateTextureMarkup(QUEST_ICONS_FILE, QUEST_ICONS_FILE_WIDTH, QUEST_ICONS_FILE_HEIGHT, 18, 18
+	, coords[1]
+	, coords[2] - 0.02 -- Offset to stop bleeding from next image
+	, coords[3]
+	, coords[4], 0, 2);
+end
+
+function EMA:GetQuestHeaderInWatchList( questID, questName, characterName )
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		local position = questWatchInfoContainer.position
+		if questWatchInfo.questID == questID and questWatchInfo.type == "QUEST_HEADER" then
+			EMA:UpdateTeamQuestCountAddCharacter( questWatchInfo, characterName )
+
+			if EMA.db.hideQuestIfAllComplete == true then
+				EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
+			end
+			return position
+		end
+	end
+	local questItemLink, questItemIcon = EMA:GetQuestItemFromQuestID(questID)
+	local icon = ""
+	if ( questItemIcon ~= nil ) then
+		icon = strconcat(" |T"..questItemIcon..":18|t".."  ")
+	end
+	-- TODO CLEAN UP AFTER 8.0
+	-- Ebony incase we wonna use this then there is C_LFGList.CanCreateQuestGroup(questID)
+	-- that would show the quest using the group finder
+	if EMAPrivate.Core.isBetaBuild() == true then
+		if (C_CampaignInfo.IsCampaignQuest(questID) ) then
+			--EMA:Print("CampaignQuest", questName)
+			icon = GetInlineFactionIcon()
+		end
+	end
+	local questWatchInfo = EMA:CreateQuestWatchInfo( questID, "QUEST_HEADER", -1, "", questName, icon )
+
+	EMA:UpdateTeamQuestCountAddCharacter( questWatchInfo, characterName )
+	if EMA.db.hideQuestIfAllComplete == true then
+		EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
+	end
+	local newPositionAtEnd = EMA:GetQuestWatchMaximumOrder() + 1
+	EMA:AddQuestWatchInfoToListAtPosition( questWatchInfo, newPositionAtEnd )
+	return newPositionAtEnd
+end
+
+function EMA:UpdateTeamQuestCount( questWatchInfo, characterName )
+	local count = 0
+	for character, dummy in pairs( questWatchInfo.teamCharacters ) do
+		count = count + 1
+	end
+	questWatchInfo.questTeamCount = count
+end
+
+function EMA:UpdateTeamQuestCountAddCharacter( questWatchInfo, name )
+
+	questWatchInfo.teamCharacters[name] = true
+	EMA:UpdateTeamQuestCount( questWatchInfo, name )
+end
+
+function EMA:UpdateTeamQuestCountRemoveCharacter( questWatchInfo, characterName )
+	questWatchInfo.teamCharacters[characterName] = nil
+	EMA:UpdateTeamQuestCount( questWatchInfo, characterName )
+end
+
+function EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
+	if EMA.db.hideQuestIfAllComplete == false then
+		return
+	end
+	-- If all objective headers for quest say "DONE" then hide quest if hideQuestIfAllComplete option set.
+	local allDone = true
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" then
+			if questWatchInfo.amount ~= L["DONE"] then
+				allDone = false
+			end
+		end
+	end
+	-- Set quest header hidden or not as appropriate.
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		if questWatchInfo.questID == questID and questWatchInfo.type == "QUEST_HEADER" then
+			questWatchInfo.childrenAreHidden = allDone
+		end
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- QUEST WATCH INFO FUNCTIONS
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:CreateQuestWatchInfo( questID, type, objectiveIndex, character, information, amount )
+	local questWatchInfo = {}
+	questWatchInfo.key = questID..type..objectiveIndex..character
+	questWatchInfo.questID = questID
+	questWatchInfo.type = type
+	questWatchInfo.objectiveIndex = objectiveIndex
+	questWatchInfo.character = character
+	questWatchInfo.information = information
+	questWatchInfo.amount = amount
+	questWatchInfo.childrenAreHidden = false
+	questWatchInfo.questTeamCount = 0
+	questWatchInfo.teamCharacters = {}
+	return questWatchInfo
+end
+
+function EMA:AddQuestWatchInfoToListAtPosition( questWatchInfo, position )
+	EMA.questWatchObjectivesList[questWatchInfo.key] = {}
+	EMA.questWatchObjectivesList[questWatchInfo.key].position = position
+	EMA.questWatchObjectivesList[questWatchInfo.key].info = questWatchInfo
+end
+
+function EMA:InsertQuestWatchInfoToListAfterPosition( questWatchInfo, position )
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		local checkPosition = questWatchInfoContainer.position
+		if checkPosition > position then
+			questWatchInfoContainer.position = checkPosition + 1
+		end
+	end
+	EMA:AddQuestWatchInfoToListAtPosition( questWatchInfo, position + 1 )
+end
+
+function EMA:RemoveQuestWatchInfo( key )
+	local removedPosition = EMA.questWatchObjectivesList[key].position
+	for checkKey, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local checkPosition = questWatchInfoContainer.position
+		if checkPosition > removedPosition then
+			questWatchInfoContainer.position = checkPosition - 1
+		end
+	end
+	EMA.questWatchObjectivesList[key].info.key = nil
+	EMA.questWatchObjectivesList[key].info.questID = nil
+	EMA.questWatchObjectivesList[key].info.type = nil
+	EMA.questWatchObjectivesList[key].info.objectiveIndex = nil
+	EMA.questWatchObjectivesList[key].info.character = nil
+	EMA.questWatchObjectivesList[key].info.information = nil
+	EMA.questWatchObjectivesList[key].info.amount = nil
+	EMA.questWatchObjectivesList[key].info.childrenAreHidden = nil
+	EMA.questWatchObjectivesList[key].info.questTeamCount = nil
+	table.wipe( EMA.questWatchObjectivesList[key].info.teamCharacters )
+	table.wipe( EMA.questWatchObjectivesList[key].info )
+	EMA.questWatchObjectivesList[key].info = nil
+	EMA.questWatchObjectivesList[key].position = nil
+	table.wipe( EMA.questWatchObjectivesList[key] )
+	EMA.questWatchObjectivesList[key] = nil
+end
+
+-- Get the largest order number from the quest watch list.
+function EMA:GetQuestWatchMaximumOrder()
+	local largestPosition = 0
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		local position = questWatchInfoContainer.position
+		if position > largestPosition then
+			largestPosition = position
+		end
+	end
+	return largestPosition
+end
+
+function EMA:GetQuestWatchInfoFromKey( key )
+	local questWatchInfo = EMA.questWatchObjectivesList[key].info
+	return questWatchInfo.information, questWatchInfo.amount, questWatchInfo.type, questWatchInfo.questID, questWatchInfo.childrenAreHidden, key, questWatchInfo.objectiveIndex
+end
+
+-- Get the quest watch info at a specific position.
+function EMA:GetQuestWatchInfoAtOrderPosition( position )
+	local information = ""
+	local amount = ""
+	local type = ""
+	local questID = ""
+	local childrenAreHidden = ""
+	local key = ""
+	local questTeamCount = ""
+	local objectiveIndex = ""
+	for keyStored, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		local questWatchInfo = questWatchInfoContainer.info
+		local questWatchPosition = questWatchInfoContainer.position
+		if questWatchPosition == position then
+			information = questWatchInfo.information
+			amount = questWatchInfo.amount
+			type = questWatchInfo.type
+			questID = questWatchInfo.questID
+			childrenAreHidden = questWatchInfo.childrenAreHidden
+			key = keyStored
+			questTeamCount = questWatchInfo.questTeamCount
+			objectiveIndex = questWatchInfo.objectiveIndex
+			break
+		end
+	end
+	return information, amount, type, questID, childrenAreHidden, key, questTeamCount, objectiveIndex
+end
+
+function EMA:ToggleChildrenAreHiddenQuestWatchInfoByKey( key )
+	local questWatchInfo = EMA.questWatchObjectivesList[key].info
+	questWatchInfo.childrenAreHidden = not questWatchInfo.childrenAreHidden
+end
+
+function EMA:CountLinesInQuestWatchList()
+	if EMA.questWatchObjectivesList == nil then
+		return 1
+	end
+	local count = 1
+	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+		count = count + 1
+	end
+	return count
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- QUEST WATCH DISPLAY LIST MECHANICS
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:QuestWatcherQuestListDrawLine( frame, iterateDisplayRows, type, information, amount, childrenAreHidden, key, questTeamCount, questID )
+	local toggleDisplay = ""
+	local padding = ""
+	local teamCount = ""
+	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.watchFontStyle )
+	local textSize = EMA.db.watchFontSize
+	if type == "CHARACTER_AMOUNT" then
+		padding = "        "
+	end
+	if type == "OBJECTIVE_HEADER" then
+		padding = "    "
+		if childrenAreHidden == true then
+			toggleDisplay = "+ "
+		else
+			toggleDisplay = "- "
+		end
+	end
+	if type == "QUEST_HEADER" then
+		if questTeamCount ~= 0 then
+			teamCount = " ("..questTeamCount.."/"..EMAApi.GetTeamListMaximumOrderOnline()..") "
+		end
+	end
+	frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetFont( textFont , textSize , "OUTLINE")
+	frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetFont( textFont , textSize , "OUTLINE")
+	--EMA:Print("test2343", type, information )
+	local matchData = string.find( information, "Bonus:" )
+	local matchDataScenario = string.find( information, "Scenario:" )
+	local matchDataScenarioBouns = string.find( information, "ScenarioBouns:" )
+	-- Scenario
+	if matchDataScenario then
+		local name = gsub(information, "[^|]+:", "")
+		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..name )
+		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount )
+			frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0, 1.0, 1.0, 1.0 )
+			frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0, 1.0, 1.0, 1.0 )
+		if InCombatLockdown() == false then
+			frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( false )
+			frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( false )
+		end
+	-- Scenario Bouns
+	elseif matchDataScenarioBouns then
+		local name = gsub(information, "[^|]+:", "")
+		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..name )
+		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount )
+			frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 0, 0.30, 1.0, 1.0, 1.0 )
+			frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 0, 0.30, 1.0, 1.0, 1.0 )
+		if InCombatLockdown() == false then
+			frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( false )
+			frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( false )
+		end
+	else
+		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..teamCount..information )
+		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount )
+		if type == "QUEST_HEADER" then
+			if matchData then
+				frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0, 0, 1.0, 1.0 )
+				frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0, 0, 1.0, 1.0 )
+			else
+				frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
+				frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
+			end
+
+		end
+		if InCombatLockdown() == false then
+			frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( true )
+			frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( true )
+		end
+	end
+
+	if type == "OBJECTIVE_HEADER" then
+		--EMA:Print("Match", information)
+		local matchData = string.find( information, "ProgressBar" )
+		if matchData then
+			--EMA:Print("Match", information)
+			frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.50, 0.50, 1.0 )
+			frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0.50, 0.50, 1.0 )
+			-- Turn on the mouse for these buttons.
+		else
+			frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1.0 )
+			frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1.0 )
+			-- Turn on the mouse for these buttons.
+		end
+	end
+	local questItemLink, questItemIcon = EMA:GetQuestItemFromQuestID(questID)
+	if questItemLink ~= nil and type == "QUEST_HEADER" then
+		EMA:UpdateQuestItemButton( iterateDisplayRows, questItemLink )
+
+	end
+	frame.questWatchList.rows[iterateDisplayRows].key = key
+end
+
+function EMA:QuestWatcherQuestListScrollRefresh()
+	local frame = EMAQuestWatcherFrame
+	FauxScrollFrame_Update(
+		frame.questWatchList.listScrollFrame,
+		EMA:GetQuestWatchMaximumOrder(),
+		frame.questWatchList.rowsToDisplay,
+		frame.questWatchList.rowHeight
+	)
+	frame.questWatchListOffset = FauxScrollFrame_GetOffset( frame.questWatchList.listScrollFrame )
+	frame.dataRowOffset = 0
+	local atLeastOneRowShowing = false
+	local afterTextEdit = false
+	for iterateDisplayRows = 1, frame.questWatchList.rowsToDisplay do
+		-- Reset.
+		frame.questWatchList.rows[iterateDisplayRows].key = ""
+		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
+		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		frame.questWatchList.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 1.0 )
+		-- Get data.
+		local dataRowNumber = iterateDisplayRows + frame.questWatchListOffset + frame.dataRowOffset
+		local foundDataRow = false
+		local finishedRows = false
+		while (foundDataRow == false) and (finishedRows == false) do
+			dataRowNumber = iterateDisplayRows + frame.questWatchListOffset + frame.dataRowOffset
+			if dataRowNumber > EMA:GetQuestWatchMaximumOrder() then
+				finishedRows = true
+			else
+				local information, amount, type, questID, childrenAreHidden, key, questTeamCount, objectiveIndex = EMA:GetQuestWatchInfoAtOrderPosition( dataRowNumber )
+
+				foundDataRow = true
+				if type == "QUEST_HEADER" then
+					-- In this case, children are hidden refers to itself as well.
+					if childrenAreHidden == true then
+						foundDataRow = false
+						frame.dataRowOffset = frame.dataRowOffset + 1
+					end
+				end
+				if type == "OBJECTIVE_HEADER" then
+					local hideMe = false
+					for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+						local questWatchInfo = questWatchInfoContainer.info
+						if questWatchInfo.questID == questID and questWatchInfo.type == "QUEST_HEADER" then
+							hideMe = questWatchInfo.childrenAreHidden
+							break
+						end
+					end
+					if hideMe == true then
+						foundDataRow = false
+						frame.dataRowOffset = frame.dataRowOffset + 1
+					end
+				end
+				-- If this is a character_amount type, find its parent objective header and see if its children are hidden.
+				if type == "CHARACTER_AMOUNT" then
+					local hideMe = false
+					for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
+						local questWatchInfo = questWatchInfoContainer.info
+						if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" and questWatchInfo.objectiveIndex ==  objectiveIndex then
+							hideMe = questWatchInfo.childrenAreHidden
+							break
+						end
+					end
+					if hideMe == true then
+						foundDataRow = false
+						frame.dataRowOffset = frame.dataRowOffset + 1
+					end
+				end
+			end
+
+			-- Put information and amount into columns.
+			local information, amount, type, questID, childrenAreHidden, key, questTeamCount, objectiveIndex = EMA:GetQuestWatchInfoAtOrderPosition( dataRowNumber )
+			EMA:QuestWatcherQuestListDrawLine( frame, iterateDisplayRows, type, information, amount, childrenAreHidden, key, questTeamCount, questID )
+			atLeastOneRowShowing = true
+		end
+	end
+	-- Adjust the scroll frame based on hidden rows.
+	if atLeastOneRowShowing == true then
+		FauxScrollFrame_Update(
+			frame.questWatchList.listScrollFrame,
+			EMA:GetQuestWatchMaximumOrder() - frame.dataRowOffset,
+			frame.questWatchList.rowsToDisplay,
+			frame.questWatchList.rowHeight
+		)
+	end
+	EMA:DisplayAutoQuestPopUps()
+end
+
+
+function EMA:QuestWatcherQuestListRowClick( rowNumber, columnNumber )
+   -- EMA:Print( "QuestWatcherQuestListRowClick", rowNumber, columnNumber )
+	local frame = EMAQuestWatcherFrame
+	local key = frame.questWatchList.rows[rowNumber].key
+	if key ~= nil and key ~= "" then
+		local information, amount, type, questID, childrenAreHidden, keyStored = EMA:GetQuestWatchInfoFromKey( key )
+        EMA:DebugMessage( "GetQuestWatchInfoFromKey", information, amount, type, questID, childrenAreHidden, keyStored, key )
+		if type == "QUEST_HEADER" then
+            if columnNumber == 1 then
+				QuestMapFrame_OpenToQuestDetails( questID )
+			end
+			if columnNumber == 2 then
+				local questItemLink, questItemIcon = EMA:GetQuestItemFromQuestID(questID)
+				if questItemLink ~= nil then
+					local itemName = GetItemInfo(questItemLink)
+					EMA:UpdateQuestItemButton( rowNumber, itemName )
+				end
+		   end
+		end
+		if type == "OBJECTIVE_HEADER" then
+			if columnNumber == 1 then
+				EMA:ToggleChildrenAreHiddenQuestWatchInfoByKey( key )
+				EMA:QuestWatcherQuestListScrollRefresh()
+			end
+		end
+	end
+end
+
+function EMA.QuestWatcherQuestListRowRightClick( rowNumber, columnNumber )
+	--EMA:Print("testRightClick", rowNumber, columnNumber )
+	local frame = EMAQuestWatcherFrame
+	local key = frame.questWatchList.rows[rowNumber].key
+	if key ~= nil and key ~= "" then
+		local information, amount, type, questID, childrenAreHidden, keyStored = EMA:GetQuestWatchInfoFromKey( key )
+		--EMA:Print("test", questID)
+		if type == "QUEST_HEADER" and columnNumber == 1 then
+			EMAQuestMapQuestOptionsDropDown.questID = questID
+			EMAQuestMapQuestOptionsDropDown.questText = information
+			ToggleDropDownMenu(1, nil, EMAQuestMapQuestOptionsDropDown, "cursor", 6, -6)
+		end
+	end
+end
+
+function EMA.QuestWatcherQuestListRowOnEnter( rowNumber, columnNumber )
+	--EMA:Print("MouseOver", rowNumber, columnNumber)
+	local frame = EMAQuestWatcherFrame
+	local key = frame.questWatchList.rows[rowNumber].key
+	local toolTipFrame = frame.questWatchList.rows[rowNumber].columns[columnNumber]
+	if key ~= nil and key ~= "" then
+		local information, amount, type, questID, childrenAreHidden, keyStored = EMA:GetQuestWatchInfoFromKey( key )
+		--EMA:Print("test", information, questID)
+		GameTooltip:ClearAllPoints()
+		GameTooltip:SetPoint("TOPRIGHT", toolTipFrame, "TOPLEFT", 0, 0)
+		GameTooltip:SetOwner( toolTipFrame, "ANCHOR_PRESERVE")
+		if type == "QUEST_HEADER" and columnNumber == 2 then
+			local questItemLink, questItemIcon = EMA:GetQuestItemFromQuestID(questID)
+			if questItemLink ~= nil then
+				GameTooltip:SetHyperlink(questItemLink)
+				GameTooltip:Show()
+			end
+		end
+			if columnNumber == 1 then
+				toolTipFrame:SetAlpha( 1.0 )
+				if ( HaveQuestData(questID) and GetQuestLogRewardXP(questID) == 0 and GetNumQuestLogRewardCurrencies(questID) == 0
+					and GetNumQuestLogRewards(questID) == 0 and GetQuestLogRewardMoney(questID) == 0 and GetQuestLogRewardArtifactXP(questID) == 0 ) then
+					GameTooltip:Hide()
+					return
+				end
+				GameTooltip:AddLine(L["REWARDS"], 1, 0.82, 0, 1)
+				GameTooltip:AddLine(L["REWARDS_TEXT"],1,1,1,1)
+				GameTooltip:AddLine(" ")
+				if ( not HaveQuestData(questID) ) then
+					GameTooltip:AddLine(RETRIEVING_DATA, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b);
+				else
+					-- Taken From Blizzard BonusObjectiveTracker_ShowRewardsTooltip
+					-- xp
+					local xp = GetQuestLogRewardXP(questID);
+					if ( xp > 0 ) then
+						GameTooltip:AddLine(string.format(BONUS_OBJECTIVE_EXPERIENCE_FORMAT, xp), 1, 1, 1);
+					end
+					local artifactXP = GetQuestLogRewardArtifactXP(questID);
+					if ( artifactXP > 0 ) then
+						GameTooltip:AddLine(string.format(BONUS_OBJECTIVE_ARTIFACT_XP_FORMAT, artifactXP), 1, 1, 1);
+					end
+					-- currency
+					QuestUtils_AddQuestCurrencyRewardsToTooltip(questID, GameTooltip);
+					-- honor
+					local honorAmount = GetQuestLogRewardHonor(questID);
+					if ( honorAmount > 0 ) then
+						GameTooltip:AddLine(BONUS_OBJECTIVE_REWARD_WITH_COUNT_FORMAT:format("Interface\\ICONS\\Achievement_LegionPVPTier4", honorAmount, HONOR), 1, 1, 1);
+					end
+					-- money
+					local money = GetQuestLogRewardMoney(questID);
+					if ( money > 0 ) then
+						SetTooltipMoney(GameTooltip, money, nil);
+					end
+					-- items
+					local numQuestRewards = GetNumQuestLogRewards(questID);
+					for i = 1, numQuestRewards do
+						local name, texture, numItems, quality, isUsable = GetQuestLogRewardInfo(i, questID);
+						local text;
+						if ( numItems > 1 ) then
+							text = string.format(BONUS_OBJECTIVE_REWARD_WITH_COUNT_FORMAT, texture, HIGHLIGHT_FONT_COLOR:WrapTextInColorCode(numItems), name);
+						elseif( texture and name ) then
+							text = string.format(BONUS_OBJECTIVE_REWARD_FORMAT, texture, name);
+						end
+					if( text ) then
+						local color = ITEM_QUALITY_COLORS[quality];
+						GameTooltip:AddLine(text, color.r, color.g, color.b);
+					end
+				end
+				GameTooltip:Show()
+			end
+		end
+	end
+end
+
+
+function  EMA.QuestWatcherQuestListRowOnLeave()
+	GameTooltip:Hide()
+end
+
+function EMAQuestMapQuestOptionsDropDown_Initialize(self)
+	CloseDropDownMenus()
+	local questID = EMAQuestMapQuestOptionsDropDown.questID
+	local questText = EMAQuestMapQuestOptionsDropDown.questText
+	if (questID ~= 0 ) then
+		local questLogIndex = GetQuestLogIndexByID(questID)
+
+		local infoTitle = UIDropDownMenu_CreateInfo()
+		infoTitle.text = questText
+		infoTitle.isTitle = 1
+		infoTitle.notCheckable = 1
+		UIDropDownMenu_AddButton(infoTitle)
+
+		local info = UIDropDownMenu_CreateInfo()
+		info.isNotRadio = true
+		info.notCheckable = true
+		info.text = OBJECTIVES_STOP_TRACKING
+
+		info.func = function(_, questID) EMA:QuestMapQuestOptions_ToggleTrackQuest(questID, questText) end
+		info.arg1 = self.questID
+		info.checked = false
+		UIDropDownMenu_AddButton(info)
+
+		if ( GetQuestLogPushable(questLogIndex) and IsInGroup() ) then
+			info.text = SHARE_QUEST
+			info.func = function(_, questID) EMA:QuestMapQuestOptions_ShareQuest(questID) end
+			info.arg1 = self.questID
+			UIDropDownMenu_AddButton(info)
+		end
+		info.text = ABANDON_QUEST
+		info.func = function(_, questID) EMA:QuestMapQuestOptions_AbandonQuest(questID, questText) end
+		info.arg1 = self.questID
+		info.disabled = nil
+
+		UIDropDownMenu_AddButton(info)
+
+	end
+end
+
+function EMA:QuestMapQuestOptions_ToggleTrackQuest(questID, questText)
+	--EMA:Print("test", questID, questText)
+	EMAApi.EMAApiUnTrackQuest( questID, questText )
+end
+
+function EMA:QuestMapQuestOptions_ShareQuest( questID )
+	local questLogIndex = GetQuestLogIndexByID(questID)
+	if questLogIndex then
+		QuestLogPushQuest(questLogIndex)
+	end
+end
+
+function EMA:QuestMapQuestOptions_AbandonQuest(questID, questText)
+	EMAApi.EMAApiAbandonQuest(questID, questText)
+end
+
+function EMA:UpdateQuestItemButton( rowNumber, itemName )
+	if InCombatLockdown() == false then
+		local frame = EMAQuestWatcherFrame
+		frame.questWatchList.rows[rowNumber].columns[2]:SetAttribute("type1", "item")
+		frame.questWatchList.rows[rowNumber].columns[2]:SetAttribute( "item", itemName )
+	end
+end
+
+------------------------------------------------------------------------------------------------------------
+-- QUEST WATCH AUTO QUEST DISPLAY - MOSTLY BORROWED FROM BLIZZARD CODE
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:HasAtLeastOneAutoQuestPopup()
+	if #EMA.currentAutoQuestPopups == 0 then
+		return false
+	end
+	return true
+end
+
+function EMA:EMAAddAutoQuestPopUp( questID, popUpType, characterName )
+	if EMA.currentAutoQuestPopups[questID] == nil then
+		EMA.currentAutoQuestPopups[questID] = {}
+	end
+	EMA.currentAutoQuestPopups[questID][characterName] = popUpType
+end
+
+function EMA:EMARemoveAutoQuestPopUp( questID, characterName )
+	if EMA.currentAutoQuestPopups[questID] == nil then
+		return
+	end
+	EMA.currentAutoQuestPopups[questID][characterName] = nil
+	if #EMA.currentAutoQuestPopups[questID] == 0 then
+		table.wipe( EMA.currentAutoQuestPopups[questID] )
+		EMA.currentAutoQuestPopups[questID] = nil
+	end
+end
+
+function EMA:EMARemoveAllAutoQuestPopUps( questID )
+	if EMA.currentAutoQuestPopups[questID] == nil then
+		return
+	end
+	table.wipe( EMA.currentAutoQuestPopups[questID] )
+	EMA.currentAutoQuestPopups[questID] = nil
+end
+
+function EMA:AutoQuestGetOrCreateFrame( parent, index )
+	if _G["EMAWatchFrameAutoQuestPopUp"..index] then
+		return _G["EMAWatchFrameAutoQuestPopUp"..index]
+	end
+	local frame = CreateFrame( "SCROLLFRAME", "EMAWatchFrameAutoQuestPopUp"..index, parent )
+	frame.index = index
+    frame:EnableMouse( true )
+    local QuestName = frame:CreateFontString( "EMAWatchFrameAutoQuestPopUpQuestName"..index, "OVERLAY", "GameFontNormal" )
+    QuestName:SetPoint( "TOP", frame, "TOP", 0, -12 )
+    QuestName:SetTextColor( 1.00, 1.00, 1.00 )
+    QuestName:SetText( "" )
+    frame.QuestName = QuestName
+    local TopText = frame:CreateFontString( "EMAWatchFrameAutoQuestPopUpTopText"..index, "OVERLAY", "GameFontNormal" )
+    TopText:SetPoint( "TOP", frame, "TOP", 0, -24 )
+    TopText:SetTextColor( 1.00, 1.00, 1.00 )
+    TopText:SetText( "" )
+    frame.TopText = TopText
+    local BottomText = frame:CreateFontString( "EMAWatchFrameAutoQuestPopUpBottomText"..index, "OVERLAY", "GameFontNormal" )
+    BottomText:SetPoint( "TOP", frame, "TOP", 0, -36 )
+    BottomText:SetTextColor( 1.00, 1.00, 1.00 )
+    BottomText:SetText( "BottomText" )
+    frame.BottomText = BottomText
+	EMA.countAutoQuestPopUpFrames = EMA.countAutoQuestPopUpFrames + 1
+	return frame
+end
+
+function EMA:DisplayAutoQuestPopUps()
+	local nextAnchor
+	local countPopUps = 0
+	local iterateQuestPopups = 01
+	EMAQuestWatcherFrame.autoQuestPopupsHeight = 0
+	local parentFrame = EMAQuestWatcherFrame.fieldNotifications
+	for questID, characterInfo in pairs( EMA.currentAutoQuestPopups ) do
+		local characterName, characterPopUpType, popUpType
+		local characterList = ""
+		for characterName, characterPopUpType in pairs( characterInfo ) do
+			--characterList = characterList..characterName.." "
+			characterList = characterList..( Ambiguate( characterName, "none" ) ).." "
+			-- TODO - hack, assuming all characters have the same sort of popup.
+			popUpType = characterPopUpType
+		end
+        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( GetQuestLogIndexByID( questID ) )
+		if isComplete and isComplete > 0 then
+			isComplete = true
+		else
+			isComplete = false
+		end
+		-- If the current character does not have the quest, show the character names that do have it.
+		local clickToViewText = QUEST_WATCH_POPUP_CLICK_TO_VIEW
+		if not (title and title ~= "") then
+            title = characterList
+			clickToViewText = ""
+		end
+		local frame = EMA:AutoQuestGetOrCreateFrame( parentFrame, countPopUps + 1 )
+		frame:Show()
+		frame:ClearAllPoints()
+		frame:SetParent( parentFrame )
+		if isComplete == true and popUpType == "COMPLETE" then
+			frame.TopText:SetText( QUEST_WATCH_POPUP_CLICK_TO_COMPLETE )
+			frame.BottomText:Hide()
+            frame:SetHeight( 32 )
+			frame.type = "COMPLETED"
+            frame:HookScript( "OnMouseUp", function()
+                ShowQuestComplete( GetQuestLogIndexByID( questID ) )
+                EMA:EMARemoveAllAutoQuestPopUps( questID )
+                EMA:DisplayAutoQuestPopUps()
+                EMA:SettingsUpdateBorderStyle()
+				EMA:SettingsUpdateFontStyle()
+            end )
+		elseif popUpType == "OFFER" then
+			frame.TopText:SetText( QUEST_WATCH_POPUP_QUEST_DISCOVERED )
+			frame.BottomText:Show()
+			frame.BottomText:SetText( clickToViewText )
+            frame:SetHeight( 48 )
+			frame.type = "OFFER"
+			frame:HookScript( "OnMouseUp", function()
+				EMA:EMARemoveAllAutoQuestPopUps( questID )
+				EMA:DisplayAutoQuestPopUps()
+				EMA:SettingsUpdateBorderStyle()
+				EMA:SettingsUpdateFontStyle()
+			end )
+		end
+		frame:ClearAllPoints()
+		if nextAnchor ~= nil then
+			if iterateQuestPopups == 1 then
+				frame:SetPoint( "TOP", nextAnchor, "BOTTOM", 0, 0 ) -- -WATCHFRAME_TYPE_OFFSET
+			else
+				frame:SetPoint( "TOP", nextAnchor, "BOTTOM", 0, 0 )
+			end
+		else
+			frame:SetPoint( "TOP", parentFrame, "TOP", 0, 5 ) -- -WATCHFRAME_INITIAL_OFFSET
+		end
+		frame:SetPoint( "LEFT", parentFrame, "LEFT", -20, 0 )
+		frame.QuestName:SetText( title )
+		frame.questId = questID
+		--frame:UpdateScrollChildRect()
+		--frame:SetVerticalScroll( floor( -9 + 0.5 ) )
+		nextAnchor = frame
+		countPopUps = countPopUps + 1
+		EMAQuestWatcherFrame.autoQuestPopupsHeight = EMAQuestWatcherFrame.autoQuestPopupsHeight + frame:GetHeight()
+	end
+	for iterateQuestPopups = countPopUps + 1, EMA.countAutoQuestPopUpFrames do
+		_G["EMAWatchFrameAutoQuestPopUp"..iterateQuestPopups].questId = nil
+		_G["EMAWatchFrameAutoQuestPopUp"..iterateQuestPopups]:Hide()
+	end
+	EMA:UpdateQuestWatcherDimensions()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- QUEST WATCH HELPERS
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:GetQuestLogIndexByName( questName )
+	for iterateQuests = 1, GetNumQuestLogEntries() do
+        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateQuests )
+		if not isHeader then
+			if title == questName then
+				return iterateQuests
+			end
+		end
+	end
+	return 0
+end
+
+function EMA:GetQuestLogIndexByID( inQuestID )
+	for iterateQuests = 1, GetNumQuestLogEntries() do
+        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateQuests )
+		if not isHeader then
+			if questID == inQuestID then
+				return iterateQuests
+			end
+		end
+	end
+	return 0
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- COMMAND MANAGEMENT
+-------------------------------------------------------------------------------------------------------------
+
+-- A EMA command has been recieved.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+
+	if commandName == EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE then
+		EMA:DoQuestWatchObjectiveUpdate( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_UPDATE_QUEST_WATCHER_LIST then
+		EMA:DoQuestWatchListUpdate( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_QUEST_WATCH_REMOVE_QUEST then
+		EMA:DoRemoveQuestFromWatchList( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_AUTO_QUEST_COMPLETE then
+		EMA:DoAutoQuestFieldComplete( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_REMOVE_AUTO_QUEST_COMPLETE then
+		EMA:DoRemoveAutoQuestFieldComplete( characterName, ... )
+	end
+	if commandName == EMA.COMMAND_AUTO_QUEST_OFFER then
+		EMA:DoAutoQuestFieldOffer( characterName, ... )
+
+	end
+end
diff --git a/EMA/Modules/Sell.lua b/EMA/Modules/Sell.lua
new file mode 100644
index 0000000..be5c78a
--- /dev/null
+++ b/EMA/Modules/Sell.lua
@@ -0,0 +1,965 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Sell",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local AceGUI = LibStub:GetLibrary( "AceGUI-3.0" )
+--local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
+local ItemUpgradeInfo = LibStub:GetLibrary( "LibItemUpgradeInfo-1.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Sell"
+EMA.settingsDatabaseName = "SellProfileDB"
+EMA.chatCommand = "ema-sell"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["VENDER"]
+EMA.moduleDisplayName = L["VENDER"]
+EMA.moduleDisplayVenderName = L["VENDER_LIST_MODULE"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\SellIcon.tga"
+-- order
+EMA.moduleOrder = 80
+EMA.moduleListOrder	 = 1
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		sellItemOnAllWithAltKey = false,
+		-- Other Items
+		autoSellOtherItems = false,
+		autoSellOtherItemsList = {},
+		messageArea = EMAApi.DefaultMessageArea(),
+		autoSellItem = false,
+		-- Gray
+		autoSellPoor = false,
+		autoSellBoEPoor	=  false,
+		-- Green
+		autoSellUncommon = false,
+		autoSellIlvlUncommon = 0,
+		autoSellBoEUncommon	= false,
+		-- Rare
+		autoSellRare = false,
+		autoSellIlvlRare = 0,
+		autoSellBoERare	=  false,
+		-- Epic
+		autoSellEpic = false,
+		autoSellIlvlEpic = 0,
+		autoSellBoEEpic	=  false,
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-sell push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_SELL_ITEM = "SellItem"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Sell Management.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.BAG_PLAYER_BACKPACK = 0
+-- NUM_BAG_SLOTS is defined as 4 in Blizzard's FrameXML\BankFrame.lua.
+EMA.BAG_PLAYER_MAXIMUM = NUM_BAG_SLOTS
+-- Store ItemQuality https://wow.gamepedia.com/API_TYPE_Quality
+EMA.ITEM_QUALITY_POOR = 0
+EMA.ITEM_QUALITY_COMMON = 1
+EMA.ITEM_QUALITY_UNCOMMON = 2
+EMA.ITEM_QUALITY_RARE = 3
+EMA.ITEM_QUALITY_EPIC = 4
+EMA.ITEM_QUALITY_LEGENDARY = 5
+EMA.ITEM_QUALITY_ARTIFACT = 6
+EMA.ITEM_QUALITY_HEIRLOOM = 7
+EMA.MIN_ITEM_LEVEL = 10
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	-- Sell on all with alt key.
+	EMA.settingsControl.checkBoxSellItemOnAllWithAltKey:SetValue( EMA.db.sellItemOnAllWithAltKey )
+	-- Auto sell Quality and Ilvl items.
+	EMA.settingsControl.checkBoxAutoSellItems:SetValue( EMA.db.autoSellItem )
+	-- Poor
+	EMA.settingsControl.checkBoxAutoSellPoor:SetValue ( EMA.db.autoSellPoor )
+	EMA.settingsControl.checkBoxAutoSellBoEPoor:SetValue ( EMA.db.autoSellBoEPoor )
+	EMA.settingsControl.checkBoxAutoSellPoor:SetDisabled ( not EMA.db.autoSellItem )
+	EMA.settingsControl.checkBoxAutoSellBoEPoor:SetDisabled ( not EMA.db.autoSellPoor )
+	-- Uncommon
+	EMA.settingsControl.checkBoxAutoSellUncommon:SetValue (EMA.db.autoSellUncommon )
+	EMA.settingsControl.editBoxAutoSellIlvlUncommon:SetText (EMA.db.autoSellIlvlUncommon )
+	EMA.settingsControl.checkBoxAutoSellBoEUncommon:SetValue (EMA.db.autoSellBoEUncommon )
+	EMA.settingsControl.checkBoxAutoSellUncommon:SetDisabled ( not EMA.db.autoSellItem )
+	EMA.settingsControl.editBoxAutoSellIlvlUncommon:SetDisabled ( not EMA.db.autoSellUncommon )
+	EMA.settingsControl.checkBoxAutoSellBoEUncommon:SetDisabled ( not EMA.db.autoSellUncommon )
+	-- Rare
+	EMA.settingsControl.checkBoxAutoSellRare:SetValue (EMA.db.autoSellRare )
+	EMA.settingsControl.editBoxAutoSellIlvlRare:SetText (EMA.db.autoSellIlvlRare )
+	EMA.settingsControl.checkBoxAutoSellBoERare:SetValue (EMA.db.autoSellBoERare )
+	EMA.settingsControl.checkBoxAutoSellRare:SetDisabled ( not EMA.db.autoSellItem )
+	EMA.settingsControl.editBoxAutoSellIlvlRare:SetDisabled ( not EMA.db.autoSellRare )
+	EMA.settingsControl.checkBoxAutoSellBoERare:SetDisabled ( not EMA.db.autoSellRare )
+	-- Epic
+	EMA.settingsControl.checkBoxAutoSellEpic:SetValue ( EMA.db.autoSellEpic )
+	EMA.settingsControl.editBoxAutoSellIlvlEpic:SetText ( EMA.db.autoSellIlvlEpic)
+	EMA.settingsControl.checkBoxAutoSellBoEEpic:SetValue ( EMA.db.autoSellBoEEpic )
+	EMA.settingsControl.checkBoxAutoSellEpic:SetDisabled ( not EMA.db.autoSellItem )
+	EMA.settingsControl.editBoxAutoSellIlvlEpic:SetDisabled ( not EMA.db.autoSellEpic )
+	EMA.settingsControl.checkBoxAutoSellBoEEpic:SetDisabled ( not EMA.db.autoSellEpic )
+	-- Messages.
+	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
+	-- Others.
+	EMA.settingsControlOthers.checkBoxAutoSellOtherItems:SetValue( EMA.db.autoSellOtherItems )
+	EMA.settingsControlOthers.othersEditBoxOtherTag:SetText( EMA.autoSellOtherItemTag )
+	EMA.settingsControlOthers.othersEditBoxOtherItem:SetDisabled( not EMA.db.autoSellOtherItems )
+	EMA.settingsControlOthers.othersEditBoxOtherTag:SetDisabled( not EMA.db.autoSellOtherItems )
+	EMA.settingsControlOthers.othersButtonRemove:SetDisabled( not EMA.db.autoSellOtherItems )
+	EMA.settingsControlOthers.othersButtonAdd:SetDisabled( not EMA.db.autoSellOtherItems )
+	EMA:SettingsOthersScrollRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.sellItemOnAllWithAltKey = settings.sellItemOnAllWithAltKey
+		EMA.db.autoSellItem = settings.autoSellItem
+		EMA.db.autoSellPoor = settings.autoSellPoor
+		EMA.db.autoSellBoEPoor = settings.autoSellBoEPoor
+		EMA.db.autoSellUncommon = settings.autoSellUncommon
+		EMA.db.autoSellIlvlUncommon = settings.autoSellIlvlUncommon
+		EMA.db.autoSellBoEUncommon = settings.autoSellBoEUncommon
+		EMA.db.autoSellRare = settings.autoSellRare
+		EMA.db.autoSellIlvlRare = settings.autoSellIlvlRare
+		EMA.db.autoSellBoERare = settings.autoSellBoERare
+		EMA.db.autoSellEpic = settings.autoSellEpic
+		EMA.db.autoSellIlvlEpic = settings.autoSellIlvlEpic
+		EMA.db.autoSellBoEEpic = settings.autoSellBoEEpic
+		EMA.db.autoSellOtherItems = settings.autoSellOtherItems
+		EMA.db.messageArea = settings.messageArea
+		EMA.db.autoSellOtherItemsList = EMAUtilities:CopyTable( settings.autoSellOtherItemsList )
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateMain( top )
+	-- Position and size constants.
+	local buttonControlWidth = 105
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local indent = horizontalSpacing * 12
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local thirdWidth = (headingWidth - (horizontalSpacing * 5)) / 5
+	local left2 = left + thirdWidth
+	local left3 = left + halfWidth
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SELL_ALL"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxSellItemOnAllWithAltKey = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ALT_SELL_ALL"],
+		EMA.SettingsToggleSellItemOnAllWithAltKey,
+		L["ALT_SELL_ALL_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SELL_ITEMS"], movingTop, false )
+
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxAutoSellItems = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["AUTO_SELL_ITEMS"],
+		EMA.SettingsToggleAutoSellItems,
+		L["AUTO_SELL_ITEMS_HELP"]
+	)
+-- Gray
+	movingTop = movingTop - checkBoxHeight - 3
+	EMA.settingsControl.checkBoxAutoSellPoor = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["SELL_GRAY"],
+		EMA.SettingsToggleAutoSellPoor,
+		L["SELL_GRAY_HELP"]
+	)
+	EMA.settingsControl.checkBoxAutoSellBoEPoor = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left3,
+		movingTop,
+		L["ONLY_SB"],
+		EMA.SettingsToggleAutoSellBoEPoor,
+		L["ONLY_SB_HELP"]
+	)
+-- Green
+	movingTop = movingTop - checkBoxHeight - 3
+	EMA.settingsControl.checkBoxAutoSellUncommon = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["SELL_GREEN"],
+		EMA.SettingsToggleAutoSellUncommon,
+		L["SELL_GREEN_HELP"]
+	)
+	EMA.settingsControl.checkBoxAutoSellBoEUncommon = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left3,
+		movingTop,
+		L["ONLY_SB"],
+		EMA.SettingsToggleAutoSellBoEUncommon,
+		L["ONLY_SB_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.editBoxAutoSellIlvlUncommon = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["iLVL"],
+		L["iLVL_HELP"]
+	)
+	EMA.settingsControl.editBoxAutoSellIlvlUncommon:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedIlvlUncommon )
+-- Rare
+	movingTop = movingTop - editBoxHeight - 3
+	EMA.settingsControl.checkBoxAutoSellRare = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["SELL_RARE"],
+		EMA.SettingsToggleAutoSellRare,
+		L["SELL_RARE_HELP"]
+	)
+	EMA.settingsControl.checkBoxAutoSellBoERare = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left3,
+		movingTop,
+		L["ONLY_SB"],
+		EMA.SettingsToggleAutoSellBoERare,
+		L["ONLY_SB_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.editBoxAutoSellIlvlRare = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["iLVL"],
+		L["iLVL_HELP"]
+	)
+	EMA.settingsControl.editBoxAutoSellIlvlRare:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedIlvlRare )
+-- Epic
+	movingTop = movingTop - editBoxHeight - 3
+	EMA.settingsControl.checkBoxAutoSellEpic = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left,
+		movingTop,
+		L["SELL_EPIC"],
+		EMA.SettingsToggleAutoSellEpic,
+		L["SELL_EPIC_HELP"]
+	)
+	EMA.settingsControl.checkBoxAutoSellBoEEpic = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		halfWidth,
+		left3,
+		movingTop,
+		L["ONLY_SB"],
+		EMA.SettingsToggleAutoSellBoEEpic,
+		L["ONLY_SB_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.editBoxAutoSellIlvlEpic = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControl,
+		thirdWidth,
+		left,
+		movingTop,
+		L["iLVL"],
+		L["iLVL_HELP"]
+	)
+	EMA.settingsControl.editBoxAutoSellIlvlEpic:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedIlvlEpic )
+	movingTop = movingTop - editBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SELL"]..L[" "]..L["MESSAGES_HEADER"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	return movingTop
+end
+
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+end
+
+local function SettingsCreateOthers( top )
+	-- Position and size constants.
+	local buttonControlWidth = 85
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local othersWidth = headingWidth
+	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
+	local movingTop = top
+	EMAHelperSettings:CreateHeading( EMA.settingsControlOthers, L["SELL_LIST"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControlOthers.checkBoxAutoSellOtherItems = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlOthers,
+		headingWidth,
+		left,
+		movingTop,
+		L["AUTO_SELL_ITEMS"],
+		EMA.SettingsToggleAutoSellOtherItems
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlOthers.othersHighlightRow = 1
+	EMA.settingsControlOthers.othersOffset = 1
+	local list = {}
+	list.listFrameName = "EMASellSettingsOthersFrame"
+	list.parentFrame = EMA.settingsControlOthers.widgetSettings.content
+	list.listTop = movingTop
+	list.listLeft = left
+	list.listWidth = othersWidth
+	list.rowHeight = 20
+	list.rowsToDisplay = 15
+	list.columnsToDisplay = 2
+	list.columnInformation = {}
+	list.columnInformation[1] = {}
+	list.columnInformation[1].width = 70
+	list.columnInformation[1].alignment = "LEFT"
+	list.columnInformation[2] = {}
+	list.columnInformation[2].width = 30
+	list.columnInformation[2].alignment = "LEFT"
+	list.scrollRefreshCallback = EMA.SettingsOthersScrollRefresh
+	list.rowClickCallback = EMA.SettingsOthersRowClick
+	EMA.settingsControlOthers.others = list
+	EMAHelperSettings:CreateScrollList( EMA.settingsControlOthers.others )
+	movingTop = movingTop - list.listHeight - verticalSpacing
+	EMA.settingsControlOthers.othersButtonRemove = EMAHelperSettings:CreateButton(
+		EMA.settingsControlOthers,
+		buttonControlWidth,
+		left,
+		movingTop,
+		L["REMOVE"],
+		EMA.SettingsOthersRemoveClick
+	)
+	movingTop = movingTop -	buttonHeight - verticalSpacing
+	EMAHelperSettings:CreateHeading( EMA.settingsControlOthers, L["ADD_TO_LIST"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControlOthers.othersEditBoxOtherItem = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControlOthers,
+		headingWidth,
+		left,
+		movingTop,
+		L["SELL_LIST_DROP_ITEM"]
+	)
+	EMA.settingsControlOthers.othersEditBoxOtherItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedOtherItem )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlOthers.othersEditBoxOtherTag = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControlOthers,
+		dropBoxWidth,
+		left,
+		movingTop,
+		L["GROUP_LIST"]
+	)
+	EMA.settingsControlOthers.othersEditBoxOtherTag:SetList( EMAApi.GroupList() )
+	EMA.settingsControlOthers.othersEditBoxOtherTag:SetCallback( "OnValueChanged",  EMA.SellOtherGroupDropDownList )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlOthers.othersButtonAdd = EMAHelperSettings:CreateButton(
+		EMA.settingsControlOthers,
+		buttonControlWidth,
+		left,
+		movingTop,
+		L["ADD"],
+		EMA.SettingsOthersAddClick
+	)
+	movingTop = movingTop -	buttonHeight
+	return movingTop
+end
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+
+	EMA.settingsControlOthers = {}
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControlOthers,
+		EMA.moduleDisplayVenderName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleListOrder
+	)
+	local bottomOfSell = SettingsCreateMain( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfSell )
+	local bottomOfOthers = SettingsCreateOthers( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControlOthers.widgetSettings.content:SetHeight( -bottomOfOthers )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Callbacks.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:SettingsOthersScrollRefresh()
+	FauxScrollFrame_Update(
+		EMA.settingsControlOthers.others.listScrollFrame,
+		EMA:GetOthersMaxPosition(),
+		EMA.settingsControlOthers.others.rowsToDisplay,
+		EMA.settingsControlOthers.others.rowHeight
+	)
+	EMA.settingsControlOthers.othersOffset = FauxScrollFrame_GetOffset( EMA.settingsControlOthers.others.listScrollFrame )
+	for iterateDisplayRows = 1, EMA.settingsControlOthers.others.rowsToDisplay do
+		-- Reset.
+		EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
+		EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControlOthers.others.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
+		-- Get data.
+		local dataRowNumber = iterateDisplayRows + EMA.settingsControlOthers.othersOffset
+		if dataRowNumber <= EMA:GetOthersMaxPosition() then
+			-- Put data information into columns.
+			local othersInformation = EMA:GetOtherAtPosition( dataRowNumber )
+			EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[1].textString:SetText( othersInformation.name )
+			EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[2].textString:SetText( othersInformation.tag )
+			-- Highlight the selected row.
+			if dataRowNumber == EMA.settingsControlOthers.othersHighlightRow then
+				EMA.settingsControlOthers.others.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
+			end
+		end
+	end
+end
+
+function EMA:SettingsOthersRowClick( rowNumber, columnNumber )
+	if EMA.settingsControlOthers.othersOffset + rowNumber <= EMA:GetOthersMaxPosition() then
+		EMA.settingsControlOthers.othersHighlightRow = EMA.settingsControlOthers.othersOffset + rowNumber
+		EMA:SettingsOthersScrollRefresh()
+	end
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsToggleSellItemOnAllWithAltKey( event, checked )
+	EMA.db.sellItemOnAllWithAltKey = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoSellItems( event, checked )
+	EMA.db.autoSellItem = checked
+	EMA:SettingsRefresh()
+end
+
+--  Poor
+function EMA:SettingsToggleAutoSellPoor( event, checked )
+	EMA.db.autoSellPoor = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoSellBoEPoor( event, checked )
+	EMA.db.autoSellBoEPoor = checked
+	EMA:SettingsRefresh()
+end
+
+-- Uncommon
+function EMA:SettingsToggleAutoSellUncommon( event, checked )
+	EMA.db.autoSellUncommon = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsEditBoxChangedIlvlUncommon( event, text )
+	EMA.db.autoSellIlvlUncommon = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoSellBoEUncommon( event, checked )
+	EMA.db.autoSellBoEUncommon = checked
+	EMA:SettingsRefresh()
+end
+
+-- Rare
+function EMA:SettingsToggleAutoSellRare( event, checked )
+	EMA.db.autoSellRare = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsEditBoxChangedIlvlRare( event, text )
+	EMA.db.autoSellIlvlRare = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoSellBoERare( event, checked )
+	EMA.db.autoSellBoERare = checked
+	EMA:SettingsRefresh()
+end
+
+-- Epic
+function EMA:SettingsToggleAutoSellEpic( event, checked )
+	EMA.db.autoSellEpic = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsEditBoxChangedIlvlEpic( event, text )
+	EMA.db.autoSellIlvlEpic = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoSellBoEEpic( event, checked )
+	EMA.db.autoSellBoEEpic = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:OnGroupAreasChanged( message )
+	EMA.settingsControlOthers.othersEditBoxOtherTag:SetList( EMAApi.GroupList() )
+end
+
+function EMA:SettingsSetMessageArea( event, value )
+	EMA.db.messageArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoSellOtherItems( event, checked )
+	EMA.db.autoSellOtherItems = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsOthersRemoveClick( event )
+	StaticPopup_Show( "EMASELL_CONFIRM_REMOVE_AUTO_SELL_OTHER_ITEMS" )
+end
+
+function EMA:SettingsEditBoxChangedOtherItem( event, text )
+	EMA.autoSellOtherItemLink = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SellOtherGroupDropDownList (event, value )
+	-- if nil or the blank group then don't get Name.
+	if value == " " or value == nil then
+		return
+	end
+	for index, groupName in ipairs( EMAApi.GroupList() ) do
+		if index == value then
+			EMA.autoSellOtherItemTag = groupName
+			break
+		end
+	end
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsEditBoxChangedUnusableSoulboundTag( event, text )
+	if not text or text:trim() == "" or text:find( "%W" ) ~= nil then
+		EMA:Print( L["ITEM_TAG_ERR"] )
+		return
+	end
+	EMA.db.autoSellUnusableSoulboundTag = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsOthersAddClick( event )
+	if EMA.autoSellOtherItemLink ~= nil and EMA.autoSellOtherItemTag ~= nil then
+		EMA:AddOther( EMA.autoSellOtherItemLink, EMA.autoSellOtherItemTag )
+		EMA.autoSellOtherItemLink = nil
+		EMA.settingsControlOthers.othersEditBoxOtherItem:SetText( "" )
+		EMA:SettingsRefresh()
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Popup Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialize Popup Dialogs.
+local function InitializePopupDialogs()
+	StaticPopupDialogs["EMASELL_CONFIRM_REMOVE_AUTO_SELL_OTHER_ITEMS"] = {
+        text = L["POPUP_REMOVE_ITEM"],
+		button1 = YES,
+        button2 = NO,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function()
+			EMA:RemoveOther()
+		end,
+    }
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	EMA.autoSellOtherItemLink = nil
+	EMA.autoSellOtherItemTag = EMAApi.AllTag()
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	EMA:RegisterEvent( "MERCHANT_SHOW" )
+	-- Hook the item click event.
+	EMA:RawHook( "ContainerFrameItemButton_OnModifiedClick", true )
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMASell functionality.
+-------------------------------------------------------------------------------------------------------------
+
+-- The ContainerFrameItemButton_OnModifiedClick hook.
+function EMA:ContainerFrameItemButton_OnModifiedClick( self, event, ... )
+	if EMA.db.sellItemOnAllWithAltKey == true and IsAltKeyDown() and MerchantFrame:IsVisible() then
+		local bag, slot = self:GetParent():GetID(), self:GetID()
+		local texture, count, locked, quality, readable, lootable, link = GetContainerItemInfo( bag, slot )
+		EMA:EMASendCommandToTeam( EMA.COMMAND_SELL_ITEM, link )
+	end
+	return EMA.hooks["ContainerFrameItemButton_OnModifiedClick"]( self, event, ... )
+end
+
+function EMA:DoSellItem( itemlink )
+	-- Iterate each bag the player has.
+	for bag = EMA.BAG_PLAYER_BACKPACK, EMA.BAG_PLAYER_MAXIMUM do
+		-- Iterate each slot in the bag.
+		numSlots = GetContainerNumSlots( bag )
+		for slot = 1, numSlots do
+			-- Get the item link for the item in this slot.
+		--	local bagItemLink = GetContainerItemLink( bag, slot )
+			local _, _, locked, _, _, _, bagItemLink, _, hasNoValue = GetContainerItemInfo(bag, slot)
+			-- If there is an item...
+			if bagItemLink ~= nil then
+				local name = GetItemInfo( bagItemLink )
+				-- Does it match the item to sell?
+				if EMAUtilities:DoItemLinksContainTheSameItem( bagItemLink, itemlink ) then
+					-- Yes, sell this item.
+					if 	hasNoValue == false then
+						if MerchantFrame:IsVisible() == true then
+							UseContainerItem( bag, slot )
+							-- Tell the boss.
+							EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_SOLD_X"]( bagItemLink ), false )
+						end
+					end
+				end
+			end
+		end
+	end
+end
+
+function EMA:GetOthersMaxPosition()
+	return #EMA.db.autoSellOtherItemsList
+end
+
+function EMA:GetOtherAtPosition( position )
+	return EMA.db.autoSellOtherItemsList[position]
+end
+
+function EMA:AddOther( itemLink, itemTag )
+	-- Get some more information about the item.
+	local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo( itemLink )
+	-- If the item could be found.
+	if name ~= nil then
+		local itemInformation = {}
+		itemInformation.link = itemLink
+		itemInformation.name = name
+		itemInformation.tag = itemTag
+		table.insert( EMA.db.autoSellOtherItemsList, itemInformation )
+		EMA:SettingsRefresh()
+		EMA:SettingsOthersRowClick( 1, 1 )
+	end
+end
+
+function EMA:RemoveOther()
+	table.remove( EMA.db.autoSellOtherItemsList, EMA.settingsControlOthers.othersHighlightRow )
+	EMA:SettingsRefresh()
+	EMA:SettingsOthersRowClick( 1, 1 )
+end
+
+function EMA:MERCHANT_SHOW()
+	-- Sell Items
+	if EMA.db.autoSellItem == true then
+		EMA:DoMerchantSellItems()
+	end
+	-- Sell Other Items
+	if EMA.db.autoSellOtherItems == true then
+		EMA:ScheduleTimer( "DoMerchantSellOtherItems", 2 )
+	end
+end
+
+function EMA:DoMerchantSellItems()
+	local count = 0
+	local gold = 0
+	-- Iterate each bag the player has.
+	for bag = EMA.BAG_PLAYER_BACKPACK, EMA.BAG_PLAYER_MAXIMUM do
+		-- Iterate each slot in the bag.
+		numSlots = GetContainerNumSlots( bag )
+		for slot = 1, numSlots do
+		local _, itemCount, locked, _, _, _, link, _, hasNoValue = GetContainerItemInfo(bag, slot)
+
+		--for bag,slot,link in LibBagUtils:Iterate("BAGS") do
+			if bag ~= nil then
+				if link ~= nil then
+				local canSell = false
+				local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, iconFileDataID, itemSellPrice = GetItemInfo( link )
+				local _, itemCount = GetContainerItemInfo( bag, slot )
+				--EMA:Print("Test", itemLink, itemRarity )
+					if EMA.db.autoSellPoor == true then
+						if itemRarity == EMA.ITEM_QUALITY_POOR then
+							canSell = true
+							if EMA.db.autoSellBoEPoor == true then
+								local isBop = EMAUtilities:ToolTipBagScaner(link, bag, slot)
+								if isBop ~= ITEM_SOULBOUND then
+								 --EMA:Print("BoE", link )
+								 canSell = false
+								end
+							end
+						end
+					end
+					-- Green
+					if EMA.db.autoSellUncommon == true then
+						if itemRarity == EMA.ITEM_QUALITY_UNCOMMON then
+							if itemType == WEAPON or itemType == ARMOR or itemSubType == EJ_LOOT_SLOT_FILTER_ARTIFACT_RELIC then
+								--EMA:Print("testGreen", link, itemRarity, "a", EMA.ITEM_QUALITY_UNCOMMON )
+								local num = tonumber( EMA.db.autoSellIlvlUncommon )
+								local iLvl = ItemUpgradeInfo:GetUpgradedItemLevel(link)
+								--EMA:Print("test", num , "vs", iLvl, "item", link )
+								if num ~= nil and iLvl ~= nil and ( itemLevel > EMA.MIN_ITEM_LEVEL ) then
+									--if iLvl >= num then
+									if num >= iLvl then
+										--EMA:Print("ture", link )
+										canSell = true
+									end
+								end
+								if EMA.db.autoSellBoEUncommon == true then
+									local isBop = EMAUtilities:ToolTipBagScaner( link,bag,slot )
+									--EMA:Print("IsBoP", isBop)
+									if isBop ~= ITEM_SOULBOUND then
+										canSell = false
+									end
+								end
+							end
+						end
+					end
+						--Blue
+						if EMA.db.autoSellRare == true then
+							if itemRarity == EMA.ITEM_QUALITY_RARE then
+								if itemType == WEAPON or itemType == ARMOR or itemSubType == EJ_LOOT_SLOT_FILTER_ARTIFACT_RELIC then
+									local num = tonumber( EMA.db.autoSellIlvlRare )
+									local iLvl = ItemUpgradeInfo:GetUpgradedItemLevel(link)
+									--EMA:Print("test", iLvl, "vs", num )
+									if num ~= nil and iLvl ~= nil and (itemLevel > EMA.MIN_ITEM_LEVEL ) then
+										if num >= iLvl then
+											canSell = true
+										end
+									end
+									if EMA.db.autoSellBoERare == true then
+										local isBop = EMAUtilities:ToolTipBagScaner( link,bag,slot )
+										--EMA:Print("IsBoP", isBop)
+										if isBop ~= ITEM_SOULBOUND then
+											canSell = false
+										end
+									end
+								end
+							end
+						end
+						-- Epic
+						if EMA.db.autoSellEpic == true then
+							if itemRarity == EMA.ITEM_QUALITY_EPIC then
+								if itemType == WEAPON or itemType == ARMOR or itemSubType == EJ_LOOT_SLOT_FILTER_ARTIFACT_RELIC then
+									local num = tonumber( EMA.db.autoSellIlvlEpic )
+									local iLvl = ItemUpgradeInfo:GetUpgradedItemLevel(link)
+									--EMA:Print("test", iLvl, "vs", num )
+									if num ~= nil and iLvl ~= nil and (itemLevel > EMA.MIN_ITEM_LEVEL ) then
+										if num >= iLvl then
+											canSell = true
+										end
+									end
+									if EMA.db.autoSellBoEEpic == true then
+										local isBop = EMAUtilities:ToolTipBagScaner( link,bag,slot )
+										--EMA:Print("IsBoP", isBop)
+										if isBop ~= ITEM_SOULBOUND then
+											canSell = false
+										end
+									end
+								end
+							end
+						end
+						if canSell == true then
+							if itemSellPrice ~= nil and itemSellPrice > 0 then
+								if MerchantFrame:IsVisible() == true then
+									if itemCount > 1 then
+										count = count + itemCount
+										gold = gold + itemSellPrice * itemCount
+									else
+										count = count + 1
+										gold = gold + itemSellPrice
+									end
+									UseContainerItem( bag, slot )
+								end
+							end
+						end
+					end
+				end
+			end
+		end
+	if count > 0 then
+		local formattedGoldAmount = GetCoinTextureString(gold)
+		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_SOLD_ITEMS_PLUS_GOLD"]( count )..formattedGoldAmount, false )
+	end
+end
+
+-- Sell Other Items!
+function EMA:DoMerchantSellOtherItems()
+	-- Iterate all the wanted items...
+	for position, itemInformation in pairs( EMA.db.autoSellOtherItemsList ) do
+		-- Does this character have the item tag?  No, don't sell.
+		if EMAApi.IsCharacterInGroup( EMA.characterName, itemInformation.tag ) == true then
+			-- Attempt to sell any items in the players bags.
+			-- Iterate each bag the player has.
+			for bag = EMA.BAG_PLAYER_BACKPACK, EMA.BAG_PLAYER_MAXIMUM do
+				-- Iterate each slot in the bag.
+				for slot = 1, GetContainerNumSlots( bag ) do
+					-- Get the item link for the item in this slot.
+					local bagItemLink = GetContainerItemLink( bag, slot )
+					local _, _, locked, _, _, _, bagItemLink, _, hasNoValue = GetContainerItemInfo(bag, slot)
+					-- If there is an item...
+					if bagItemLink ~= nil then
+						-- Does it match the item to sell?
+						if EMAUtilities:DoItemLinksContainTheSameItem( bagItemLink, itemInformation.link ) then
+							-- Yes, sell this item.
+							if hasNoValue == false then
+								if MerchantFrame:IsVisible() == true then
+									UseContainerItem( bag, slot )
+								end
+							else
+								if 	locked == false then
+									PickupContainerItem(bag,slot)
+									DeleteCursorItem()
+									EMA:EMASendMessageToTeam( EMA.db.messageArea, L["DELETE_ITEM"]( bagItemLink ), false )
+								end
+							end
+						end
+					end
+				end
+			end
+		end
+	end
+end
+
+-- A EMA command has been recieved.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if commandName == EMA.COMMAND_SELL_ITEM then
+		EMA:DoSellItem( ... )
+	end
+end
\ No newline at end of file
diff --git a/EMA/Modules/Sync.lua b/EMA/Modules/Sync.lua
new file mode 100644
index 0000000..8774466
--- /dev/null
+++ b/EMA/Modules/Sync.lua
@@ -0,0 +1,372 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Sync",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Get the EMA Utilities Library.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Sync"
+EMA.settingsDatabaseName = "SyncProfileDB"
+EMA.chatCommand = "ema-Sync"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["SYNC"]
+EMA.moduleDisplayName = L["SYNC"]
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		mountWithTeam = false,
+		dismountWithTeam = false,
+		dismountWithMaster = false,
+		mountInRange = false,
+
+		--messageArea = EMAApi.DefaultMessageArea(),
+		warningArea = EMAApi.DefaultWarningArea()
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["Push Settings"],
+				desc = L["Push the Mount settings to all characters in the team."],
+				usage = "/EMA-mount push",
+				get = false,
+				set = "EMASendSettings",
+				order = 4,
+				guiHidden = true,
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_MOUNT_ME = "EMAMountMe"
+EMA.COMMAND_MOUNT_DISMOUNT = "EMAMountDisMount"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Create the settings control.
+	EMA:SettingsCreate()
+	-- Initialse the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- BlizzUI Frames
+	EMA:CreateEMAInterFaceSyncFrame()
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+--	EMA:RegisterEvent("PLAYER_REGEN_ENABLED")
+
+	EMA:HookScript( InterfaceOptionsFrame, "OnShow", "InterfaceOptionsFrameOnShow" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+	-- AceHook-3.0 will tidy up the hooks for us.
+end
+
+function EMA:SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick
+	)
+	local bottomOfInfo = EMA:SettingsCreateMount( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsCreateMount( top )
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local movingTop = top
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PH"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxMountWithTeam = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["PH"],
+		EMA.SettingsToggleMountWithTeam,
+		L["PH"]
+	)
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxDismountWithTeam = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["PH"],
+		EMA.SettingsToggleDisMountWithTeam,
+		L["PH"]
+	)
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxDismountWithMaster = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["PH"],
+		EMA.SettingsToggleDisMountWithMaster,
+		L["PH"]
+	)
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxMountInRange = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["PH"],
+		EMA.SettingsToggleMountInRange,
+		L["PH"]
+	)
+-- DO WE NEED THIS?
+--	movingTop = movingTop - checkBoxHeight
+--	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+--		EMA.settingsControl,
+--		headingWidth,
+--		left,
+--		movingTop,
+--		L["Message Area"]
+--	)
+--	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+--	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["Send Warning Area"]
+	)
+	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	return movingTop
+end
+
+function EMA:OnMessageAreasChanged( message )
+	--EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+end
+
+function EMA:SettingsSetWarningArea( event, value )
+	EMA.db.warningArea = value
+	EMA:SettingsRefresh()
+end
+
+--function EMA:SettingsSetMessageArea( event, value )
+--	EMA.db.messageArea = value
+--	EMA:SettingsRefresh()
+--end
+
+function EMA:SettingsToggleMountWithTeam( event, checked )
+	EMA.db.mountWithTeam = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDisMountWithTeam( event, checked )
+	EMA.db.dismountWithTeam = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDisMountWithMaster( event, checked )
+	EMA.db.dismountWithMaster = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleMountInRange( event, checked )
+	EMA.db.mountInRange = checked
+	EMA:SettingsRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.mountWithTeam = settings.mountWithTeam
+		EMA.db.dismountWithTeam = settings.dismountWithTeam
+		EMA.db.dismountWithMaster = settings.dismountWithMaster
+		EMA.db.mountInRange = settings.mountInRange
+		EMA.db.messageArea = settings.messageArea
+		EMA.db.warningArea = settings.warningArea
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["Settings received from A."]( characterName ) )
+	end
+end
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	EMA.settingsControl.checkBoxMountWithTeam:SetValue( EMA.db.mountWithTeam )
+	EMA.settingsControl.checkBoxDismountWithTeam:SetValue( EMA.db.dismountWithTeam )
+	EMA.settingsControl.checkBoxDismountWithMaster:SetValue( EMA.db.dismountWithMaster )
+	EMA.settingsControl.checkBoxMountInRange:SetValue( EMA.db.mountInRange )
+	--EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
+	EMA.settingsControl.dropdownWarningArea:SetValue( EMA.db.warningArea )
+	-- Set state.
+	--EMA.settingsControl.checkBoxMountWithTeam:SetDisabled( not EMA.db.mountWithTeam )
+	EMA.settingsControl.checkBoxDismountWithTeam:SetDisabled( not EMA.db.mountWithTeam )
+	EMA.settingsControl.checkBoxDismountWithMaster:SetDisabled( not EMA.db.dismountWithTeam or not EMA.db.mountWithTeam )
+	EMA.settingsControl.checkBoxMountInRange:SetDisabled( not EMA.db.mountWithTeam )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMASync functionality.
+-------------------------------------------------------------------------------------------------------------
+
+--Frames Buttons
+
+function EMA:ShowTooltip(frame, show, text)
+	if show then
+		GameTooltip:SetOwner(frame, "ANCHOR_TOP")
+		GameTooltip:SetPoint("TOPLEFT", frame, "TOPRIGHT", 16, 0)
+		GameTooltip:ClearLines()
+		GameTooltip:AddLine( text , 1, 0.82, 0, 1)
+		GameTooltip:Show()
+	else
+	GameTooltip:Hide()
+	end
+end
+
+
+function EMA:CreateEMAInterFaceSyncFrame()
+	EMAInterFaceSyncFrame = CreateFrame( "Frame", "InterFaceSyncFrame", InterfaceOptionsFrame )
+    local frame = EMAInterFaceSyncFrame
+	frame:SetWidth( 110 )
+	frame:SetHeight( 30 )
+	frame:SetFrameStrata( "HIGH" )
+	frame:SetToplevel( true )
+	frame:SetClampedToScreen( true )
+	frame:EnableMouse( true )
+	frame:SetMovable( true )
+	frame:ClearAllPoints()
+	frame:SetPoint("TOPRIGHT", InterfaceOptionsFrame, "TOPRIGHT", -5, -8 )
+	--[[
+		frame:SetBackdrop( {
+		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+		edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
+		tile = true, tileSize = 15, edgeSize = 15,
+		insets = { left = 5, right = 5, top = 5, bottom = 5 }
+	} )
+	]]
+	table.insert( UISpecialFrames, "EMAInterFaceSyncFrame" )
+	local syncButton = CreateFrame( "Button", "syncButton", frame, "UIPanelButtonTemplate" )
+	syncButton:SetScript( "OnClick", function()  EMA:DoSyncInterfaceSettings() end )
+	syncButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 10 , -5)
+	syncButton:SetHeight( 20 )
+	syncButton:SetWidth( 90 )
+	syncButton:SetText( L["SYNC"] )
+	syncButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(syncButton, true, L["SYNC"] ) end)
+	syncButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
+	syncButtonFrameButton = syncButton
+
+end
+
+function EMA:InterfaceOptionsFrameOnShow()
+	--EMA:Print("test")
+	-- This sorts out hooking on L or marcioMenu button
+	--if EMA.db.showEMAQuestLogWithWoWQuestLog == true then
+		if InterfaceOptionsFrame:IsVisible() then
+			EMA:ToggleShowSyncInterfaceFrame( true )
+		else
+			EMA:ToggleShowSyncInterfaceFrame( false )
+		end
+	--end
+end
+
+
+function EMA:ToggleShowSyncInterfaceFrame( show )
+    if show == true then
+		EMAInterFaceSyncFrame:Show()
+    else
+		EMAInterFaceSyncFrame:Hide()
+    end
+end
+
+function EMA:DoSyncInterfaceSettings()
+    EMA:Print("[PH] Button Does Nothing" )
+end
+
+
+-- COMMS
+
+-- A EMA command has been received.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if characterName ~= self.characterName then
+		--[[
+		if commandName == EMA.COMMAND_MOUNT_ME then
+			--EMA:Print("command")
+			EMA:TeamMount( characterName, ... )
+		end
+		]]
+	end
+end
diff --git a/EMA/Modules/Talk.lua b/EMA/Modules/Talk.lua
new file mode 100644
index 0000000..ef38d44
--- /dev/null
+++ b/EMA/Modules/Talk.lua
@@ -0,0 +1,841 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Talk",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0"
+)
+
+-- Load libraries.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Talk"
+EMA.settingsDatabaseName = "TalkProfileDB"
+EMA.chatCommand = "ema-talk"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["TOON"]
+EMA.moduleDisplayName = L["TALK"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\ChatIcon.tga"
+-- order
+EMA.moduleOrder = 99
+
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		forwardWhispers = true,
+		doNotForwardRealIdWhispers = true,
+--		forwardViaWhisper = false,
+		fakeWhisper = true,
+		fakeInjectSenderToReplyQueue = true,
+		fakeInjectOriginatorToReplyQueue = false,
+--		fakeWhisperCompact = false,
+		whisperMessageArea = "ChatFrame1",
+--		enableChatSnippets = false,
+--		chatSnippets = {},
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_ALL_SETTINGS"],
+				desc = L["PUSH_SETTINGS_INFO"],
+				usage = "/EMA-talk push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_MESSAGE = "EMATalkMessage"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Talk Management.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:UpdateChatFrameList()
+	EMAUtilities:ClearTable( EMA.chatFrameList )
+	for index = 1, NUM_CHAT_WINDOWS do
+		local name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable = GetChatWindowInfo( index )
+		if (shown == 1) or (docked ~= nil) then
+			EMA.chatFrameList["ChatFrame"..index] = name
+		end
+	end
+	table.sort( EMA.chatFrameList )
+end
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	-- Set values.
+	EMA.settingsControl.checkBoxForwardWhispers:SetValue( EMA.db.forwardWhispers )
+	EMA.settingsControl.checkBoxDoNotForwardRealIdWhispers:SetValue( EMA.db.doNotForwardRealIdWhispers )
+--	EMA.settingsControl.checkBoxForwardViaWhisper:SetValue( EMA.db.forwardViaWhisper )
+	EMA.settingsControl.checkBoxFakeWhispers:SetValue( EMA.db.fakeWhisper )
+	EMA.settingsControl.checkBoxFakeInjectSenderToReplyQueue:SetValue( EMA.db.fakeInjectSenderToReplyQueue )
+	EMA.settingsControl.checkBoxFakeInjectOriginatorToReplyQueue:SetValue( EMA.db.fakeInjectOriginatorToReplyQueue )
+--	EMA.settingsControl.checkBoxFakeWhisperCompact:SetValue( EMA.db.fakeWhisperCompact )
+--	EMA.settingsControl.checkBoxEnableChatSnippets:SetValue( EMA.db.enableChatSnippets )
+	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.whisperMessageArea )
+	-- Set state.
+	EMA.settingsControl.checkBoxFakeInjectSenderToReplyQueue:SetDisabled( not EMA.db.fakeWhisper )
+	EMA.settingsControl.checkBoxFakeInjectOriginatorToReplyQueue:SetDisabled( not EMA.db.fakeWhisper )
+--	EMA.settingsControl.checkBoxFakeWhisperCompact:SetDisabled( not EMA.db.fakeWhisper )
+	EMA.settingsControl.dropdownMessageArea:SetDisabled( not EMA.db.fakeWhisper )
+	EMA.settingsControl.buttonRefreshChatList:SetDisabled( not EMA.db.fakeWhisper )
+--	EMA.settingsControl.buttonRemove:SetDisabled( not EMA.db.enableChatSnippets )
+--	EMA.settingsControl.buttonAdd:SetDisabled( not EMA.db.enableChatSnippets )
+--	EMA.settingsControl.multiEditBoxSnippet:SetDisabled( not EMA.db.enableChatSnippets )
+--	EMA:SettingsScrollRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.forwardWhispers = settings.forwardWhispers
+		EMA.db.doNotForwardRealIdWhispers = settings.doNotForwardRealIdWhispers
+		EMA.db.fakeWhisper = settings.fakeWhisper
+--		EMA.db.enableChatSnippets = settings.enableChatSnippets
+		EMA.db.whisperMessageArea = settings.whisperMessageArea
+--		EMA.db.forwardViaWhisper = settings.forwardViaWhisper
+--		EMA.db.fakeWhisperCompact = settings.fakeWhisperCompact
+		EMA.db.fakeInjectSenderToReplyQueue = settings.fakeInjectSenderToReplyQueue
+		EMA.db.fakeInjectOriginatorToReplyQueue = settings.fakeInjectOriginatorToReplyQueue
+		EMA.db.chatSnippets = EMAUtilities:CopyTable( settings.chatSnippets )
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+		end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateOptions( top )
+	-- Position and size constants.
+	local buttonControlWidth = 105
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local left2 = left + halfWidth + horizontalSpacing
+	local indent = horizontalSpacing * 10
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, "", movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["TALK_OPTIONS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxForwardWhispers = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["FORWARD_WHISPERS_MASTER_RELAY"],
+		EMA.SettingsToggleForwardWhispers,
+		L["FORWARD_WHISPERS_MASTER_RELAY_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxDoNotForwardRealIdWhispers = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["DO_NOT_BATTENET_WHISPERS"],
+		EMA.SettingsToggleDoNotForwardRealIdWhispers,
+		L["DO_NOT_BATTENET_WHISPERS_HELP"]
+	)
+--[[
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxForwardViaWhisper = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["FORWARD_USING_NORMAL_WHISPERS"],
+		EMA.SettingsToggleForwardViaWhisper,
+		L["FORWARD_USING_NORMAL_WHISPERS_HRLP"]
+	)
+]]
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxFakeWhispers = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["FORWARD_FAKE_WHISPERS"],
+		EMA.SettingsToggleFakeWhispers,
+		L["FORWARD_FAKE_WHISPERS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+		EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		(headingWidth - indent) / 2,
+		left + indent,
+		movingTop,
+		L["FAKE_WHISPERS_CHANNEL"]
+	)
+	EMA.settingsControl.dropdownMessageArea:SetList( EMA.chatFrameList )
+	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+	EMA.settingsControl.buttonRefreshChatList = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left + indent + (headingWidth - indent) / 2 + horizontalSpacing,
+		movingTop - buttonHeight + 4,
+		L["UPDATE"],
+		EMA.SettingsRefreshChatListClick
+	)
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	EMA.settingsControl.checkBoxFakeInjectSenderToReplyQueue = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth - indent,
+		left + indent,
+		movingTop,
+		L["FORWARDER_REPLY_QUEUE"],
+		EMA.SettingsToggleFakeInjectSenderToReplyQueue,
+		L["FORWARDER_REPLY_QUEUE_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxFakeInjectOriginatorToReplyQueue = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth - indent,
+		left + indent,
+		movingTop,
+		L["ORIGINATOR_REPLY_QUEUE"],
+		EMA.SettingsToggleFakeInjectOriginatorToReplyQueue,
+		L["ORIGINATOR_REPLY_QUEUE_HELP"]
+		)
+--[[
+		movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxFakeWhisperCompact = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth - indent,
+		left + indent,
+		movingTop,
+		L["MESSAGES_WITH_LINKS"],
+		EMA.SettingsToggleFakeWhisperCompact,
+		L["MESSAGES_WITH_LINKS_HELP"]
+	)
+]]
+--[[
+	movingTop = movingTop - checkBoxHeight
+
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CHAT_SNIPPETS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxEnableChatSnippets = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ENABLE_CHAT_SNIPPETS"],
+		EMA.SettingsToggleChatSnippets,
+		L["ENABLE_CHAT_SNIPPETS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.highlightRow = 1
+	EMA.settingsControl.offset = 1
+	local list = {}
+	list.listFrameName = "EMATalkChatSnippetsSettingsFrame"
+	list.parentFrame = EMA.settingsControl.widgetSettings.content
+	list.listTop = movingTop
+	list.listLeft = left
+	list.listWidth = headingWidth
+	list.rowHeight = 20
+	list.rowsToDisplay = 5
+	list.columnsToDisplay = 2
+	list.columnInformation = {}
+	list.columnInformation[1] = {}
+	list.columnInformation[1].width = 25
+	list.columnInformation[1].alignment = "LEFT"
+	list.columnInformation[2] = {}
+	list.columnInformation[2].width = 75
+	list.columnInformation[2].alignment = "LEFT"
+	list.scrollRefreshCallback = EMA.SettingsScrollRefresh
+	list.rowClickCallback = EMA.SettingsRowClick
+	EMA.settingsControl.list = list
+	EMAHelperSettings:CreateScrollList( EMA.settingsControl.list )
+	movingTop = movingTop - list.listHeight - verticalSpacing
+	EMA.settingsControl.buttonAdd = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left,
+		movingTop,
+		L["ADD"],
+		EMA.SettingsAddClick
+	)
+	EMA.settingsControl.buttonRemove = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left + buttonControlWidth + horizontalSpacing,
+		movingTop,
+		L["REMOVE"],
+		EMA.SettingsRemoveClick
+	)
+	movingTop = movingTop -	buttonHeight - verticalSpacing
+	EMA.settingsControl.multiEditBoxSnippet = EMAHelperSettings:CreateMultiEditBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["SNIPPET_TEXT"],
+		5
+	)
+	EMA.settingsControl.multiEditBoxSnippet:SetCallback( "OnEnterPressed", EMA.SettingsMultiEditBoxChangedSnippet )
+	local multiEditBoxHeightSnippet = 110
+
+	movingTop = movingTop - multiEditBoxHeightSnippet
+]]
+	return movingTop
+end
+
+local function SettingsCreate()
+	EMA.settingsControl = {}
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfSettings = SettingsCreateOptions( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfSettings )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Callbacks.
+-------------------------------------------------------------------------------------------------------------
+
+--[[
+function EMA:SettingsScrollRefresh()
+	FauxScrollFrame_Update(
+		EMA.settingsControl.list.listScrollFrame,
+		EMA:GetItemsMaxPosition(),
+		EMA.settingsControl.list.rowsToDisplay,
+		EMA.settingsControl.list.rowHeight
+	)
+	EMA.settingsControl.offset = FauxScrollFrame_GetOffset( EMA.settingsControl.list.listScrollFrame )
+	for iterateDisplayRows = 1, EMA.settingsControl.list.rowsToDisplay do
+		-- Reset.
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
+		EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
+		-- Get data.
+		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.offset
+		if dataRowNumber <= EMA:GetItemsMaxPosition() then
+			-- Put data information into columns.
+			local itemInformation = EMA:GetItemAtPosition( dataRowNumber )
+			EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetText( itemInformation.name )
+			EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( itemInformation.snippet )
+			-- Highlight the selected row.
+			if dataRowNumber == EMA.settingsControl.highlightRow then
+				EMA.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
+			end
+		end
+	end
+end
+
+function EMA:SettingsRowClick( rowNumber, columnNumber )
+	if EMA.settingsControl.offset + rowNumber <= EMA:GetItemsMaxPosition() then
+		EMA.settingsControl.highlightRow = EMA.settingsControl.offset + rowNumber
+		local itemInformation = EMA:GetItemAtPosition( EMA.settingsControl.highlightRow )
+		if itemInformation ~= nil then
+			EMA.settingsControl.multiEditBoxSnippet:SetText( itemInformation.snippet )
+		end
+		EMA:SettingsScrollRefresh()
+	end
+end
+]]
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsSetMessageArea( event, value )
+	EMA.db.whisperMessageArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleForwardWhispers( event, checked )
+	EMA.db.forwardWhispers = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleDoNotForwardRealIdWhispers( event, checked )
+	EMA.db.doNotForwardRealIdWhispers = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleFakeWhispers( event, checked )
+	EMA.db.fakeWhisper = checked
+	EMA:SettingsRefresh()
+end
+
+--[[
+function EMA:SettingsToggleForwardViaWhisper( event, checked )
+	EMA.db.forwardViaWhisper = checked
+	EMA:SettingsRefresh()
+end
+]]
+
+function EMA:SettingsToggleFakeInjectSenderToReplyQueue( event, checked )
+	EMA.db.fakeInjectSenderToReplyQueue = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleFakeInjectOriginatorToReplyQueue( event, checked )
+	EMA.db.fakeInjectOriginatorToReplyQueue = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefreshChatListClick( event )
+	EMA:UPDATE_CHAT_WINDOWS()
+end
+
+--[[
+function EMA:SettingsToggleFakeWhisperCompact( event, checked )
+	EMA.db.fakeWhisperCompact = checked
+	EMA:SettingsRefresh()
+end
+]]
+
+--[[
+function EMA:SettingsToggleChatSnippets( event, checked )
+	EMA.db.enableChatSnippets = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsMultiEditBoxChangedSnippet( event, text )
+	local itemInformation = EMA:GetItemAtPosition( EMA.settingsControl.highlightRow )
+	if itemInformation ~= nil then
+		itemInformation.snippet = text
+	end
+	EMA:SettingsRefresh()
+end
+]]
+
+
+--[[
+function EMA:SettingsAddClick( event )
+	StaticPopup_Show( "EMATALK_ASK_SNIPPET" )
+end
+
+function EMA:SettingsRemoveClick( event )
+	StaticPopup_Show( "EMATALK_CONFIRM_REMOVE_CHAT_SNIPPET" )
+end
+]]
+-------------------------------------------------------------------------------------------------------------
+-- Popup Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialize Popup Dialogs.
+local function InitializePopupDialogs()
+	--[[
+	StaticPopupDialogs["EMATALK_ASK_SNIPPET"] = {
+        text = L["CHAT_SNIPPET_POPUP"],
+        button1 = ACCEPT,
+        button2 = CANCEL,
+        hasEditBox = 1,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+		OnShow = function( self )
+			self.editBox:SetText("")
+            self.button1:Disable()
+            self.editBox:SetFocus()
+        end,
+		OnAccept = function( self )
+			EMA:AddItem( self.editBox:GetText() )
+		end,
+		EditBoxOnTextChanged = function( self )
+            if not self:GetText() or self:GetText():trim() == "" or self:GetText():find( "%W" ) ~= nil then
+				self:GetParent().button1:Disable()
+            else
+                self:GetParent().button1:Enable()
+            end
+        end,
+		EditBoxOnEnterPressed = function( self )
+            if self:GetParent().button1:IsEnabled() then
+				EMA:AddItem( self:GetText() )
+            end
+            self:GetParent():Hide()
+        end,
+    }
+	StaticPopupDialogs["EMATALK_CONFIRM_REMOVE_CHAT_SNIPPET"] = {
+        text = L["REMOVE_CHAT_SNIPPET"],
+        button1 = YES,
+        button2 = NO,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function( self )
+			EMA:RemoveItem()
+		end,
+    }
+	]]
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	EMA.chatFrameList = {}
+	EMA:UpdateChatFrameList()
+	-- Remember the last sender to whisper this character.
+	EMA.lastSender = nil
+	EMA.lastSenderIsReal = false
+	EMA.lastSenderRealID = nil
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Hook the SendChatMessage to translate any chat snippets.
+	--EMA:RawHook( "SendChatMessage", true )
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+--	EMA:SettingsRowClick( 1, 1 )
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	EMA:RegisterEvent( "CHAT_MSG_WHISPER" )
+	EMA:RegisterEvent( "CHAT_MSG_BN_WHISPER" )
+	EMA:RegisterEvent( "UPDATE_CHAT_WINDOWS" )
+	EMA:RegisterEvent( "UPDATE_FLOATING_CHAT_WINDOWS", "UPDATE_CHAT_WINDOWS" )
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- EMATalk functionality.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:UPDATE_CHAT_WINDOWS()
+	EMA:UpdateChatFrameList()
+	EMA.settingsControl.dropdownMessageArea:SetList( EMA.chatFrameList )
+	if EMA.chatFrameList[EMA.db.whisperMessageArea] == nil then
+		EMA.db.whisperMessageArea = "ChatFrame1"
+	end
+	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.whisperMessageArea )
+end
+
+function EMA:GetItemsMaxPosition()
+	return #EMA.db.chatSnippets
+end
+
+function EMA:GetItemAtPosition( position )
+	return EMA.db.chatSnippets[position]
+end
+
+function EMA:AddItem( name )
+	local itemInformation = {}
+	itemInformation.name = name
+	itemInformation.snippet = ""
+	table.insert( EMA.db.chatSnippets, itemInformation )
+	EMA:SettingsRefresh()
+	EMA:SettingsRowClick( 1, 1 )
+end
+
+function EMA:RemoveItem()
+	table.remove( EMA.db.chatSnippets, EMA.settingsControl.highlightRow )
+	EMA:SettingsRefresh()
+	EMA:SettingsRowClick( 1, 1 )
+end
+
+--[[
+-- The SendChatMessage hook.
+function EMA:SendChatMessage( ... )
+	local message, chatType, language, target = ...
+	EMA:Print("test")
+	if chatType == "WHISPER" then
+		-- Does this character have chat snippets enabled?
+		if EMA.db.enableChatSnippets == true then
+			local snippetName = select( 3, message:find( "^!(%w+)$" ) )
+			-- If a snippet name was found...
+			if snippetName then
+				-- Then look up the associated text.
+				local messageToSend = EMA:GetTextForSnippet( snippetName )
+				EMA:Print("test")
+				--EMAPrivate.Communications.SendChatMessage( messageToSend, "WHISPER", target, EMAPrivate.Communications )
+
+				-- Finish with the chat message, i.e. do not let the original handler run.
+				return true
+			end
+		end
+	end
+
+	-- Call the orginal function.
+	return EMA.hooks["SendChatMessage"]( ... )
+end
+]]
+
+function EMA:CHAT_MSG_WHISPER( chatType, message, sender, language, channelName, target, flag, ... )
+	-- Does this character forward whispers?
+	--EMA:Print("Test", message, sender)
+	if EMA.db.forwardWhispers == true then
+		-- Set a GM flag if this whisper was from a GM.
+		local isGM = false
+		if flag == L["GM"] then
+			isGM = true
+		end
+		-- Was the sender the master?
+		if EMAApi.IsCharacterTheMaster( sender ) == true then
+			-- Yes, relay the masters message to others.
+			EMA:ForwardWhisperFromMaster( message )
+		else
+			-- Not the master, forward the whisper to the master.
+			EMA:ForwardWhisperToMaster( message, sender, isGM, false, nil )
+		end
+	end
+end
+
+function EMA:CHAT_MSG_BN_WHISPER( event, message, sender, a, b, c, d, e, f, g, h, i, j, realFriendID, ... )
+	-- Does this character forward whispers?
+	if EMA.db.forwardWhispers == true and EMA.db.doNotForwardRealIdWhispers == false then
+		-- Is this character NOT the master?
+		if EMAApi.IsCharacterTheMaster( self.characterName ) == false then
+			-- Yes, not the master, relay the message to the master.
+			EMA:ForwardWhisperToMaster( message, sender, false, true, realFriendID )
+		end
+	end
+end
+
+local function ColourCodeLinks( message )
+	local realMessage = message
+	for link in message:gmatch( "|H.*|h" ) do
+		local realLink = ""
+		local startFind, endFind = message:find( "|Hitem", 1, true )
+		-- Is it an item link?
+		if startFind ~= nil then
+			-- Yes, is an item link.
+			local itemQuality = select( 3, GetItemInfo( link ) )
+			-- If the item is not in our cache, we cannot get the correct item quality / colour and the link will not work.
+			if itemQuality ~= nil then
+				realLink = select( 4, GetItemQualityColor( itemQuality ) )..link..FONT_COLOR_CODE_CLOSE
+			else
+				realLink = NORMAL_FONT_COLOR_CODE..link..FONT_COLOR_CODE_CLOSE
+			end
+		else
+			-- Not an item link.
+			-- GetFixedLink is in Blizzard's FrameXML/ItemRef.lua
+			-- It fixes, quest, achievement, talent, trade, enchant and instancelock links.
+			realLink = GetFixedLink( link )
+		end
+		realMessage = realMessage:replace( link, realLink )
+	end
+	return realMessage
+end
+
+local function DoesMessageHaveLink( message )
+	local startFind, endFind = message:find( "|H", 1, true )
+	return startFind ~= nil
+end
+
+local function BuildWhisperCharacterString( originalSender, viaCharacter )
+	local info = ChatTypeInfo["WHISPER"]
+	local colorString = format( "|cff%02x%02x%02x", info.r * 255, info.g * 255, info.b * 255 )
+	return format( "%s|Hplayer:%2$s|h[%2$s]|h%4$s|Hplayer:%3$s|h[%3$s]|h%5$s|r", colorString, originalSender, viaCharacter, L["TALK_VIA"], L[")"] )
+end
+
+function EMA:ForwardWhisperToMaster( message, sender, isGM, isReal, realFriendID )
+	-- Don't relay messages to the master or self (causes infinite loop, which causes disconnect).
+	if (EMAApi.IsCharacterTheMaster( EMA.characterName )) or (EMA.characterName == sender) then
+		return
+	end
+	-- Don't relay messages from the master either (not that this situation should happen).
+	if EMAApi.IsCharacterTheMaster( sender ) == true then
+		return
+	end
+	-- Build from whisper string, this cannot be a link as player links are not sent by whispers.
+	local fromCharacterWhisper = sender
+	if isReal == true then
+		-- Get the toon name of the character the RealID person is playing, Blizzard will not reveal player real names, so cannot send those.
+		fromCharacterWhisper = select( 5, BNGetFriendInfoByID( realFriendID ) )..L["BATTLE_NET"]
+		--local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText = BNGetFriendInfoByID( realFriendID )
+	end
+	if isGM == true then
+		fromCharacterWhisper = fromCharacterWhisper..L["<GM>"]
+	end
+	-- Whisper the master.
+	if EMA.db.fakeWhisper == true then
+		local completeMessage = L["WHISPERS"]..message
+	--[[
+		-- Send in compact format?
+		if EMA.db.fakeWhisperCompact == true then
+			-- Does the message contain a link?
+			if DoesMessageHaveLink( message ) == false then
+				-- No, don't display the message.
+				local info = ChatTypeInfo["WHISPER"]
+				local colorString = format( "|cff%02x%02x%02x", info.r * 255, info.g * 255, info.b * 255 )
+				completeMessage = L[" "]..colorString..L["WHISPERED_YOU"].."|r"
+			end
+		end
+	]]
+		if isGM == true then
+			completeMessage = L[" "]..L["<GM>"]..L[" "]..completeMessage
+		end
+		local inject1 = nil
+		if EMA.db.fakeInjectSenderToReplyQueue == true then
+			inject1 = EMA.characterName
+		end
+		local inject2 = nil
+		if EMA.db.fakeInjectOriginatorToReplyQueue == true then
+			inject2 = sender
+		end
+		EMA:EMASendCommandToMaster( EMA.COMMAND_MESSAGE, EMA.db.whisperMessageArea, sender, EMA.characterName, completeMessage, inject1, inject2 )
+	end
+	--[[
+	if EMA.db.forwardViaWhisper == true then
+		-- RealID messages do not wrap links in colour codes (text is always all blue), so wrap link in colour code
+		-- so normal whisper forwarding with link works.
+		if (isReal == true) and (DoesMessageHaveLink( message ) == true) then
+			message = ColourCodeLinks( message )
+		end
+		EMAPrivate.Communications.SendCommandMaster( fromCharacterWhisper..": "..message, "WHISPER", EMAApi.GetMasterName(), EMAPrivate.Communications.COMMUNICATION_PRIORITY_BULK )
+	end
+	]]
+	-- Remember this sender as the most recent sender.
+	EMA.lastSender = sender
+	EMA.lastSenderIsReal = isReal
+	EMA.lastSenderRealID = realFriendID
+end
+
+function EMA:ForwardWhisperFromMaster( messageFromMaster )
+	-- Who to send to and what to send?
+	-- Check the message to see if there is a character to whisper to; character name is preceeded by @.
+	-- No match will return nil for the parameters.
+	local sendTo, messageToInspect = select( 3, messageFromMaster:find( "^@(%w+)%s*(.*)$" ) )
+	-- If no sender found in message...
+	if not sendTo then
+		-- Then send to last sender.
+		sendTo = EMA.lastSender
+		-- Send the full message.
+		messageToInspect = messageFromMaster
+	end
+	-- Check to see if there is a snippet name in the message (text with a leading !).
+	local messageToSend = messageToInspect
+--[[
+	if EMA.db.enableChatSnippets == true then
+		local snippetName = select( 3, messageToInspect:find( "^!(%w+)$" ) )
+		-- If a snippet name was found...
+		if snippetName then
+			-- Then look up the associated text.
+			messageToSend = EMA:GetTextForSnippet( snippetName )
+		end
+	end
+]]
+	-- If there is a valid character to send to...
+	if sendTo then
+		if messageToSend:trim() ~= "" then
+			-- Send the message.
+			if EMA.lastSenderIsReal == true and EMA.lastSenderRealID ~= nil then
+				BNSendWhisper( EMA.lastSenderRealID, messageToSend )
+			else
+				--EMA:Print("chatSend", messageToSend, sendTo )
+				SendChatMessage( messageToSend, "WHISPER", nil, sendTo )
+			end
+		end
+		-- Remember this sender as the most recent sender.
+		EMA.lastSender = sendTo
+	end
+end
+
+function EMA:GetTextForSnippet( snippetName )
+	local snippet = ""
+	for position, itemInformation in pairs( EMA.db.chatSnippets ) do
+		if itemInformation.name == snippetName then
+			snippet = itemInformation.snippet
+			break
+		end
+	end
+	return snippet
+end
+
+function EMA:ProcessReceivedMessage( sender, whisperMessageArea, orginator, forwarder, message, inject1, inject2 )
+	local chatTimestamp = ""
+	local info = ChatTypeInfo["WHISPER"]
+	local colorString = format( "|cff%02x%02x%02x", info.r * 255, info.g * 255, info.b * 255 )
+	if (CHAT_TIMESTAMP_FORMAT) then
+		chatTimestamp = colorString..BetterDate( CHAT_TIMESTAMP_FORMAT, time() ).."|r"
+	end
+	local fixedMessage = message
+	for embeddedColourString in message:gmatch( "|c.*|r" ) do
+		fixedMessage = fixedMessage:replace( embeddedColourString, "|r"..embeddedColourString..colorString )
+	end
+	fixedMessage = colorString..fixedMessage.."|r"
+	if string.sub( whisperMessageArea, 1, 9 ) ~= "ChatFrame" then
+		whisperMessageArea = "ChatFrame1"
+	end
+	_G[whisperMessageArea]:AddMessage( chatTimestamp..BuildWhisperCharacterString( orginator, forwarder )..fixedMessage )
+	if inject1 ~= nil then
+		ChatEdit_SetLastTellTarget( inject1, "WHISPER" )
+	end
+	if inject2 ~= nil then
+		ChatEdit_SetLastTellTarget( inject2, "WHISPER" )
+	end
+end
+
+-- A EMA command has been recieved.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if commandName == EMA.COMMAND_MESSAGE then
+		EMA:ProcessReceivedMessage( characterName, ... )
+	end
+end
\ No newline at end of file
diff --git a/EMA/Modules/Toon.lua b/EMA/Modules/Toon.lua
new file mode 100644
index 0000000..c4e2782
--- /dev/null
+++ b/EMA/Modules/Toon.lua
@@ -0,0 +1,1540 @@
+-- ================================================================================ --
+--				EMA EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )    --
+--				Current Author: Jennifer Cally (Ebony)								--
+--				Copyright 2015 - 2018 Jennifer Cally "Ebony"						--
+--																					--
+--				License: The MIT License (MIT)										--
+--				Copyright (c) 2008-2015  Michael "Jafula" Miller					--
+--																					--
+-- ================================================================================ --
+
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Toon",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Get the EMA Utilities Library.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
+EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Toon"
+EMA.settingsDatabaseName = "ToonProfileDB"
+EMA.chatCommand = "ema-toon"
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["TOON"]
+EMA.parentDisplayNameToon = L["TOON"]
+EMA.parentDisplayNameMerchant = L["VENDER"]
+EMA.moduleDisplayName = L["TOON"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\Toon.tga"
+EMA.moduleIconWarnings = "Interface\\Addons\\EMA\\Media\\WarningIcon.tga"
+EMA.moduleIconRepair = "Interface\\Addons\\EMA\\Media\\moduleIconRepair.tga"
+-- order
+EMA.moduleOrder = 40
+
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		warnHitFirstTimeCombat = false,
+		hitFirstTimeMessage = L["ATTACKED"],
+		warnTargetNotMasterEnterCombat = false,
+		warnTargetNotMasterMessage = L["TARGETING"],
+		warnFocusNotMasterEnterCombat = false,
+		warnFocusNotMasterMessage = L["FOCUS"],
+		warnWhenHealthDropsBelowX = true,
+		warnWhenHealthDropsAmount = "30",
+		warnHealthDropsMessage = L["LOW_HEALTH"],
+		warnWhenManaDropsBelowX = true,
+		warnWhenManaDropsAmount = "30",
+		warnManaDropsMessage = L["LOW_MANA"],
+		warnWhenDurabilityDropsBelowX = true,
+		warnWhenDurabilityDropsAmount = "20",
+		warnDurabilityDropsMessage = L["DURABILITY_LOW_MSG"],
+		warnBagsFull = true,
+		bagsFullMessage = L["BAGS_FULL"],
+		warnCC = true,
+		CcMessage = L["CCED"],
+		warningArea = EMAApi.DefaultWarningArea(),
+		autoAcceptResurrectRequest = true,
+		autoAcceptResurrectRequestOnlyFromTeam = true,
+		acceptDeathRequests = true,
+		autoDenyDuels = true,
+		autoAcceptSummonRequest = false,
+		autoDenyGuildInvites = false,
+		requestArea = EMAApi.DefaultMessageArea(),
+		autoRepair = true,
+		autoRepairUseGuildFunds = true,
+		merchantArea = EMAApi.DefaultMessageArea(),
+		autoAcceptRoleCheck = false,
+		enterLFGWithTeam = false,
+		acceptReadyCheck = false,
+		teleportLFGWithTeam = false,
+		rollWithTeam = false,
+		--Debug Suff
+		testAlwaysOff = true
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		args = {
+				push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_ALL_SETTINGS"],
+				usage = "/EMA-toon push",
+				get = false,
+				set = "EMASendSettings",
+			},
+		},
+	}
+	return configuration
+end
+
+local function DebugMessage( ... )
+	--EMA:Print( ... )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.COMMAND_TEAM_DEATH = "EMAToonTeamDeath"
+EMA.COMMAND_RECOVER_TEAM = "EMAToonRecoverTeam"
+EMA.COMMAND_SOUL_STONE = "EMAToonSoulStone"
+EMA.COMMAND_READY_CHECK = "EMAReadyCheck"
+EMA.COMMAND_TELE_PORT = "EMAteleport"
+EMA.COMMAND_LOOT_ROLL = "JamabaLootRoll"
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------------------------------------
+-- Variables used by module.
+-------------------------------------------------------------------------------------------------------------
+
+EMA.sharedInvData = {}
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function SettingsCreateMerchant( top )
+	-- Get positions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
+	local column2left = left + halfWidth
+	local left2 = left + thirdWidth
+	local left3 = left + (thirdWidth * 2)
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControlMerchant, "", movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControlMerchant, L["VENDOR"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControlMerchant.checkBoxAutoRepair = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlMerchant,
+		headingWidth,
+		left,
+		movingTop,
+		L["AUTO_REPAIR"],
+		EMA.SettingsToggleAutoRepair,
+		L["AUTO_REPAIR_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlMerchant.checkBoxAutoRepairUseGuildFunds = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlMerchant,
+		headingWidth,
+		left,
+		movingTop,
+		L["REPAIR_GUILD_FUNDS"],
+		EMA.SettingsToggleAutoRepairUseGuildFunds,
+		L["REPAIR_GUILD_FUNDS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlMerchant.dropdownMerchantArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControlMerchant,
+		headingWidth,
+		left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControlMerchant.dropdownMerchantArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControlMerchant.dropdownMerchantArea:SetCallback( "OnValueChanged", EMA.SettingsSetMerchantArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	return movingTop
+end
+
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControlMerchant.dropdownMerchantArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControlToon.dropdownRequestArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControlWarnings.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+end
+
+function EMA:OnCharactersChanged()
+	EMA:SettingsRefresh()
+end
+
+local function SettingsCreateToon( top )
+	-- Get positions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
+	local column2left = left + halfWidth
+	local left2 = left + thirdWidth
+	local left3 = left + (thirdWidth * 2)
+	local movingTop = top
+	EMAHelperSettings:CreateHeading( EMA.settingsControlToon, L["REQUESTS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControlToon.checkBoxAutoDenyDuels = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["DENY_DUELS"],
+		EMA.SettingsToggleAutoDenyDuels,
+		L["DENY_DUELS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlToon.checkBoxAutoDenyGuildInvites = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["DENY_GUILD_INVITES"],
+		EMA.SettingsToggleAutoDenyGuildInvites,
+		L["DENY_GUILD_INVITES_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequest = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["ACCEPT_RESURRECT"],
+		EMA.SettingsToggleAutoAcceptResurrectRequests,
+		L["ACCEPT_RESURRECT_AUTO"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequestOnlyFromTeam = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left + 20,
+		movingTop,
+		L["ACCEPT_RESURRECT_FROM_TEAM"],
+		EMA.SettingsToggleAutoAcceptResurrectRequestsOnlyFromTeam,
+		L["ACCEPT_RESURRECT_FROM_TEAM_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlToon.checkBoxAcceptDeathRequests = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["RELEASE_PROMPTS"],
+		EMA.SettingsToggleAcceptDeathRequests,
+		L["RELEASE_PROMPTS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlToon.checkBoxAutoAcceptSummonRequest = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["SUMMON_REQUEST"],
+		EMA.SettingsToggleAutoAcceptSummonRequest,
+		L["SUMMON_REQUEST_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControlToon, L["GROUPTOOLS_HEADING"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControlToon.checkBoxAutoRoleCheck = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["ROLE_CHECKS"],
+		EMA.SettingsToggleAutoRoleCheck,
+		L["ROLE_CHECKS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlToon.checkBoxAcceptReadyCheck = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["READY_CHECKS"],
+		EMA.SettingsToggleAcceptReadyCheck,
+		L["READY_CHECKS_HELP"]
+	)
+ 	movingTop = movingTop - checkBoxHeight
+ 	EMA.settingsControlToon.checkBoxLFGTeleport = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["LFG_Teleport"],
+		EMA.SettingsToggleLFGTeleport,
+		L["LFG_Teleport_HELP"]
+	)
+ 	movingTop = movingTop - checkBoxHeight
+ 	EMA.settingsControlToon.checkBoxLootWithTeam = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlToon,
+		halfWidth,
+		left,
+		movingTop,
+		L["ROLL_LOOT"],
+		EMA.SettingsToggleLootWithTeam,
+		L["ROLL_LOOT_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControlToon, L["MESSAGES_HEADER"], movingTop, false )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+ 	EMA.settingsControlToon.dropdownRequestArea = EMAHelperSettings:CreateDropdown(
+	EMA.settingsControlToon,
+		headingWidth,
+		left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControlToon.dropdownRequestArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControlToon.dropdownRequestArea:SetCallback( "OnValueChanged", EMA.SettingsSetRequestArea )
+	return movingTop
+end
+
+local function SettingsCreateWarnings( top )
+	-- Get positions.
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local labelHeight = EMAHelperSettings:GetLabelHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( true )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local halfWidth = (headingWidth - horizontalSpacing) / 2
+	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
+	local column2left = left + halfWidth
+	local left2 = left + thirdWidth
+	local left3 = left + (thirdWidth * 2)
+	local movingTop = top
+	EMAHelperSettings:CreateHeading( EMA.settingsControlWarnings, L["COMBAT"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControlWarnings.checkBoxWarnHitFirstTimeCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["WARN_HIT"],
+		EMA.SettingsToggleWarnHitFirstTimeCombat,
+		L["WARN_HIT_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWarnings.editBoxHitFirstTimeMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["WARN_HIT"]
+	)
+	EMA.settingsControlWarnings.editBoxHitFirstTimeMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedHitFirstTimeMessage )
+
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlWarnings.checkBoxWarnTargetNotMasterEnterCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["TARGET_NOT_MASTER"],
+		EMA.SettingsToggleWarnTargetNotMasterEnterCombat,
+		L["TARGET_NOT_MASTER_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWarnings.editBoxWarnTargetNotMasterMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["TARGETING"]
+	)
+	EMA.settingsControlWarnings.editBoxWarnTargetNotMasterMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnTargetNotMasterMessage )
+
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlWarnings.checkBoxWarnFocusNotMasterEnterCombat = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["FOCUS_NOT_MASTER"],
+		EMA.SettingsToggleWarnFocusNotMasterEnterCombat,
+		L["FOCUS_NOT_MASTER_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWarnings.editBoxWarnFocusNotMasterMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["FOCUS"]
+	)
+	EMA.settingsControlWarnings.editBoxWarnFocusNotMasterMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnFocusNotMasterMessage )
+	movingTop = movingTop - editBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControlWarnings, L["HEALTH_POWER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControlWarnings.checkBoxWarnWhenHealthDropsBelowX = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["HEALTH_DROPS_BELOW"],
+		EMA.SettingsToggleWarnWhenHealthDropsBelowX,
+		L["HEALTH_DROPS_BELOW_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWarnings.editBoxWarnWhenHealthDropsAmount = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["HEALTH_PERCENTAGE"]
+	)
+	EMA.settingsControlWarnings.editBoxWarnWhenHealthDropsAmount:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnWhenHealthDropsAmount )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["LOW_HEALTH"]
+	)
+	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnHealthDropsMessage )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlWarnings.checkBoxWarnWhenManaDropsBelowX = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["MANA_DROPS_BELOW"],
+		EMA.SettingsToggleWarnWhenManaDropsBelowX,
+		L["MANA_DROPS_BELOW_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWarnings.editBoxWarnWhenManaDropsAmount = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["MANA_PERCENTAGE"]
+	)
+	EMA.settingsControlWarnings.editBoxWarnWhenManaDropsAmount:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnWhenManaDropsAmount )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlWarnings.editBoxWarnManaDropsMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["LOW_MANA"]
+	)
+	EMA.settingsControlWarnings.editBoxWarnManaDropsMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnManaDropsMessage )
+	movingTop = movingTop - editBoxHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControlWarnings, L["OTHER"], movingTop, true )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControlWarnings.checkBoxWarnWhenDurabilityDropsBelowX = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["DURABILITY_DROPS_BELOW"],
+		EMA.SettingsToggleWarnWhenDurabilityDropsBelowX,
+		L["DURABILITY_DROPS_BELOW_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWarnings.editBoxWarnWhenDurabilityDropsAmount = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["DURABILITY_PERCENTAGE"]
+	)
+	EMA.settingsControlWarnings.editBoxWarnWhenDurabilityDropsAmount:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnWhenDurabilityDropsAmount )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlWarnings.editBoxWarnDurabilityDropsMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["LOW_DURABILITY_TEXT"]
+	)
+	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnDurabilityDropsMessage )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlWarnings.checkBoxWarnCC = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["WARN_IF_CC"],
+		EMA.SettingsToggleWarnCC,
+		L["WARN_IF_CC_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWarnings.editBoxCCMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["CCED"]
+	)
+	EMA.settingsControlWarnings.editBoxCCMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedCCMessage )
+
+	movingTop = movingTop - editBoxHeight
+    EMA.settingsControlWarnings.checkBoxWarnBagsFull = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["BAGS_FULL"],
+		EMA.SettingsToggleWarnBagsFull,
+		L["BAGS_FULL_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControlWarnings.editBoxBagsFullMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["BAGS_FULL"]
+	)
+	EMA.settingsControlWarnings.editBoxBagsFullMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedBagsFullMessage )
+	movingTop = movingTop - editBoxHeight
+
+
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControlWarnings.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControlWarnings,
+		headingWidth,
+		left,
+		movingTop,
+		L["SEND_WARNING_AREA"]
+	)
+	EMA.settingsControlWarnings.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControlWarnings.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	return movingTop
+end
+
+local function SettingsCreate()
+	EMA.settingsControlToon = {}
+	EMA.settingsControlWarnings = {}
+	EMA.settingsControlMerchant = {}
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControlToon,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayNameToon,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControlWarnings,
+		L["WARNINGS"],
+		EMA.parentDisplayNameToon,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIconWarnings
+	)
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControlMerchant,
+		L["REPAIR"],
+		EMA.parentDisplayNameMerchant,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIconRepair
+	)
+	local bottomOfToon = SettingsCreateToon( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControlToon.widgetSettings.content:SetHeight( -bottomOfToon )
+	local bottomOfWarnings = SettingsCreateWarnings( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControlWarnings.widgetSettings.content:SetHeight( -bottomOfWarnings)
+	local bottomOfMerchant = SettingsCreateMerchant( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControlMerchant.widgetSettings.content:SetHeight( -bottomOfMerchant )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControlWarnings, helpTable, EMA:GetConfiguration() )
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Populate.
+-------------------------------------------------------------------------------------------------------------
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	EMA.settingsControlWarnings.checkBoxWarnHitFirstTimeCombat:SetValue( EMA.db.warnHitFirstTimeCombat )
+	EMA.settingsControlWarnings.editBoxHitFirstTimeMessage:SetText( EMA.db.hitFirstTimeMessage )
+	EMA.settingsControlWarnings.checkBoxWarnTargetNotMasterEnterCombat:SetValue( EMA.db.warnTargetNotMasterEnterCombat )
+	EMA.settingsControlWarnings.editBoxWarnTargetNotMasterMessage:SetText( EMA.db.warnTargetNotMasterMessage )
+	EMA.settingsControlWarnings.checkBoxWarnFocusNotMasterEnterCombat:SetValue( EMA.db.warnFocusNotMasterEnterCombat )
+	EMA.settingsControlWarnings.editBoxWarnFocusNotMasterMessage:SetText( EMA.db.warnFocusNotMasterMessage )
+	EMA.settingsControlWarnings.checkBoxWarnWhenHealthDropsBelowX:SetValue( EMA.db.warnWhenHealthDropsBelowX )
+	EMA.settingsControlWarnings.editBoxWarnWhenHealthDropsAmount:SetText( EMA.db.warnWhenHealthDropsAmount )
+	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage:SetText( EMA.db.warnHealthDropsMessage )
+	EMA.settingsControlWarnings.checkBoxWarnWhenManaDropsBelowX:SetValue( EMA.db.warnWhenManaDropsBelowX )
+	EMA.settingsControlWarnings.editBoxWarnWhenManaDropsAmount:SetText( EMA.db.warnWhenManaDropsAmount )
+	EMA.settingsControlWarnings.editBoxWarnManaDropsMessage:SetText( EMA.db.warnManaDropsMessage )
+	EMA.settingsControlWarnings.checkBoxWarnWhenDurabilityDropsBelowX:SetValue( EMA.db.warnWhenDurabilityDropsBelowX )
+	EMA.settingsControlWarnings.editBoxWarnWhenDurabilityDropsAmount:SetText( EMA.db.warnWhenDurabilityDropsAmount )
+	EMA.settingsControlWarnings.editBoxWarnDurabilityDropsMessage:SetText( EMA.db.warnDurabilityDropsMessage )
+	EMA.settingsControlWarnings.checkBoxWarnBagsFull:SetValue( EMA.db.warnBagsFull )
+	EMA.settingsControlWarnings.editBoxBagsFullMessage:SetText( EMA.db.bagsFullMessage )
+	EMA.settingsControlWarnings.checkBoxWarnCC:SetValue( EMA.db.warnCC )
+	EMA.settingsControlWarnings.editBoxCCMessage:SetText( EMA.db.CcMessage )
+	EMA.settingsControlWarnings.dropdownWarningArea:SetValue( EMA.db.warningArea )
+	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequest:SetValue( EMA.db.autoAcceptResurrectRequest )
+	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequestOnlyFromTeam:SetValue( EMA.db.autoAcceptResurrectRequestOnlyFromTeam )
+	EMA.settingsControlToon.checkBoxAcceptDeathRequests:SetValue( EMA.db.acceptDeathRequests )
+	EMA.settingsControlToon.checkBoxAutoDenyDuels:SetValue( EMA.db.autoDenyDuels )
+	EMA.settingsControlToon.checkBoxAutoAcceptSummonRequest:SetValue( EMA.db.autoAcceptSummonRequest )
+	EMA.settingsControlToon.checkBoxAutoDenyGuildInvites:SetValue( EMA.db.autoDenyGuildInvites )
+	EMA.settingsControlToon.checkBoxAutoRoleCheck:SetValue( EMA.db.autoAcceptRoleCheck )
+	EMA.settingsControlToon.checkBoxAcceptReadyCheck:SetValue( EMA.db.acceptReadyCheck )
+	EMA.settingsControlToon.checkBoxLFGTeleport:SetValue( EMA.db.teleportLFGWithTeam )
+	EMA.settingsControlToon.checkBoxLootWithTeam:SetValue( EMA.db.rollWithTeam )
+	EMA.settingsControlToon.dropdownRequestArea:SetValue( EMA.db.requestArea )
+	EMA.settingsControlMerchant.checkBoxAutoRepair:SetValue( EMA.db.autoRepair )
+	EMA.settingsControlMerchant.checkBoxAutoRepairUseGuildFunds:SetValue( EMA.db.autoRepairUseGuildFunds )
+	EMA.settingsControlMerchant.dropdownMerchantArea:SetValue( EMA.db.merchantArea )
+	-- Set state.
+	EMA.settingsControlWarnings.editBoxHitFirstTimeMessage:SetDisabled( not EMA.db.warnHitFirstTimeCombat )
+	EMA.settingsControlWarnings.editBoxWarnTargetNotMasterMessage:SetDisabled( not EMA.db.warnTargetNotMasterEnterCombat )
+	EMA.settingsControlWarnings.editBoxWarnFocusNotMasterMessage:SetDisabled( not EMA.db.warnFocusNotMasterEnterCombat )
+	EMA.settingsControlWarnings.editBoxWarnWhenHealthDropsAmount:SetDisabled( not EMA.db.warnWhenHealthDropsBelowX )
+	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage:SetDisabled( not EMA.db.warnWhenHealthDropsBelowX )
+	EMA.settingsControlWarnings.editBoxWarnWhenManaDropsAmount:SetDisabled( not EMA.db.warnWhenManaDropsBelowX )
+	EMA.settingsControlWarnings.editBoxWarnManaDropsMessage:SetDisabled( not EMA.db.warnWhenManaDropsBelowX )
+	EMA.settingsControlWarnings.editBoxWarnWhenDurabilityDropsAmount:SetDisabled( not EMA.db.warnWhenDurabilityDropsBelowX )
+	EMA.settingsControlWarnings.editBoxWarnDurabilityDropsMessage:SetDisabled( not EMA.db.warnWhenDurabilityDropsBelowX )
+	EMA.settingsControlMerchant.checkBoxAutoRepairUseGuildFunds:SetDisabled( not EMA.db.autoRepair )
+	EMA.settingsControlWarnings.editBoxBagsFullMessage:SetDisabled( not EMA.db.warnBagsFull )
+	EMA.settingsControlWarnings.editBoxCCMessage:SetDisabled( not EMA.db.warnCC )
+	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequestOnlyFromTeam:SetDisabled( not EMA.db.autoAcceptResurrectRequest )
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsToggleAutoRepair( event, checked )
+	EMA.db.autoRepair = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoRepairUseGuildFunds( event, checked )
+	EMA.db.autoRepairUseGuildFunds = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoDenyDuels( event, checked )
+	EMA.db.autoDenyDuels = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoAcceptSummonRequest( event, checked )
+	EMA.db.autoAcceptSummonRequest = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoDenyGuildInvites( event, checked )
+	EMA.db.autoDenyGuildInvites = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoAcceptResurrectRequests( event, checked )
+	EMA.db.autoAcceptResurrectRequest = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoAcceptResurrectRequestsOnlyFromTeam( event, checked )
+	EMA.db.autoAcceptResurrectRequestOnlyFromTeam = checked
+	EMA:SettingsRefresh()
+end
+
+
+function EMA:SettingsToggleAcceptDeathRequests( event, checked )
+	EMA.db.acceptDeathRequests = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAutoRoleCheck( event, checked )
+	EMA.db.autoAcceptRoleCheck = checked
+	EMA:SettingsRefresh()
+end
+
+
+function EMA:SettingsToggleAcceptReadyCheck( event, checked )
+	EMA.db.acceptReadyCheck = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleLFGTeleport( event, checked )
+	EMA.db.teleportLFGWithTeam = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleLootWithTeam( event, checked )
+	EMA.db.rollWithTeam = checked
+	EMA:SettingsRefresh()
+end
+
+-- Warnings Toggles
+
+function EMA:SettingsToggleWarnHitFirstTimeCombat( event, checked )
+	EMA.db.warnHitFirstTimeCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedHitFirstTimeMessage( event, text )
+	EMA.db.hitFirstTimeMessage = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleWarnBagsFull( event, checked )
+	EMA.db.warnBagsFull = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedBagsFullMessage( event, text )
+	EMA.db.bagsFullMessage = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleWarnCC( event, checked )
+	EMA.db.warnCC = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedCCMessage( event, text )
+	EMA.db.CcMessage = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleWarnTargetNotMasterEnterCombat( event, checked )
+	EMA.db.warnTargetNotMasterEnterCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedWarnTargetNotMasterMessage( event, text )
+	EMA.db.warnTargetNotMasterMessage = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleWarnFocusNotMasterEnterCombat( event, checked )
+	EMA.db.warnFocusNotMasterEnterCombat = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedWarnFocusNotMasterMessage( event, text )
+	EMA.db.warnFocusNotMasterMessage = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleWarnWhenHealthDropsBelowX( event, checked )
+	EMA.db.warnWhenHealthDropsBelowX = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedWarnWhenHealthDropsAmount( event, text )
+	local amount = tonumber( text )
+	amount = EMAUtilities:FixValueToRange( amount, 0, 100 )
+	EMA.db.warnWhenHealthDropsAmount = tostring( amount )
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedWarnHealthDropsMessage( event, text )
+	EMA.db.warnHealthDropsMessage = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleWarnWhenManaDropsBelowX( event, checked )
+	EMA.db.warnWhenManaDropsBelowX = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedWarnWhenManaDropsAmount( event, text )
+	local amount = tonumber( text )
+	amount = EMAUtilities:FixValueToRange( amount, 0, 100 )
+	EMA.db.warnWhenManaDropsAmount = tostring( amount )
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedWarnManaDropsMessage( event, text )
+	EMA.db.warnManaDropsMessage = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleWarnWhenDurabilityDropsBelowX( event, checked )
+	EMA.db.warnWhenDurabilityDropsBelowX = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedWarnWhenDurabilityDropsAmount( event, text )
+	local amount = tonumber( text )
+	amount = EMAUtilities:FixValueToRange( amount, 0, 100 )
+	EMA.db.warnWhenDurabilityDropsAmount = tostring( amount )
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedWarnDurabilityDropsMessage( event, text )
+	EMA.db.warnDurabilityDropsMessage = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetWarningArea( event, value )
+	EMA.db.warningArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetRequestArea( event, value )
+	EMA.db.requestArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsSetMerchantArea( event, value )
+	EMA.db.merchantArea = value
+	EMA:SettingsRefresh()
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Create the settings control.
+	SettingsCreate()
+	-- Initialise the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControlWarnings.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+	-- Flag set when told the master about health falling below a certain percentage.
+	EMA.toldMasterAboutHealth = false
+	-- Flag set when told the master about mana falling below a certain percentage.
+	EMA.toldMasterAboutMana = false
+	-- Flag Set when told master About Durability
+	EMA.toldMasterAboutDurability = false
+	-- Have been hit flag.
+	EMA.haveBeenHit = false
+	-- Bags full changed count.
+	EMA.previousFreeBagSlotsCount = false
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	EMA.isInternalCommand = false
+	-- WoW events.
+	EMA:RegisterEvent( "UNIT_COMBAT" )
+	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
+	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
+	EMA:RegisterEvent( "UNIT_HEALTH" )
+	EMA:RegisterEvent( "UPDATE_INVENTORY_DURABILITY" )
+	EMA:RegisterEvent( "UNIT_POWER_FREQUENT" )
+	EMA:RegisterEvent( "MERCHANT_SHOW" )
+	EMA:RegisterEvent( "RESURRECT_REQUEST" )
+	EMA:RegisterEvent( "PLAYER_DEAD" )
+	EMA:RegisterEvent( "CORPSE_IN_RANGE" )
+	EMA:RegisterEvent( "CORPSE_IN_INSTANCE" )
+	EMA:RegisterEvent( "CORPSE_OUT_OF_RANGE" )
+	EMA:RegisterEvent( "PLAYER_UNGHOST" )
+	EMA:RegisterEvent( "PLAYER_ALIVE" )
+	EMA:RegisterEvent( "CONFIRM_SUMMON")
+	EMA:RegisterEvent( "DUEL_REQUESTED" )
+	EMA:RegisterEvent( "GUILD_INVITE_REQUEST" )
+	EMA:RegisterEvent( "LFG_ROLE_CHECK_SHOW" )
+	EMA:RegisterEvent( "READY_CHECK" )
+	EMA:RegisterEvent("LOSS_OF_CONTROL_ADDED")
+	EMA:RegisterEvent( "UI_ERROR_MESSAGE", "BAGS_FULL" )
+	EMA:RegisterEvent( "BAG_UPDATE_DELAYED" )
+
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_ONLINE, "OnCharactersChanged" )
+	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_OFFLINE, "OnCharactersChanged" )
+	-- Ace Hooks
+	EMA:SecureHook( "ConfirmReadyCheck" )
+	EMA:SecureHook( "LFGTeleport" )
+	EMA:SecureHook( "RollOnLoot" )
+
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.warnHitFirstTimeCombat = settings.warnHitFirstTimeCombat
+		EMA.db.hitFirstTimeMessage = settings.hitFirstTimeMessage
+		EMA.db.warnTargetNotMasterEnterCombat = settings.warnTargetNotMasterEnterCombat
+		EMA.db.warnTargetNotMasterMessage = settings.warnTargetNotMasterMessage
+		EMA.db.warnFocusNotMasterEnterCombat = settings.warnFocusNotMasterEnterCombat
+		EMA.db.warnFocusNotMasterMessage = settings.warnFocusNotMasterMessage
+		EMA.db.warnWhenHealthDropsBelowX = settings.warnWhenHealthDropsBelowX
+		EMA.db.warnWhenHealthDropsAmount = settings.warnWhenHealthDropsAmount
+		EMA.db.warnHealthDropsMessage = settings.warnHealthDropsMessage
+		EMA.db.warnWhenManaDropsBelowX = settings.warnWhenManaDropsBelowX
+		EMA.db.warnWhenManaDropsAmount = settings.warnWhenManaDropsAmount
+		EMA.db.warnManaDropsMessage = settings.warnManaDropsMessage
+		EMA.db.warnWhenDurabilityDropsBelowX = settings.warnWhenDurabilityDropsBelowX
+		EMA.db.warnWhenDurabilityDropsAmount = settings.warnWhenDurabilityDropsAmount
+		EMA.db.warnDurabilityDropsMessage = settings.warnDurabilityDropsMessage
+		EMA.db.warnBagsFull = settings.warnBagsFull
+		EMA.db.bagsFullMessage = settings.bagsFullMessage
+		EMA.db.warnCC = settings.warnCC
+		EMA.db.CcMessage = settings.CcMessage
+		EMA.db.autoAcceptResurrectRequest = settings.autoAcceptResurrectRequest
+		EMA.db.autoAcceptResurrectRequestOnlyFromTeam = settings.autoAcceptResurrectRequestOnlyFromTeam
+		EMA.db.acceptDeathRequests = settings.acceptDeathRequests
+		EMA.db.autoDenyDuels = settings.autoDenyDuels
+		EMA.db.autoAcceptSummonRequest = settings.autoAcceptSummonRequest
+		EMA.db.autoDenyGuildInvites = settings.autoDenyGuildInvites
+		EMA.db.autoAcceptRoleCheck = settings.autoAcceptRoleCheck
+		EMA.db.enterLFGWithTeam = settings.enterLFGWithTeam
+		EMA.db.acceptReadyCheck = settings.acceptReadyCheck
+		EMA.db.teleportLFGWithTeam = settings.teleportLFGWithTeam
+		EMA.db.rollWithTeam = settings.rollWithTeam
+		EMA.db.autoRepair = settings.autoRepair
+		EMA.db.autoRepairUseGuildFunds = settings.autoRepairUseGuildFunds
+		EMA.db.warningArea = settings.warningArea
+		EMA.db.requestArea = settings.requestArea
+		EMA.db.merchantArea = settings.merchantArea
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+function EMA:UNIT_COMBAT( event, unitAffected, action )
+	if EMA.db.warnHitFirstTimeCombat == false then
+		return
+	end
+	if EMAApi.IsCharacterTheMaster( self.characterName ) == true then
+		return
+	end
+	if InCombatLockdown() then
+		if unitAffected == "player" and action ~= "HEAL" and not EMA.haveBeenHit then
+			EMA.haveBeenHit = true
+			EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.hitFirstTimeMessage, false )
+		end
+	end
+end
+
+function EMA:GUILD_INVITE_REQUEST( event, inviter, guild, ... )
+	if EMA.db.autoDenyGuildInvites == true then
+		DeclineGuild()
+		GuildInviteFrame:Hide()
+		EMA:EMASendMessageToTeam( EMA.db.requestArea, L["REFUSED_GUILD_INVITE"]( guild, inviter ), false )
+	end
+end
+
+function EMA:DUEL_REQUESTED( event, challenger, ... )
+	if EMA.db.autoDenyDuels == true then
+		CancelDuel()
+		StaticPopup_Hide( "DUEL_REQUESTED" )
+		EMA:EMASendMessageToTeam( EMA.db.requestArea, L["I_REFUSED_A_DUEL_FROM_X"]( challenger ), false )
+	end
+end
+
+function EMA:PLAYER_UNGHOST(event, ...)
+		StaticPopup_Hide( "RECOVER_CORPSE" )
+		StaticPopup_Hide( "RECOVER_CORPSE_INSTANCE" )
+		StaticPopup_Hide( "XP_LOSS" )
+		StaticPopup_Hide( "RECOVER_TEAM")
+		StaticPopup_Hide(  "TEAMDEATH" )
+end
+
+function EMA:PLAYER_ALIVE(event, ...)
+		StaticPopup_Hide( "RECOVER_CORPSE" )
+		StaticPopup_Hide( "RECOVER_CORPSE_INSTANCE" )
+		StaticPopup_Hide( "XP_LOSS" )
+		StaticPopup_Hide( "RECOVER_TEAM" )
+		StaticPopup_Hide( "TEAMDEATH" )
+end
+
+function EMA:CORPSE_IN_RANGE(event, ...)
+	local teamMembers = EMAApi.GetTeamListMaximumOrderOnline()
+	if teamMembers > 1 and EMA.db.acceptDeathRequests == true then
+		StaticPopup_Show("RECOVER_TEAM")
+	end
+end
+
+function EMA:CORPSE_IN_INSTANCE(event, ...)
+		StaticPopup_Show("RECOVER_CORPSE_INSTANCE")
+		StaticPopup_Hide("RECOVER_TEAM")
+end
+
+function EMA:CORPSE_OUT_OF_RANGE(event, ...)
+		StaticPopup_Hide("RECOVER_CORPSE")
+		StaticPopup_Hide("RECOVER_CORPSE_INSTANCE")
+		StaticPopup_Hide("XP_LOSS")
+		StaticPopup_Hide("RECOVER_TEAM")
+end
+
+function EMA:PLAYER_DEAD( event, ...)
+	-- EMA Team Stuff.
+	local teamMembers = EMAApi.GetTeamListMaximumOrderOnline()
+	if teamMembers > 1 and EMA.db.acceptDeathRequests == true then
+		StaticPopup_Show( "TEAMDEATH" )
+	end
+end
+
+-- Mosty taken from blizzard StaticPopup Code
+-- 8.0 changes self Res to much to beable to work like we want it to
+-- Not sure if we can do this anymore? maybe just remove it for now
+StaticPopupDialogs["TEAMDEATH"] = {
+	text = L["RELEASE_TEAM_Q"],
+	button1 = DEATH_RELEASE,
+	--button2 = USE_SOULSTONE,
+	button2 = CANCEL,
+	OnShow = function(self)
+		--self.timeleft = GetReleaseTimeRemaining()
+		--[[
+		-- TODO FIX FOR 8.0
+		if EMAPrivate.Core.isBetaBuild == true then
+			-- Find out new code????? for now we can not use this
+			local text = nil
+		else
+			local text = HasSoulstone()
+		end
+		if ( text ) then
+			self.button2:SetText(text)
+		end
+		if ( self.timeleft == -1 ) then
+			self.text:SetText(DEATH_RELEASE_NOTIMER)
+		end
+		--]]
+		self.button1:SetText(L["RELEASE_TEAM"])
+	end,
+	OnAccept = function(self)
+		--EMA:Print("testRes")
+		-- Do we need this???
+		--if not ( CannotBeResurrected() ) then
+		--	return 1
+		--end
+
+		EMA.teamDeath()
+	end,
+	OnCancel = function(self, data, reason)
+		--[[
+		if ( reason == "override" ) then
+			return;
+		end
+		if ( reason == "timeout" ) then
+			return;
+		end
+		if ( reason == "clicked" ) then
+			if ( HasSoulstone() ) then
+				EMA.teamSS()
+			else
+				EMA.teamRes()
+			end
+			if ( CannotBeResurrected() ) then
+				return 1
+			end
+		end
+		]]
+	end,
+	OnUpdate = function(self, elapsed)
+		if ( IsFalling() and not IsOutOfBounds()) then
+			self.button1:Disable()
+			self.button2:Disable()
+			--self.button3:Disable()
+			return;
+		end
+
+		local b1_enabled = self.button1:IsEnabled()
+		self.button1:SetEnabled(not IsEncounterInProgress())
+
+		if ( b1_enabled ~= self.button1:IsEnabled() ) then
+			if ( b1_enabled ) then
+				self.text:SetText(CAN_NOT_RELEASE_IN_COMBAT)
+			else
+				self.text:SetText("");
+				StaticPopupDialogs[self.which].OnShow(self)
+			end
+			StaticPopup_Resize(dialog, which)
+		end
+		--[[
+		if( HasSoulstone() and CanUseSoulstone() ) then
+			self.button2:Enable()
+		else
+			self.button2:Disable()
+		end
+		--]]
+	end,
+	--[[
+	DisplayButton2 = function(self)
+		return HasSoulstone()
+	end,
+	]]
+	timeout = 0,
+	whileDead = 1,
+	interruptCinematic = 1,
+	notClosableByLogout = 1,
+	noCancelOnReuse = 1,
+	cancels = "RECOVER_TEAM"
+}
+
+StaticPopupDialogs["RECOVER_TEAM"] = {
+	text = L["RECOVER_CORPSES"],
+	button1 = ACCEPT,
+	OnAccept = function(self)
+		EMA:relaseTeam();
+		return 1;
+	end,
+	timeout = 0,
+	whileDead = 1,
+	interruptCinematic = 1,
+	notClosableByLogout = 1
+};
+
+function EMA:relaseTeam()
+	EMA:EMASendCommandToTeam( EMA.COMMAND_RECOVER_TEAM )
+end
+
+function EMA:teamDeath()
+
+	EMA:EMASendCommandToTeam( EMA.COMMAND_TEAM_DEATH )
+end
+
+--Remove
+function EMA:teamSS()
+	EMA:EMASendCommandToTeam( EMA.COMMAND_SOUL_STONE )
+	--UseSoulstone()
+end
+
+function EMA:doRecoverTeam()
+	RetrieveCorpse()
+	if UnitIsGhost("player") then
+		local delay = GetCorpseRecoveryDelay()
+		if delay > 0 then
+			EMA:EMASendMessageToTeam( EMA.db.requestArea, L["RELEASE_CORPSE_FOR_X"]( delay ), false )
+			StaticPopup_Show("RECOVER_TEAM")
+		else
+			RetrieveCorpse()
+			StaticPopup_Hide("RECOVER_TEAM")
+		end
+	end
+end
+
+function EMA:doTeamDeath()
+	if UnitIsDead("player") and not UnitIsGhost("player") then
+		RepopMe()
+		StaticPopup_Hide("TEAMDEATH")
+	end
+end
+
+--CleanUP
+function EMA:doSoulStone()
+	if UnitIsDead("player") and not UnitIsGhost("player") then
+		-- Dead code do not use!
+		--[[
+		if HasSoulstone() then
+			UseSoulstone()
+			StaticPopup_Hide("TEAMDEATH")
+		else
+			EMA:EMASendMessageToTeam( EMA.db.warningArea, L["I Do not have a SoulStone"], false )
+		end
+		]]
+	end
+end
+
+function EMA:RESURRECT_REQUEST( event, name, ... )
+	--EMA:Print("test Res From", name)
+	local canResurrect = false
+	if EMA.db.autoAcceptResurrectRequest == true then
+		--EMA:Print("test Res From", name)
+		canResurrect = true
+	end
+	if EMA.db.autoAcceptResurrectRequestOnlyFromTeam == true then
+		for index, characterName in EMAApi.TeamListOrderedOnline() do
+			unit = Ambiguate( characterName, "none" )
+			--EMA:Print("test", name, "vs", unit )
+			if unit == name then
+				canResurrect = true
+				break
+			else
+				canResurrect = false
+			end
+		end
+	end
+	if canResurrect == true then
+		AcceptResurrect()
+		StaticPopup_Hide( "RESURRECT")
+		StaticPopup_Hide( "RESURRECT_NO_SICKNESS" )
+		StaticPopup_Hide( "RESURRECT_NO_TIMER" )
+		StaticPopup_Hide( "SKINNED" )
+		StaticPopup_Hide( "SKINNED_REPOP" )
+		StaticPopup_Hide( "DEATH" )
+		StaticPopup_Hide( "RECOVER_TEAM" )
+		StaticPopup_Hide( "TEAMDEATH" )
+	end
+end
+
+--LFG stuff
+
+function EMA:READY_CHECK( event, name, ... )
+	-- Auto do Ready Check if team member is the one that does the readycheck
+	if EMA.db.acceptReadyCheck == true then
+		--EMA:Print("readyCheck", name )
+		for index, characterName in EMAApi.TeamListOrderedOnline() do
+			if name == Ambiguate( characterName, "none") then
+				EMA.isInternalCommand = ture
+				--EMA:Print("found in team", characterName)
+				if ReadyCheckFrame:IsShown() == true then
+					--EMA:Print("Ok?")
+					ConfirmReadyCheck(1)
+					ReadyCheckFrame:Hide()
+				end
+				EMA.isInternalCommand = false
+			end
+		end
+	end
+end
+
+function EMA:ConfirmReadyCheck( ready )
+	--EMA:Print("Test", ready )
+	if EMA.db.acceptReadyCheck == true then
+		if EMA.isInternalCommand == false then
+			EMA:EMASendCommandToTeam( EMA.COMMAND_READY_CHECK, ready)
+		end
+	end
+end
+
+function EMA:AmReadyCheck( ready )
+	--EMA:Print("AmReady!", ready )
+	EMA.isInternalCommand = true
+		if ready == 1 then
+			ConfirmReadyCheck(1)
+			ReadyCheckFrame:Hide()
+		else
+			ConfirmReadyCheck()
+			ReadyCheckFrame:Hide()
+		end
+	EMA.isInternalCommand = false
+end
+
+function EMA:LFGTeleport( event, arg1, ... )
+	--EMA:Print("LFGtest")
+	if EMA.db.teleportLFGWithTeam == true then
+		if IsShiftKeyDown() == false then
+			if EMA.isInternalCommand == false then
+				if IsInLFGDungeon() == true then
+					EMA:EMASendCommandToTeam( EMA.COMMAND_TELE_PORT, true )
+				else
+					EMA:EMASendCommandToTeam( EMA.COMMAND_TELE_PORT, false )
+				end
+			end
+		end
+	end
+end
+
+function EMA:DoLFGTeleport(port)
+	--EMA:Print("TeleCommand", port)
+	EMA.isInternalCommand = true
+	if IsShiftKeyDown() == false then
+		if port == true then
+			LFGTeleport(1)
+		else
+			LFGTeleport()
+		end
+	end
+	EMA.isInternalCommand = false
+end
+
+function EMA:LFG_ROLE_CHECK_SHOW( event, ... )
+	if EMA.db.autoAcceptRoleCheck == true then
+		--EMA:Print("testPopup?")
+		CompleteLFGRoleCheck("ture")
+	end
+end
+
+function EMA:RollOnLoot(id, rollType, ...)
+	--EMA:Print("lootTest", id, rollType)
+	local texture, name, count, quality, bindOnPickUp = GetLootRollItemInfo( id )
+	--EMA:Print("lootItemTest", name)
+	if EMA.db.rollWithTeam == true then
+		if IsShiftKeyDown() == false then
+			if EMA.isInternalCommand == false then
+				EMA:EMASendCommandToTeam( EMA.COMMAND_LOOT_ROLL, id, rollType, name)
+			end
+		end
+	end
+end
+
+function EMA:DoLootRoll( id, rollType, name )
+	--EMA:Print("i have a command to roll on item", name)
+	EMA.isInternalCommand = true
+	if name ~= nil then
+		RollOnLoot(id, rollType)
+	end
+	EMA.isInternalCommand = false
+end
+
+function EMA:CONFIRM_SUMMON( event, sender, location, ... )
+	local sender, location = GetSummonConfirmSummoner(), GetSummonConfirmAreaName()
+	if EMA.db.autoAcceptSummonRequest == true then
+		if GetSummonConfirmTimeLeft() > 0 then
+		ConfirmSummon()
+		StaticPopup_Hide("CONFIRM_SUMMON")
+		EMA:EMASendMessageToTeam( EMA.db.requestArea, L["SUMMON_FROM_X_TO_Y"]( sender, location ), false )
+		end
+	end
+end
+
+function EMA:MERCHANT_SHOW( event, ... )
+	-- Does the user want to auto repair?
+	if EMA.db.autoRepair == false then
+		return
+	end
+	-- Can this merchant repair?
+	if not CanMerchantRepair() then
+		return
+	end
+	-- How much to repair?
+	local repairCost, canRepair = GetRepairAllCost()
+	if canRepair == nil then
+		return
+	end
+	-- At least some cost...
+	if repairCost > 0 then
+		-- If allowed to use guild funds, then attempt to repair using guild funds.
+		if EMA.db.autoRepairUseGuildFunds == true then
+			if IsInGuild() and CanGuildBankRepair() then
+				RepairAllItems( 1 )
+			end
+		end
+		-- After guild funds used, still need to repair?
+		repairCost = GetRepairAllCost()
+		-- At least some cost...
+		if repairCost > 0 then
+			-- How much money available?
+			local moneyAvailable = GetMoney()
+			-- More or equal money than cost?
+			if moneyAvailable >= repairCost then
+				-- Yes, repair.
+				RepairAllItems()
+			else
+				-- Nope, tell the boss.
+				 EMA:EMASendMessageToTeam( EMA.db.merchantArea, L["ERR_GOLD_TO_REPAIR"], false )
+			end
+		end
+	end
+	if repairCost > 0 then
+		-- Tell the boss how much that cost.
+		local costString = EMAUtilities:FormatMoneyString( repairCost )
+		EMA:EMASendMessageToTeam( EMA.db.merchantArea, L["REPAIRING_COST_ME_X"]( costString ), false )
+	end
+end
+
+function EMA:UNIT_POWER_FREQUENT( event, unitAffected, power, ... )
+	if EMA.db.warnWhenManaDropsBelowX == false then
+		return
+	end
+	if unitAffected ~= "player" then
+		return
+	end
+	if power ~= "MANA" then
+		return
+	end
+	local currentMana = (UnitPower( "player", 0 ) / UnitPowerMax( "player", 0 ) * 100)
+	if EMA.toldMasterAboutMana == true then
+		if currentMana >= tonumber( EMA.db.warnWhenManaDropsAmount ) then
+			EMA.toldMasterAboutMana = false
+		end
+	else
+		if currentMana < tonumber( EMA.db.warnWhenManaDropsAmount ) then
+			EMA.toldMasterAboutMana = true
+			EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnManaDropsMessage, false )
+		end
+	end
+end
+
+function EMA:UNIT_HEALTH( event, unitAffected, ... )
+	if EMA.db.warnWhenHealthDropsBelowX == false then
+		return
+	end
+	if unitAffected ~= "player" then
+		return
+	end
+	local currentHealth = (UnitHealth( "player" ) / UnitHealthMax( "player" ) * 100)
+	if EMA.toldMasterAboutHealth == true then
+		if currentHealth >= tonumber( EMA.db.warnWhenHealthDropsAmount ) then
+			EMA.toldMasterAboutHealth = false
+		end
+	else
+		if currentHealth < tonumber( EMA.db.warnWhenHealthDropsAmount ) then
+			EMA.toldMasterAboutHealth = true
+			EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnHealthDropsMessage, false )
+		end
+	end
+end
+
+function EMA:UPDATE_INVENTORY_DURABILITY(event, agr1)
+	if EMA.db.warnWhenDurabilityDropsBelowX == false then
+		return
+	end
+	--EMA:Print("Test Durability Fired")
+	local curTotal, maxTotal, broken = 0, 0, 0
+	for i = 1, 18 do
+		local curItemDurability, maxItemDurability = GetInventoryItemDurability(i)
+		if curItemDurability and maxItemDurability then
+			curTotal = curTotal + curItemDurability
+			maxTotal = maxTotal + maxItemDurability
+			if maxItemDurability > 0 and curItemDurability == 0 then
+				broken = broken + 1
+			end
+		end
+	end
+	local durability = (curTotal / maxTotal) * 100
+	local durabilityText = tostring(gsub( durability, "%.[^|]+", "") )
+	--EMA:Print("Test Durability", durabilityText,"%")
+	if EMA.toldMasterAboutDurability == true then
+		if durability >= tonumber( EMA.db.warnWhenDurabilityDropsAmount ) then
+			EMA.toldMasterAboutDurability = false
+		end
+	else
+		if durability < tonumber( EMA.db.warnWhenDurabilityDropsAmount ) then
+			EMA.toldMasterAboutDurability = true
+			EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnDurabilityDropsMessage..L[" "]..durabilityText..L["%"], false )
+		end
+	end
+end
+
+function EMA:PLAYER_REGEN_ENABLED( event, ... )
+	EMA.haveBeenHit = false
+end
+
+function EMA:PLAYER_REGEN_DISABLED( event, ... )
+	EMA.haveBeenHit = false
+	if EMA.db.warnTargetNotMasterEnterCombat == true then
+		if EMAApi.IsCharacterTheMaster( EMA.characterName ) == false then
+			local name, realm = UnitName( "target" )
+			local character = EMAUtilities:AddRealmToNameIfNotNil( name, realm )
+			if character ~= EMAApi.GetMasterName() then
+				EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnTargetNotMasterMessage, false )
+			end
+		end
+	end
+	if EMA.db.warnFocusNotMasterEnterCombat == true then
+		if EMAApi.IsCharacterTheMaster( EMA.characterName ) == false then
+			local name, realm = UnitName( "focus" )
+			local character = EMAUtilities:AddRealmToNameIfNotNil( name, realm )
+			if character ~= EMAApi.GetMasterName() then
+				EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnFocusNotMasterMessage, false )
+			end
+		end
+	end
+end
+
+function EMA:BAGS_FULL( event, arg1, message, ... )
+   if EMA.db.warnBagsFull == true then
+		if UnitIsGhost( "player" ) then
+			return
+		end
+		if UnitIsDead( "player" ) then
+			return
+		end
+		local numberFreeSlots, numberTotalSlots = LibBagUtils:CountSlots( "BAGS", 0 )
+		if  message == ERR_INV_FULL or message == INVENTORY_FULL then
+			if numberFreeSlots == 0 then
+				if EMA.previousFreeBagSlotsCount == false then
+					EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.bagsFullMessage, false )
+					EMA.previousFreeBagSlotsCount = true
+					EMA:ScheduleTimer("ResetBagFull", 60, nil )
+				end
+			end
+		end
+	end
+end
+
+function EMA:BAG_UPDATE_DELAYED(event, ... )
+	if EMA.db.warnBagsFull == true then
+		local numberFreeSlots, numberTotalSlots = LibBagUtils:CountSlots( "BAGS", 0 )
+		if numberFreeSlots > 0 then
+			 EMA.previousFreeBagSlotsCount = false
+			 EMA:CancelAllTimers()
+		end
+	end
+end
+
+function EMA:ResetBagFull()
+	EMA.previousFreeBagSlotsCount = false
+	EMA:CancelAllTimers()
+end
+
+--Ebony CCed
+function EMA:LOSS_OF_CONTROL_ADDED( event, ... )
+	if EMA.db.warnCC == true then
+		local eventIndex = C_LossOfControl.GetNumEvents()
+		if eventIndex > 0 then
+			local locType, spellID, text, iconTexture, startTime, timeRemaining, duration, lockoutSchool, priority, displayType = C_LossOfControl.GetEventInfo(eventIndex)
+			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == false then
+				EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.CcMessage..L[" "]..text, false )
+			end
+		end
+	end
+end
+
+-- A EMA command has been received.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	--EMA:Print("Test", characterName, commandName)
+	if commandName == EMA.COMMAND_RECOVER_TEAM then
+		EMA:doRecoverTeam()
+	end
+	if commandName == EMA.COMMAND_TEAM_DEATH then
+		EMA:doTeamDeath()
+	end
+	-- More then likey to get removed
+	if commandName == EMA.COMMAND_SOUL_STONE then
+		--EMA:doSoulStone()
+	end
+	if commandName == EMA.COMMAND_READY_CHECK then
+		if characterName ~= self.characterName then
+			EMA.AmReadyCheck( characterName, ... )
+		end
+	end
+	if commandName == EMA.COMMAND_TELE_PORT then
+		if characterName ~= self.characterName then
+			EMA.DoLFGTeleport( characterName, ... )
+		end
+	end
+	if commandName == EMA.COMMAND_LOOT_ROLL then
+		if characterName ~= self.characterName then
+			EMA.DoLootRoll( characterName, ... )
+		end
+	end
+end
diff --git a/EMA/Modules/Trade.lua b/EMA/Modules/Trade.lua
new file mode 100644
index 0000000..3523c54
--- /dev/null
+++ b/EMA/Modules/Trade.lua
@@ -0,0 +1,681 @@
+-- ================================================================================ --
+--				EMA - ( Ebony's MultiBoxing Assistant )    							--
+--				Current Author: Jennifer Cally (Ebony)								--
+--																					--
+--				License: MIT License 2018 Jennifer Cally							--
+--																					--
+--				Some Code Used from "Jamba" that is 								--
+--				Released under the MIT License 										--
+--				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
+--																					--
+-- ================================================================================ --
+-- Create the addon using AceAddon-3.0 and embed some libraries.
+
+local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
+	"Trade",
+	"Module-1.0",
+	"AceConsole-3.0",
+	"AceEvent-3.0",
+	"AceHook-3.0",
+	"AceTimer-3.0"
+)
+
+-- Get the EMA Utilities Library.
+local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
+local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
+local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
+local AceGUI = LibStub( "AceGUI-3.0" )
+
+--  Constants and Locale for this module.
+EMA.moduleName = "Trade"
+EMA.settingsDatabaseName = "TradeProfileDB"
+EMA.chatCommand = "ema-trade"
+
+local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
+EMA.parentDisplayName = L["INTERACTION"]
+EMA.moduleDisplayName = L["TRADE"]
+-- Icon
+EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\TradeIcon.tga"
+-- order
+EMA.moduleOrder = 10
+
+-- Settings - the values to store and their defaults for the settings database.
+EMA.settings = {
+	profile = {
+		messageArea = EMAApi.DefaultMessageArea(),
+		showEMATradeWindow = false,
+		tradeBoEItems = false,
+		tradeCRItems = false,
+		autoTradeItemsList = {},
+		adjustMoneyWithMasterOnTrade = false,
+		goldAmountToKeepOnToonTrade = 200,
+	},
+}
+
+-- Configuration.
+function EMA:GetConfiguration()
+	local configuration = {
+		name = EMA.moduleDisplayName,
+		handler = EMA,
+		type = 'group',
+		childGroups  = "tab",
+		get = "EMAConfigurationGetSetting",
+		set = "EMAConfigurationSetSetting",
+		args = {
+			push = {
+				type = "input",
+				name = L["PUSH_SETTINGS"],
+				desc = L["PUSH_ALL_SETTINGS"],
+				usage = "/EMA-trade push",
+				get = false,
+				set = "EMASendSettings",
+				guiHidden = true,
+			},
+		},
+	}
+	return configuration
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Command this module sends.
+-------------------------------------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Messages module sends.
+-------------------------------------------------------------------------------------------------------------
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Popup Dialogs.
+-------------------------------------------------------------------------------------------------------------
+
+local function InitializePopupDialogs()
+	StaticPopupDialogs["EMATRADE_CONFIRM_REMOVE_TRADE_ITEMS"] = {
+        text = L["REMOVE_TRADE_LIST"],
+        button1 = YES,
+        button2 = NO,
+        timeout = 0,
+		whileDead = 1,
+		hideOnEscape = 1,
+        OnAccept = function()
+			EMA:RemoveItem()
+		end,
+    }
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Addon initialization, enabling and disabling.
+-------------------------------------------------------------------------------------------------------------
+
+-- Initialise the module.
+function EMA:OnInitialize()
+	-- Initialise the popup dialogs.
+	InitializePopupDialogs()
+	EMA.autoTradeItemLink = nil
+	EMA.autoTradeItemTag = EMAApi.AllTag()
+	-- Create the settings control.
+	EMA:SettingsCreate()
+	-- Initialse the EMAModule part of this module.
+	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
+	-- Populate the settings.
+	EMA:SettingsRefresh()
+end
+
+-- Called when the addon is enabled.
+function EMA:OnEnable()
+	EMA:RegisterEvent( "TRADE_SHOW" )
+	EMA:RegisterEvent( "TRADE_CLOSED" ) -- Unsued but we keep it for now!
+	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
+	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
+end
+
+-- Called when the addon is disabled.
+function EMA:OnDisable()
+	-- AceHook-3.0 will tidy up the hooks for us.
+end
+
+function EMA:SettingsCreate()
+	EMA.settingsControl = {}
+	-- Create the settings panel.
+	EMAHelperSettings:CreateSettings(
+		EMA.settingsControl,
+		EMA.moduleDisplayName,
+		EMA.parentDisplayName,
+		EMA.SettingsPushSettingsClick,
+		EMA.moduleIcon,
+		EMA.moduleOrder
+	)
+	local bottomOfInfo = EMA:SettingsCreateTrade( EMAHelperSettings:TopOfSettings() )
+	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
+	-- Help
+	local helpTable = {}
+	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
+end
+
+function EMA:SettingsPushSettingsClick( event )
+	EMA:EMASendSettings()
+end
+
+function EMA:SettingsCreateTrade( top )
+	local buttonControlWidth = 85
+	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
+	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
+	local buttonHeight = EMAHelperSettings:GetButtonHeight()
+	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
+	local left = EMAHelperSettings:LeftOfSettings()
+	local headingHeight = EMAHelperSettings:HeadingHeight()
+	local headingWidth = EMAHelperSettings:HeadingWidth( false )
+	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
+	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
+	local tradeWidth = headingWidth
+	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
+	local movingTop = top
+	-- A blank to get layout to show right?
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["TRADE_LIST_HEADER"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxShowEMATradeWindow = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TRADE_LIST"],
+		EMA.SettingsToggleShowEMATradeWindow,
+		L["TRADE_LIST_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.tradeItemsHighlightRow = 1
+	EMA.settingsControl.tradeItemsOffset = 1
+	local list = {}
+	list.listFrameName = "EMATradeIteamsSettingsFrame"
+	list.parentFrame = EMA.settingsControl.widgetSettings.content
+	list.listTop = movingTop
+	list.listLeft = left
+	list.listWidth = tradeWidth
+	list.rowHeight = 15
+	list.rowsToDisplay = 10
+	list.columnsToDisplay = 2
+	list.columnInformation = {}
+	list.columnInformation[1] = {}
+	list.columnInformation[1].width = 70
+	list.columnInformation[1].alignment = "LEFT"
+	list.columnInformation[2] = {}
+	list.columnInformation[2].width = 30
+	list.columnInformation[2].alignment = "LEFT"
+	list.scrollRefreshCallback = EMA.SettingsScrollRefresh
+	list.rowClickCallback = EMA.SettingsTradeItemsRowClick
+	EMA.settingsControl.tradeItems = list
+	EMAHelperSettings:CreateScrollList( EMA.settingsControl.tradeItems )
+	movingTop = movingTop - list.listHeight - verticalSpacing
+	EMA.settingsControl.tradeItemsButtonRemove = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left,
+		movingTop,
+		L["REMOVE"],
+		EMA.SettingsTradeItemsRemoveClick
+	)
+	movingTop = movingTop -	buttonHeight - verticalSpacing
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ADD_ITEMS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.tradeItemsEditBoxTradeItem = EMAHelperSettings:CreateEditBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["ITEM_DROP"]
+	)
+
+	EMA.settingsControl.tradeItemsEditBoxTradeItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedTradeItem )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.tradeItemsEditBoxToonTag = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		dropBoxWidth,
+		left,
+		movingTop,
+		L["GROUP_LIST"]
+	)
+	EMA.settingsControl.tradeItemsEditBoxToonTag:SetList( EMAApi.GroupList() )
+	EMA.settingsControl.tradeItemsEditBoxToonTag:SetCallback( "OnValueChanged",  EMA.TradeGroupListDropDownList )
+
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.tradeItemsButtonAdd = EMAHelperSettings:CreateButton(
+		EMA.settingsControl,
+		buttonControlWidth,
+		left,
+		movingTop,
+		L["ADD"],
+		EMA.SettingsTradeItemsAddClick
+	)
+	movingTop = movingTop -	buttonHeight
+	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["TRADE_OPTIONS"], movingTop, false )
+	movingTop = movingTop - headingHeight
+	EMA.settingsControl.checkBoxTradeBoEItems = EMAHelperSettings:CreateCheckBox(
+	EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TRADE_BOE_ITEMS"],
+		EMA.SettingsToggleTradeBoEItems,
+		L["TRADE_BOE_ITEMS_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxTradeCRItems = EMAHelperSettings:CreateCheckBox(
+	EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TRADE_REAGENTS"],
+		EMA.SettingsToggleTradeCRItems,
+		L["TRADE_REAGENTS_HELP"]
+	)
+	-- Trade Gold! Keep
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.checkBoxAdjustMoneyWithMasterOnTrade = EMAHelperSettings:CreateCheckBox(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["TRADE_GOLD"],
+		EMA.SettingsToggleAdjustMoneyWithMasterOnTrade,
+		L["TRADE_GOLD_HELP"]
+	)
+	movingTop = movingTop - checkBoxHeight
+	EMA.settingsControl.editBoxGoldAmountToLeaveOnToonTrade = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["GOLD_TO_KEEP"]
+	)
+	EMA.settingsControl.editBoxGoldAmountToLeaveOnToonTrade:SetCallback( "OnEnterPressed", EMA.EditBoxChangedGoldAmountToLeaveOnToonTrade )
+	movingTop = movingTop - editBoxHeight
+	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
+		EMA.settingsControl,
+		headingWidth,
+		left,
+		movingTop,
+		L["MESSAGE_AREA"]
+	)
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
+	movingTop = movingTop - dropdownHeight - verticalSpacing
+	return movingTop
+end
+
+
+-------------------------------------------------------------------------------------------------------------
+-- Settings Callbacks.
+-------------------------------------------------------------------------------------------------------------
+
+
+function EMA:SettingsScrollRefresh()
+	FauxScrollFrame_Update(
+		EMA.settingsControl.tradeItems.listScrollFrame,
+		EMA:GetTradeItemsMaxPosition(),
+		EMA.settingsControl.tradeItems.rowsToDisplay,
+		EMA.settingsControl.tradeItems.rowHeight
+	)
+	EMA.settingsControl.tradeItemsOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.tradeItems.listScrollFrame )
+	for iterateDisplayRows = 1, EMA.settingsControl.tradeItems.rowsToDisplay do
+		-- Reset.
+		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
+		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
+		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
+		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
+		-- Get data.
+		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.tradeItemsOffset
+		if dataRowNumber <= EMA:GetTradeItemsMaxPosition() then
+			-- Put data information into columns.
+			local tradeItemsInformation = EMA:GetTradeItemsAtPosition( dataRowNumber )
+			EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[1].textString:SetText( tradeItemsInformation.name )
+			EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[2].textString:SetText( tradeItemsInformation.tag )
+			-- Highlight the selected row.
+			if dataRowNumber == EMA.settingsControl.tradeItemsHighlightRow then
+				EMA.settingsControl.tradeItems.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
+			end
+		end
+	end
+end
+
+function EMA:SettingsTradeItemsRowClick( rowNumber, columnNumber )
+	if EMA.settingsControl.tradeItemsOffset + rowNumber <= EMA:GetTradeItemsMaxPosition() then
+		EMA.settingsControl.tradeItemsHighlightRow = EMA.settingsControl.tradeItemsOffset + rowNumber
+		EMA:SettingsScrollRefresh()
+	end
+end
+
+function EMA:SettingsTradeItemsRemoveClick( event )
+	StaticPopup_Show( "EMATRADE_CONFIRM_REMOVE_TRADE_ITEMS" )
+end
+
+function EMA:SettingsEditBoxChangedTradeItem( event, text )
+	EMA.autoTradeItemLink = text
+	EMA:SettingsRefresh()
+end
+
+function EMA:TradeGroupListDropDownList (event, value )
+	-- if nil or the blank group then don't get Name.
+	if value == " " or value == nil then
+		return
+	end
+	for index, groupName in ipairs( EMAApi.GroupList() ) do
+		if index == value then
+			EMA.autoTradeItemTag = groupName
+			break
+		end
+	end
+	EMA:SettingsRefresh()
+end
+
+
+function EMA:SettingsTradeItemsAddClick( event )
+	if EMA.autoTradeItemLink ~= nil and EMA.autoTradeItemTag ~= nil then
+		EMA:AddItem( EMA.autoTradeItemLink, EMA.autoTradeItemTag )
+		EMA.autoTradeItemLink = nil
+		EMA.settingsControl.tradeItemsEditBoxTradeItem:SetText( "" )
+		EMA:SettingsRefresh()
+	end
+end
+
+function EMA:OnMessageAreasChanged( message )
+	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
+end
+
+function EMA:OnGroupAreasChanged( message )
+	EMA.settingsControl.tradeItemsEditBoxToonTag:SetList( EMAApi.GroupList() )
+end
+
+function EMA:SettingsSetMessageArea( event, value )
+	EMA.db.messageArea = value
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleShowEMATradeWindow( event, checked )
+	EMA.db.showEMATradeWindow = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleTradeBoEItems(event, checked )
+	EMA.db.tradeBoEItems = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleTradeCRItems(event, checked )
+	EMA.db.tradeCRItems = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAdjustMoneyOnToonViaGuildBank( event, checked )
+	EMA.db.adjustMoneyWithGuildBank = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsToggleAdjustMoneyWithMasterOnTrade( event, checked )
+	EMA.db.adjustMoneyWithMasterOnTrade = checked
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedGoldAmountToLeaveOnToon( event, text )
+	EMA.db.goldAmountToKeepOnToon = tonumber( text )
+	if EMA.db.goldAmountToKeepOnToon == nil then
+		EMA.db.goldAmountToKeepOnToon = 0
+	end
+	EMA:SettingsRefresh()
+end
+
+function EMA:EditBoxChangedGoldAmountToLeaveOnToonTrade( event, text )
+	EMA.db.goldAmountToKeepOnToonTrade = tonumber( text )
+	if EMA.db.goldAmountToKeepOnToonTrade == nil then
+		EMA.db.goldAmountToKeepOnToonTrade = 0
+	end
+	EMA:SettingsRefresh()
+end
+
+-- Settings received.
+function EMA:EMAOnSettingsReceived( characterName, settings )
+	if characterName ~= EMA.characterName then
+		-- Update the settings.
+		EMA.db.messageArea = settings.messageArea
+		EMA.db.showEMATradeWindow = settings.showEMATradeWindow
+		EMA.db.tradeBoEItems = settings.tradeBoEItems
+		EMA.db.tradeCRItems = settings.tradeCRItems
+		EMA.db.autoTradeItemsList = EMAUtilities:CopyTable( settings.autoTradeItemsList )
+		EMA.db.adjustMoneyWithGuildBank = settings.adjustMoneyWithGuildBank
+		EMA.db.goldAmountToKeepOnToon = settings.goldAmountToKeepOnToon
+		EMA.db.adjustMoneyWithMasterOnTrade = settings.adjustMoneyWithMasterOnTrade
+		EMA.db.goldAmountToKeepOnToonTrade = settings.goldAmountToKeepOnToonTrade
+		-- Refresh the settings.
+		EMA:SettingsRefresh()
+		-- Tell the player.
+		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
+	end
+end
+
+function EMA:BeforeEMAProfileChanged()
+end
+
+function EMA:OnEMAProfileChanged()
+	EMA:SettingsRefresh()
+end
+
+function EMA:SettingsRefresh()
+	EMA.settingsControl.checkBoxShowEMATradeWindow:SetValue( EMA.db.showEMATradeWindow )
+	EMA.settingsControl.checkBoxTradeBoEItems:SetValue( EMA.db.tradeBoEItems)
+	EMA.settingsControl.checkBoxTradeCRItems:SetValue( EMA.db.tradeCRItems)
+	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
+	EMA.settingsControl.checkBoxAdjustMoneyWithMasterOnTrade:SetValue( EMA.db.adjustMoneyWithMasterOnTrade )
+	EMA.settingsControl.editBoxGoldAmountToLeaveOnToonTrade:SetText( tostring( EMA.db.goldAmountToKeepOnToonTrade ) )
+	EMA.settingsControl.editBoxGoldAmountToLeaveOnToonTrade:SetDisabled( not EMA.db.adjustMoneyWithMasterOnTrade )
+	EMA.settingsControl.tradeItemsEditBoxTradeItem:SetDisabled( not EMA.db.showEMATradeWindow )
+	EMA.settingsControl.tradeItemsEditBoxToonTag:SetDisabled( not EMA.db.showEMATradeWindow )
+	EMA.settingsControl.tradeItemsButtonRemove:SetDisabled( not EMA.db.showEMATradeWindow )
+	EMA.settingsControl.tradeItemsButtonAdd:SetDisabled( not EMA.db.showEMATradeWindow )
+	EMA:SettingsScrollRefresh()
+
+end
+
+--Comms not sure if we going to use comms here.
+-- A EMA command has been received.
+function EMA:EMAOnCommandReceived( characterName, commandName, ... )
+	if characterName == self.characterName then
+		return
+	end
+end
+
+-------------------------------------------------------------------------------------------------------------
+-- Trade functionality.
+-------------------------------------------------------------------------------------------------------------
+
+-- New Trade stuff
+
+
+function EMA:GetTradeItemsMaxPosition()
+	return #EMA.db.autoTradeItemsList
+end
+
+function EMA:GetTradeItemsAtPosition( position )
+	return EMA.db.autoTradeItemsList[position]
+end
+
+function EMA:AddItem( itemLink, itemTag )
+	-- Get some more information about the item.
+	local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo( itemLink )
+	-- If the item could be found.
+	if name ~= nil then
+		local itemInformation = {}
+		itemInformation.link = link
+		itemInformation.name = name
+		itemInformation.tag = itemTag
+		table.insert( EMA.db.autoTradeItemsList, itemInformation )
+		EMA:SettingsRefresh()
+		EMA:SettingsTradeItemsRowClick( 1, 1 )
+	end
+end
+
+function EMA:RemoveItem()
+	table.remove( EMA.db.autoTradeItemsList, EMA.settingsControl.tradeItemsHighlightRow )
+	EMA:SettingsRefresh()
+	EMA:SettingsTradeItemsRowClick( 1, 1 )
+end
+
+
+function EMA:TRADE_SHOW( event, ... )
+	--Keep for tradeing gold!
+	if EMA.db.adjustMoneyWithMasterOnTrade == true then
+		EMA:ScheduleTimer( "TradeShowAdjustMoneyWithMaster", 0.3 )
+	end
+	-- do trade list with Gold!
+	if EMA.db.showEMATradeWindow == true then
+		EMA:ScheduleTimer("TradeItemsFromList", 0.5 )
+	end
+	if EMA.db.tradeBoEItems == true then
+		EMA:ScheduleTimer("TradeBoEItems", 1.0 )
+	end
+	if EMA.db.tradeCRItems == true then
+		EMA:ScheduleTimer("TradeCRItems", 1.5 )
+	end
+end
+
+
+function EMA:TradeShowAdjustMoneyWithMaster()
+	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+		return
+	end
+	local moneyToKeepOnToon = tonumber( EMA.db.goldAmountToKeepOnToonTrade ) * 10000
+	local moneyOnToon = GetMoney()
+	local moneyToDepositOrWithdraw = moneyOnToon - moneyToKeepOnToon
+	if moneyToDepositOrWithdraw == 0 then
+		return
+	end
+	if moneyToDepositOrWithdraw > 0 then
+		for index, character in EMAApi.TeamListOrderedOnline() do
+			--EMA:Print("Team", character )
+			local teamCharacterName = ( Ambiguate( character, "short" ) )
+			local tradePlayersName = GetUnitName("NPC")
+			if tradePlayersName == teamCharacterName then
+					--EMA:Print("found", tradePlayersName, teamCharacterName, character )
+					if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
+						MoneyInputFrame_SetCopper(TradePlayerInputMoneyFrame, moneyToDepositOrWithdraw)
+						break
+					end
+			else
+				--EMA:Print(tradePlayersName, L["Is Not a Member of the team, Will not trade Gold."])
+			end
+		end
+
+	end
+end
+
+
+function EMA:TradeItemsFromList()
+	for index, character in EMAApi.TeamListOrderedOnline() do
+		--EMA:Print("Team", character )
+		local teamCharacterName = ( Ambiguate( character, "short" ) )
+		local tradePlayersName = GetUnitName("NPC")
+		if tradePlayersName == teamCharacterName then
+			--EMA:Print("found", tradePlayersName, teamCharacterName, character )
+			--Checks the D_B for any items in the list.
+			for position, itemInformation in pairs( EMA.db.autoTradeItemsList ) do
+				if EMAApi.IsCharacterInGroup(EMA.characterName, itemInformation.tag ) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
+				--EMA:Print("Items in list", itemInformation.link )
+					for bag,slot,link in LibBagUtils:Iterate("BAGS", itemInformation.link ) do
+						if bag ~= nil then
+							--EMA:Print("found", bag, slot)
+							for iterateTradeSlots = 1, (MAX_TRADE_ITEMS - 1) do
+								if GetTradePlayerItemLink( iterateTradeSlots ) == nil then
+									PickupContainerItem( bag, slot )
+									ClickTradeButton( iterateTradeSlots )
+								end
+							end
+						end
+					end
+				end
+			end
+		else
+			--EMA:Print(tradePlayersName, L["ERR_WILL_NOT_TRADE"])
+		end
+	end
+end
+
+function EMA:TradeBoEItems()
+	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+		return
+	end
+	for index, character in EMAApi.TeamListOrderedOnline() do
+		--EMA:Print("Team", character )
+		local teamCharacterName = ( Ambiguate( character, "short" ) )
+		local tradePlayersName = GetUnitName("NPC")
+		if tradePlayersName == teamCharacterName then
+			if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
+				for bag,slot,link in LibBagUtils:Iterate("BAGS") do
+					if bag ~= nil then
+						local _, _, locked, quality = GetContainerItemInfo(bag, slot)
+						-- quality is Uncommon (green) to  Epic (purple) 2 - 3 - 4
+						if quality ~= nil and locked == false then
+							if quality >= 2 and quality <= 4 then
+								-- tooltips scan is the olny way to find if the item is BoE in bags!
+								local isBoe = EMAUtilities:ToolTipBagScaner(link, bag, slot)
+								-- if the item is boe then add it to the trade list!
+								if isBoe ~= ITEM_SOULBOUND then
+									--EMA:Print("test21", link, locked)
+									for iterateTradeSlots = 1, (MAX_TRADE_ITEMS - 1) do
+										if GetTradePlayerItemLink( iterateTradeSlots ) == nil then
+											PickupContainerItem( bag, slot )
+											ClickTradeButton( iterateTradeSlots )
+										end
+									end
+								end
+							end
+						end
+					end
+				end
+			end
+		end
+	end
+end
+
+
+function EMA:TradeCRItems()
+	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
+		return
+	end
+	for index, character in EMAApi.TeamListOrderedOnline() do
+		--EMA:Print("Team", character )
+		local teamCharacterName = ( Ambiguate( character, "short" ) )
+		local tradePlayersName = GetUnitName("NPC")
+		if tradePlayersName == teamCharacterName then
+			if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
+				for bag,slot,itemLink in LibBagUtils:Iterate("BAGS") do
+					if itemLink then
+						-- using legion CraftingReagent API, as tooltip massess up some "items"
+						local _,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,isCraftingReagent = GetItemInfo(itemLink)
+						if isCraftingReagent == true then
+							--EMA:Print("TradeCraftingGoods", isCraftingReagent, itemLink)
+							-- tooltips scan is the olny way to find if the item is BOP in bags!
+							local isBop = EMAUtilities:TooltipScaner(itemLink)
+							--EMA:Print("testBOP", itemLink, isBop)
+							if isBop ~= ITEM_BIND_ON_PICKUP then
+							--EMA:Print("AddToTrade", itemLink)
+								for iterateTradeSlots = 1, (MAX_TRADE_ITEMS - 1) do
+									if GetTradePlayerItemLink( iterateTradeSlots ) == nil then
+										PickupContainerItem( bag, slot )
+										ClickTradeButton( iterateTradeSlots )
+									end
+								end
+							end
+						end
+					end
+				end
+			end
+		end
+	end
+end
+
+
+function EMA:TRADE_CLOSED()
+
+end
\ No newline at end of file
diff --git a/EbonyUtilities.lua b/EbonyUtilities.lua
deleted file mode 100644
index 8b6a09f..0000000
--- a/EbonyUtilities.lua
+++ /dev/null
@@ -1,283 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 									--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Localization debugging.
---GAME_LOCALE = "frFR"
-
-local MAJOR, MINOR = "EbonyUtilities-1.0", 1
-local EbonyUtilities, oldMinor = LibStub:NewLibrary( MAJOR, MINOR )
-
-if not EbonyUtilities then
-	return
-end
-
--- Code modified from http://lua-users.org/wiki/CopyTable
-function EbonyUtilities:CopyTable(object)
-    local lookup_table = {}
-    local function _copy(object)
-        if type(object) ~= "table" then
-            return object
-        elseif lookup_table[object] then
-            return lookup_table[object]
-        end
-        local new_table = {}
-        lookup_table[object] = new_table
-        for index, value in pairs(object) do
-            new_table[_copy(index)] = _copy(value)
-        end
-        return setmetatable(new_table, getmetatable(object))
-    end
-    return _copy(object)
-end
-
-function EbonyUtilities:ClearTable( object )
-	for key in next, object do
-		if type( object[key] ) == "table" then
-			EbonyUtilities:ClearTable( object[key] )
-		end
-		object[key] = nil
-	end
-end
-
-function EbonyUtilities:Lowercase( name )
-	if name ~= nil then
-		return string.utf8lower( name )
-	end
-end
-
-function EbonyUtilities:AddRealmToNameIfMissing( name )
-	if name == nil then
-		return
-	end
-	Name = name:gsub("^%l", string.upper )
-	fullName = Name:gsub( "%s+", "")
-	local matchDash = fullName:find( "-" )
-	if not matchDash then
-		local k = GetRealmName()
-		local realm = k:gsub( "%s+", "")
-		fullName = fullName.."-"..realm
-		end
-	return fullName
-end
-
--- Capitalise the name.
-function EbonyUtilities:Capitalise( name )
-    if name ~= nil then
-		return string.utf8upper( string.utf8sub( name, 1, 1 ) )..string.utf8lower( string.utf8sub( name, 2 ) )
-	end
-end
-
-function EbonyUtilities:AddRealmToNameIfNotNil( name, realm )
-	local fullName = name
-	if realm ~= nil and realm:trim() ~= "" then
-		fullName = name.."-"..realm
-	end
-	return fullName
-end
-
--- Money constants.
-EbonyUtilities.COLOUR_COPPER = "eda55f"
-EbonyUtilities.COLOUR_SILVER = "c7c7cf"
-EbonyUtilities.COLOUR_GOLD = "ffd700"
-EbonyUtilities.COPPER_PER_SILVER = 100;
-EbonyUtilities.SILVER_PER_GOLD = 100;
-EbonyUtilities.COPPER_PER_GOLD = EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD;
-
--- value - the amount of money to display formatted.
--- Creates a money string from the value passed; don't pass negative values!
-function EbonyUtilities:FormatMoneyString( value )
-	local gold = floor( value / ( EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) );
-	local silver = floor( ( value - ( gold * EbonyUtilities.COPPER_PER_SILVER * EbonyUtilities.SILVER_PER_GOLD ) ) / EbonyUtilities.COPPER_PER_SILVER );
-	local copper = mod( value, EbonyUtilities.COPPER_PER_SILVER );
-	local goldFormat = format( "|cff%s%d|r", EbonyUtilities.COLOUR_GOLD, gold )
-	local silverFormat = format( "|cff%s%02d|r", EbonyUtilities.COLOUR_SILVER, silver )
-	local copperFormat = format( "|cff%s%02d|r", EbonyUtilities.COLOUR_COPPER, copper )
-	if gold <=0 then
-		goldFormat = ""
-		if silver <= 0 then
-			silverFormat = ""
-		end
-	end
-	return strtrim(goldFormat.." "..silverFormat.." "..copperFormat)
-end
-
--- itemLink - the item link to extract an item id from.
--- Gets an item id from an item link.  Returns nil, if an item id could not be found.
-function EbonyUtilities:GetItemIdFromItemLink( itemLink )
-	if itemLink == nil then
-		return
-	end
-	local itemIdFound = nil
-	local itemStringStart, itemStringEnd, itemString = itemLink:find( "^|c%x+|H(.+)|h%[.*%]" )
-	if itemStringStart then
-		local matchStart, matchEnd, itemId = itemString:find( "(item:%d+)" )
-		if matchStart then
-			itemIdFound = itemId
-		end
-	end
-	return itemIdFound
-end
-
--- itemLink1 - the first item link to compare.
--- itemLink2 - the second item link to compare.
--- Compares two itemlinks to see if they both refer to the same item.  Return true if they do, false if they don't.
-function EbonyUtilities:DoItemLinksContainTheSameItem( itemLink1, itemLink2 )
-	local theSame = false
-	local itemId1 = EbonyUtilities:GetItemIdFromItemLink( itemLink1 )
-	local itemId2 = EbonyUtilities:GetItemIdFromItemLink( itemLink2 )
-	if itemId1 ~= nil and itemId2 ~= nil then
-		if itemId1 == itemId2 then
-			theSame = true
-		end
-	end
-	return theSame
-end
-
--- state - string value containing "on" or "off".
--- onCommand - string that is equivalent to true, like "on".
--- offCommand - string that is equivalent to false, like "off".
--- Returns true for "on"; false for "off"; nil for invalid.
-function EbonyUtilities:GetOnOrOffFromCommand( state, onCommand, offCommand )
-	local setToOn = nil
-	state = state:lower():trim()
-	if state == onCommand then
-		setToOn = true
-	end
-	if state == offCommand then
-		setToOn = false
-	end
-	return setToOn
-end
-
--- Check for a buff.
-function EbonyUtilities:DoesThisCharacterHaveBuff( buffName )
-	local hasBuff = false
-	local iterateBuffs = 1
-	local buff = UnitBuff( "player", iterateBuffs )
-	while buff ~= nil do
-		if buff == buffName then
-			hasBuff = true
-			break
-		end
-		iterateBuffs = iterateBuffs + 1
-		buff = UnitBuff( "player", iterateBuffs )
-	end
-	return hasBuff
-end
-
-function EbonyUtilities:FixValueToRange( value, minValue, maxValue )
-	if value < minValue then
-		value = minValue
-	end
-	if value > maxValue then
-		value = maxValue
-	end
-	return value
-end
-
-
-function EbonyUtilities:CheckIsFromMyRealm( name )
-	--print("test", name)
-	local sameRealm = false
-	if name ~= nil then
-		local player, realm = strsplit( "-", name, 2 )
-		local myRealm = string.gsub(GetRealmName(), "%s+", "")
-		if realm == myRealm then
-			--print("Real SameRealm")
-			sameRealm = true
-		else
-			local connectedServers = GetAutoCompleteRealms()
-			if connectedServers then --Check if realm matches any realm in our connection
-				for i = 1, #connectedServers do
-	 				if realm == connectedServers[i] then
-						--print("connectedRealm")
-						sameRealm = true
-					end
-				end
-			else
-				--print("NotFromARealm")
-				sameRealm = false
-			end
-		end
-	end
-	return sameRealm
-end
-
-function EbonyUtilities:InTagList( tag )
-	local isInTagList = false
-	if JambaApi.DoesGroupExist(  tag ) then
-		isInTagList = true
-	end
-	return isInTagList
-end
-
-function EbonyUtilities:TooltipScaner(item)
-	local text = nil
-	local text2 = nil
-		if item ~= nil then
-			local tooltipName = "AJMScanner"
-			local tooltipScanner = CreateFrame("GameTooltip", tooltipName, nil, "GameTooltipTemplate")
-			tooltipScanner:SetOwner(UIParent, "ANCHOR_NONE")
-			tooltipScanner:SetHyperlink(item)
-			local tooltipText = _G[tooltipName.."TextLeft2"]:GetText()
-			local tooltipTextTwo = _G[tooltipName.."TextLeft3"]:GetText()
-				--print("test",  tooltipTextTwo)
-				text = tooltipText
-				text2 = tooltipTextTwo
-			--print("test9", text, text2)
-			tooltipScanner:Hide()
-		end
-	return text, text2
-end
-
-
-function EbonyUtilities:ToolTipBagScaner(item, bag, slot)
-	--print("test", item, bag, slot )
-	if item ~= nil or bag ~= nil or slot ~= nil then
-		local boe = nil
-		local ilvl = nil
-		local tooltipName = "AJMBagScanner"
-		local tooltipbagScanner = CreateFrame("GameTooltip", tooltipName , nil, "GameTooltipTemplate")
-			tooltipbagScanner:SetOwner(UIParent, "ANCHOR_NONE")
-			tooltipbagScanner:SetBagItem(bag, slot)
-			tooltipbagScanner:Show()
-		for i = 1,6 do
-			local t = _G[tooltipName.."TextLeft"..i]:GetText()
-			--print("test", t)
-			if (t == ITEM_SOULBOUND) then
-				boe = ITEM_SOULBOUND
-			end
-		end
-	    tooltipbagScanner:Hide()
-		return boe
-	end
-end
-
--- GetPetOwner
-function EbonyUtilities:getPetOwner( petName )
-	--print(petName)
-	if petName ~= nil then
-		local tooltipName = "AJMPetScanner"
-		local tooltipPetScanner = CreateFrame("GameTooltip", tooltipName, nil, "GameTooltipTemplate")
-		tooltipPetScanner:ClearLines()
-		tooltipPetScanner:SetOwner(WorldFrame, "ANCHOR_NONE")
-		tooltipPetScanner:SetUnit( petName )
-		local ownerName = _G[tooltipName.."TextLeft2"]:GetText() -- This is the line with <[Player]'s Pet>
-		if not ownerName then
-			 return nil
-		end
-		local owner, _ = string.split("'",ownerName)
-		tooltipPetScanner:Hide()
-		return owner -- This is the pet's owner
-	--	print(owner)
-	end
-end
diff --git a/Embeds.xml b/Embeds.xml
deleted file mode 100644
index c0f1efa..0000000
--- a/Embeds.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-				EMA - ( Ebony's MultiBoxing Assistant )
-				Current Author: Jennifer Cally (Ebony)
-				License: MIT License 2018 Jennifer Cally
-
-				Some Code Used from 'Jamba' that is
-				Released under the MIT License
-				'Jamba' Copyright 2008-2015  Michael "Jafula" Miller
--->
-
-<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd" xmlns="http://www.blizzard.com/wow/ui/">
-	<Script file="Libs\LibStub\LibStub.lua" />
-	<Include file="Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml" />
-	<Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml" />
-	<Include file="Libs\AceGUI-3.0\AceGUI-3.0.xml" />
-	<Include file="Libs\AceConfig-3.0\AceConfig-3.0.xml" />
-	<Include file="Libs\AceConsole-3.0\AceConsole-3.0.xml" />
-	<Include file="Libs\AceDB-3.0\AceDB-3.0.xml" />
-	<Include file="Libs\AceDBOptions-3.0\AceDBOptions-3.0.xml" />
-	<Include file="Libs\AceEvent-3.0\AceEvent-3.0.xml" />
-	<Include file="Libs\AceLocale-3.0\AceLocale-3.0.xml" />
-	<Include file="Libs\AceTimer-3.0\AceTimer-3.0.xml" />
-	<Include file="Libs\AceComm-3.0\AceComm-3.0.xml" />
-	<Include file="Libs\AceHook-3.0\AceHook-3.0.xml" />
-	<Include file="Libs\AceSerializer-3.0\AceSerializer-3.0.xml" />
-	<Include file="Libs\LibSharedMedia-3.0\lib.xml" />
-	<Include file="Libs\AceGUI-3.0-SharedMediaWidgets\widget.xml" />
-	<Include file="Libs\LibBagUtils-1.0\LibBagUtils-1.0.xml" />
-	<Include file="Libs\LibItemUpgradeInfo-1.0\LibItemUpgradeInfo-1.0.xml" />
-	<Script file="Libs\LibAuras\LibAuras.lua" />
-	<Script file="Libs\EMALibActionButton-1.0.lua" />
-	<Script file="Libs\LibButtonGlow-1.0\LibButtonGlow-1.0.lua" />
-	<Script file="Libs\UTF8\utf8data.lua" />
-	<Script file="Libs\UTF8\utf8.lua" />
-	<Script file="GUI\AceGUIContainer-EMAWindow.lua" />
-	<Script file="GUI\AceGUIContainer-EMATreeGroup.lua" />
-	<Script file="GUI\AceGUIWidget-EMANormalLabel.lua" />
-	<Script file="GUI\AceGUIWidget-EMAContinueLabel.lua" />
-	<Script file="GUI\AceGUIWidget-EMAKeybinding.lua" />
-</Ui>
diff --git a/GUI/AceGUIContainer-EMATreeGroup.lua b/GUI/AceGUIContainer-EMATreeGroup.lua
deleted file mode 100644
index 1930da5..0000000
--- a/GUI/AceGUIContainer-EMATreeGroup.lua
+++ /dev/null
@@ -1,748 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
-
---[[
-File modified from AceGUI TreeGroup container.  Used under Ace3 modified BSD licence.
-
-Version 2 Support for the new Jamba EE 8.0 Build
-
-
-]]--
-
---[[-----------------------------------------------------------------------------
-TreeGroup Container
-Container that uses a tree control to switch between groups.
--------------------------------------------------------------------------------]]
-local Type, Version = "EMATreeGroup", 1
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
-local WoW80 = select(4, GetBuildInfo()) >= 80000
--- Lua APIs
-local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
-local math_min, math_max, floor = math.min, math.max, floor
-local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GameTooltip, FONT_COLOR_CODE_CLOSE
-
--- Recycling functions
-local new, del
-do
-	local pool = setmetatable({},{__mode='k'})
-	function new()
-		local t = next(pool)
-		if t then
-			pool[t] = nil
-			return t
-		else
-			return {}
-		end
-	end
-	function del(t)
-		for k in pairs(t) do
-			t[k] = nil
-		end
-		pool[t] = true
-	end
-end
-
-local DEFAULT_TREE_WIDTH = 200
-local DEFAULT_TREE_SIZABLE = true
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-local function GetButtonUniqueValue(line)
-	local parent = line.parent
-	if parent and parent.value then
-		return GetButtonUniqueValue(parent).."\001"..line.value
-	else
-		return line.value
-	end
-end
-
-local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
-	local self = button.obj
-	local toggle = button.toggle
-	local frame = self.frame
-	local text = treeline.text or ""
-	local icon = treeline.icon
-	local iconCoords = treeline.iconCoords
-	local level = treeline.level
-	local value = treeline.value
-	local uniquevalue = treeline.uniquevalue
-	local disabled = treeline.disabled
-
-	button.treeline = treeline
-	button.value = value
-	button.uniquevalue = uniquevalue
-	if selected then
-		button:LockHighlight()
-		button.selected = true
-	else
-		button:UnlockHighlight()
-		button.selected = false
-	end
-	local normalTexture = button:GetNormalTexture()
-	local line = button.line
-	button.level = level
-	if ( level == 1 ) then
-		button:SetNormalFontObject("GameFontNormal")
-		button:SetHighlightFontObject("GameFontHighlight")
-		button.text:SetPoint("LEFT", (icon and 35 or 0) + 8, -4)
-	else
-		button:SetNormalFontObject("GameFontHighlightSmall")
-		button:SetHighlightFontObject("GameFontHighlightSmall")
-		button.text:SetPoint("LEFT", (icon and 35 or 0) + 12 * level, -4)
-	end
-
-	if disabled then
-		button:EnableMouse(false)
-		button.text:SetText("|cff808080"..text..FONT_COLOR_CODE_CLOSE)
-	else
-		button.text:SetText(text)
-		button:EnableMouse(true)
-	end
-
-	if icon then
-		button.icon:SetTexture(icon)
-		if ( level == 1 ) then
-			button.icon:SetPoint("LEFT", 4 * level, (level == 1) and 0 or 1)
-		else
-			button.icon:SetPoint("LEFT", 8 * level, (level == 1) and 0 or 1)
-		end
-	else
-		button.icon:SetTexture(nil)
-	end
-
-	if iconCoords then
-		button.icon:SetTexCoord(unpack(iconCoords))
-	else
-		button.icon:SetTexCoord(0, 1, 0, 1)
-	end
-
-	if canExpand then
-		if not isExpanded then
-			toggle:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-UP")
-			toggle:SetPushedTexture("Interface\\Buttons\\UI-PlusButton-DOWN")
-		else
-			toggle:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-UP")
-			toggle:SetPushedTexture("Interface\\Buttons\\UI-MinusButton-DOWN")
-		end
-		toggle:Show()
-	else
-		toggle:Hide()
-	end
-
-end
-
-local function ShouldDisplayLevel(tree)
-	local result = false
-	for k, v in ipairs(tree) do
-		if v.children == nil and v.visible ~= false then
-			result = true
-		elseif v.children then
-			result = result or ShouldDisplayLevel(v.children)
-		end
-		if result then return result end
-	end
-	return false
-end
-
-local function addLine(self, v, tree, level, parent)
-	local line = new()
-	line.value = v.value
-	line.text = v.text
-	line.icon = v.icon
-	line.iconCoords = v.iconCoords
-	line.disabled = v.disabled
-	line.tree = tree
-	line.level = level
-	line.parent = parent
-	line.visible = v.visible
-	line.uniquevalue = GetButtonUniqueValue(line)
-	if v.children then
-		line.hasChildren = true
-	else
-		line.hasChildren = nil
-	end
-	self.lines[#self.lines+1] = line
-	return line
-end
-
---fire an update after one frame to catch the treeframes height
-local function FirstFrameUpdate(frame)
-	local self = frame.obj
-	frame:SetScript("OnUpdate", nil)
-	--self:RefreshTree()
-	self:RefreshTree(nil, true)
-end
-
-local function BuildUniqueValue(...)
-	local n = select('#', ...)
-	if n == 1 then
-		return ...
-	else
-		return (...).."\001"..BuildUniqueValue(select(2,...))
-	end
-end
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Expand_OnClick(frame)
-	local button = frame.button
-	local self = button.obj
-	local status = (self.status or self.localstatus).groups
-	status[button.uniquevalue] = not status[button.uniquevalue]
-	self:RefreshTree()
-end
-
-local function Button_OnClick(frame)
-	local self = frame.obj
-	self:Fire("OnClick", frame.uniquevalue, frame.selected)
-	if not frame.selected then
-		self:SetSelected(frame.uniquevalue)
-		frame.selected = true
-		frame:LockHighlight()
-		self:RefreshTree()
-	end
-	AceGUI:ClearFocus()
-end
-
-local function Button_OnDoubleClick(button)
-	local self = button.obj
-	local status = self.status or self.localstatus
-	local status = (self.status or self.localstatus).groups
-	status[button.uniquevalue] = not status[button.uniquevalue]
-	self:RefreshTree()
-end
-
-local function Button_OnEnter(frame)
-	local self = frame.obj
-	self:Fire("OnButtonEnter", frame.uniquevalue, frame)
-
-	if self.enabletooltips then
-		GameTooltip:SetOwner(frame, "ANCHOR_NONE")
-		GameTooltip:SetPoint("LEFT",frame,"RIGHT")
-		GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
-
-		GameTooltip:Show()
-	end
-end
-
-local function Button_OnLeave(frame)
-	local self = frame.obj
-	self:Fire("OnButtonLeave", frame.uniquevalue, frame)
-
-	if self.enabletooltips then
-		GameTooltip:Hide()
-	end
-end
-
-local function OnScrollValueChanged(frame, value)
-	if frame.obj.noupdate then return end
-	local self = frame.obj
-	local status = self.status or self.localstatus
-	status.scrollvalue = floor(value + 0.5)
-	self:RefreshTree()
-	AceGUI:ClearFocus()
-end
-
-local function Tree_OnSizeChanged(frame)
-	frame.obj:RefreshTree()
-end
-
-local function Tree_OnMouseWheel(frame, delta)
-	local self = frame.obj
-	if self.showscroll then
-		local scrollbar = self.scrollbar
-		local min, max = scrollbar:GetMinMaxValues()
-		local value = scrollbar:GetValue()
-		local newvalue = math_min(max,math_max(min,value - delta))
-		if value ~= newvalue then
-			scrollbar:SetValue(newvalue)
-		end
-	end
-end
-
-local function Dragger_OnLeave(frame)
-	frame:SetBackdropColor(1, 1, 1, 0)
-end
-
-local function Dragger_OnEnter(frame)
-	frame:SetBackdropColor(1, 1, 1, 0.8)
-end
-
-local function Dragger_OnMouseDown(frame)
-	local treeframe = frame:GetParent()
-	treeframe:StartSizing("RIGHT")
-end
-
-local function Dragger_OnMouseUp(frame)
-	local treeframe = frame:GetParent()
-	local self = treeframe.obj
-	local frame = treeframe:GetParent()
-	treeframe:StopMovingOrSizing()
-	--treeframe:SetScript("OnUpdate", nil)
-	treeframe:SetUserPlaced(false)
-	--Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize
-	treeframe:SetHeight(0)
-	treeframe:SetPoint("TOPLEFT", frame, "TOPLEFT",0,0)
-	treeframe:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT",0,0)
-	local status = self.status or self.localstatus
-	status.treewidth = treeframe:GetWidth()
-
-	treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth())
-	-- recalculate the content width
-	treeframe.obj:OnWidthSet(status.fullwidth)
-	-- update the layout of the content
-	treeframe.obj:DoLayout()
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
-		self:EnableButtonTooltips(true)
-		self.frame:SetScript("OnUpdate", FirstFrameUpdate)
-	end,
-
-	["OnRelease"] = function(self)
-		self.status = nil
-		self.tree = nil
-		self.frame:SetScript("OnUpdate", nil)
-		for k, v in pairs(self.localstatus) do
-			if k == "groups" then
-				for k2 in pairs(v) do
-					v[k2] = nil
-				end
-			else
-				self.localstatus[k] = nil
-			end
-		end
-		self.localstatus.scrollvalue = 0
-		self.localstatus.treewidth = DEFAULT_TREE_WIDTH
-		self.localstatus.treesizable = DEFAULT_TREE_SIZABLE
-	end,
-
-	["EnableButtonTooltips"] = function(self, enable)
-		self.enabletooltips = enable
-	end,
-
-	["CreateButton"] = function(self)
-		local num = AceGUI:GetNextWidgetNum("TreeGroupButton")
-		local button = CreateFrame("Button", ("AceGUI30TreeButton%d"):format(num), self.treeframe, "OptionsListButtonTemplate")
-		button.obj = self
-
-		local icon = button:CreateTexture(nil, "OVERLAY")
-		icon:SetWidth(35)
-		icon:SetHeight(35)
-		button.icon = icon
-
-		button:SetScript("OnClick",Button_OnClick)
-		button:SetScript("OnDoubleClick", Button_OnDoubleClick)
-		button:SetScript("OnEnter",Button_OnEnter)
-		button:SetScript("OnLeave",Button_OnLeave)
-
-		button.toggle.button = button
-		button.toggle:SetScript("OnClick",Expand_OnClick)
-
-		button.text:SetHeight(14) -- Prevents text wrapping
-
-		return button
-	end,
-
-	["SetStatusTable"] = function(self, status)
-		assert(type(status) == "table")
-		self.status = status
-		if not status.groups then
-			status.groups = {}
-		end
-		if not status.scrollvalue then
-			status.scrollvalue = 0
-		end
-		if not status.treewidth then
-			status.treewidth = DEFAULT_TREE_WIDTH
-		end
-		if status.treesizable == nil then
-			status.treesizable = DEFAULT_TREE_SIZABLE
-		end
-		self:SetTreeWidth(status.treewidth,status.treesizable)
-		self:RefreshTree()
-	end,
-
-	--sets the tree to be displayed
-	["SetTree"] = function(self, tree, filter)
-		self.filter = filter
-		if tree then
-			assert(type(tree) == "table")
-		end
-		self.tree = tree
-		self:RefreshTree()
-	end,
-
-	["BuildLevel"] = function(self, tree, level, parent)
-		local groups = (self.status or self.localstatus).groups
-		local hasChildren = self.hasChildren
-
-		for i, v in ipairs(tree) do
-			if v.children then
-				if not self.filter or ShouldDisplayLevel(v.children) then
-					local line = addLine(self, v, tree, level, parent)
-					if groups[line.uniquevalue] then
-						self:BuildLevel(v.children, level+1, line)
-					end
-				end
-			elseif v.visible ~= false or not self.filter then
-				addLine(self, v, tree, level, parent)
-			end
-		end
-	end,
-
---	["RefreshTree"] = function(self,scrollToSelection)
-	["RefreshTree"] = function(self,scrollToSelection,fromOnUpdate)
-		local buttons = self.buttons
-		local lines = self.lines
-
-		for i, v in ipairs(buttons) do
-			v:Hide()
-		end
-		while lines[1] do
-			local t = tremove(lines)
-			for k in pairs(t) do
-				t[k] = nil
-			end
-			del(t)
-		end
-
-		if not self.tree then return end
-		--Build the list of visible entries from the tree and status tables
-		local status = self.status or self.localstatus
-		local groupstatus = status.groups
-		local tree = self.tree
-
-		local treeframe = self.treeframe
-
-		status.scrollToSelection = status.scrollToSelection or scrollToSelection	-- needs to be cached in case the control hasn't been drawn yet (code bails out below)
-
-		self:BuildLevel(tree, 1)
-
-		local numlines = #lines
-
-		--local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
-		local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 36 ) / 36 ))
-		if maxlines <= 0 then return end
-
-		-- workaround for lag spikes on WoW 8.0
-		if WoW80 and self.frame:GetParent() == UIParent and not fromOnUpdate then
-			self.frame:SetScript("OnUpdate", FirstFrameUpdate)
-			return
-		end
-
-		local first, last
-
-		scrollToSelection = status.scrollToSelection
-		status.scrollToSelection = nil
-
-		if numlines <= maxlines then
-			--the whole tree fits in the frame
-			status.scrollvalue = 0
-			self:ShowScroll(false)
-			first, last = 1, numlines
-		else
-			self:ShowScroll(true)
-			--scrolling will be needed
-			self.noupdate = true
-			self.scrollbar:SetMinMaxValues(0, numlines - maxlines)
-			--check if we are scrolled down too far
-			if numlines - status.scrollvalue < maxlines then
-				status.scrollvalue = numlines - maxlines
-			end
-			self.noupdate = nil
-			first, last = status.scrollvalue+1, status.scrollvalue + maxlines
-			--show selection?
-			if scrollToSelection and status.selected then
-				local show
-				for i,line in ipairs(lines) do	-- find the line number
-					if line.uniquevalue==status.selected then
-						show=i
-					end
-				end
-				if not show then
-					-- selection was deleted or something?
-				elseif show>=first and show<=last then
-					-- all good
-				else
-					-- scrolling needed!
-					if show<first then
-						status.scrollvalue = show-1
-					else
-						status.scrollvalue = show-maxlines
-					end
-					first, last = status.scrollvalue+1, status.scrollvalue + maxlines
-				end
-			end
-			if self.scrollbar:GetValue() ~= status.scrollvalue then
-				self.scrollbar:SetValue(status.scrollvalue)
-			end
-		end
-
-		local buttonnum = 1
-		for i = first, last do
-			local line = lines[i]
-			local button = buttons[buttonnum]
-			if not button then
-				button = self:CreateButton()
-
-				buttons[buttonnum] = button
-				button:SetParent(treeframe)
-				button:SetFrameLevel(treeframe:GetFrameLevel()+1)
-				button:ClearAllPoints()
-				if buttonnum == 1 then
-					if self.showscroll then
-						button:SetPoint("TOPRIGHT", -22, -15)
-						button:SetPoint("TOPLEFT", 0, -15)
-					else
-						button:SetPoint("TOPRIGHT", 0, -15)
-						button:SetPoint("TOPLEFT", 0, -15)
-					end
-				else
-					button:SetPoint("TOPRIGHT", buttons[buttonnum-1], "BOTTOMRIGHT",0, -20 )-- 8
-					button:SetPoint("TOPLEFT", buttons[buttonnum-1], "BOTTOMLEFT",0, -20 )
-				end
-			end
-
-			UpdateButton(button, line, status.selected == line.uniquevalue, line.hasChildren, groupstatus[line.uniquevalue] )
-			button:Show()
-			buttonnum = buttonnum + 1
-		end
-
-	end,
-
-	["SetSelected"] = function(self, value)
-		local status = self.status or self.localstatus
-		if status.selected ~= value then
-			status.selected = value
-			self:Fire("OnGroupSelected", value)
-		end
-	end,
-
-	["Select"] = function(self, uniquevalue, ...)
-		self.filter = false
-		local status = self.status or self.localstatus
-		local groups = status.groups
-		local path = {...}
-		for i = 1, #path do
-			groups[tconcat(path, "\001", 1, i)] = true
-		end
-		status.selected = uniquevalue
-		self:RefreshTree(true)
-		self:Fire("OnGroupSelected", uniquevalue)
-	end,
-
-	["SelectByPath"] = function(self, ...)
-		self:Select(BuildUniqueValue(...), ...)
-	end,
-
-	["SelectByValue"] = function(self, uniquevalue)
-		self:Select(uniquevalue, ("\001"):split(uniquevalue))
-	end,
-
-	["ShowScroll"] = function(self, show)
-		self.showscroll = show
-		if show then
-			self.scrollbar:Show()
-			if self.buttons[1] then
-				self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",-22,-10)
-			end
-		else
-			self.scrollbar:Hide()
-			if self.buttons[1] then
-				self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",0,-10)
-			end
-		end
-	end,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		local treeframe = self.treeframe
-		local status = self.status or self.localstatus
-		status.fullwidth = width
-
-		local contentwidth = width - status.treewidth - 20
-		if contentwidth < 0 then
-			contentwidth = 0
-		end
-		content:SetWidth(contentwidth)
-		content.width = contentwidth
-
-		local maxtreewidth = math_min(400, width - 50)
-
-		if maxtreewidth > 100 and status.treewidth > maxtreewidth then
-			self:SetTreeWidth(maxtreewidth, status.treesizable)
-		end
-		treeframe:SetMaxResize(maxtreewidth, 1600)
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		local contentheight = height - 30
-		if contentheight < 0 then
-			contentheight = 0
-		end
-		content:SetHeight(contentheight)
-		content.height = contentheight
-	end,
-
-	["SetTreeWidth"] = function(self, treewidth, resizable)
-		if not resizable then
-			if type(treewidth) == 'number' then
-				resizable = false
-			elseif type(treewidth) == 'boolean' then
-				resizable = treewidth
-				treewidth = DEFAULT_TREE_WIDTH
-			else
-				resizable = false
-				treewidth = DEFAULT_TREE_WIDTH
-			end
-		end
-		self.treeframe:SetWidth(treewidth)
-		self.dragger:EnableMouse(resizable)
-
-		local status = self.status or self.localstatus
-		status.treewidth = treewidth
-		status.treesizable = resizable
-
-		-- recalculate the content width
-		if status.fullwidth then
-			self:OnWidthSet(status.fullwidth)
-		end
-	end,
-
-	["GetTreeWidth"] = function(self)
-		local status = self.status or self.localstatus
-		return status.treewidth or DEFAULT_TREE_WIDTH
-	end,
-
-	["LayoutFinished"] = function(self, width, height)
-		if self.noAutoHeight then return end
-		self:SetHeight((height or 0) + 20)
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local PaneBackdrop  = {
-	--bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
-	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-	tile = true, tileSize = 16, edgeSize = 16,
-	insets = { left = 3, right = 3, top = 5, bottom = 3 }
-}
-
-local DraggerBackdrop  = {
-	bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
-	edgeFile = nil,
-	tile = true, tileSize = 16, edgeSize = 0,
-	insets = { left = 3, right = 3, top = 7, bottom = 7 }
-}
-
-local function Constructor()
-	local num = AceGUI:GetNextWidgetNum(Type)
-	local frame = CreateFrame("Frame", nil, UIParent)
-
-	local treeframe = CreateFrame("Frame", nil, frame)
-	treeframe:SetPoint("TOPLEFT")
-	treeframe:SetPoint("BOTTOM")
-	treeframe:SetWidth(DEFAULT_TREE_WIDTH)
-	treeframe:EnableMouseWheel(true)
-	treeframe:SetBackdrop(PaneBackdrop)
-	treeframe:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
-	treeframe:SetBackdropBorderColor(0.4, 0.4, 0.4)
-	treeframe:SetResizable(true)
-	treeframe:SetMinResize(100, 1)
-	treeframe:SetMaxResize(400, 1600)
-	treeframe:SetScript("OnUpdate", FirstFrameUpdate)
-	treeframe:SetScript("OnSizeChanged", Tree_OnSizeChanged)
-	treeframe:SetScript("OnMouseWheel", Tree_OnMouseWheel)
-
-	local dragger = CreateFrame("Frame", nil, treeframe)
-	dragger:SetWidth(8)
-	dragger:SetPoint("BOTTOM", treeframe, "BOTTOM")
-	dragger:SetPoint("BOTTOM", treeframe, "BOTTOM")
-	dragger:SetBackdrop(DraggerBackdrop)
-	dragger:SetBackdropColor(1, 1, 1, 0)
-	dragger:SetScript("OnEnter", Dragger_OnEnter)
-	dragger:SetScript("OnLeave", Dragger_OnLeave)
-	dragger:SetScript("OnMouseDown", Dragger_OnMouseDown)
-	dragger:SetScript("OnMouseUp", Dragger_OnMouseUp)
-
-	local scrollbar = CreateFrame("Slider", ("AceConfigDialogTreeGroup%dScrollBar"):format(num), treeframe, "UIPanelScrollBarTemplate")
-	scrollbar:SetScript("OnValueChanged", nil)
-	scrollbar:SetPoint("TOPRIGHT", -10, -26)
-	scrollbar:SetPoint("BOTTOMRIGHT", -10, 26)
-	scrollbar:SetMinMaxValues(0,0)
-	scrollbar:SetValueStep(1)
-	scrollbar:SetValue(0)
-	scrollbar:SetWidth(16)
-	scrollbar:SetScript("OnValueChanged", OnScrollValueChanged)
-
-	local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
-	scrollbg:SetAllPoints(scrollbar)
-	scrollbg:SetColorTexture(0,0,0,0.4)
-
-	local border = CreateFrame("Frame",nil,frame)
-	border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
-	border:SetPoint("BOTTOMRIGHT")
-	border:SetBackdrop(PaneBackdrop)
-	border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
-	border:SetBackdropBorderColor(0.4, 0.4, 0.4)
-
-	--Container Support
-	local content = CreateFrame("Frame", nil, border)
-	content:SetPoint("TOPLEFT", 10, -10)
-	content:SetPoint("BOTTOMRIGHT", -10, 10)
-
-	local widget = {
-		frame        = frame,
-		lines        = {},
-		levels       = {},
-		buttons      = {},
-		hasChildren  = {},
-		localstatus  = { groups = {}, scrollvalue = 0 },
-		filter       = false,
-		treeframe    = treeframe,
-		dragger      = dragger,
-		scrollbar    = scrollbar,
-		border       = border,
-		content      = content,
-		type         = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	treeframe.obj, dragger.obj, scrollbar.obj = widget, widget, widget
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/GUI/AceGUIContainer-EMAWindow.lua b/GUI/AceGUIContainer-EMAWindow.lua
deleted file mode 100644
index 2043a98..0000000
--- a/GUI/AceGUIContainer-EMAWindow.lua
+++ /dev/null
@@ -1,348 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
-
---[[
-ver 2 Update for new GUI!
-
-
-File modified from AceGUI Window container.  Used under Ace3 modified BSD licence.
-
-Was updated by Ebony.
-
-Added logo Support. Changed Size of frame to suppot newer dispalys
-
-EMA changes
-Really the olny thing changed is to lower the setframestata for InitializePopupDialogs.
-
-]]--
-
---[[-----------------------------------------------------------------------------
-Frame Container
--------------------------------------------------------------------------------]]
-local Type, Version = "EMAWindow", 1
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs, assert, type = pairs, assert, type
-local wipe = table.wipe
-
--- WoW APIs
-local PlaySound = PlaySound
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: CLOSE
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Button_OnClick(frame)
-	--7.3 PlaySound Update.
-	PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
-	frame.obj:Hide()
-end
-
-local function Frame_OnClose(frame)
-	frame.obj:Fire("OnClose")
-end
-
-local function Frame_OnMouseDown(frame)
-	AceGUI:ClearFocus()
-end
-
-local function Title_OnMouseDown(frame)
-	frame:GetParent():StartMoving()
-	AceGUI:ClearFocus()
-end
-
-local function MoverSizer_OnMouseUp(mover)
-	local frame = mover:GetParent()
-	frame:StopMovingOrSizing()
-	local self = frame.obj
-	local status = self.status or self.localstatus
-	status.width = frame:GetWidth()
-	status.height = frame:GetHeight()
-	status.top = frame:GetTop()
-	status.left = frame:GetLeft()
-end
-
-local function SizerSE_OnMouseDown(frame)
-	frame:GetParent():StartSizing("BOTTOMRIGHT")
-	AceGUI:ClearFocus()
-end
-
-local function SizerS_OnMouseDown(frame)
-	frame:GetParent():StartSizing("BOTTOM")
-	AceGUI:ClearFocus()
-end
-
-local function SizerE_OnMouseDown(frame)
-	frame:GetParent():StartSizing("RIGHT")
-	AceGUI:ClearFocus()
-end
-
-local function StatusBar_OnEnter(frame)
-	frame.obj:Fire("OnEnterStatusBar")
-end
-
-local function StatusBar_OnLeave(frame)
-	frame.obj:Fire("OnLeaveStatusBar")
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self.frame:SetParent(UIParent)
-		self.frame:SetFrameStrata("HIGH")
-		self:SetTitle()
-		self:SetStatusText()
-		self:ApplyStatus()
-		self:Show()
-        self:EnableResize(true)
-	end,
-
-	["OnRelease"] = function(self)
-		self.status = nil
-		wipe(self.localstatus)
-	end,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		local contentwidth = width - 34
-		if contentwidth < 0 then
-			contentwidth = 0
-		end
-		content:SetWidth(contentwidth)
-		content.width = contentwidth
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		local contentheight = height - 57
-		if contentheight < 0 then
-			contentheight = 0
-		end
-		content:SetHeight(contentheight)
-		content.height = contentheight
-	end,
-	--Text Is the Width of the Logo!
-	["SetTitle"] = function(self, title)
-		self.titletext:SetText(title)
-		self.titlebg:SetWidth((self.titletext:GetWidth() or 0) + 300)
-	end,
-
-	["SetStatusText"] = function(self, text)
-		self.statustext:SetText(text)
-	end,
-
-	["Hide"] = function(self)
-		self.frame:Hide()
-	end,
-
-	["Show"] = function(self)
-		self.frame:Show()
-	end,
-
-	["EnableResize"] = function(self, state)
-		local func = state and "Show" or "Hide"
-		self.sizer_se[func](self.sizer_se)
-		self.sizer_s[func](self.sizer_s)
-		self.sizer_e[func](self.sizer_e)
-	end,
-
-	-- called to set an external table to store status in
-	["SetStatusTable"] = function(self, status)
-		assert(type(status) == "table")
-		self.status = status
-		self:ApplyStatus()
-	end,
-
-	["ApplyStatus"] = function(self)
-		local status = self.status or self.localstatus
-		local frame = self.frame
-		self:SetWidth(status.width or 700)
-		self:SetHeight(status.height or 500)
-		frame:ClearAllPoints()
-		if status.top and status.left then
-			frame:SetPoint("TOP", UIParent, "BOTTOM", 0, status.top)
-			frame:SetPoint("LEFT", UIParent, "LEFT", status.left, 0)
-		else
-			frame:SetPoint("CENTER")
-		end
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local FrameBackdrop = {
-	bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
-	edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
-	tile = true, tileSize = 32, edgeSize = 32,
-	insets = { left = 8, right = 8, top = 8, bottom = 8 }
-}
-
-local PaneBackdrop  = {
-	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-	tile = true, tileSize = 16, edgeSize = 16,
-	insets = { left = 3, right = 3, top = 5, bottom = 3 }
-}
-
-local function Constructor()
-	local frame = CreateFrame("Frame", nil, UIParent)
-	frame:Hide()
-
-	frame:EnableMouse(true)
-	frame:SetMovable(true)
-	frame:SetResizable(true)
-	--frame:SetFrameStrata("FULLSCREEN_DIALOG")
-	frame:SetFrameStrata("HIGH")
-	frame:SetBackdrop(FrameBackdrop)
-	frame:SetBackdropColor(0, 0, 0, 1)
-	frame:SetMinResize(400, 200)
-	frame:SetToplevel(true)
-	frame:SetScript("OnHide", Frame_OnClose)
-	frame:SetScript("OnMouseDown", Frame_OnMouseDown)
-
-	local closebutton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate")
-	closebutton:SetScript("OnClick", Button_OnClick)
-	closebutton:SetPoint("BOTTOMRIGHT", -27, 17)
-	closebutton:SetHeight(20)
-	closebutton:SetWidth(100)
-	closebutton:SetText(CLOSE)
-
-	local statusbg = CreateFrame("Button", nil, frame)
-	statusbg:SetPoint("BOTTOMLEFT", 15, 15)
-	statusbg:SetPoint("BOTTOMRIGHT", -132, 15)
-	statusbg:SetHeight(24)
-	statusbg:SetBackdrop(PaneBackdrop)
-	statusbg:SetBackdropColor(0.1,0.1,0.1)
-	statusbg:SetBackdropBorderColor(0.4,0.4,0.4)
-	statusbg:SetScript("OnEnter", StatusBar_OnEnter)
-	statusbg:SetScript("OnLeave", StatusBar_OnLeave)
-
-	local statustext = statusbg:CreateFontString(nil, "OVERLAY", "GameFontNormal")
-	statustext:SetPoint("TOPLEFT", 7, -2)
-	statustext:SetPoint("BOTTOMRIGHT", -7, 2)
-	statustext:SetHeight(20)
-	statustext:SetJustifyH("LEFT")
-	statustext:SetText("")
-
-	--Hacky hacky to set a logo then text -- temp logo ChangeMe
-	local titlebg = frame:CreateTexture(nil, "OVERLAY")
-	--titlebg:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
-
-	titlebg:SetTexture("Interface\\Addons\\EMA\\Media\\HeaderLogo.tga")
-	titlebg:SetTexCoord(0, 0.99, 0, 0.99)
-	--titlebg:SetTexCoord(0.10, 0.10, 0.10, 0.10)
-	titlebg:SetPoint("TOP", 0, 50)
-	titlebg:SetWidth(300)
-	titlebg:SetHeight(100)
-
-	local title = CreateFrame("Frame", nil, frame)
-	title:EnableMouse(true)
-	title:SetScript("OnMouseDown", Title_OnMouseDown)
-	title:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
-	title:SetAllPoints(titlebg)
-
-	local titletext = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
-	titletext:SetPoint("TOP", titlebg, "TOP", -100, -14)
-
---This was a frame we don't need with a logo!
---[[
-	local titlebg_l = frame:CreateTexture(nil, "OVERLAY")
-	titlebg_l:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
-	titlebg_l:SetTexCoord(0.21, 0.31, 0, 0.63)
-	titlebg_l:SetPoint("RIGHT", titlebg, "LEFT")
-	titlebg_l:SetWidth(30)
-	titlebg_l:SetHeight(40)
-
-	local titlebg_r = frame:CreateTexture(nil, "OVERLAY")
-	titlebg_r:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
-	titlebg_r:SetTexCoord(0.67, 0.77, 0, 0.63)
-	titlebg_r:SetPoint("LEFT", titlebg, "RIGHT")
-	titlebg_r:SetWidth(30)
-	titlebg_r:SetHeight(40)
-]]
-
-	local sizer_se = CreateFrame("Frame", nil, frame)
-	sizer_se:SetPoint("BOTTOMRIGHT")
-	sizer_se:SetWidth(25)
-	sizer_se:SetHeight(25)
-	sizer_se:EnableMouse()
-	sizer_se:SetScript("OnMouseDown",SizerSE_OnMouseDown)
-	sizer_se:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
-
-	local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
-	line1:SetWidth(14)
-	line1:SetHeight(14)
-	line1:SetPoint("BOTTOMRIGHT", -8, 8)
-	line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
-	local x = 0.1 * 14/17
-	line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
-
-	local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
-	line2:SetWidth(8)
-	line2:SetHeight(8)
-	line2:SetPoint("BOTTOMRIGHT", -8, 8)
-	line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
-	local x = 0.1 * 8/17
-	line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
-
-	local sizer_s = CreateFrame("Frame", nil, frame)
-	sizer_s:SetPoint("BOTTOMRIGHT", -25, 0)
-	sizer_s:SetPoint("BOTTOMLEFT")
-	sizer_s:SetHeight(25)
-	sizer_s:EnableMouse(true)
-	sizer_s:SetScript("OnMouseDown", SizerS_OnMouseDown)
-	sizer_s:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
-
-	local sizer_e = CreateFrame("Frame", nil, frame)
-	sizer_e:SetPoint("BOTTOMRIGHT", 0, 25)
-	sizer_e:SetPoint("TOPRIGHT")
-	sizer_e:SetWidth(25)
-	sizer_e:EnableMouse(true)
-	sizer_e:SetScript("OnMouseDown", SizerE_OnMouseDown)
-	sizer_e:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
-
-	--Container Support
-	local content = CreateFrame("Frame", nil, frame)
-	content:SetPoint("TOPLEFT", 17, -50)
-	content:SetPoint("BOTTOMRIGHT", -17, 40)
-
-	local widget = {
-		localstatus = {},
-		titletext   = titletext,
-		statustext  = statustext,
-		titlebg     = titlebg,
-		sizer_se    = sizer_se,
-		sizer_s     = sizer_s,
-		sizer_e     = sizer_e,
-		content     = content,
-		frame       = frame,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	closebutton.obj, statusbg.obj = widget, widget
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/GUI/AceGUIWidget-EMAContinueLabel.lua b/GUI/AceGUIWidget-EMAContinueLabel.lua
deleted file mode 100644
index d5b70e2..0000000
--- a/GUI/AceGUIWidget-EMAContinueLabel.lua
+++ /dev/null
@@ -1,158 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
---[[
-File modified from AceGUI Label widget.  Used under Ace3 modified BSD licence.
-]]--
-
-local AceGUI = LibStub("AceGUI-3.0")
-
---------------------------
--- Jamba Continue Label
---------------------------
-do
-	local Type = "EMAContinueLabel"
-	local Version = 1
-
-	local function OnAcquire(self)
-		self:SetText("")
-		self:SetImage(nil)
-		self:SetColor()
-	end
-
-	local function OnRelease(self)
-		self.frame:ClearAllPoints()
-		self.frame:Hide()
-	end
-
-	local function UpdateImageAnchor(self)
-		local width = self.frame.width or self.frame:GetWidth() or 0
-		local image = self.image
-		local label = self.label
-		local frame = self.frame
-		local height
-
-		label:ClearAllPoints()
-		image:ClearAllPoints()
-
-		if self.imageshown then
-			local imagewidth = image:GetWidth()
-			if (width - imagewidth) < 200 or (label:GetText() or "") == "" then
-				--image goes on top centered when less than 200 width for the text, or if there is no text
-				image:SetPoint("TOP",frame,"TOP",0,0)
-				label:SetPoint("TOP",image,"BOTTOM",0,0)
-				label:SetPoint("LEFT",frame,"LEFT",0,0)
-				label:SetWidth(width)
-				height = image:GetHeight() + label:GetHeight()
-			else
-				--image on the left
-				image:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
-				label:SetPoint("TOPLEFT",image,"TOPRIGHT",0,0)
-				label:SetWidth(width - imagewidth)
-				height = math.max(image:GetHeight(), label:GetHeight())
-			end
-		else
-			--no image shown
-			label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
-			label:SetWidth(width)
-			height = self.label:GetHeight()
-		end
-
-		self.resizing = true
-		self.frame:SetHeight(height)
-		self.frame.height = height
-		self.resizing = nil
-	end
-
-	local function SetText(self, text)
-		self.label:SetText(text or "")
-		UpdateImageAnchor(self)
-	end
-
-	local function SetDisabled(self,disabled)
-		if disabled then
-			self.label:SetTextColor(0.5,0.5,0.5)
-		else
-			self.label:SetTextColor(1,1,1)
-		end
-	end
-
-	local function SetColor(self, r, g, b)
-		if not (r and g and b) then
-			r, g, b = 1, 1, 1
-		end
-		self.label:SetVertexColor(r, g, b)
-	end
-
-	local function OnWidthSet(self, width)
-		if self.resizing then return end
-		UpdateImageAnchor(self)
-	end
-
-	local function SetImage(self, path, ...)
-		local image = self.image
-		image:SetTexture(path)
-
-		if image:GetTexture() then
-			self.imageshown = true
-			local n = select('#', ...)
-			if n == 4 or n == 8 then
-				image:SetTexCoord(...)
-			end
-		else
-			self.imageshown = nil
-		end
-		UpdateImageAnchor(self)
-	end
-
-	local function SetImageSize(self, width, height)
-		self.image:SetWidth(width)
-		self.image:SetHeight(height)
-		UpdateImageAnchor(self)
-	end
-
-	local function Constructor()
-		local frame = CreateFrame("Frame",nil,UIParent)
-		local self = {}
-		self.type = Type
-
-		self.OnRelease = OnRelease
-		self.OnAcquire = OnAcquire
-		self.SetText = SetText
-		self.SetDisabled = SetDisabled
-		self.SetColor = SetColor
-		self.frame = frame
-		self.OnWidthSet = OnWidthSet
-		self.SetImage = SetImage
-		self.SetImageSize = SetImageSize
-		frame.obj = self
-
-		frame:SetHeight(14)
-		frame:SetWidth(200)
-		local label = frame:CreateFontString(nil,"BACKGROUND","GameFontHighlight")
-		label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
-		label:SetWidth(200)
-		label:SetHeight(14)
-		label:SetJustifyH("LEFT")
-		label:SetJustifyV("MIDDLE")
-		self.label = label
-
-		local image = frame:CreateTexture(nil,"BACKGROUND")
-		self.image = image
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(Type,Constructor,Version)
-end
-
diff --git a/GUI/AceGUIWidget-EMAKeybinding.lua b/GUI/AceGUIWidget-EMAKeybinding.lua
deleted file mode 100644
index 8abe366..0000000
--- a/GUI/AceGUIWidget-EMAKeybinding.lua
+++ /dev/null
@@ -1,231 +0,0 @@
---[[-----------------------------------------------------------------------------
-Keybinding Widget
-Set Keybindings in the Config UI.
--------------------------------------------------------------------------------]]
-local Type, Version = "EMAKeybinding", 22
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs = pairs
-
--- WoW APIs
-local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: NOT_BOUND
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-
-local function Control_OnEnter(frame)
-	frame.obj:Fire("OnEnter")
-end
-
-local function Control_OnLeave(frame)
-	frame.obj:Fire("OnLeave")
-end
-
-local function Keybinding_OnClick(frame, button)
-	if button == "LeftButton" or button == "RightButton" then
-		local self = frame.obj
-		if self.waitingForKey then
-			frame:EnableKeyboard(false)
-			self.msgframe:Hide()
-			frame:UnlockHighlight()
-			self.waitingForKey = nil
-		else
-			frame:EnableKeyboard(true)
-			self.msgframe:Show()
-			frame:LockHighlight()
-			self.waitingForKey = true
-		end
-	end
-	AceGUI:ClearFocus()
-end
-
-local ignoreKeys = {
-	["BUTTON1"] = true, ["BUTTON2"] = true,
-	["UNKNOWN"] = true,
-	["LSHIFT"] = true, ["LCTRL"] = true, ["LALT"] = true,
-	["RSHIFT"] = true, ["RCTRL"] = true, ["RALT"] = true,
-}
-local function Keybinding_OnKeyDown(frame, key)
-	local self = frame.obj
-	if self.waitingForKey then
-		local keyPressed = key
-		if keyPressed == "ESCAPE" then
-			keyPressed = ""
-		else
-			if ignoreKeys[keyPressed] then return end
-			if IsShiftKeyDown() then
-				keyPressed = "SHIFT-"..keyPressed
-			end
-			if IsControlKeyDown() then
-				keyPressed = "CTRL-"..keyPressed
-			end
-			if IsAltKeyDown() then
-				keyPressed = "ALT-"..keyPressed
-			end
-		end
-
-		frame:EnableKeyboard(false)
-		self.msgframe:Hide()
-		frame:UnlockHighlight()
-		self.waitingForKey = nil
-
-		if not self.disabled then
-			self:SetKey(keyPressed)
-			self:Fire("OnKeyChanged", keyPressed)
-		end
-	end
-end
-
-local function Keybinding_OnMouseDown(frame, button)
-	if button == "LeftButton" or button == "RightButton" then
-		return
-	elseif button == "MiddleButton" then
-		button = "BUTTON3"
-	elseif button == "Button4" then
-		button = "BUTTON4"
-	elseif button == "Button5" then
-		button = "BUTTON5"
-	end
-	Keybinding_OnKeyDown(frame, button)
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetWidth(200)
-		self:SetLabel("")
-		self:SetKey("")
-		self.waitingForKey = nil
-		self.msgframe:Hide()
-		self:SetDisabled(false)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["SetDisabled"] = function(self, disabled)
-		self.disabled = disabled
-		if disabled then
-			self.button:Disable()
-			self.label:SetTextColor(0.5,0.5,0.5)
-		else
-			self.button:Enable()
-			self.label:SetTextColor(1,1,1)
-		end
-	end,
-
-	["SetKey"] = function(self, key)
-		if (key or "") == "" then
-			self.button:SetText(NOT_BOUND)
-			self.button:SetNormalFontObject("GameFontNormal")
-		else
-			self.button:SetText(key)
-			self.button:SetNormalFontObject("GameFontHighlight")
-		end
-	end,
-
-	["GetKey"] = function(self)
-		local key = self.button:GetText()
-		if key == NOT_BOUND then
-			key = nil
-		end
-		return key
-	end,
-
-	["SetLabel"] = function(self, label)
-		self.label:SetText(label or "")
-		if (label or "") == "" then
-			self.alignoffset = nil
-			self:SetHeight(24)
-		else
-			self.alignoffset = 30
-			self:SetHeight(44)
-		end
-	end,
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-
-local ControlBackdrop  = {
-	bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
-	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-	tile = true, tileSize = 16, edgeSize = 16,
-	insets = { left = 3, right = 3, top = 3, bottom = 3 }
-}
-
-local function keybindingMsgFixWidth(frame)
-	frame:SetWidth(frame.msg:GetWidth() + 10)
-	frame:SetScript("OnUpdate", nil)
-end
-
-local function Constructor()
-	local name = "AceGUI30KeybindingButton" .. AceGUI:GetNextWidgetNum(Type)
-
-	local frame = CreateFrame("Frame", nil, UIParent)
-	local button = CreateFrame("Button", name, frame, "UIPanelButtonTemplate")
-
-	button:EnableMouse(true)
-	button:RegisterForClicks("AnyDown")
-	button:SetScript("OnEnter", Control_OnEnter)
-	button:SetScript("OnLeave", Control_OnLeave)
-	button:SetScript("OnClick", Keybinding_OnClick)
-	button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
-	button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
-	button:EnableKeyboard(false)
-	button:SetPoint("BOTTOMLEFT")
-	button:SetPoint("BOTTOMRIGHT")
-	button:SetHeight(24)
-
-	local text = button:GetFontString()
-	text:SetPoint("LEFT", 7, 0)
-	text:SetPoint("RIGHT", -7, 0)
-
-	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
-	label:SetPoint("TOPLEFT")
-	label:SetPoint("TOPRIGHT")
-	label:SetJustifyH("CENTER")
-	label:SetHeight(18)
-
-	local msgframe = CreateFrame("Frame", nil, UIParent)
-	msgframe:SetHeight(30)
-	msgframe:SetBackdrop(ControlBackdrop)
-	msgframe:SetBackdropColor(0,0,0)
-	msgframe:SetFrameStrata("FULLSCREEN_DIALOG")
-	msgframe:SetFrameLevel(1000)
-
-	local msg = msgframe:CreateFontString(nil, "OVERLAY", "GameFontNormal")
-	msg:SetText("Press a key to bind, ESC to clear the binding or click the button again to cancel.")
-	msgframe.msg = msg
-	msg:SetPoint("TOPLEFT", 5, -5)
-	msgframe:SetScript("OnUpdate", keybindingMsgFixWidth)
-	msgframe:SetPoint("BOTTOM", button, "TOP")
-	msgframe:Hide()
-
-	local widget = {
-		button      = button,
-		label       = label,
-		msgframe    = msgframe,
-		frame       = frame,
-		alignoffset = 30,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	button.obj = widget
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/GUI/AceGUIWidget-EMANormalLabel.lua b/GUI/AceGUIWidget-EMANormalLabel.lua
deleted file mode 100644
index ca01c67..0000000
--- a/GUI/AceGUIWidget-EMANormalLabel.lua
+++ /dev/null
@@ -1,158 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
---[[
-File modified from AceGUI Label widget.  Used under Ace3 modified BSD licence.
-]]--
-
-local AceGUI = LibStub("AceGUI-3.0")
-
---------------------------
--- Jamba Normal Label
---------------------------
-do
-	local Type = "EMANormalLabel"
-	local Version = 1
-
-	local function OnAcquire(self)
-		self:SetText("")
-		self:SetImage(nil)
-		self:SetColor()
-	end
-
-	local function OnRelease(self)
-		self.frame:ClearAllPoints()
-		self.frame:Hide()
-	end
-
-	local function UpdateImageAnchor(self)
-		local width = self.frame.width or self.frame:GetWidth() or 0
-		local image = self.image
-		local label = self.label
-		local frame = self.frame
-		local height
-
-		label:ClearAllPoints()
-		image:ClearAllPoints()
-
-		if self.imageshown then
-			local imagewidth = image:GetWidth()
-			if (width - imagewidth) < 200 or (label:GetText() or "") == "" then
-				--image goes on top centered when less than 200 width for the text, or if there is no text
-				image:SetPoint("TOP",frame,"TOP",0,0)
-				label:SetPoint("TOP",image,"BOTTOM",0,0)
-				label:SetPoint("LEFT",frame,"LEFT",0,0)
-				label:SetWidth(width)
-				height = image:GetHeight() + label:GetHeight()
-			else
-				--image on the left
-				image:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
-				label:SetPoint("TOPLEFT",image,"TOPRIGHT",0,0)
-				label:SetWidth(width - imagewidth)
-				height = math.max(image:GetHeight(), label:GetHeight())
-			end
-		else
-			--no image shown
-			label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
-			label:SetWidth(width)
-			height = self.label:GetHeight()
-		end
-
-		self.resizing = true
-		self.frame:SetHeight(height)
-		self.frame.height = height
-		self.resizing = nil
-	end
-
-	local function SetText(self, text)
-		self.label:SetText(text or "")
-		UpdateImageAnchor(self)
-	end
-
-	local function SetDisabled(self,disabled)
-		if disabled then
-			self.label:SetTextColor(0.5,0.5,0.5)
-		else
-			self.label:SetTextColor(1,1,1)
-		end
-	end
-
-	local function SetColor(self, r, g, b)
-		if not (r and g and b) then
-			r, g, b = 1, 1, 1
-		end
-		self.label:SetVertexColor(r, g, b)
-	end
-
-	local function OnWidthSet(self, width)
-		if self.resizing then return end
-		UpdateImageAnchor(self)
-	end
-
-	local function SetImage(self, path, ...)
-		local image = self.image
-		image:SetTexture(path)
-
-		if image:GetTexture() then
-			self.imageshown = true
-			local n = select('#', ...)
-			if n == 4 or n == 8 then
-				image:SetTexCoord(...)
-			end
-		else
-			self.imageshown = nil
-		end
-		UpdateImageAnchor(self)
-	end
-
-	local function SetImageSize(self, width, height)
-		self.image:SetWidth(width)
-		self.image:SetHeight(height)
-		UpdateImageAnchor(self)
-	end
-
-	local function Constructor()
-		local frame = CreateFrame("Frame",nil,UIParent)
-		local self = {}
-		self.type = Type
-
-		self.OnRelease = OnRelease
-		self.OnAcquire = OnAcquire
-		self.SetText = SetText
-		self.SetDisabled = SetDisabled
-		self.SetColor = SetColor
-		self.frame = frame
-		self.OnWidthSet = OnWidthSet
-		self.SetImage = SetImage
-		self.SetImageSize = SetImageSize
-		frame.obj = self
-
-		frame:SetHeight(24)
-		frame:SetWidth(200)
-		local label = frame:CreateFontString(nil,"BACKGROUND","GameFontHighlight")
-		label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
-		label:SetWidth(200)
-		label:SetHeight(24)
-		label:SetJustifyH("LEFT")
-		label:SetJustifyV("MIDDLE")
-		self.label = label
-
-		local image = frame:CreateTexture(nil,"BACKGROUND")
-		self.image = image
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(Type,Constructor,Version)
-end
-
diff --git a/GUI/EMAHelperSettings.lua b/GUI/EMAHelperSettings.lua
deleted file mode 100644
index 1e08cbb..0000000
--- a/GUI/EMAHelperSettings.lua
+++ /dev/null
@@ -1,668 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
-local MAJOR, MINOR = "EMAHelperSettings-1.0", 2
-local EMAHelperSettings, oldMinor = LibStub:NewLibrary( MAJOR, MINOR )
-
-if not EMAHelperSettings then
-	return
-end
-
--- Locale.
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-
--- Get the ACE GUI Library.
-local AceGUI = LibStub( "AceGUI-3.0" )
-
--- Register a manual layout function which does nothing, each child manually sets its size and position.
-AceGUI:RegisterLayout( "EMAManual", function(content, children) end )
-
-
-AceGUI:RegisterLayout("EMAFill",
-	function(content, children)
-		if children[1] then
-			local offset = 12
-			local height = content:GetHeight() - offset
-			local width = content:GetWidth()
-			children[1]:SetWidth(width)
-			children[1]:SetHeight(height)
-			children[1]:SetPoint( "TOPLEFT", 0, -offset )
-			children[1]:ClearAllPoints()
-			children[1].frame:Show()
-
-		end
-	end)
-
-
-	-- A single control fills the whole content area
-AceGUI:RegisterLayout("EMAFillAce3Fix",
-	function(content, children)
-		if children[1] then
-			children[1].frame:Hide()
-			local offset = 0
-			local height = content:GetHeight()
-			local width = content:GetWidth()
-			children[1]:SetWidth(width)
-			children[1]:SetHeight(height)
-			children[1]:SetPoint("TOPLEFT", content)
-			children[1]:ClearAllPoints()
-			children[1].frame:Show()
-
-		end
-	end)
-
--------------------------------------------------------------------------------------------------------------
--- Spacing.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetHorizontalSpacing()
-	return 2
-end
-
-function EMAHelperSettings:GetVerticalSpacing()
-	return 2
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Frame.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:CreateSettings( settingsControl, displayName, parentDisplayName, pushSettingsCallback, moduleIcon, order )
-	if moduleIcon == nil then
-		moduleIcon = "Interface\\Icons\\Temp"
-	end
-
-	if order == nil then
-		order = 1000
-	end
-
-	local containerWidgetSettings = AceGUI:Create( "SimpleGroup" )
-	containerWidgetSettings:SetLayout( "Fill" )
-
-	local widgetSettings = AceGUI:Create( "ScrollFrame" )
-	widgetSettings:SetLayout( "EMAFill" )
-
-	containerWidgetSettings:AddChild( widgetSettings )
-
-	local button = AceGUI:Create( "Button" )
-	if displayName == "News" then
-		button:SetText( L["PUSH_ALL_SETTINGS"] )
-	else
-		button:SetText( L["PUSH_SETTINGS"] )
-	end
-
-	containerWidgetSettings:AddChild( button )
-	button:SetWidth( 200 )
-	button:SetPoint( "TOPLEFT", containerWidgetSettings.frame, "TOPRIGHT", -200, 40 )
-	button:SetCallback( "OnClick", pushSettingsCallback )
-	settingsControl.widgetPushSettingsButton = button
-
-	settingsControl.widgetSettingsHelp = widgetSettingsHelp
-	settingsControl.containerWidgetSettings = containerWidgetSettings
-	settingsControl.widgetSettings = widgetSettings
-	EMAPrivate.SettingsFrame.Tree.Add( displayName, parentDisplayName, moduleIcon, order, settingsControl.containerWidgetSettings )
-end
-
-function EMAHelperSettings:TopOfSettings()
-	return 0
-end
-
-function EMAHelperSettings:LeftOfSettings()
-	return 0
-end
-
--------------------------------------------------------------------------------------------------------------
--- Help.  Removed We need to keep this here incase some module needs CreateHelp
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:CreateHelp( settingsControl, help, configuration )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Heading.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:HeadingWidth( hasScrollBar )
-	local width = 600
-	if hasScrollBar == true then
-		return width
-	else
-		return width + 20
-	end
-end
-
-function EMAHelperSettings:HeadingHeight()
-	-- Defined as 18 in the AceGUI Heading Widget (added 2 more pixels for spacing purposes).
-	return 20
-end
-
-function EMAHelperSettings:CreateHeading( settingsControl, text, top, hasScrollBar )
-	-- Create a heading
-	local heading = AceGUI:Create( "Heading" )
-	heading:SetText( text )
-	settingsControl.widgetSettings:AddChild( heading )
-	heading:SetWidth( self:HeadingWidth( hasScrollBar ) )
-	heading:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", 0, top )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Frame backdrop.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:CreateBackdrop()
-	local frameBackdrop  = {
-		bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-		tile = true, tileSize = 16, edgeSize = 16,
-		insets = { left = 3, right = 3, top = 5, bottom = 3 }
-	}
-	return frameBackdrop
-end
-
--------------------------------------------------------------------------------------------------------------
--- ToolTip.
--------------------------------------------------------------------------------------------------------------
-
-
-local function onControlEnter(widget, event, value)
-	GameTooltip:ClearLines()
-	GameTooltip:SetOwner(widget.frame, "ANCHOR_TOP")
-	GameTooltip:AddLine(widget.text and widget.text:GetText() or widget.label:GetText())
-	GameTooltip:AddLine(widget:GetUserData("tooltip"), 1, 1, 1, 1)
-	GameTooltip:Show()
-end
-
-local function onControlLeave() GameTooltip:Hide() end
-
--------------------------------------------------------------------------------------------------------------
--- Button.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetButtonHeight()
-	-- Defined as 24 in the AceGUI Button Widget .
-	return 24
-end
-
-function EMAHelperSettings:CreateButton( settingsControl, width, left, top, text, buttonCallback, toolTip )
-	local button = AceGUI:Create( "Button" )
-	button:SetText( text )
-	settingsControl.widgetSettings:AddChild( button )
-	button:SetWidth( width )
-	button:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	button:SetCallback( "OnClick", buttonCallback )
-	--button:SetUserData("key", "keyword") -- needed/??
-	button:SetUserData("tooltip", toolTip)
-	button:SetCallback("OnEnter", onControlEnter)
-	button:SetCallback("OnLeave", onControlLeave)
-	return button
-end
-
--------------------------------------------------------------------------------------------------------------
--- Icon.
--------------------------------------------------------------------------------------------------------------
-
-
-function EMAHelperSettings:Icon( settingsControl, sizeW, sizeH, image, left, top, text, buttonCallback, toolTip )
-	local icon = AceGUI:Create( "Icon" )
-	icon:SetLabel( text )
-	icon:SetImage ( image )
-	icon:SetImageSize( sizeW, sizeH )
-	settingsControl.widgetSettings:AddChild( icon )
-	icon:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	icon:SetCallback( "OnClick", buttonCallback )
-	icon:SetUserData("tooltip", toolTip)
-	icon:SetCallback("OnEnter", onControlEnter)
-	icon:SetCallback("OnLeave", onControlLeave)
-	return icon
-end
-
--------------------------------------------------------------------------------------------------------------
--- CheckBox.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetCheckBoxHeight()
-	-- Defined as 24 in the AceGUI CheckBox Widget.
-	return 24
-end
-
-function EMAHelperSettings:GetRadioBoxHeight()
-	-- Defined as 16 in the AceGUI CheckBox Widget (added 4 pixels for spacing).
-	return 20
-end
-
-function EMAHelperSettings:CreateCheckBox( settingsControl, width, left, top, text, checkBoxCallback, toolTip )
-	local button = AceGUI:Create( "CheckBox" )
-	button:SetLabel( text )
-	settingsControl.widgetSettings:AddChild( button )
-	button:SetWidth( width )
-	button:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	button:SetCallback( "OnValueChanged", checkBoxCallback )
-	button:SetUserData("tooltip", toolTip)
-	button:SetCallback("OnEnter", onControlEnter)
-	button:SetCallback("OnLeave", onControlLeave)
-	return button
-end
-
--------------------------------------------------------------------------------------------------------------
--- EditBox.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetEditBoxHeight()
-	-- Defined as 44 (with label) in the AceGUI EditBox Widget.
-	return 44
-end
-
-function EMAHelperSettings:CreateEditBox( settingsControl, width, left, top, text, toolTip )
-	local editBox = AceGUI:Create( "EditBox" )
-	editBox:SetLabel( text )
-	settingsControl.widgetSettings:AddChild( editBox )
-	editBox:SetWidth( width )
-	editBox:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	editBox:SetUserData("tooltip", toolTip)
-	editBox:SetCallback("OnEnter", onControlEnter)
-	editBox:SetCallback("OnLeave", onControlLeave)
-	return editBox
-end
-
--------------------------------------------------------------------------------------------------------------
--- Multi EditBox.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:CreateMultiEditBox( settingsControl, width, left, top, text, lines, toolTip )
-	local editBox = AceGUI:Create( "MultiLineEditBox" )
-	editBox:SetLabel( text )
-	settingsControl.widgetSettings:AddChild( editBox )
-	editBox:SetWidth( width )
-	editBox:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	editBox:SetNumLines( lines )
-	editBox:SetUserData("tooltip", toolTip)
-	editBox:SetCallback("OnEnter", onControlEnter)
-	editBox:SetCallback("OnLeave", onControlLeave)
-	return editBox
-end
-
--------------------------------------------------------------------------------------------------------------
--- Keybinding.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetKeyBindingHeight()
-	-- Defined as 44 (with label) in the AceGUI Keybinding Widget.
-	return 44
-end
-
-function EMAHelperSettings:CreateKeyBinding( settingsControl, width, left, top, text )
-	local keyBinding = AceGUI:Create( "EMAKeybinding" )
-	keyBinding:SetLabel( text )
-	settingsControl.widgetSettings:AddChild( keyBinding )
-	keyBinding:SetWidth( width )
-	keyBinding:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	return keyBinding
-end
-
--------------------------------------------------------------------------------------------------------------
--- Dropdown.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetDropdownHeight()
-	-- Defined as 44 (with label) in the AceGUI Dropdown Widget.
-	return 44
-end
-
-function EMAHelperSettings:CreateDropdown( settingsControl, width, left, top, text )
-	local dropdown = AceGUI:Create( "Dropdown" )
-	dropdown:ClearAllPoints()
-	dropdown:SetLabel( text )
-	settingsControl.widgetSettings:AddChild( dropdown )
-	dropdown:SetWidth( width )
-	dropdown:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	return dropdown
-end
-
--------------------------------------------------------------------------------------------------------------
--- Icon.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetIconHeight()
-	return 32
-end
-
-
-function EMAHelperSettings:CreateIcon( settingsControl, width, left, top, iconName )
-	--print("testGUI", text, icon, iconSize )
-	local icon = AceGUI:Create( "Label" )
-	icon:SetImage( iconName )
-	icon:SetImageSize( 32, 32 )
-	settingsControl.widgetSettings:AddChild( icon )
-	icon:SetWidth( width )
-	icon:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	return icon
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- Label.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetLabelHeight()
-	-- Defined as 24 in the AceGUI EMA NormalLabel Widget.
-	return 24
-end
-
-function EMAHelperSettings:CreateLabel( settingsControl, width, left, top, text )
-	local label = AceGUI:Create( "EMANormalLabel" )
-	label:SetText( text )
-	settingsControl.widgetSettings:AddChild( label )
-	label:SetWidth( width )
-	label:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	return label
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- Label continue.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetContinueLabelHeight()
-	-- Defined as 14 in the AceGUI EMA ContinueLabel Widget.
-	return 14
-end
-
-function EMAHelperSettings:CreateContinueLabel( settingsControl, width, left, top, text )
-	local label = AceGUI:Create( "EMAContinueLabel" )
-	label:SetText( text )
-	settingsControl.widgetSettings:AddChild( label )
-	label:SetWidth( width )
-	label:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	return label
-end
-
--------------------------------------------------------------------------------------------------------------
--- Slider.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetSliderHeight()
-	return 45
-end
-
-function EMAHelperSettings:CreateSlider( settingsControl, width, left, top, text )
-	local slider = AceGUI:Create( "Slider" )
-	slider:SetLabel( text )
-	settingsControl.widgetSettings:AddChild( slider )
-	slider:SetWidth( width )
-	slider:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	slider:SetSliderValues( 0, 100, 1 )
-	slider:SetValue( 0 )
-	return slider
-end
-
--------------------------------------------------------------------------------------------------------------
--- Colour pickers.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetColourPickerHeight()
-	return 25
-end
-
-function EMAHelperSettings:CreateColourPicker( settingsControl, width, left, top, text )
-	local picker = AceGUI:Create( "ColorPicker" )
-	picker:SetLabel( text )
-	settingsControl.widgetSettings:AddChild( picker )
-	picker:SetWidth( width )
-	picker:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	return picker
-end
-
--------------------------------------------------------------------------------------------------------------
--- Media.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:GetMediaHeight()
-	return 45
-end
-
--------------------------------------------------------------------------------------------------------------
--- Media Status Bar.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:CreateMediaStatus( settingsControl, width, left, top, text )
-	local media = AceGUI:Create( "LSM30_Statusbar" )
-	media:SetLabel( text )
-	media:SetWidth( width )
-	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	media:SetList()
-	settingsControl.widgetSettings:AddChild( media )
-	return media
-end
-
--------------------------------------------------------------------------------------------------------------
--- Media Border.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:CreateMediaBorder( settingsControl, width, left, top, text )
-	local media = AceGUI:Create( "LSM30_Border" )
-	media:SetLabel( text )
-	media:SetWidth( width )
-	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	media:SetList()
-	settingsControl.widgetSettings:AddChild( media )
-	return media
-end
-
--------------------------------------------------------------------------------------------------------------
--- Media Background.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:CreateMediaBackground( settingsControl, width, left, top, text )
-	local media = AceGUI:Create( "LSM30_Background" )
-	media:SetLabel( text )
-	media:SetWidth( width )
-	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	media:SetList()
-	settingsControl.widgetSettings:AddChild( media )
-	return media
-end
-
--------------------------------------------------------------------------------------------------------------
--- Media Font.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:CreateMediaFont( settingsControl, width, left, top, text )
-	local media = AceGUI:Create( "LSM30_Font" )
-	media:SetLabel( text )
-	media:SetWidth( width )
-	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content, "TOPLEFT", left, top )
-	media:SetList()
-	settingsControl.widgetSettings:AddChild( media )
-	return media
-end
-
--------------------------------------------------------------------------------------------------------------
--- Media Sound.
--------------------------------------------------------------------------------------------------------------
-
-function EMAHelperSettings:CreateMediaSound( settingsControl, width, left, top, text )
-	local media = AceGUI:Create( "LSM30_Sound" )
-	media:SetLabel( text )
-	media:SetWidth( width )
-	media:SetPoint( "TOPLEFT", settingsControl.widgetSettings.content , "TOPLEFT", left, top )
-	media:SetList()
-	settingsControl.widgetSettings:AddChild( media )
-	return media
-end
-
--------------------------------------------------------------------------------------------------------------
--- FauxScrollFrame.
--------------------------------------------------------------------------------------------------------------
-
---
--- List Structure
---
--- Required to be passed into the function.
---
--- list.listFrameName - String (name of list frame)
--- list.parentFrame - Frame (parent frame for the list)
--- list.listTop - Number (top location in parent frame)
--- list.listLeft - Number (left location in parent frame)
--- list.listWidth - Number (width of list)
--- list.rowHeight - Number (height of row)
--- list.rowsToDisplay - Number (number of rows to display)
--- list.columnsToDisplay - Number (number of columns to display)
--- list.columnInformation - Table (table of columns information)
--- list.columnInformation[x]- Table (table of column information)
--- list.columnInformation[x].width - Number[0,100] (percentage of width to use for this column)
--- list.columnInformation[x].alignment - String (column text alignment string: "LEFT", "CENTER" or "RIGHT")
--- list.scrollRefreshCallback - Function (called when the list is scrolled, no parameters)
--- list.rowClickCallback - Function (called when a column in a row is clicked, parameters: self, rowNumber, columnNumber)
---
--- Created by the function.
---
--- list.listFrame - Frame (list frame holder)
--- list.listScrollFrame - Frame (list frame holder)
--- list.listHeight - Number (height of list - decided by number of display rows * height of each row)
--- list.rows - Table
--- list.rows[x] - Frame (row frame)
--- list.rows[x].highlight - Texture (row frame texture for highlight)
--- list.rows[x].columns - Table
--- list.rows[x].columns[y] - Frame (column frame)
--- list.rows[x].columns[y].rowNumber - Number (the row number of this row)
--- list.rows[x].columns[y].columnNumber - Number (the column number of this column)
--- list.rows[x].columns[y].textString - FontString (where text for column goes)
---
-
-function EMAHelperSettings:CreateScrollList( list )
-	-- Position and size constants.
-	local columnSpacing = 6
-	local widthOfScrollBar = 16
-	local rowVerticalSpacing = 3
-	local rowWidth = list.listWidth - ( columnSpacing * 2 ) - widthOfScrollBar
-	list.listHeight = list.rowsToDisplay * list.rowHeight + ( rowVerticalSpacing * 2 )
-	-- Create the holder frame.
-	list.listFrame = CreateFrame(
-		"Frame",
-		list.listFrameName,
-		list.parentFrame
-	)
-	list.listFrame:SetBackdrop( self:CreateBackdrop() )
-	list.listFrame:SetBackdropColor( 0.1, 0.1, 0.1, 0.5 )
-	list.listFrame:SetBackdropBorderColor( 0.4, 0.4, 0.4 )
-	list.listFrame:SetPoint( "TOPLEFT", list.parentFrame, "TOPLEFT", list.listLeft, list.listTop )
-	list.listFrame:SetWidth( list.listWidth )
-	list.listFrame:SetHeight( list.listHeight )
-	-- Create the scroll frame.
-	list.listScrollFrame = CreateFrame(
-		"ScrollFrame",
-		list.listFrame:GetName().."ScrollFrame",
-		list.listFrame,
-		"FauxScrollFrameTemplate"
-	)
-	list.listScrollFrame:SetPoint( "TOPLEFT", list.listFrame, "TOPLEFT", 0, -4 )
-	list.listScrollFrame:SetPoint( "BOTTOMRIGHT", list.listFrame, "BOTTOMRIGHT", -26, 3 )
-	list.listScrollFrame:SetScript( "OnVerticalScroll",
-		function( self, offset )
-			FauxScrollFrame_OnVerticalScroll(
-				self,
-				offset,
-				list.rowHeight,
-				list.scrollRefreshCallback )
-		end
-	)
-	-- Create frames for scroll table rows and columns.
-	list.rows = {}
-	for iterateDisplayRows = 1, list.rowsToDisplay do
-		local displayRow = CreateFrame(
-			"Frame",
-			list.listFrame:GetName().."Row"..iterateDisplayRows,
-			list.listFrame
-		)
-		displayRow:SetWidth( rowWidth )
-		displayRow:SetHeight( list.rowHeight )
-		displayRow:SetPoint(
-			"TOPLEFT",
-			list.listFrame,
-			"TOPLEFT",
-			columnSpacing,
-			( -1 * rowVerticalSpacing ) - ( list.rowHeight * ( iterateDisplayRows - 1 ) )
-		)
-		displayRow.highlight = displayRow:CreateTexture( nil, "OVERLAY" )
-		displayRow.highlight:SetAllPoints( displayRow )
-		list.rows[iterateDisplayRows] = displayRow
-		displayRow.columns = {}
-		local columnPosition = 0
-		for iterateDisplayColumns = 1, list.columnsToDisplay do
-			local displayColumn = CreateFrame(
-				"Button",
-				displayRow:GetName().."Column"..iterateDisplayColumns,
-				displayRow,
-				"SecureActionButtonTemplate"
-			)
-			if InCombatLockdown() == true then
-				return
-			end
-
-			displayColumn.rowNumber = iterateDisplayRows
-			displayColumn.columnNumber = iterateDisplayColumns
-			displayColumn.textString = displayRow:CreateFontString(
-				displayColumn:GetName().."Text",
-				"OVERLAY",
-				"GameFontHighlight"
-			)
-			local columnWidth = ( list.columnInformation[iterateDisplayColumns].width / 100 ) *
-				( rowWidth - ( columnSpacing * ( list.columnsToDisplay - 1 ) ) )
-			displayColumn:SetPoint( "TOPLEFT", displayRow, "TOPLEFT", columnPosition, 0 )
-			displayColumn:SetWidth( columnWidth )
-			displayColumn:SetHeight( list.rowHeight )
-			if InCombatLockdown() == false then
-				displayColumn:EnableMouse( true )
-				displayColumn:RegisterForClicks( "AnyUp" )
-			end
-			displayColumn:SetScript( "PostClick",
-				function( self, button )
-					if button == "LeftButton" then
-						list.rowClickCallback( self, displayColumn.rowNumber, displayColumn.columnNumber )
-					end
-					if button == "RightButton" then
-						if list.rowRightClickCallback ~= nil then
-							list.rowRightClickCallback( displayColumn.rowNumber, displayColumn.columnNumber )
-						end
-					end
-				end
-			)
-			displayColumn:SetScript("OnEnter",
-				function(self)
-					if list.rowMouseOverCallBack_OnEnter ~= nil then
-						list.rowMouseOverCallBack_OnEnter( displayColumn.rowNumber, displayColumn.columnNumber )
-					end
-				end
-			)
-			displayColumn:SetScript("OnLeave",
-				function(self)
-					if list.rowMouseOverCallBack_OnLeave ~= nil then
-						list.rowMouseOverCallBack_OnLeave( displayColumn.rowNumber, displayColumn.columnNumber )
-					end
-				end
-			)
-			displayColumn.textString:SetJustifyH( list.columnInformation[iterateDisplayColumns].alignment )
-			displayColumn.textString:SetAllPoints( displayColumn )
-			displayRow.columns[iterateDisplayColumns] = displayColumn
-			columnPosition = columnPosition + columnWidth + columnSpacing
-		end
-	end
-end
-
-function EMAHelperSettings:SetFauxScrollFramePosition( scrollFrame, position, maxPosition, rowHeight )
-	FauxScrollFrame_SetOffset( scrollFrame, position )
-	local scrollBar = getglobal( scrollFrame:GetName().."ScrollBar" )
-	if scrollBar ~= nil then
-		local minScroll, maxScroll = scrollBar:GetMinMaxValues()
-		scrollBar:SetValue( minScroll + ( ( maxScroll - minScroll + (2 * rowHeight) ) * position / maxPosition ) )
-	end
-end
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 83bb460..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2008-2015  Michael "Jafula" Miller
-Copyright (c) 2015-2018  Jennifer Cally
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
diff --git a/Libs/AceAddon-3.0/AceAddon-3.0.lua b/Libs/AceAddon-3.0/AceAddon-3.0.lua
deleted file mode 100644
index a7f7279..0000000
--- a/Libs/AceAddon-3.0/AceAddon-3.0.lua
+++ /dev/null
@@ -1,674 +0,0 @@
---- **AceAddon-3.0** provides a template for creating addon objects.
--- It'll provide you with a set of callback functions that allow you to simplify the loading
--- process of your addon.\\
--- Callbacks provided are:\\
--- * **OnInitialize**, which is called directly after the addon is fully loaded.
--- * **OnEnable** which gets called during the PLAYER_LOGIN event, when most of the data provided by the game is already present.
--- * **OnDisable**, which is only called when your addon is manually being disabled.
--- @usage
--- -- A small (but complete) addon, that doesn't do anything,
--- -- but shows usage of the callbacks.
--- local MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
---
--- function MyAddon:OnInitialize()
---   -- do init tasks here, like loading the Saved Variables,
---   -- or setting up slash commands.
--- end
---
--- function MyAddon:OnEnable()
---   -- Do more initialization here, that really enables the use of your addon.
---   -- Register Events, Hook functions, Create Frames, Get information from
---   -- the game that wasn't available in OnInitialize
--- end
---
--- function MyAddon:OnDisable()
---   -- Unhook, Unregister Events, Hide frames that you created.
---   -- You would probably only use an OnDisable if you want to
---   -- build a "standby" mode, or be able to toggle modules on/off.
--- end
--- @class file
--- @name AceAddon-3.0.lua
--- @release $Id: AceAddon-3.0.lua 1084 2013-04-27 20:14:11Z nevcairiel $
-
-local MAJOR, MINOR = "AceAddon-3.0", 12
-local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceAddon then return end -- No Upgrade needed.
-
-AceAddon.frame = AceAddon.frame or CreateFrame("Frame", "AceAddon30Frame") -- Our very own frame
-AceAddon.addons = AceAddon.addons or {} -- addons in general
-AceAddon.statuses = AceAddon.statuses or {} -- statuses of addon.
-AceAddon.initializequeue = AceAddon.initializequeue or {} -- addons that are new and not initialized
-AceAddon.enablequeue = AceAddon.enablequeue or {} -- addons that are initialized and waiting to be enabled
-AceAddon.embeds = AceAddon.embeds or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end }) -- contains a list of libraries embedded in an addon
-
--- Lua APIs
-local tinsert, tconcat, tremove = table.insert, table.concat, table.remove
-local fmt, tostring = string.format, tostring
-local select, pairs, next, type, unpack = select, pairs, next, type, unpack
-local loadstring, assert, error = loadstring, assert, error
-local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: LibStub, IsLoggedIn, geterrorhandler
-
---[[
-	 xpcall safecall implementation
-]]
-local xpcall = xpcall
-
-local function errorhandler(err)
-	return geterrorhandler()(err)
-end
-
-local function CreateDispatcher(argCount)
-	local code = [[
-		local xpcall, eh = ...
-		local method, ARGS
-		local function call() return method(ARGS) end
-
-		local function dispatch(func, ...)
-			 method = func
-			 if not method then return end
-			 ARGS = ...
-			 return xpcall(call, eh)
-		end
-
-		return dispatch
-	]]
-
-	local ARGS = {}
-	for i = 1, argCount do ARGS[i] = "arg"..i end
-	code = code:gsub("ARGS", tconcat(ARGS, ", "))
-	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
-end
-
-local Dispatchers = setmetatable({}, {__index=function(self, argCount)
-	local dispatcher = CreateDispatcher(argCount)
-	rawset(self, argCount, dispatcher)
-	return dispatcher
-end})
-Dispatchers[0] = function(func)
-	return xpcall(func, errorhandler)
-end
-
-local function safecall(func, ...)
-	-- we check to see if the func is passed is actually a function here and don't error when it isn't
-	-- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not
-	-- present execution should continue without hinderance
-	if type(func) == "function" then
-		return Dispatchers[select('#', ...)](func, ...)
-	end
-end
-
--- local functions that will be implemented further down
-local Enable, Disable, EnableModule, DisableModule, Embed, NewModule, GetModule, GetName, SetDefaultModuleState, SetDefaultModuleLibraries, SetEnabledState, SetDefaultModulePrototype
-
--- used in the addon metatable
-local function addontostring( self ) return self.name end
-
--- Check if the addon is queued for initialization
-local function queuedForInitialization(addon)
-	for i = 1, #AceAddon.initializequeue do
-		if AceAddon.initializequeue[i] == addon then
-			return true
-		end
-	end
-	return false
-end
-
---- Create a new AceAddon-3.0 addon.
--- Any libraries you specified will be embeded, and the addon will be scheduled for
--- its OnInitialize and OnEnable callbacks.
--- The final addon object, with all libraries embeded, will be returned.
--- @paramsig [object ,]name[, lib, ...]
--- @param object Table to use as a base for the addon (optional)
--- @param name Name of the addon object to create
--- @param lib List of libraries to embed into the addon
--- @usage
--- -- Create a simple addon object
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceEvent-3.0")
---
--- -- Create a Addon object based on the table of a frame
--- local MyFrame = CreateFrame("Frame")
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon(MyFrame, "MyAddon", "AceEvent-3.0")
-function AceAddon:NewAddon(objectorname, ...)
-	local object,name
-	local i=1
-	if type(objectorname)=="table" then
-		object=objectorname
-		name=...
-		i=2
-	else
-		name=objectorname
-	end
-	if type(name)~="string" then
-		error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2)
-	end
-	if self.addons[name] then
-		error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon '%s' already exists."):format(name), 2)
-	end
-
-	object = object or {}
-	object.name = name
-
-	local addonmeta = {}
-	local oldmeta = getmetatable(object)
-	if oldmeta then
-		for k, v in pairs(oldmeta) do addonmeta[k] = v end
-	end
-	addonmeta.__tostring = addontostring
-
-	setmetatable( object, addonmeta )
-	self.addons[name] = object
-	object.modules = {}
-	object.orderedModules = {}
-	object.defaultModuleLibraries = {}
-	Embed( object ) -- embed NewModule, GetModule methods
-	self:EmbedLibraries(object, select(i,...))
-
-	-- add to queue of addons to be initialized upon ADDON_LOADED
-	tinsert(self.initializequeue, object)
-	return object
-end
-
-
---- Get the addon object by its name from the internal AceAddon registry.
--- Throws an error if the addon object cannot be found (except if silent is set).
--- @param name unique name of the addon object
--- @param silent if true, the addon is optional, silently return nil if its not found
--- @usage
--- -- Get the Addon
--- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
-function AceAddon:GetAddon(name, silent)
-	if not silent and not self.addons[name] then
-		error(("Usage: GetAddon(name): 'name' - Cannot find an AceAddon '%s'."):format(tostring(name)), 2)
-	end
-	return self.addons[name]
-end
-
--- - Embed a list of libraries into the specified addon.
--- This function will try to embed all of the listed libraries into the addon
--- and error if a single one fails.
---
--- **Note:** This function is for internal use by :NewAddon/:NewModule
--- @paramsig addon, [lib, ...]
--- @param addon addon object to embed the libs in
--- @param lib List of libraries to embed into the addon
-function AceAddon:EmbedLibraries(addon, ...)
-	for i=1,select("#", ... ) do
-		local libname = select(i, ...)
-		self:EmbedLibrary(addon, libname, false, 4)
-	end
-end
-
--- - Embed a library into the addon object.
--- This function will check if the specified library is registered with LibStub
--- and if it has a :Embed function to call. It'll error if any of those conditions
--- fails.
---
--- **Note:** This function is for internal use by :EmbedLibraries
--- @paramsig addon, libname[, silent[, offset]]
--- @param addon addon object to embed the library in
--- @param libname name of the library to embed
--- @param silent marks an embed to fail silently if the library doesn't exist (optional)
--- @param offset will push the error messages back to said offset, defaults to 2 (optional)
-function AceAddon:EmbedLibrary(addon, libname, silent, offset)
-	local lib = LibStub:GetLibrary(libname, true)
-	if not lib and not silent then
-		error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of %q."):format(tostring(libname)), offset or 2)
-	elseif lib and type(lib.Embed) == "function" then
-		lib:Embed(addon)
-		tinsert(self.embeds[addon], libname)
-		return true
-	elseif lib then
-		error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Library '%s' is not Embed capable"):format(libname), offset or 2)
-	end
-end
-
---- Return the specified module from an addon object.
--- Throws an error if the addon object cannot be found (except if silent is set)
--- @name //addon//:GetModule
--- @paramsig name[, silent]
--- @param name unique name of the module
--- @param silent if true, the module is optional, silently return nil if its not found (optional)
--- @usage
--- -- Get the Addon
--- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
--- -- Get the Module
--- MyModule = MyAddon:GetModule("MyModule")
-function GetModule(self, name, silent)
-	if not self.modules[name] and not silent then
-		error(("Usage: GetModule(name, silent): 'name' - Cannot find module '%s'."):format(tostring(name)), 2)
-	end
-	return self.modules[name]
-end
-
-local function IsModuleTrue(self) return true end
-
---- Create a new module for the addon.
--- The new module can have its own embeded libraries and/or use a module prototype to be mixed into the module.\\
--- A module has the same functionality as a real addon, it can have modules of its own, and has the same API as
--- an addon object.
--- @name //addon//:NewModule
--- @paramsig name[, prototype|lib[, lib, ...]]
--- @param name unique name of the module
--- @param prototype object to derive this module from, methods and values from this table will be mixed into the module (optional)
--- @param lib List of libraries to embed into the addon
--- @usage
--- -- Create a module with some embeded libraries
--- MyModule = MyAddon:NewModule("MyModule", "AceEvent-3.0", "AceHook-3.0")
---
--- -- Create a module with a prototype
--- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
--- MyModule = MyAddon:NewModule("MyModule", prototype, "AceEvent-3.0", "AceHook-3.0")
-function NewModule(self, name, prototype, ...)
-	if type(name) ~= "string" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) end
-	if type(prototype) ~= "string" and type(prototype) ~= "table" and type(prototype) ~= "nil" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'prototype' - table (prototype), string (lib) or nil expected got '%s'."):format(type(prototype)), 2) end
-
-	if self.modules[name] then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - Module '%s' already exists."):format(name), 2) end
-
-	-- modules are basically addons. We treat them as such. They will be added to the initializequeue properly as well.
-	-- NewModule can only be called after the parent addon is present thus the modules will be initialized after their parent is.
-	local module = AceAddon:NewAddon(fmt("%s_%s", self.name or tostring(self), name))
-
-	module.IsModule = IsModuleTrue
-	module:SetEnabledState(self.defaultModuleState)
-	module.moduleName = name
-
-	if type(prototype) == "string" then
-		AceAddon:EmbedLibraries(module, prototype, ...)
-	else
-		AceAddon:EmbedLibraries(module, ...)
-	end
-	AceAddon:EmbedLibraries(module, unpack(self.defaultModuleLibraries))
-
-	if not prototype or type(prototype) == "string" then
-		prototype = self.defaultModulePrototype or nil
-	end
-
-	if type(prototype) == "table" then
-		local mt = getmetatable(module)
-		mt.__index = prototype
-		setmetatable(module, mt)  -- More of a Base class type feel.
-	end
-
-	safecall(self.OnModuleCreated, self, module) -- Was in Ace2 and I think it could be a cool thing to have handy.
-	self.modules[name] = module
-	tinsert(self.orderedModules, module)
-
-	return module
-end
-
---- Returns the real name of the addon or module, without any prefix.
--- @name //addon//:GetName
--- @paramsig
--- @usage
--- print(MyAddon:GetName())
--- -- prints "MyAddon"
-function GetName(self)
-	return self.moduleName or self.name
-end
-
---- Enables the Addon, if possible, return true or false depending on success.
--- This internally calls AceAddon:EnableAddon(), thus dispatching a OnEnable callback
--- and enabling all modules of the addon (unless explicitly disabled).\\
--- :Enable() also sets the internal `enableState` variable to true
--- @name //addon//:Enable
--- @paramsig
--- @usage
--- -- Enable MyModule
--- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
--- MyModule = MyAddon:GetModule("MyModule")
--- MyModule:Enable()
-function Enable(self)
-	self:SetEnabledState(true)
-
-	-- nevcairiel 2013-04-27: don't enable an addon/module if its queued for init still
-	-- it'll be enabled after the init process
-	if not queuedForInitialization(self) then
-		return AceAddon:EnableAddon(self)
-	end
-end
-
---- Disables the Addon, if possible, return true or false depending on success.
--- This internally calls AceAddon:DisableAddon(), thus dispatching a OnDisable callback
--- and disabling all modules of the addon.\\
--- :Disable() also sets the internal `enableState` variable to false
--- @name //addon//:Disable
--- @paramsig
--- @usage
--- -- Disable MyAddon
--- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
--- MyAddon:Disable()
-function Disable(self)
-	self:SetEnabledState(false)
-	return AceAddon:DisableAddon(self)
-end
-
---- Enables the Module, if possible, return true or false depending on success.
--- Short-hand function that retrieves the module via `:GetModule` and calls `:Enable` on the module object.
--- @name //addon//:EnableModule
--- @paramsig name
--- @usage
--- -- Enable MyModule using :GetModule
--- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
--- MyModule = MyAddon:GetModule("MyModule")
--- MyModule:Enable()
---
--- -- Enable MyModule using the short-hand
--- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
--- MyAddon:EnableModule("MyModule")
-function EnableModule(self, name)
-	local module = self:GetModule( name )
-	return module:Enable()
-end
-
---- Disables the Module, if possible, return true or false depending on success.
--- Short-hand function that retrieves the module via `:GetModule` and calls `:Disable` on the module object.
--- @name //addon//:DisableModule
--- @paramsig name
--- @usage
--- -- Disable MyModule using :GetModule
--- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
--- MyModule = MyAddon:GetModule("MyModule")
--- MyModule:Disable()
---
--- -- Disable MyModule using the short-hand
--- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
--- MyAddon:DisableModule("MyModule")
-function DisableModule(self, name)
-	local module = self:GetModule( name )
-	return module:Disable()
-end
-
---- Set the default libraries to be mixed into all modules created by this object.
--- Note that you can only change the default module libraries before any module is created.
--- @name //addon//:SetDefaultModuleLibraries
--- @paramsig lib[, lib, ...]
--- @param lib List of libraries to embed into the addon
--- @usage
--- -- Create the addon object
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
--- -- Configure default libraries for modules (all modules need AceEvent-3.0)
--- MyAddon:SetDefaultModuleLibraries("AceEvent-3.0")
--- -- Create a module
--- MyModule = MyAddon:NewModule("MyModule")
-function SetDefaultModuleLibraries(self, ...)
-	if next(self.modules) then
-		error("Usage: SetDefaultModuleLibraries(...): cannot change the module defaults after a module has been registered.", 2)
-	end
-	self.defaultModuleLibraries = {...}
-end
-
---- Set the default state in which new modules are being created.
--- Note that you can only change the default state before any module is created.
--- @name //addon//:SetDefaultModuleState
--- @paramsig state
--- @param state Default state for new modules, true for enabled, false for disabled
--- @usage
--- -- Create the addon object
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
--- -- Set the default state to "disabled"
--- MyAddon:SetDefaultModuleState(false)
--- -- Create a module and explicilty enable it
--- MyModule = MyAddon:NewModule("MyModule")
--- MyModule:Enable()
-function SetDefaultModuleState(self, state)
-	if next(self.modules) then
-		error("Usage: SetDefaultModuleState(state): cannot change the module defaults after a module has been registered.", 2)
-	end
-	self.defaultModuleState = state
-end
-
---- Set the default prototype to use for new modules on creation.
--- Note that you can only change the default prototype before any module is created.
--- @name //addon//:SetDefaultModulePrototype
--- @paramsig prototype
--- @param prototype Default prototype for the new modules (table)
--- @usage
--- -- Define a prototype
--- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
--- -- Set the default prototype
--- MyAddon:SetDefaultModulePrototype(prototype)
--- -- Create a module and explicitly Enable it
--- MyModule = MyAddon:NewModule("MyModule")
--- MyModule:Enable()
--- -- should print "OnEnable called!" now
--- @see NewModule
-function SetDefaultModulePrototype(self, prototype)
-	if next(self.modules) then
-		error("Usage: SetDefaultModulePrototype(prototype): cannot change the module defaults after a module has been registered.", 2)
-	end
-	if type(prototype) ~= "table" then
-		error(("Usage: SetDefaultModulePrototype(prototype): 'prototype' - table expected got '%s'."):format(type(prototype)), 2)
-	end
-	self.defaultModulePrototype = prototype
-end
-
---- Set the state of an addon or module
--- This should only be called before any enabling actually happend, e.g. in/before OnInitialize.
--- @name //addon//:SetEnabledState
--- @paramsig state
--- @param state the state of an addon or module  (enabled=true, disabled=false)
-function SetEnabledState(self, state)
-	self.enabledState = state
-end
-
-
---- Return an iterator of all modules associated to the addon.
--- @name //addon//:IterateModules
--- @paramsig
--- @usage
--- -- Enable all modules
--- for name, module in MyAddon:IterateModules() do
---    module:Enable()
--- end
-local function IterateModules(self) return pairs(self.modules) end
-
--- Returns an iterator of all embeds in the addon
--- @name //addon//:IterateEmbeds
--- @paramsig
-local function IterateEmbeds(self) return pairs(AceAddon.embeds[self]) end
-
---- Query the enabledState of an addon.
--- @name //addon//:IsEnabled
--- @paramsig
--- @usage
--- if MyAddon:IsEnabled() then
---     MyAddon:Disable()
--- end
-local function IsEnabled(self) return self.enabledState end
-local mixins = {
-	NewModule = NewModule,
-	GetModule = GetModule,
-	Enable = Enable,
-	Disable = Disable,
-	EnableModule = EnableModule,
-	DisableModule = DisableModule,
-	IsEnabled = IsEnabled,
-	SetDefaultModuleLibraries = SetDefaultModuleLibraries,
-	SetDefaultModuleState = SetDefaultModuleState,
-	SetDefaultModulePrototype = SetDefaultModulePrototype,
-	SetEnabledState = SetEnabledState,
-	IterateModules = IterateModules,
-	IterateEmbeds = IterateEmbeds,
-	GetName = GetName,
-}
-local function IsModule(self) return false end
-local pmixins = {
-	defaultModuleState = true,
-	enabledState = true,
-	IsModule = IsModule,
-}
--- Embed( target )
--- target (object) - target object to embed aceaddon in
---
--- this is a local function specifically since it's meant to be only called internally
-function Embed(target, skipPMixins)
-	for k, v in pairs(mixins) do
-		target[k] = v
-	end
-	if not skipPMixins then
-		for k, v in pairs(pmixins) do
-			target[k] = target[k] or v
-		end
-	end
-end
-
-
--- - Initialize the addon after creation.
--- This function is only used internally during the ADDON_LOADED event
--- It will call the **OnInitialize** function on the addon object (if present),
--- and the **OnEmbedInitialize** function on all embeded libraries.
---
--- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
--- @param addon addon object to intialize
-function AceAddon:InitializeAddon(addon)
-	safecall(addon.OnInitialize, addon)
-
-	local embeds = self.embeds[addon]
-	for i = 1, #embeds do
-		local lib = LibStub:GetLibrary(embeds[i], true)
-		if lib then safecall(lib.OnEmbedInitialize, lib, addon) end
-	end
-
-	-- we don't call InitializeAddon on modules specifically, this is handled
-	-- from the event handler and only done _once_
-end
-
--- - Enable the addon after creation.
--- Note: This function is only used internally during the PLAYER_LOGIN event, or during ADDON_LOADED,
--- if IsLoggedIn() already returns true at that point, e.g. for LoD Addons.
--- It will call the **OnEnable** function on the addon object (if present),
--- and the **OnEmbedEnable** function on all embeded libraries.\\
--- This function does not toggle the enable state of the addon itself, and will return early if the addon is disabled.
---
--- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
--- Use :Enable on the addon itself instead.
--- @param addon addon object to enable
-function AceAddon:EnableAddon(addon)
-	if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
-	if self.statuses[addon.name] or not addon.enabledState then return false end
-
-	-- set the statuses first, before calling the OnEnable. this allows for Disabling of the addon in OnEnable.
-	self.statuses[addon.name] = true
-
-	safecall(addon.OnEnable, addon)
-
-	-- make sure we're still enabled before continueing
-	if self.statuses[addon.name] then
-		local embeds = self.embeds[addon]
-		for i = 1, #embeds do
-			local lib = LibStub:GetLibrary(embeds[i], true)
-			if lib then safecall(lib.OnEmbedEnable, lib, addon) end
-		end
-
-		-- enable possible modules.
-		local modules = addon.orderedModules
-		for i = 1, #modules do
-			self:EnableAddon(modules[i])
-		end
-	end
-	return self.statuses[addon.name] -- return true if we're disabled
-end
-
--- - Disable the addon
--- Note: This function is only used internally.
--- It will call the **OnDisable** function on the addon object (if present),
--- and the **OnEmbedDisable** function on all embeded libraries.\\
--- This function does not toggle the enable state of the addon itself, and will return early if the addon is still enabled.
---
--- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
--- Use :Disable on the addon itself instead.
--- @param addon addon object to enable
-function AceAddon:DisableAddon(addon)
-	if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
-	if not self.statuses[addon.name] then return false end
-
-	-- set statuses first before calling OnDisable, this allows for aborting the disable in OnDisable.
-	self.statuses[addon.name] = false
-
-	safecall( addon.OnDisable, addon )
-
-	-- make sure we're still disabling...
-	if not self.statuses[addon.name] then
-		local embeds = self.embeds[addon]
-		for i = 1, #embeds do
-			local lib = LibStub:GetLibrary(embeds[i], true)
-			if lib then safecall(lib.OnEmbedDisable, lib, addon) end
-		end
-		-- disable possible modules.
-		local modules = addon.orderedModules
-		for i = 1, #modules do
-			self:DisableAddon(modules[i])
-		end
-	end
-
-	return not self.statuses[addon.name] -- return true if we're disabled
-end
-
---- Get an iterator over all registered addons.
--- @usage
--- -- Print a list of all installed AceAddon's
--- for name, addon in AceAddon:IterateAddons() do
---   print("Addon: " .. name)
--- end
-function AceAddon:IterateAddons() return pairs(self.addons) end
-
---- Get an iterator over the internal status registry.
--- @usage
--- -- Print a list of all enabled addons
--- for name, status in AceAddon:IterateAddonStatus() do
---   if status then
---     print("EnabledAddon: " .. name)
---   end
--- end
-function AceAddon:IterateAddonStatus() return pairs(self.statuses) end
-
--- Following Iterators are deprecated, and their addon specific versions should be used
--- e.g. addon:IterateEmbeds() instead of :IterateEmbedsOnAddon(addon)
-function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end
-function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end
-
--- Event Handling
-local function onEvent(this, event, arg1)
-	-- 2011-08-17 nevcairiel - ignore the load event of Blizzard_DebugTools, so a potential startup error isn't swallowed up
-	if (event == "ADDON_LOADED"  and arg1 ~= "Blizzard_DebugTools") or event == "PLAYER_LOGIN" then
-		-- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration
-		while(#AceAddon.initializequeue > 0) do
-			local addon = tremove(AceAddon.initializequeue, 1)
-			-- this might be an issue with recursion - TODO: validate
-			if event == "ADDON_LOADED" then addon.baseName = arg1 end
-			AceAddon:InitializeAddon(addon)
-			tinsert(AceAddon.enablequeue, addon)
-		end
-
-		if IsLoggedIn() then
-			while(#AceAddon.enablequeue > 0) do
-				local addon = tremove(AceAddon.enablequeue, 1)
-				AceAddon:EnableAddon(addon)
-			end
-		end
-	end
-end
-
-AceAddon.frame:RegisterEvent("ADDON_LOADED")
-AceAddon.frame:RegisterEvent("PLAYER_LOGIN")
-AceAddon.frame:SetScript("OnEvent", onEvent)
-
--- upgrade embeded
-for name, addon in pairs(AceAddon.addons) do
-	Embed(addon, true)
-end
-
--- 2010-10-27 nevcairiel - add new "orderedModules" table
-if oldminor and oldminor < 10 then
-	for name, addon in pairs(AceAddon.addons) do
-		addon.orderedModules = {}
-		for module_name, module in pairs(addon.modules) do
-			tinsert(addon.orderedModules, module)
-		end
-	end
-end
diff --git a/Libs/AceAddon-3.0/AceAddon-3.0.xml b/Libs/AceAddon-3.0/AceAddon-3.0.xml
deleted file mode 100644
index dcf24c7..0000000
--- a/Libs/AceAddon-3.0/AceAddon-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceAddon-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceBucket-3.0/AceBucket-3.0.lua b/Libs/AceBucket-3.0/AceBucket-3.0.lua
deleted file mode 100644
index d5e1065..0000000
--- a/Libs/AceBucket-3.0/AceBucket-3.0.lua
+++ /dev/null
@@ -1,293 +0,0 @@
---- A bucket to catch events in. **AceBucket-3.0** provides throttling of events that fire in bursts and
--- your addon only needs to know about the full burst.
---
--- This Bucket implementation works as follows:\\
---   Initially, no schedule is running, and its waiting for the first event to happen.\\
---   The first event will start the bucket, and get the scheduler running, which will collect all
---   events in the given interval. When that interval is reached, the bucket is pushed to the
---   callback and a new schedule is started. When a bucket is empty after its interval, the scheduler is
---   stopped, and the bucket is only listening for the next event to happen, basically back in its initial state.
---
--- In addition, the buckets collect information about the "arg1" argument of the events that fire, and pass those as a
--- table to your callback. This functionality was mostly designed for the UNIT_* events.\\
--- The table will have the different values of "arg1" as keys, and the number of occurances as their value, e.g.\\
---   { ["player"] = 2, ["target"] = 1, ["party1"] = 1 }
---
--- **AceBucket-3.0** can be embeded into your addon, either explicitly by calling AceBucket:Embed(MyAddon) or by
--- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
--- and can be accessed directly, without having to explicitly call AceBucket itself.\\
--- It is recommended to embed AceBucket, otherwise you'll have to specify a custom `self` on all calls you
--- make into AceBucket.
--- @usage
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("BucketExample", "AceBucket-3.0")
---
--- function MyAddon:OnEnable()
---   -- Register a bucket that listens to all the HP related events,
---   -- and fires once per second
---   self:RegisterBucketEvent({"UNIT_HEALTH", "UNIT_MAXHEALTH"}, 1, "UpdateHealth")
--- end
---
--- function MyAddon:UpdateHealth(units)
---   if units.player then
---     print("Your HP changed!")
---   end
--- end
--- @class file
--- @name AceBucket-3.0.lua
--- @release $Id: AceBucket-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $
-
-local MAJOR, MINOR = "AceBucket-3.0", 3
-local AceBucket, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceBucket then return end -- No Upgrade needed
-
-AceBucket.buckets = AceBucket.buckets or {}
-AceBucket.embeds = AceBucket.embeds or {}
-
--- the libraries will be lazyly bound later, to avoid errors due to loading order issues
-local AceEvent, AceTimer
-
--- Lua APIs
-local tconcat = table.concat
-local type, next, pairs, select = type, next, pairs, select
-local tonumber, tostring, rawset = tonumber, tostring, rawset
-local assert, loadstring, error = assert, loadstring, error
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: LibStub, geterrorhandler
-
-local bucketCache = setmetatable({}, {__mode='k'})
-
---[[
-	 xpcall safecall implementation
-]]
-local xpcall = xpcall
-
-local function errorhandler(err)
-	return geterrorhandler()(err)
-end
-
-local function CreateDispatcher(argCount)
-	local code = [[
-		local xpcall, eh = ...
-		local method, ARGS
-		local function call() return method(ARGS) end
-
-		local function dispatch(func, ...)
-			 method = func
-			 if not method then return end
-			 ARGS = ...
-			 return xpcall(call, eh)
-		end
-
-		return dispatch
-	]]
-
-	local ARGS = {}
-	for i = 1, argCount do ARGS[i] = "arg"..i end
-	code = code:gsub("ARGS", tconcat(ARGS, ", "))
-	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
-end
-
-local Dispatchers = setmetatable({}, {__index=function(self, argCount)
-	local dispatcher = CreateDispatcher(argCount)
-	rawset(self, argCount, dispatcher)
-	return dispatcher
-end})
-Dispatchers[0] = function(func)
-	return xpcall(func, errorhandler)
-end
-
-local function safecall(func, ...)
-	return Dispatchers[select('#', ...)](func, ...)
-end
-
--- FireBucket ( bucket )
---
--- send the bucket to the callback function and schedule the next FireBucket in interval seconds
-local function FireBucket(bucket)
-	local received = bucket.received
-
-	-- we dont want to fire empty buckets
-	if next(received) then
-		local callback = bucket.callback
-		if type(callback) == "string" then
-			safecall(bucket.object[callback], bucket.object, received)
-		else
-			safecall(callback, received)
-		end
-
-		for k in pairs(received) do
-			received[k] = nil
-		end
-
-		-- if the bucket was not empty, schedule another FireBucket in interval seconds
-		bucket.timer = AceTimer.ScheduleTimer(bucket, FireBucket, bucket.interval, bucket)
-	else -- if it was empty, clear the timer and wait for the next event
-		bucket.timer = nil
-	end
-end
-
--- BucketHandler ( event, arg1 )
---
--- callback func for AceEvent
--- stores arg1 in the received table, and schedules the bucket if necessary
-local function BucketHandler(self, event, arg1)
-	if arg1 == nil then
-		arg1 = "nil"
-	end
-
-	self.received[arg1] = (self.received[arg1] or 0) + 1
-
-	-- if we are not scheduled yet, start a timer on the interval for our bucket to be cleared
-	if not self.timer then
-		self.timer = AceTimer.ScheduleTimer(self, FireBucket, self.interval, self)
-	end
-end
-
--- RegisterBucket( event, interval, callback, isMessage )
---
--- event(string or table) - the event, or a table with the events, that this bucket listens to
--- interval(int) - time between bucket fireings
--- callback(func or string) - function pointer, or method name of the object, that gets called when the bucket is cleared
--- isMessage(boolean) - register AceEvent Messages instead of game events
-local function RegisterBucket(self, event, interval, callback, isMessage)
-	-- try to fetch the librarys
-	if not AceEvent or not AceTimer then
-		AceEvent = LibStub:GetLibrary("AceEvent-3.0", true)
-		AceTimer = LibStub:GetLibrary("AceTimer-3.0", true)
-		if not AceEvent or not AceTimer then
-			error(MAJOR .. " requires AceEvent-3.0 and AceTimer-3.0", 3)
-		end
-	end
-
-	if type(event) ~= "string" and type(event) ~= "table" then error("Usage: RegisterBucket(event, interval, callback): 'event' - string or table expected.", 3) end
-	if not callback then
-		if type(event) == "string" then
-			callback = event
-		else
-			error("Usage: RegisterBucket(event, interval, callback): cannot omit callback when event is not a string.", 3)
-		end
-	end
-	if not tonumber(interval) then error("Usage: RegisterBucket(event, interval, callback): 'interval' - number expected.", 3) end
-	if type(callback) ~= "string" and type(callback) ~= "function" then error("Usage: RegisterBucket(event, interval, callback): 'callback' - string or function or nil expected.", 3) end
-	if type(callback) == "string" and type(self[callback]) ~= "function" then error("Usage: RegisterBucket(event, interval, callback): 'callback' - method not found on target object.", 3) end
-
-	local bucket = next(bucketCache)
-	if bucket then
-		bucketCache[bucket] = nil
-	else
-		bucket = { handler = BucketHandler, received = {} }
-	end
-	bucket.object, bucket.callback, bucket.interval = self, callback, tonumber(interval)
-
-	local regFunc = isMessage and AceEvent.RegisterMessage or AceEvent.RegisterEvent
-
-	if type(event) == "table" then
-		for _,e in pairs(event) do
-			regFunc(bucket, e, "handler")
-		end
-	else
-		regFunc(bucket, event, "handler")
-	end
-
-	local handle = tostring(bucket)
-	AceBucket.buckets[handle] = bucket
-
-	return handle
-end
-
---- Register a Bucket for an event (or a set of events)
--- @param event The event to listen for, or a table of events.
--- @param interval The Bucket interval (burst interval)
--- @param callback The callback function, either as a function reference, or a string pointing to a method of the addon object.
--- @return The handle of the bucket (for unregistering)
--- @usage
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceBucket-3.0")
--- MyAddon:RegisterBucketEvent("BAG_UPDATE", 0.2, "UpdateBags")
---
--- function MyAddon:UpdateBags()
---   -- do stuff
--- end
-function AceBucket:RegisterBucketEvent(event, interval, callback)
-	return RegisterBucket(self, event, interval, callback, false)
-end
-
---- Register a Bucket for an AceEvent-3.0 addon message (or a set of messages)
--- @param message The message to listen for, or a table of messages.
--- @param interval The Bucket interval (burst interval)
--- @param callback The callback function, either as a function reference, or a string pointing to a method of the addon object.
--- @return The handle of the bucket (for unregistering)
--- @usage
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceBucket-3.0")
--- MyAddon:RegisterBucketEvent("SomeAddon_InformationMessage", 0.2, "ProcessData")
---
--- function MyAddon:ProcessData()
---   -- do stuff
--- end
-function AceBucket:RegisterBucketMessage(message, interval, callback)
-	return RegisterBucket(self, message, interval, callback, true)
-end
-
---- Unregister any events and messages from the bucket and clear any remaining data.
--- @param handle The handle of the bucket as returned by RegisterBucket*
-function AceBucket:UnregisterBucket(handle)
-	local bucket = AceBucket.buckets[handle]
-	if bucket then
-		AceEvent.UnregisterAllEvents(bucket)
-		AceEvent.UnregisterAllMessages(bucket)
-
-		-- clear any remaining data in the bucket
-		for k in pairs(bucket.received) do
-			bucket.received[k] = nil
-		end
-
-		if bucket.timer then
-			AceTimer.CancelTimer(bucket, bucket.timer)
-			bucket.timer = nil
-		end
-
-		AceBucket.buckets[handle] = nil
-		-- store our bucket in the cache
-		bucketCache[bucket] = true
-	end
-end
-
---- Unregister all buckets of the current addon object (or custom "self").
-function AceBucket:UnregisterAllBuckets()
-	-- hmm can we do this more efficient? (it is not done often so shouldn't matter much)
-	for handle, bucket in pairs(AceBucket.buckets) do
-		if bucket.object == self then
-			AceBucket.UnregisterBucket(self, handle)
-		end
-	end
-end
-
-
-
--- embedding and embed handling
-local mixins = {
-	"RegisterBucketEvent",
-	"RegisterBucketMessage",
-	"UnregisterBucket",
-	"UnregisterAllBuckets",
-}
-
--- Embeds AceBucket into the target object making the functions from the mixins list available on target:..
--- @param target target object to embed AceBucket in
-function AceBucket:Embed( target )
-	for _, v in pairs( mixins ) do
-		target[v] = self[v]
-	end
-	self.embeds[target] = true
-	return target
-end
-
-function AceBucket:OnEmbedDisable( target )
-	target:UnregisterAllBuckets()
-end
-
-for addon in pairs(AceBucket.embeds) do
-	AceBucket:Embed(addon)
-end
diff --git a/Libs/AceBucket-3.0/AceBucket-3.0.xml b/Libs/AceBucket-3.0/AceBucket-3.0.xml
deleted file mode 100644
index 06ab712..0000000
--- a/Libs/AceBucket-3.0/AceBucket-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceBucket-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceComm-3.0/AceComm-3.0.lua b/Libs/AceComm-3.0/AceComm-3.0.lua
deleted file mode 100644
index 9a38979..0000000
--- a/Libs/AceComm-3.0/AceComm-3.0.lua
+++ /dev/null
@@ -1,305 +0,0 @@
---- **AceComm-3.0** allows you to send messages of unlimited length over the addon comm channels.
--- It'll automatically split the messages into multiple parts and rebuild them on the receiving end.\\
--- **ChatThrottleLib** is of course being used to avoid being disconnected by the server.
---
--- **AceComm-3.0** can be embeded into your addon, either explicitly by calling AceComm:Embed(MyAddon) or by
--- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
--- and can be accessed directly, without having to explicitly call AceComm itself.\\
--- It is recommended to embed AceComm, otherwise you'll have to specify a custom `self` on all calls you
--- make into AceComm.
--- @class file
--- @name AceComm-3.0
--- @release $Id: AceComm-3.0.lua 1174 2018-05-14 17:29:49Z h.leppkes@gmail.com $
-
---[[ AceComm-3.0
-
-TODO: Time out old data rotting around from dead senders? Not a HUGE deal since the number of possible sender names is somewhat limited.
-
-]]
-
-local CallbackHandler = LibStub("CallbackHandler-1.0")
-local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")
-
-local MAJOR, MINOR = "AceComm-3.0", 12
-local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceComm then return end
-
--- Lua APIs
-local type, next, pairs, tostring = type, next, pairs, tostring
-local strsub, strfind = string.sub, string.find
-local match = string.match
-local tinsert, tconcat = table.insert, table.concat
-local error, assert = error, assert
-
--- WoW APIs
-local Ambiguate = Ambiguate
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: LibStub, DEFAULT_CHAT_FRAME, geterrorhandler, RegisterAddonMessagePrefix
-
-AceComm.embeds = AceComm.embeds or {}
-
--- for my sanity and yours, let's give the message type bytes some names
-local MSG_MULTI_FIRST = "\001"
-local MSG_MULTI_NEXT  = "\002"
-local MSG_MULTI_LAST  = "\003"
-local MSG_ESCAPE = "\004"
-
--- remove old structures (pre WoW 4.0)
-AceComm.multipart_origprefixes = nil
-AceComm.multipart_reassemblers = nil
-
--- the multipart message spool: indexed by a combination of sender+distribution+
-AceComm.multipart_spool = AceComm.multipart_spool or {}
-
---- Register for Addon Traffic on a specified prefix
--- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent), max 16 characters
--- @param method Callback to call on message reception: Function reference, or method name (string) to call on self. Defaults to "OnCommReceived"
-function AceComm:RegisterComm(prefix, method)
-	if method == nil then
-		method = "OnCommReceived"
-	end
-
-	if #prefix > 16 then -- TODO: 15?
-		error("AceComm:RegisterComm(prefix,method): prefix length is limited to 16 characters")
-	end
-	if C_ChatInfo then
-		C_ChatInfo.RegisterAddonMessagePrefix(prefix)
-	else
-		RegisterAddonMessagePrefix(prefix)
-	end
-
-	return AceComm._RegisterComm(self, prefix, method)	-- created by CallbackHandler
-end
-
-local warnedPrefix=false
-
---- Send a message over the Addon Channel
--- @param prefix A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent)
--- @param text Data to send, nils (\000) not allowed. Any length.
--- @param distribution Addon channel, e.g. "RAID", "GUILD", etc; see SendAddonMessage API
--- @param target Destination for some distributions; see SendAddonMessage API
--- @param prio OPTIONAL: ChatThrottleLib priority, "BULK", "NORMAL" or "ALERT". Defaults to "NORMAL".
--- @param callbackFn OPTIONAL: callback function to be called as each chunk is sent. receives 3 args: the user supplied arg (see next), the number of bytes sent so far, and the number of bytes total to send.
--- @param callbackArg: OPTIONAL: first arg to the callback function. nil will be passed if not specified.
-function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callbackFn, callbackArg)
-	prio = prio or "NORMAL"	-- pasta's reference implementation had different prio for singlepart and multipart, but that's a very bad idea since that can easily lead to out-of-sequence delivery!
-	if not( type(prefix)=="string" and
-			type(text)=="string" and
-			type(distribution)=="string" and
-			(target==nil or type(target)=="string" or type(target)=="number") and
-			(prio=="BULK" or prio=="NORMAL" or prio=="ALERT")
-		) then
-		error('Usage: SendCommMessage(addon, "prefix", "text", "distribution"[, "target"[, "prio"[, callbackFn, callbackarg]]])', 2)
-	end
-
-	local textlen = #text
-	local maxtextlen = 255  -- Yes, the max is 255 even if the dev post said 256. I tested. Char 256+ get silently truncated. /Mikk, 20110327
-	local queueName = prefix..distribution..(target or "")
-
-	local ctlCallback = nil
-	if callbackFn then
-		ctlCallback = function(sent)
-			return callbackFn(callbackArg, sent, textlen)
-		end
-	end
-
-	local forceMultipart
-	if match(text, "^[\001-\009]") then -- 4.1+: see if the first character is a control character
-		-- we need to escape the first character with a \004
-		if textlen+1 > maxtextlen then	-- would we go over the size limit?
-			forceMultipart = true	-- just make it multipart, no escape problems then
-		else
-			text = "\004" .. text
-		end
-	end
-
-	if not forceMultipart and textlen <= maxtextlen then
-		-- fits all in one message
-		CTL:SendAddonMessage(prio, prefix, text, distribution, target, queueName, ctlCallback, textlen)
-	else
-		maxtextlen = maxtextlen - 1	-- 1 extra byte for part indicator in prefix(4.0)/start of message(4.1)
-
-		-- first part
-		local chunk = strsub(text, 1, maxtextlen)
-		CTL:SendAddonMessage(prio, prefix, MSG_MULTI_FIRST..chunk, distribution, target, queueName, ctlCallback, maxtextlen)
-
-		-- continuation
-		local pos = 1+maxtextlen
-
-		while pos+maxtextlen <= textlen do
-			chunk = strsub(text, pos, pos+maxtextlen-1)
-			CTL:SendAddonMessage(prio, prefix, MSG_MULTI_NEXT..chunk, distribution, target, queueName, ctlCallback, pos+maxtextlen-1)
-			pos = pos + maxtextlen
-		end
-
-		-- final part
-		chunk = strsub(text, pos)
-		CTL:SendAddonMessage(prio, prefix, MSG_MULTI_LAST..chunk, distribution, target, queueName, ctlCallback, textlen)
-	end
-end
-
-
-----------------------------------------
--- Message receiving
-----------------------------------------
-
-do
-	local compost = setmetatable({}, {__mode = "k"})
-	local function new()
-		local t = next(compost)
-		if t then
-			compost[t]=nil
-			for i=#t,3,-1 do	-- faster than pairs loop. don't even nil out 1/2 since they'll be overwritten
-				t[i]=nil
-			end
-			return t
-		end
-
-		return {}
-	end
-
-	local function lostdatawarning(prefix,sender,where)
-		DEFAULT_CHAT_FRAME:AddMessage(MAJOR..": Warning: lost network data regarding '"..tostring(prefix).."' from '"..tostring(sender).."' (in "..where..")")
-	end
-
-	function AceComm:OnReceiveMultipartFirst(prefix, message, distribution, sender)
-		local key = prefix.."\t"..distribution.."\t"..sender	-- a unique stream is defined by the prefix + distribution + sender
-		local spool = AceComm.multipart_spool
-
-		--[[
-		if spool[key] then
-			lostdatawarning(prefix,sender,"First")
-			-- continue and overwrite
-		end
-		--]]
-
-		spool[key] = message  -- plain string for now
-	end
-
-	function AceComm:OnReceiveMultipartNext(prefix, message, distribution, sender)
-		local key = prefix.."\t"..distribution.."\t"..sender	-- a unique stream is defined by the prefix + distribution + sender
-		local spool = AceComm.multipart_spool
-		local olddata = spool[key]
-
-		if not olddata then
-			--lostdatawarning(prefix,sender,"Next")
-			return
-		end
-
-		if type(olddata)~="table" then
-			-- ... but what we have is not a table. So make it one. (Pull a composted one if available)
-			local t = new()
-			t[1] = olddata    -- add old data as first string
-			t[2] = message    -- and new message as second string
-			spool[key] = t    -- and put the table in the spool instead of the old string
-		else
-			tinsert(olddata, message)
-		end
-	end
-
-	function AceComm:OnReceiveMultipartLast(prefix, message, distribution, sender)
-		local key = prefix.."\t"..distribution.."\t"..sender	-- a unique stream is defined by the prefix + distribution + sender
-		local spool = AceComm.multipart_spool
-		local olddata = spool[key]
-
-		if not olddata then
-			--lostdatawarning(prefix,sender,"End")
-			return
-		end
-
-		spool[key] = nil
-
-		if type(olddata) == "table" then
-			-- if we've received a "next", the spooled data will be a table for rapid & garbage-free tconcat
-			tinsert(olddata, message)
-			AceComm.callbacks:Fire(prefix, tconcat(olddata, ""), distribution, sender)
-			compost[olddata] = true
-		else
-			-- if we've only received a "first", the spooled data will still only be a string
-			AceComm.callbacks:Fire(prefix, olddata..message, distribution, sender)
-		end
-	end
-end
-
-
-
-
-
-
-----------------------------------------
--- Embed CallbackHandler
-----------------------------------------
-
-if not AceComm.callbacks then
-	AceComm.callbacks = CallbackHandler:New(AceComm,
-						"_RegisterComm",
-						"UnregisterComm",
-						"UnregisterAllComm")
-end
-
-AceComm.callbacks.OnUsed = nil
-AceComm.callbacks.OnUnused = nil
-
-local function OnEvent(self, event, prefix, message, distribution, sender)
-	if event == "CHAT_MSG_ADDON" then
-		sender = Ambiguate(sender, "none")
-		local control, rest = match(message, "^([\001-\009])(.*)")
-		if control then
-			if control==MSG_MULTI_FIRST then
-				AceComm:OnReceiveMultipartFirst(prefix, rest, distribution, sender)
-			elseif control==MSG_MULTI_NEXT then
-				AceComm:OnReceiveMultipartNext(prefix, rest, distribution, sender)
-			elseif control==MSG_MULTI_LAST then
-				AceComm:OnReceiveMultipartLast(prefix, rest, distribution, sender)
-			elseif control==MSG_ESCAPE then
-				AceComm.callbacks:Fire(prefix, rest, distribution, sender)
-			else
-				-- unknown control character, ignore SILENTLY (dont warn unnecessarily about future extensions!)
-			end
-		else
-			-- single part: fire it off immediately and let CallbackHandler decide if it's registered or not
-			AceComm.callbacks:Fire(prefix, message, distribution, sender)
-		end
-	else
-		assert(false, "Received "..tostring(event).." event?!")
-	end
-end
-
-AceComm.frame = AceComm.frame or CreateFrame("Frame", "AceComm30Frame")
-AceComm.frame:SetScript("OnEvent", OnEvent)
-AceComm.frame:UnregisterAllEvents()
-AceComm.frame:RegisterEvent("CHAT_MSG_ADDON")
-
-
-----------------------------------------
--- Base library stuff
-----------------------------------------
-
-local mixins = {
-	"RegisterComm",
-	"UnregisterComm",
-	"UnregisterAllComm",
-	"SendCommMessage",
-}
-
--- Embeds AceComm-3.0 into the target object making the functions from the mixins list available on target:..
--- @param target target object to embed AceComm-3.0 in
-function AceComm:Embed(target)
-	for k, v in pairs(mixins) do
-		target[v] = self[v]
-	end
-	self.embeds[target] = true
-	return target
-end
-
-function AceComm:OnEmbedDisable(target)
-	target:UnregisterAllComm()
-end
-
--- Update embeds
-for target, v in pairs(AceComm.embeds) do
-	AceComm:Embed(target)
-end
diff --git a/Libs/AceComm-3.0/AceComm-3.0.xml b/Libs/AceComm-3.0/AceComm-3.0.xml
deleted file mode 100644
index 24fb43b..0000000
--- a/Libs/AceComm-3.0/AceComm-3.0.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="ChatThrottleLib.lua"/>
-	<Script file="AceComm-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceComm-3.0/ChatThrottleLib.lua b/Libs/AceComm-3.0/ChatThrottleLib.lua
deleted file mode 100644
index 01088f6..0000000
--- a/Libs/AceComm-3.0/ChatThrottleLib.lua
+++ /dev/null
@@ -1,534 +0,0 @@
---
--- ChatThrottleLib by Mikk
---
--- Manages AddOn chat output to keep player from getting kicked off.
---
--- ChatThrottleLib:SendChatMessage/:SendAddonMessage functions that accept
--- a Priority ("BULK", "NORMAL", "ALERT") as well as prefix for SendChatMessage.
---
--- Priorities get an equal share of available bandwidth when fully loaded.
--- Communication channels are separated on extension+chattype+destination and
--- get round-robinned. (Destination only matters for whispers and channels,
--- obviously)
---
--- Will install hooks for SendChatMessage and SendAddonMessage to measure
--- bandwidth bypassing the library and use less bandwidth itself.
---
---
--- Fully embeddable library. Just copy this file into your addon directory,
--- add it to the .toc, and it's done.
---
--- Can run as a standalone addon also, but, really, just embed it! :-)
---
--- LICENSE: ChatThrottleLib is released into the Public Domain
---
-
-local CTL_VERSION = 24
-
-local _G = _G
-
-if _G.ChatThrottleLib then
-	if _G.ChatThrottleLib.version >= CTL_VERSION then
-		-- There's already a newer (or same) version loaded. Buh-bye.
-		return
-	elseif not _G.ChatThrottleLib.securelyHooked then
-		print("ChatThrottleLib: Warning: There's an ANCIENT ChatThrottleLib.lua (pre-wow 2.0, <v16) in an addon somewhere. Get the addon updated or copy in a newer ChatThrottleLib.lua (>=v16) in it!")
-		-- ATTEMPT to unhook; this'll behave badly if someone else has hooked...
-		-- ... and if someone has securehooked, they can kiss that goodbye too... >.<
-		_G.SendChatMessage = _G.ChatThrottleLib.ORIG_SendChatMessage
-		if _G.ChatThrottleLib.ORIG_SendAddonMessage then
-			_G.SendAddonMessage = _G.ChatThrottleLib.ORIG_SendAddonMessage
-		end
-	end
-	_G.ChatThrottleLib.ORIG_SendChatMessage = nil
-	_G.ChatThrottleLib.ORIG_SendAddonMessage = nil
-end
-
-if not _G.ChatThrottleLib then
-	_G.ChatThrottleLib = {}
-end
-
-ChatThrottleLib = _G.ChatThrottleLib  -- in case some addon does "local ChatThrottleLib" above us and we're copypasted (AceComm-2, sigh)
-local ChatThrottleLib = _G.ChatThrottleLib
-
-ChatThrottleLib.version = CTL_VERSION
-
-
-
------------------- TWEAKABLES -----------------
-
-ChatThrottleLib.MAX_CPS = 800			  -- 2000 seems to be safe if NOTHING ELSE is happening. let's call it 800.
-ChatThrottleLib.MSG_OVERHEAD = 40		-- Guesstimate overhead for sending a message; source+dest+chattype+protocolstuff
-
-ChatThrottleLib.BURST = 4000				-- WoW's server buffer seems to be about 32KB. 8KB should be safe, but seen disconnects on _some_ servers. Using 4KB now.
-
-ChatThrottleLib.MIN_FPS = 20				-- Reduce output CPS to half (and don't burst) if FPS drops below this value
-
-
-local setmetatable = setmetatable
-local table_remove = table.remove
-local tostring = tostring
-local GetTime = GetTime
-local math_min = math.min
-local math_max = math.max
-local next = next
-local strlen = string.len
-local GetFramerate = GetFramerate
-local strlower = string.lower
-local unpack,type,pairs,wipe = unpack,type,pairs,wipe
-local UnitInRaid,UnitInParty = UnitInRaid,UnitInParty
-
-
------------------------------------------------------------------------
--- Double-linked ring implementation
-
-local Ring = {}
-local RingMeta = { __index = Ring }
-
-function Ring:New()
-	local ret = {}
-	setmetatable(ret, RingMeta)
-	return ret
-end
-
-function Ring:Add(obj)	-- Append at the "far end" of the ring (aka just before the current position)
-	if self.pos then
-		obj.prev = self.pos.prev
-		obj.prev.next = obj
-		obj.next = self.pos
-		obj.next.prev = obj
-	else
-		obj.next = obj
-		obj.prev = obj
-		self.pos = obj
-	end
-end
-
-function Ring:Remove(obj)
-	obj.next.prev = obj.prev
-	obj.prev.next = obj.next
-	if self.pos == obj then
-		self.pos = obj.next
-		if self.pos == obj then
-			self.pos = nil
-		end
-	end
-end
-
-
-
------------------------------------------------------------------------
--- Recycling bin for pipes
--- A pipe is a plain integer-indexed queue of messages
--- Pipes normally live in Rings of pipes  (3 rings total, one per priority)
-
-ChatThrottleLib.PipeBin = nil -- pre-v19, drastically different
-local PipeBin = setmetatable({}, {__mode="k"})
-
-local function DelPipe(pipe)
-	PipeBin[pipe] = true
-end
-
-local function NewPipe()
-	local pipe = next(PipeBin)
-	if pipe then
-		wipe(pipe)
-		PipeBin[pipe] = nil
-		return pipe
-	end
-	return {}
-end
-
-
-
-
------------------------------------------------------------------------
--- Recycling bin for messages
-
-ChatThrottleLib.MsgBin = nil -- pre-v19, drastically different
-local MsgBin = setmetatable({}, {__mode="k"})
-
-local function DelMsg(msg)
-	msg[1] = nil
-	-- there's more parameters, but they're very repetetive so the string pool doesn't suffer really, and it's faster to just not delete them.
-	MsgBin[msg] = true
-end
-
-local function NewMsg()
-	local msg = next(MsgBin)
-	if msg then
-		MsgBin[msg] = nil
-		return msg
-	end
-	return {}
-end
-
-
------------------------------------------------------------------------
--- ChatThrottleLib:Init
--- Initialize queues, set up frame for OnUpdate, etc
-
-
-function ChatThrottleLib:Init()
-
-	-- Set up queues
-	if not self.Prio then
-		self.Prio = {}
-		self.Prio["ALERT"] = { ByName = {}, Ring = Ring:New(), avail = 0 }
-		self.Prio["NORMAL"] = { ByName = {}, Ring = Ring:New(), avail = 0 }
-		self.Prio["BULK"] = { ByName = {}, Ring = Ring:New(), avail = 0 }
-	end
-
-	-- v4: total send counters per priority
-	for _, Prio in pairs(self.Prio) do
-		Prio.nTotalSent = Prio.nTotalSent or 0
-	end
-
-	if not self.avail then
-		self.avail = 0 -- v5
-	end
-	if not self.nTotalSent then
-		self.nTotalSent = 0 -- v5
-	end
-
-
-	-- Set up a frame to get OnUpdate events
-	if not self.Frame then
-		self.Frame = CreateFrame("Frame")
-		self.Frame:Hide()
-	end
-	self.Frame:SetScript("OnUpdate", self.OnUpdate)
-	self.Frame:SetScript("OnEvent", self.OnEvent)	-- v11: Monitor P_E_W so we can throttle hard for a few seconds
-	self.Frame:RegisterEvent("PLAYER_ENTERING_WORLD")
-	self.OnUpdateDelay = 0
-	self.LastAvailUpdate = GetTime()
-	self.HardThrottlingBeginTime = GetTime()	-- v11: Throttle hard for a few seconds after startup
-
-	-- Hook SendChatMessage and SendAddonMessage so we can measure unpiped traffic and avoid overloads (v7)
-	if not self.securelyHooked then
-		-- Use secure hooks as of v16. Old regular hook support yanked out in v21.
-		self.securelyHooked = true
-		--SendChatMessage
-		hooksecurefunc("SendChatMessage", function(...)
-			return ChatThrottleLib.Hook_SendChatMessage(...)
-		end)
-		--SendAddonMessage
-		if _G.C_ChatInfo then
-			hooksecurefunc(_G.C_ChatInfo, "SendAddonMessage", function(...)
-				return ChatThrottleLib.Hook_SendAddonMessage(...)
-			end)
-		else
-			hooksecurefunc("SendAddonMessage", function(...)
-				return ChatThrottleLib.Hook_SendAddonMessage(...)
-			end)
-		end
-	end
-	self.nBypass = 0
-end
-
-
------------------------------------------------------------------------
--- ChatThrottleLib.Hook_SendChatMessage / .Hook_SendAddonMessage
-
-local bMyTraffic = false
-
-function ChatThrottleLib.Hook_SendChatMessage(text, chattype, language, destination, ...)
-	if bMyTraffic then
-		return
-	end
-	local self = ChatThrottleLib
-	local size = strlen(tostring(text or "")) + strlen(tostring(destination or "")) + self.MSG_OVERHEAD
-	self.avail = self.avail - size
-	self.nBypass = self.nBypass + size	-- just a statistic
-end
-function ChatThrottleLib.Hook_SendAddonMessage(prefix, text, chattype, destination, ...)
-	if bMyTraffic then
-		return
-	end
-	local self = ChatThrottleLib
-	local size = tostring(text or ""):len() + tostring(prefix or ""):len();
-	size = size + tostring(destination or ""):len() + self.MSG_OVERHEAD
-	self.avail = self.avail - size
-	self.nBypass = self.nBypass + size	-- just a statistic
-end
-
-
-
------------------------------------------------------------------------
--- ChatThrottleLib:UpdateAvail
--- Update self.avail with how much bandwidth is currently available
-
-function ChatThrottleLib:UpdateAvail()
-	local now = GetTime()
-	local MAX_CPS = self.MAX_CPS;
-	local newavail = MAX_CPS * (now - self.LastAvailUpdate)
-	local avail = self.avail
-
-	if now - self.HardThrottlingBeginTime < 5 then
-		-- First 5 seconds after startup/zoning: VERY hard clamping to avoid irritating the server rate limiter, it seems very cranky then
-		avail = math_min(avail + (newavail*0.1), MAX_CPS*0.5)
-		self.bChoking = true
-	elseif GetFramerate() < self.MIN_FPS then		-- GetFrameRate call takes ~0.002 secs
-		avail = math_min(MAX_CPS, avail + newavail*0.5)
-		self.bChoking = true		-- just a statistic
-	else
-		avail = math_min(self.BURST, avail + newavail)
-		self.bChoking = false
-	end
-
-	avail = math_max(avail, 0-(MAX_CPS*2))	-- Can go negative when someone is eating bandwidth past the lib. but we refuse to stay silent for more than 2 seconds; if they can do it, we can.
-
-	self.avail = avail
-	self.LastAvailUpdate = now
-
-	return avail
-end
-
-
------------------------------------------------------------------------
--- Despooling logic
--- Reminder:
--- - We have 3 Priorities, each containing a "Ring" construct ...
--- - ... made up of N "Pipe"s (1 for each destination/pipename)
--- - and each pipe contains messages
-
-function ChatThrottleLib:Despool(Prio)
-	local ring = Prio.Ring
-	while ring.pos and Prio.avail > ring.pos[1].nSize do
-		local msg = table_remove(ring.pos, 1)
-		if not ring.pos[1] then  -- did we remove last msg in this pipe?
-			local pipe = Prio.Ring.pos
-			Prio.Ring:Remove(pipe)
-			Prio.ByName[pipe.name] = nil
-			DelPipe(pipe)
-		else
-			Prio.Ring.pos = Prio.Ring.pos.next
-		end
-		local didSend=false
-		local lowerDest = strlower(msg[3] or "")
-		if lowerDest == "raid" and not UnitInRaid("player") then
-			-- do nothing
-		elseif lowerDest == "party" and not UnitInParty("player") then
-			-- do nothing
-		else
-			Prio.avail = Prio.avail - msg.nSize
-			bMyTraffic = true
-			msg.f(unpack(msg, 1, msg.n))
-			bMyTraffic = false
-			Prio.nTotalSent = Prio.nTotalSent + msg.nSize
-			DelMsg(msg)
-			didSend = true
-		end
-		-- notify caller of delivery (even if we didn't send it)
-		if msg.callbackFn then
-			msg.callbackFn (msg.callbackArg, didSend)
-		end
-		-- USER CALLBACK MAY ERROR
-	end
-end
-
-
-function ChatThrottleLib.OnEvent(this,event)
-	-- v11: We know that the rate limiter is touchy after login. Assume that it's touchy after zoning, too.
-	local self = ChatThrottleLib
-	if event == "PLAYER_ENTERING_WORLD" then
-		self.HardThrottlingBeginTime = GetTime()	-- Throttle hard for a few seconds after zoning
-		self.avail = 0
-	end
-end
-
-
-function ChatThrottleLib.OnUpdate(this,delay)
-	local self = ChatThrottleLib
-
-	self.OnUpdateDelay = self.OnUpdateDelay + delay
-	if self.OnUpdateDelay < 0.08 then
-		return
-	end
-	self.OnUpdateDelay = 0
-
-	self:UpdateAvail()
-
-	if self.avail < 0  then
-		return -- argh. some bastard is spewing stuff past the lib. just bail early to save cpu.
-	end
-
-	-- See how many of our priorities have queued messages (we only have 3, don't worry about the loop)
-	local n = 0
-	for prioname,Prio in pairs(self.Prio) do
-		if Prio.Ring.pos or Prio.avail < 0 then
-			n = n + 1
-		end
-	end
-
-	-- Anything queued still?
-	if n<1 then
-		-- Nope. Move spillover bandwidth to global availability gauge and clear self.bQueueing
-		for prioname, Prio in pairs(self.Prio) do
-			self.avail = self.avail + Prio.avail
-			Prio.avail = 0
-		end
-		self.bQueueing = false
-		self.Frame:Hide()
-		return
-	end
-
-	-- There's stuff queued. Hand out available bandwidth to priorities as needed and despool their queues
-	local avail = self.avail/n
-	self.avail = 0
-
-	for prioname, Prio in pairs(self.Prio) do
-		if Prio.Ring.pos or Prio.avail < 0 then
-			Prio.avail = Prio.avail + avail
-			if Prio.Ring.pos and Prio.avail > Prio.Ring.pos[1].nSize then
-				self:Despool(Prio)
-				-- Note: We might not get here if the user-supplied callback function errors out! Take care!
-			end
-		end
-	end
-
-end
-
-
-
-
------------------------------------------------------------------------
--- Spooling logic
-
-function ChatThrottleLib:Enqueue(prioname, pipename, msg)
-	local Prio = self.Prio[prioname]
-	local pipe = Prio.ByName[pipename]
-	if not pipe then
-		self.Frame:Show()
-		pipe = NewPipe()
-		pipe.name = pipename
-		Prio.ByName[pipename] = pipe
-		Prio.Ring:Add(pipe)
-	end
-
-	pipe[#pipe + 1] = msg
-
-	self.bQueueing = true
-end
-
-function ChatThrottleLib:SendChatMessage(prio, prefix,   text, chattype, language, destination, queueName, callbackFn, callbackArg)
-	if not self or not prio or not prefix or not text or not self.Prio[prio] then
-		error('Usage: ChatThrottleLib:SendChatMessage("{BULK||NORMAL||ALERT}", "prefix", "text"[, "chattype"[, "language"[, "destination"]]]', 2)
-	end
-	if callbackFn and type(callbackFn)~="function" then
-		error('ChatThrottleLib:ChatMessage(): callbackFn: expected function, got '..type(callbackFn), 2)
-	end
-
-	local nSize = text:len()
-
-	if nSize>255 then
-		error("ChatThrottleLib:SendChatMessage(): message length cannot exceed 255 bytes", 2)
-	end
-
-	nSize = nSize + self.MSG_OVERHEAD
-
-	-- Check if there's room in the global available bandwidth gauge to send directly
-	if not self.bQueueing and nSize < self:UpdateAvail() then
-		self.avail = self.avail - nSize
-		bMyTraffic = true
-		_G.SendChatMessage(text, chattype, language, destination)
-		bMyTraffic = false
-		self.Prio[prio].nTotalSent = self.Prio[prio].nTotalSent + nSize
-		if callbackFn then
-			callbackFn (callbackArg, true)
-		end
-		-- USER CALLBACK MAY ERROR
-		return
-	end
-
-	-- Message needs to be queued
-	local msg = NewMsg()
-	msg.f = _G.SendChatMessage
-	msg[1] = text
-	msg[2] = chattype or "SAY"
-	msg[3] = language
-	msg[4] = destination
-	msg.n = 4
-	msg.nSize = nSize
-	msg.callbackFn = callbackFn
-	msg.callbackArg = callbackArg
-
-	self:Enqueue(prio, queueName or (prefix..(chattype or "SAY")..(destination or "")), msg)
-end
-
-
-function ChatThrottleLib:SendAddonMessage(prio, prefix, text, chattype, target, queueName, callbackFn, callbackArg)
-	if not self or not prio or not prefix or not text or not chattype or not self.Prio[prio] then
-		error('Usage: ChatThrottleLib:SendAddonMessage("{BULK||NORMAL||ALERT}", "prefix", "text", "chattype"[, "target"])', 2)
-	end
-	if callbackFn and type(callbackFn)~="function" then
-		error('ChatThrottleLib:SendAddonMessage(): callbackFn: expected function, got '..type(callbackFn), 2)
-	end
-
-	local nSize = text:len();
-
-	if C_ChatInfo or RegisterAddonMessagePrefix then
-		if nSize>255 then
-			error("ChatThrottleLib:SendAddonMessage(): message length cannot exceed 255 bytes", 2)
-		end
-	else
-		nSize = nSize + prefix:len() + 1
-		if nSize>255 then
-			error("ChatThrottleLib:SendAddonMessage(): prefix + message length cannot exceed 254 bytes", 2)
-		end
-	end
-
-	nSize = nSize + self.MSG_OVERHEAD;
-
-	-- Check if there's room in the global available bandwidth gauge to send directly
-	if not self.bQueueing and nSize < self:UpdateAvail() then
-		self.avail = self.avail - nSize
-		bMyTraffic = true
-		if _G.C_ChatInfo then
-			_G.C_ChatInfo.SendAddonMessage(prefix, text, chattype, target)
-		else
-			_G.SendAddonMessage(prefix, text, chattype, target)
-		end
-		bMyTraffic = false
-		self.Prio[prio].nTotalSent = self.Prio[prio].nTotalSent + nSize
-		if callbackFn then
-			callbackFn (callbackArg, true)
-		end
-		-- USER CALLBACK MAY ERROR
-		return
-	end
-
-	-- Message needs to be queued
-	local msg = NewMsg()
-	msg.f = _G.C_ChatInfo and _G.C_ChatInfo.SendAddonMessage or _G.SendAddonMessage
-	msg[1] = prefix
-	msg[2] = text
-	msg[3] = chattype
-	msg[4] = target
-	msg.n = (target~=nil) and 4 or 3;
-	msg.nSize = nSize
-	msg.callbackFn = callbackFn
-	msg.callbackArg = callbackArg
-
-	self:Enqueue(prio, queueName or (prefix..chattype..(target or "")), msg)
-end
-
-
-
-
------------------------------------------------------------------------
--- Get the ball rolling!
-
-ChatThrottleLib:Init()
-
---[[ WoWBench debugging snippet
-if(WOWB_VER) then
-	local function SayTimer()
-		print("SAY: "..GetTime().." "..arg1)
-	end
-	ChatThrottleLib.Frame:SetScript("OnEvent", SayTimer)
-	ChatThrottleLib.Frame:RegisterEvent("CHAT_MSG_SAY")
-end
-]]
-
-
diff --git a/Libs/AceConfig-3.0/AceConfig-3.0.lua b/Libs/AceConfig-3.0/AceConfig-3.0.lua
deleted file mode 100644
index a99ddf7..0000000
--- a/Libs/AceConfig-3.0/AceConfig-3.0.lua
+++ /dev/null
@@ -1,58 +0,0 @@
---- AceConfig-3.0 wrapper library.
--- Provides an API to register an options table with the config registry,
--- as well as associate it with a slash command.
--- @class file
--- @name AceConfig-3.0
--- @release $Id: AceConfig-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
-
---[[
-AceConfig-3.0
-
-Very light wrapper library that combines all the AceConfig subcomponents into one more easily used whole.
-
-]]
-
-local cfgreg = LibStub("AceConfigRegistry-3.0")
-local cfgcmd = LibStub("AceConfigCmd-3.0")
-
-local MAJOR, MINOR = "AceConfig-3.0", 3
-local AceConfig = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceConfig then return end
-
---TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true)
---TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true)
-
--- Lua APIs
-local pcall, error, type, pairs = pcall, error, type, pairs
-
--- -------------------------------------------------------------------
--- :RegisterOptionsTable(appName, options, slashcmd, persist)
---
--- - appName - (string) application name
--- - options - table or function ref, see AceConfigRegistry
--- - slashcmd - slash command (string) or table with commands, or nil to NOT create a slash command
-
---- Register a option table with the AceConfig registry.
--- You can supply a slash command (or a table of slash commands) to register with AceConfigCmd directly.
--- @paramsig appName, options [, slashcmd]
--- @param appName The application name for the config table.
--- @param options The option table (or a function to generate one on demand).  http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/
--- @param slashcmd A slash command to register for the option table, or a table of slash commands.
--- @usage
--- local AceConfig = LibStub("AceConfig-3.0")
--- AceConfig:RegisterOptionsTable("MyAddon", myOptions, {"/myslash", "/my"})
-function AceConfig:RegisterOptionsTable(appName, options, slashcmd)
-	local ok,msg = pcall(cfgreg.RegisterOptionsTable, self, appName, options)
-	if not ok then error(msg, 2) end
-
-	if slashcmd then
-		if type(slashcmd) == "table" then
-			for _,cmd in pairs(slashcmd) do
-				cfgcmd:CreateChatCommand(cmd, appName)
-			end
-		else
-			cfgcmd:CreateChatCommand(slashcmd, appName)
-		end
-	end
-end
diff --git a/Libs/AceConfig-3.0/AceConfig-3.0.xml b/Libs/AceConfig-3.0/AceConfig-3.0.xml
deleted file mode 100644
index a3569b7..0000000
--- a/Libs/AceConfig-3.0/AceConfig-3.0.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Include file="AceConfigRegistry-3.0\AceConfigRegistry-3.0.xml"/>
-	<Include file="AceConfigCmd-3.0\AceConfigCmd-3.0.xml"/>
-	<Include file="AceConfigDialog-3.0\AceConfigDialog-3.0.xml"/>
-	<!--<Include file="AceConfigDropdown-3.0\AceConfigDropdown-3.0.xml"/>-->
-	<Script file="AceConfig-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua b/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
deleted file mode 100644
index 33f9fe1..0000000
--- a/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
+++ /dev/null
@@ -1,794 +0,0 @@
---- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
--- @class file
--- @name AceConfigCmd-3.0
--- @release $Id: AceConfigCmd-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
-
---[[
-AceConfigCmd-3.0
-
-Handles commandline optionstable access
-
-REQUIRES: AceConsole-3.0 for command registration (loaded on demand)
-
-]]
-
--- TODO: plugin args
-
-local cfgreg = LibStub("AceConfigRegistry-3.0")
-
-local MAJOR, MINOR = "AceConfigCmd-3.0", 14
-local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceConfigCmd then return end
-
-AceConfigCmd.commands = AceConfigCmd.commands or {}
-local commands = AceConfigCmd.commands
-
-local AceConsole -- LoD
-local AceConsoleName = "AceConsole-3.0"
-
--- Lua APIs
-local strsub, strsplit, strlower, strmatch, strtrim = string.sub, string.split, string.lower, string.match, string.trim
-local format, tonumber, tostring = string.format, tonumber, tostring
-local tsort, tinsert = table.sort, table.insert
-local select, pairs, next, type = select, pairs, next, type
-local error, assert = error, assert
-
--- WoW APIs
-local _G = _G
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: LibStub, SELECTED_CHAT_FRAME, DEFAULT_CHAT_FRAME
-
-
-local L = setmetatable({}, {	-- TODO: replace with proper locale
-	__index = function(self,k) return k end
-})
-
-
-
-local function print(msg)
-	(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(msg)
-end
-
--- constants used by getparam() calls below
-
-local handlertypes = {["table"]=true}
-local handlermsg = "expected a table"
-
-local functypes = {["function"]=true, ["string"]=true}
-local funcmsg = "expected function or member name"
-
-
--- pickfirstset() - picks the first non-nil value and returns it
-
-local function pickfirstset(...)
-	for i=1,select("#",...) do
-		if select(i,...)~=nil then
-			return select(i,...)
-		end
-	end
-end
-
-
--- err() - produce real error() regarding malformed options tables etc
-
-local function err(info,inputpos,msg )
-	local cmdstr=" "..strsub(info.input, 1, inputpos-1)
-	error(MAJOR..": /" ..info[0] ..cmdstr ..": "..(msg or "malformed options table"), 2)
-end
-
-
--- usererr() - produce chatframe message regarding bad slash syntax etc
-
-local function usererr(info,inputpos,msg )
-	local cmdstr=strsub(info.input, 1, inputpos-1);
-	print("/" ..info[0] .. " "..cmdstr ..": "..(msg or "malformed options table"))
-end
-
-
--- callmethod() - call a given named method (e.g. "get", "set") with given arguments
-
-local function callmethod(info, inputpos, tab, methodtype, ...)
-	local method = info[methodtype]
-	if not method then
-		err(info, inputpos, "'"..methodtype.."': not set")
-	end
-
-	info.arg = tab.arg
-	info.option = tab
-	info.type = tab.type
-
-	if type(method)=="function" then
-		return method(info, ...)
-	elseif type(method)=="string" then
-		if type(info.handler[method])~="function" then
-			err(info, inputpos, "'"..methodtype.."': '"..method.."' is not a member function of "..tostring(info.handler))
-		end
-		return info.handler[method](info.handler, info, ...)
-	else
-		assert(false)	-- type should have already been checked on read
-	end
-end
-
--- callfunction() - call a given named function (e.g. "name", "desc") with given arguments
-
-local function callfunction(info, tab, methodtype, ...)
-	local method = tab[methodtype]
-
-	info.arg = tab.arg
-	info.option = tab
-	info.type = tab.type
-
-	if type(method)=="function" then
-		return method(info, ...)
-	else
-		assert(false) -- type should have already been checked on read
-	end
-end
-
--- do_final() - do the final step (set/execute) along with validation and confirmation
-
-local function do_final(info, inputpos, tab, methodtype, ...)
-	if info.validate then
-		local res = callmethod(info,inputpos,tab,"validate",...)
-		if type(res)=="string" then
-			usererr(info, inputpos, "'"..strsub(info.input, inputpos).."' - "..res)
-			return
-		end
-	end
-	-- console ignores .confirm
-
-	callmethod(info,inputpos,tab,methodtype, ...)
-end
-
-
--- getparam() - used by handle() to retreive and store "handler", "get", "set", etc
-
-local function getparam(info, inputpos, tab, depth, paramname, types, errormsg)
-	local old,oldat = info[paramname], info[paramname.."_at"]
-	local val=tab[paramname]
-	if val~=nil then
-		if val==false then
-			val=nil
-		elseif not types[type(val)] then
-			err(info, inputpos, "'" .. paramname.. "' - "..errormsg)
-		end
-		info[paramname] = val
-		info[paramname.."_at"] = depth
-	end
-	return old,oldat
-end
-
-
--- iterateargs(tab) - custom iterator that iterates both t.args and t.plugins.*
-local dummytable={}
-
-local function iterateargs(tab)
-	if not tab.plugins then
-		return pairs(tab.args)
-	end
-
-	local argtabkey,argtab=next(tab.plugins)
-	local v
-
-	return function(_, k)
-		while argtab do
-			k,v = next(argtab, k)
-			if k then return k,v end
-			if argtab==tab.args then
-				argtab=nil
-			else
-				argtabkey,argtab = next(tab.plugins, argtabkey)
-				if not argtabkey then
-					argtab=tab.args
-				end
-			end
-		end
-	end
-end
-
-local function checkhidden(info, inputpos, tab)
-	if tab.cmdHidden~=nil then
-		return tab.cmdHidden
-	end
-	local hidden = tab.hidden
-	if type(hidden) == "function" or type(hidden) == "string" then
-		info.hidden = hidden
-		hidden = callmethod(info, inputpos, tab, 'hidden')
-		info.hidden = nil
-	end
-	return hidden
-end
-
-local function showhelp(info, inputpos, tab, depth, noHead)
-	if not noHead then
-		print("|cff33ff99"..info.appName.."|r: Arguments to |cffffff78/"..info[0].."|r "..strsub(info.input,1,inputpos-1)..":")
-	end
-
-	local sortTbl = {}	-- [1..n]=name
-	local refTbl = {}   -- [name]=tableref
-
-	for k,v in iterateargs(tab) do
-		if not refTbl[k] then	-- a plugin overriding something in .args
-			tinsert(sortTbl, k)
-			refTbl[k] = v
-		end
-	end
-
-	tsort(sortTbl, function(one, two)
-		local o1 = refTbl[one].order or 100
-		local o2 = refTbl[two].order or 100
-		if type(o1) == "function" or type(o1) == "string" then
-			info.order = o1
-			info[#info+1] = one
-			o1 = callmethod(info, inputpos, refTbl[one], "order")
-			info[#info] = nil
-			info.order = nil
-		end
-		if type(o2) == "function" or type(o1) == "string" then
-			info.order = o2
-			info[#info+1] = two
-			o2 = callmethod(info, inputpos, refTbl[two], "order")
-			info[#info] = nil
-			info.order = nil
-		end
-		if o1<0 and o2<0 then return o1<o2 end
-		if o2<0 then return true end
-		if o1<0 then return false end
-		if o1==o2 then return tostring(one)<tostring(two) end   -- compare names
-		return o1<o2
-	end)
-
-	for i = 1, #sortTbl do
-		local k = sortTbl[i]
-		local v = refTbl[k]
-		if not checkhidden(info, inputpos, v) then
-			if v.type ~= "description" and v.type ~= "header" then
-				-- recursively show all inline groups
-				local name, desc = v.name, v.desc
-				if type(name) == "function" then
-					name = callfunction(info, v, 'name')
-				end
-				if type(desc) == "function" then
-					desc = callfunction(info, v, 'desc')
-				end
-				if v.type == "group" and pickfirstset(v.cmdInline, v.inline, false) then
-					print("  "..(desc or name)..":")
-					local oldhandler,oldhandler_at = getparam(info, inputpos, v, depth, "handler", handlertypes, handlermsg)
-					showhelp(info, inputpos, v, depth, true)
-					info.handler,info.handler_at = oldhandler,oldhandler_at
-				else
-					local key = k:gsub(" ", "_")
-					print("  |cffffff78"..key.."|r - "..(desc or name or ""))
-				end
-			end
-		end
-	end
-end
-
-
-local function keybindingValidateFunc(text)
-	if text == nil or text == "NONE" then
-		return nil
-	end
-	text = text:upper()
-	local shift, ctrl, alt
-	local modifier
-	while true do
-		if text == "-" then
-			break
-		end
-		modifier, text = strsplit('-', text, 2)
-		if text then
-			if modifier ~= "SHIFT" and modifier ~= "CTRL" and modifier ~= "ALT" then
-				return false
-			end
-			if modifier == "SHIFT" then
-				if shift then
-					return false
-				end
-				shift = true
-			end
-			if modifier == "CTRL" then
-				if ctrl then
-					return false
-				end
-				ctrl = true
-			end
-			if modifier == "ALT" then
-				if alt then
-					return false
-				end
-				alt = true
-			end
-		else
-			text = modifier
-			break
-		end
-	end
-	if text == "" then
-		return false
-	end
-	if not text:find("^F%d+$") and text ~= "CAPSLOCK" and text:len() ~= 1 and (text:byte() < 128 or text:len() > 4) and not _G["KEY_" .. text] then
-		return false
-	end
-	local s = text
-	if shift then
-		s = "SHIFT-" .. s
-	end
-	if ctrl then
-		s = "CTRL-" .. s
-	end
-	if alt then
-		s = "ALT-" .. s
-	end
-	return s
-end
-
--- handle() - selfrecursing function that processes input->optiontable
--- - depth - starts at 0
--- - retfalse - return false rather than produce error if a match is not found (used by inlined groups)
-
-local function handle(info, inputpos, tab, depth, retfalse)
-
-	if not(type(tab)=="table" and type(tab.type)=="string") then err(info,inputpos) end
-
-	-------------------------------------------------------------------
-	-- Grab hold of handler,set,get,func,etc if set (and remember old ones)
-	-- Note that we do NOT validate if method names are correct at this stage,
-	-- the handler may change before they're actually used!
-
-	local oldhandler,oldhandler_at = getparam(info,inputpos,tab,depth,"handler",handlertypes,handlermsg)
-	local oldset,oldset_at = getparam(info,inputpos,tab,depth,"set",functypes,funcmsg)
-	local oldget,oldget_at = getparam(info,inputpos,tab,depth,"get",functypes,funcmsg)
-	local oldfunc,oldfunc_at = getparam(info,inputpos,tab,depth,"func",functypes,funcmsg)
-	local oldvalidate,oldvalidate_at = getparam(info,inputpos,tab,depth,"validate",functypes,funcmsg)
-	--local oldconfirm,oldconfirm_at = getparam(info,inputpos,tab,depth,"confirm",functypes,funcmsg)
-
-	-------------------------------------------------------------------
-	-- Act according to .type of this table
-
-	if tab.type=="group" then
-		------------ group --------------------------------------------
-
-		if type(tab.args)~="table" then err(info, inputpos) end
-		if tab.plugins and type(tab.plugins)~="table" then err(info,inputpos) end
-
-		-- grab next arg from input
-		local _,nextpos,arg = (info.input):find(" *([^ ]+) *", inputpos)
-		if not arg then
-			showhelp(info, inputpos, tab, depth)
-			return
-		end
-		nextpos=nextpos+1
-
-		-- loop .args and try to find a key with a matching name
-		for k,v in iterateargs(tab) do
-			if not(type(k)=="string" and type(v)=="table" and type(v.type)=="string") then err(info,inputpos, "options table child '"..tostring(k).."' is malformed") end
-
-			-- is this child an inline group? if so, traverse into it
-			if v.type=="group" and pickfirstset(v.cmdInline, v.inline, false) then
-				info[depth+1] = k
-				if handle(info, inputpos, v, depth+1, true)==false then
-					info[depth+1] = nil
-					-- wasn't found in there, but that's ok, we just keep looking down here
-				else
-					return	-- done, name was found in inline group
-				end
-			-- matching name and not a inline group
-			elseif strlower(arg)==strlower(k:gsub(" ", "_")) then
-				info[depth+1] = k
-				return handle(info,nextpos,v,depth+1)
-			end
-		end
-
-		-- no match
-		if retfalse then
-			-- restore old infotable members and return false to indicate failure
-			info.handler,info.handler_at = oldhandler,oldhandler_at
-			info.set,info.set_at = oldset,oldset_at
-			info.get,info.get_at = oldget,oldget_at
-			info.func,info.func_at = oldfunc,oldfunc_at
-			info.validate,info.validate_at = oldvalidate,oldvalidate_at
-			--info.confirm,info.confirm_at = oldconfirm,oldconfirm_at
-			return false
-		end
-
-		-- couldn't find the command, display error
-		usererr(info, inputpos, "'"..arg.."' - " .. L["unknown argument"])
-		return
-	end
-
-	local str = strsub(info.input,inputpos);
-
-	if tab.type=="execute" then
-		------------ execute --------------------------------------------
-		do_final(info, inputpos, tab, "func")
-
-
-
-	elseif tab.type=="input" then
-		------------ input --------------------------------------------
-
-		local res = true
-		if tab.pattern then
-			if not(type(tab.pattern)=="string") then err(info, inputpos, "'pattern' - expected a string") end
-			if not strmatch(str, tab.pattern) then
-				usererr(info, inputpos, "'"..str.."' - " .. L["invalid input"])
-				return
-			end
-		end
-
-		do_final(info, inputpos, tab, "set", str)
-
-
-
-	elseif tab.type=="toggle" then
-		------------ toggle --------------------------------------------
-		local b
-		local str = strtrim(strlower(str))
-		if str=="" then
-			b = callmethod(info, inputpos, tab, "get")
-
-			if tab.tristate then
-				--cycle in true, nil, false order
-				if b then
-					b = nil
-				elseif b == nil then
-					b = false
-				else
-					b = true
-				end
-			else
-				b = not b
-			end
-
-		elseif str==L["on"] then
-			b = true
-		elseif str==L["off"] then
-			b = false
-		elseif tab.tristate and str==L["default"] then
-			b = nil
-		else
-			if tab.tristate then
-				usererr(info, inputpos, format(L["'%s' - expected 'on', 'off' or 'default', or no argument to toggle."], str))
-			else
-				usererr(info, inputpos, format(L["'%s' - expected 'on' or 'off', or no argument to toggle."], str))
-			end
-			return
-		end
-
-		do_final(info, inputpos, tab, "set", b)
-
-
-	elseif tab.type=="range" then
-		------------ range --------------------------------------------
-		local val = tonumber(str)
-		if not val then
-			usererr(info, inputpos, "'"..str.."' - "..L["expected number"])
-			return
-		end
-		if type(info.step)=="number" then
-			val = val- (val % info.step)
-		end
-		if type(info.min)=="number" and val<info.min then
-			usererr(info, inputpos, val.." - "..format(L["must be equal to or higher than %s"], tostring(info.min)) )
-			return
-		end
-		if type(info.max)=="number" and val>info.max then
-			usererr(info, inputpos, val.." - "..format(L["must be equal to or lower than %s"], tostring(info.max)) )
-			return
-		end
-
-		do_final(info, inputpos, tab, "set", val)
-
-
-	elseif tab.type=="select" then
-		------------ select ------------------------------------
-		local str = strtrim(strlower(str))
-
-		local values = tab.values
-		if type(values) == "function" or type(values) == "string" then
-			info.values = values
-			values = callmethod(info, inputpos, tab, "values")
-			info.values = nil
-		end
-
-		if str == "" then
-			local b = callmethod(info, inputpos, tab, "get")
-			local fmt = "|cffffff78- [%s]|r %s"
-			local fmt_sel = "|cffffff78- [%s]|r %s |cffff0000*|r"
-			print(L["Options for |cffffff78"..info[#info].."|r:"])
-			for k, v in pairs(values) do
-				if b == k then
-					print(fmt_sel:format(k, v))
-				else
-					print(fmt:format(k, v))
-				end
-			end
-			return
-		end
-
-		local ok
-		for k,v in pairs(values) do
-			if strlower(k)==str then
-				str = k	-- overwrite with key (in case of case mismatches)
-				ok = true
-				break
-			end
-		end
-		if not ok then
-			usererr(info, inputpos, "'"..str.."' - "..L["unknown selection"])
-			return
-		end
-
-		do_final(info, inputpos, tab, "set", str)
-
-	elseif tab.type=="multiselect" then
-		------------ multiselect -------------------------------------------
-		local str = strtrim(strlower(str))
-
-		local values = tab.values
-		if type(values) == "function" or type(values) == "string" then
-			info.values = values
-			values = callmethod(info, inputpos, tab, "values")
-			info.values = nil
-		end
-
-		if str == "" then
-			local fmt = "|cffffff78- [%s]|r %s"
-			local fmt_sel = "|cffffff78- [%s]|r %s |cffff0000*|r"
-			print(L["Options for |cffffff78"..info[#info].."|r (multiple possible):"])
-			for k, v in pairs(values) do
-				if callmethod(info, inputpos, tab, "get", k) then
-					print(fmt_sel:format(k, v))
-				else
-					print(fmt:format(k, v))
-				end
-			end
-			return
-		end
-
-		--build a table of the selections, checking that they exist
-		--parse for =on =off =default in the process
-		--table will be key = true for options that should toggle, key = [on|off|default] for options to be set
-		local sels = {}
-		for v in str:gmatch("[^ ]+") do
-			--parse option=on etc
-			local opt, val = v:match('(.+)=(.+)')
-			--get option if toggling
-			if not opt then
-				opt = v
-			end
-
-			--check that the opt is valid
-			local ok
-			for k,v in pairs(values) do
-				if strlower(k)==opt then
-					opt = k	-- overwrite with key (in case of case mismatches)
-					ok = true
-					break
-				end
-			end
-
-			if not ok then
-				usererr(info, inputpos, "'"..opt.."' - "..L["unknown selection"])
-				return
-			end
-
-			--check that if val was supplied it is valid
-			if val then
-				if val == L["on"] or val == L["off"] or (tab.tristate and val == L["default"]) then
-					--val is valid insert it
-					sels[opt] = val
-				else
-					if tab.tristate then
-						usererr(info, inputpos, format(L["'%s' '%s' - expected 'on', 'off' or 'default', or no argument to toggle."], v, val))
-					else
-						usererr(info, inputpos, format(L["'%s' '%s' - expected 'on' or 'off', or no argument to toggle."], v, val))
-					end
-					return
-				end
-			else
-				-- no val supplied, toggle
-				sels[opt] = true
-			end
-		end
-
-		for opt, val in pairs(sels) do
-			local newval
-
-			if (val == true) then
-				--toggle the option
-				local b = callmethod(info, inputpos, tab, "get", opt)
-
-				if tab.tristate then
-					--cycle in true, nil, false order
-					if b then
-						b = nil
-					elseif b == nil then
-						b = false
-					else
-						b = true
-					end
-				else
-					b = not b
-				end
-				newval = b
-			else
-				--set the option as specified
-				if val==L["on"] then
-					newval = true
-				elseif val==L["off"] then
-					newval = false
-				elseif val==L["default"] then
-					newval = nil
-				end
-			end
-
-			do_final(info, inputpos, tab, "set", opt, newval)
-		end
-
-
-	elseif tab.type=="color" then
-		------------ color --------------------------------------------
-		local str = strtrim(strlower(str))
-		if str == "" then
-			--TODO: Show current value
-			return
-		end
-
-		local r, g, b, a
-
-		local hasAlpha = tab.hasAlpha
-		if type(hasAlpha) == "function" or type(hasAlpha) == "string" then
-			info.hasAlpha = hasAlpha
-			hasAlpha = callmethod(info, inputpos, tab, 'hasAlpha')
-			info.hasAlpha = nil
-		end
-
-		if hasAlpha then
-			if str:len() == 8 and str:find("^%x*$")  then
-				--parse a hex string
-				r,g,b,a = tonumber(str:sub(1, 2), 16) / 255, tonumber(str:sub(3, 4), 16) / 255, tonumber(str:sub(5, 6), 16) / 255, tonumber(str:sub(7, 8), 16) / 255
-			else
-				--parse seperate values
-				r,g,b,a = str:match("^([%d%.]+) ([%d%.]+) ([%d%.]+) ([%d%.]+)$")
-				r,g,b,a = tonumber(r), tonumber(g), tonumber(b), tonumber(a)
-			end
-			if not (r and g and b and a) then
-				usererr(info, inputpos, format(L["'%s' - expected 'RRGGBBAA' or 'r g b a'."], str))
-				return
-			end
-
-			if r >= 0.0 and r <= 1.0 and g >= 0.0 and g <= 1.0 and b >= 0.0 and b <= 1.0 and a >= 0.0 and a <= 1.0 then
-				--values are valid
-			elseif r >= 0 and r <= 255 and g >= 0 and g <= 255 and b >= 0 and b <= 255 and a >= 0 and a <= 255 then
-				--values are valid 0..255, convert to 0..1
-				r = r / 255
-				g = g / 255
-				b = b / 255
-				a = a / 255
-			else
-				--values are invalid
-				usererr(info, inputpos, format(L["'%s' - values must all be either in the range 0..1 or 0..255."], str))
-			end
-		else
-			a = 1.0
-			if str:len() == 6 and str:find("^%x*$") then
-				--parse a hex string
-				r,g,b = tonumber(str:sub(1, 2), 16) / 255, tonumber(str:sub(3, 4), 16) / 255, tonumber(str:sub(5, 6), 16) / 255
-			else
-				--parse seperate values
-				r,g,b = str:match("^([%d%.]+) ([%d%.]+) ([%d%.]+)$")
-				r,g,b = tonumber(r), tonumber(g), tonumber(b)
-			end
-			if not (r and g and b) then
-				usererr(info, inputpos, format(L["'%s' - expected 'RRGGBB' or 'r g b'."], str))
-				return
-			end
-			if r >= 0.0 and r <= 1.0 and g >= 0.0 and g <= 1.0 and b >= 0.0 and b <= 1.0 then
-				--values are valid
-			elseif r >= 0 and r <= 255 and g >= 0 and g <= 255 and b >= 0 and b <= 255 then
-				--values are valid 0..255, convert to 0..1
-				r = r / 255
-				g = g / 255
-				b = b / 255
-			else
-				--values are invalid
-				usererr(info, inputpos, format(L["'%s' - values must all be either in the range 0-1 or 0-255."], str))
-			end
-		end
-
-		do_final(info, inputpos, tab, "set", r,g,b,a)
-
-	elseif tab.type=="keybinding" then
-		------------ keybinding --------------------------------------------
-		local str = strtrim(strlower(str))
-		if str == "" then
-			--TODO: Show current value
-			return
-		end
-		local value = keybindingValidateFunc(str:upper())
-		if value == false then
-			usererr(info, inputpos, format(L["'%s' - Invalid Keybinding."], str))
-			return
-		end
-
-		do_final(info, inputpos, tab, "set", value)
-
-	elseif tab.type=="description" then
-		------------ description --------------------
-		-- ignore description, GUI config only
-	else
-		err(info, inputpos, "unknown options table item type '"..tostring(tab.type).."'")
-	end
-end
-
---- Handle the chat command.
--- This is usually called from a chat command handler to parse the command input as operations on an aceoptions table.\\
--- AceConfigCmd uses this function internally when a slash command is registered with `:CreateChatCommand`
--- @param slashcmd The slash command WITHOUT leading slash (only used for error output)
--- @param appName The application name as given to `:RegisterOptionsTable()`
--- @param input The commandline input (as given by the WoW handler, i.e. without the command itself)
--- @usage
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceConsole-3.0")
--- -- Use AceConsole-3.0 to register a Chat Command
--- MyAddon:RegisterChatCommand("mychat", "ChatCommand")
---
--- -- Show the GUI if no input is supplied, otherwise handle the chat input.
--- function MyAddon:ChatCommand(input)
---   -- Assuming "MyOptions" is the appName of a valid options table
---   if not input or input:trim() == "" then
---     LibStub("AceConfigDialog-3.0"):Open("MyOptions")
---   else
---     LibStub("AceConfigCmd-3.0").HandleCommand(MyAddon, "mychat", "MyOptions", input)
---   end
--- end
-function AceConfigCmd:HandleCommand(slashcmd, appName, input)
-
-	local optgetter = cfgreg:GetOptionsTable(appName)
-	if not optgetter then
-		error([[Usage: HandleCommand("slashcmd", "appName", "input"): 'appName' - no options table "]]..tostring(appName)..[[" has been registered]], 2)
-	end
-	local options = assert( optgetter("cmd", MAJOR) )
-
-	local info = {   -- Don't try to recycle this, it gets handed off to callbacks and whatnot
-		[0] = slashcmd,
-		appName = appName,
-		options = options,
-		input = input,
-		self = self,
-		handler = self,
-		uiType = "cmd",
-		uiName = MAJOR,
-	}
-
-	handle(info, 1, options, 0)  -- (info, inputpos, table, depth)
-end
-
---- Utility function to create a slash command handler.
--- Also registers tab completion with AceTab
--- @param slashcmd The slash command WITHOUT leading slash (only used for error output)
--- @param appName The application name as given to `:RegisterOptionsTable()`
-function AceConfigCmd:CreateChatCommand(slashcmd, appName)
-	if not AceConsole then
-		AceConsole = LibStub(AceConsoleName)
-	end
-	if AceConsole.RegisterChatCommand(self, slashcmd, function(input)
-				AceConfigCmd.HandleCommand(self, slashcmd, appName, input)	-- upgradable
-		end,
-	true) then -- succesfully registered so lets get the command -> app table in
-		commands[slashcmd] = appName
-	end
-end
-
---- Utility function that returns the options table that belongs to a slashcommand.
--- Designed to be used for the AceTab interface.
--- @param slashcmd The slash command WITHOUT leading slash (only used for error output)
--- @return The options table associated with the slash command (or nil if the slash command was not registered)
-function AceConfigCmd:GetChatCommandOptions(slashcmd)
-	return commands[slashcmd]
-end
diff --git a/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml b/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml
deleted file mode 100644
index 9e157b5..0000000
--- a/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceConfigCmd-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua b/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
deleted file mode 100644
index 66416e8..0000000
--- a/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
+++ /dev/null
@@ -1,1983 +0,0 @@
---- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
--- @class file
--- @name AceConfigDialog-3.0
--- @release $Id: AceConfigDialog-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $
-
-local LibStub = LibStub
-local gui = LibStub("AceGUI-3.0")
-local reg = LibStub("AceConfigRegistry-3.0")
-
-local MAJOR, MINOR = "AceConfigDialog-3.0", 66
-local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceConfigDialog then return end
-
-AceConfigDialog.OpenFrames = AceConfigDialog.OpenFrames or {}
-AceConfigDialog.Status = AceConfigDialog.Status or {}
-AceConfigDialog.frame = AceConfigDialog.frame or CreateFrame("Frame")
-
-AceConfigDialog.frame.apps = AceConfigDialog.frame.apps or {}
-AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {}
-AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {}
-
--- Lua APIs
-local tconcat, tinsert, tsort, tremove, tsort = table.concat, table.insert, table.sort, table.remove, table.sort
-local strmatch, format = string.match, string.format
-local assert, loadstring, error = assert, loadstring, error
-local pairs, next, select, type, unpack, wipe, ipairs = pairs, next, select, type, unpack, wipe, ipairs
-local rawset, tostring, tonumber = rawset, tostring, tonumber
-local math_min, math_max, math_floor = math.min, math.max, math.floor
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: NORMAL_FONT_COLOR, GameTooltip, StaticPopupDialogs, ACCEPT, CANCEL, StaticPopup_Show
--- GLOBALS: PlaySound, GameFontHighlight, GameFontHighlightSmall, GameFontHighlightLarge
--- GLOBALS: CloseSpecialWindows, InterfaceOptions_AddCategory, geterrorhandler
-
-local emptyTbl = {}
-
---[[
-	 xpcall safecall implementation
-]]
-local xpcall = xpcall
-
-local function errorhandler(err)
-	return geterrorhandler()(err)
-end
-
-local function CreateDispatcher(argCount)
-	local code = [[
-		local xpcall, eh = ...
-		local method, ARGS
-		local function call() return method(ARGS) end
-
-		local function dispatch(func, ...)
-			 method = func
-			 if not method then return end
-			 ARGS = ...
-			 return xpcall(call, eh)
-		end
-
-		return dispatch
-	]]
-
-	local ARGS = {}
-	for i = 1, argCount do ARGS[i] = "arg"..i end
-	code = code:gsub("ARGS", tconcat(ARGS, ", "))
-	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
-end
-
-local Dispatchers = setmetatable({}, {__index=function(self, argCount)
-	local dispatcher = CreateDispatcher(argCount)
-	rawset(self, argCount, dispatcher)
-	return dispatcher
-end})
-Dispatchers[0] = function(func)
-	return xpcall(func, errorhandler)
-end
-
-local function safecall(func, ...)
-	return Dispatchers[select("#", ...)](func, ...)
-end
-
-local width_multiplier = 170
-
---[[
-Group Types
-  Tree 	- All Descendant Groups will all become nodes on the tree, direct child options will appear above the tree
-  		- Descendant Groups with inline=true and thier children will not become nodes
-
-  Tab	- Direct Child Groups will become tabs, direct child options will appear above the tab control
-  		- Grandchild groups will default to inline unless specified otherwise
-
-  Select- Same as Tab but with entries in a dropdown rather than tabs
-
-
-  Inline Groups
-  	- Will not become nodes of a select group, they will be effectivly part of thier parent group seperated by a border
-  	- If declared on a direct child of a root node of a select group, they will appear above the group container control
-  	- When a group is displayed inline, all descendants will also be inline members of the group
-
-]]
-
--- Recycling functions
-local new, del, copy
---newcount, delcount,createdcount,cached = 0,0,0
-do
-	local pool = setmetatable({},{__mode="k"})
-	function new()
-		--newcount = newcount + 1
-		local t = next(pool)
-		if t then
-			pool[t] = nil
-			return t
-		else
-			--createdcount = createdcount + 1
-			return {}
-		end
-	end
-	function copy(t)
-		local c = new()
-		for k, v in pairs(t) do
-			c[k] = v
-		end
-		return c
-	end
-	function del(t)
-		--delcount = delcount + 1
-		wipe(t)
-		pool[t] = true
-	end
---	function cached()
---		local n = 0
---		for k in pairs(pool) do
---			n = n + 1
---		end
---		return n
---	end
-end
-
--- picks the first non-nil value and returns it
-local function pickfirstset(...)
-  for i=1,select("#",...) do
-    if select(i,...)~=nil then
-      return select(i,...)
-    end
-  end
-end
-
---gets an option from a given group, checking plugins
-local function GetSubOption(group, key)
-	if group.plugins then
-		for plugin, t in pairs(group.plugins) do
-			if t[key] then
-				return t[key]
-			end
-		end
-	end
-
-	return group.args[key]
-end
-
---Option member type definitions, used to decide how to access it
-
---Is the member Inherited from parent options
-local isInherited = {
-	set = true,
-	get = true,
-	func = true,
-	confirm = true,
-	validate = true,
-	disabled = true,
-	hidden = true
-}
-
---Does a string type mean a literal value, instead of the default of a method of the handler
-local stringIsLiteral = {
-	name = true,
-	desc = true,
-	icon = true,
-	usage = true,
-	width = true,
-	image = true,
-	fontSize = true,
-}
-
---Is Never a function or method
-local allIsLiteral = {
-	type = true,
-	descStyle = true,
-	imageWidth = true,
-	imageHeight = true,
-}
-
---gets the value for a member that could be a function
---function refs are called with an info arg
---every other type is returned
-local function GetOptionsMemberValue(membername, option, options, path, appName, ...)
-	--get definition for the member
-	local inherits = isInherited[membername]
-
-
-	--get the member of the option, traversing the tree if it can be inherited
-	local member
-
-	if inherits then
-		local group = options
-		if group[membername] ~= nil then
-			member = group[membername]
-		end
-		for i = 1, #path do
-			group = GetSubOption(group, path[i])
-			if group[membername] ~= nil then
-				member = group[membername]
-			end
-		end
-	else
-		member = option[membername]
-	end
-
-	--check if we need to call a functon, or if we have a literal value
-	if ( not allIsLiteral[membername] ) and ( type(member) == "function" or ((not stringIsLiteral[membername]) and type(member) == "string") ) then
-		--We have a function to call
-		local info = new()
-		--traverse the options table, picking up the handler and filling the info with the path
-		local handler
-		local group = options
-		handler = group.handler or handler
-
-		for i = 1, #path do
-			group = GetSubOption(group, path[i])
-			info[i] = path[i]
-			handler = group.handler or handler
-		end
-
-		info.options = options
-		info.appName = appName
-		info[0] = appName
-		info.arg = option.arg
-		info.handler = handler
-		info.option = option
-		info.type = option.type
-		info.uiType = "dialog"
-		info.uiName = MAJOR
-
-		local a, b, c ,d
-		--using 4 returns for the get of a color type, increase if a type needs more
-		if type(member) == "function" then
-			--Call the function
-			a,b,c,d = member(info, ...)
-		else
-			--Call the method
-			if handler and handler[member] then
-				a,b,c,d = handler[member](handler, info, ...)
-			else
-				error(format("Method %s doesn't exist in handler for type %s", member, membername))
-			end
-		end
-		del(info)
-		return a,b,c,d
-	else
-		--The value isnt a function to call, return it
-		return member
-	end
-end
-
---[[calls an options function that could be inherited, method name or function ref
-local function CallOptionsFunction(funcname ,option, options, path, appName, ...)
-	local info = new()
-
-	local func
-	local group = options
-	local handler
-
-	--build the info table containing the path
-	-- pick up functions while traversing the tree
-	if group[funcname] ~= nil then
-		func = group[funcname]
-	end
-	handler = group.handler or handler
-
-	for i, v in ipairs(path) do
-		group = GetSubOption(group, v)
-		info[i] = v
-		if group[funcname] ~= nil then
-			func =  group[funcname]
-		end
-		handler = group.handler or handler
-	end
-
-	info.options = options
-	info[0] = appName
-	info.arg = option.arg
-
-	local a, b, c ,d
-	if type(func) == "string" then
-		if handler and handler[func] then
-			a,b,c,d = handler[func](handler, info, ...)
-		else
-			error(string.format("Method %s doesn't exist in handler for type func", func))
-		end
-	elseif type(func) == "function" then
-		a,b,c,d = func(info, ...)
-	end
-	del(info)
-	return a,b,c,d
-end
---]]
-
---tables to hold orders and names for options being sorted, will be created with new()
---prevents needing to call functions repeatedly while sorting
-local tempOrders
-local tempNames
-
-local function compareOptions(a,b)
-	if not a then
-		return true
-	end
-	if not b then
-		return false
-	end
-	local OrderA, OrderB = tempOrders[a] or 100, tempOrders[b] or 100
-	if OrderA == OrderB then
-		local NameA = (type(tempNames[a]) == "string") and tempNames[a] or ""
-		local NameB = (type(tempNames[b]) == "string") and tempNames[b] or ""
-		return NameA:upper() < NameB:upper()
-	end
-	if OrderA < 0 then
-		if OrderB > 0 then
-			return false
-		end
-	else
-		if OrderB < 0 then
-			return true
-		end
-	end
-	return OrderA < OrderB
-end
-
-
-
---builds 2 tables out of an options group
--- keySort, sorted keys
--- opts, combined options from .plugins and args
-local function BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
-	tempOrders = new()
-	tempNames = new()
-
-	if group.plugins then
-		for plugin, t in pairs(group.plugins) do
-			for k, v in pairs(t) do
-				if not opts[k] then
-					tinsert(keySort, k)
-					opts[k] = v
-
-					path[#path+1] = k
-					tempOrders[k] = GetOptionsMemberValue("order", v, options, path, appName)
-					tempNames[k] = GetOptionsMemberValue("name", v, options, path, appName)
-					path[#path] = nil
-				end
-			end
-		end
-	end
-
-	for k, v in pairs(group.args) do
-		if not opts[k] then
-			tinsert(keySort, k)
-			opts[k] = v
-
-			path[#path+1] = k
-			tempOrders[k] = GetOptionsMemberValue("order", v, options, path, appName)
-			tempNames[k] = GetOptionsMemberValue("name", v, options, path, appName)
-			path[#path] = nil
-		end
-	end
-
-	tsort(keySort, compareOptions)
-
-	del(tempOrders)
-	del(tempNames)
-end
-
-local function DelTree(tree)
-	if tree.children then
-		local childs = tree.children
-		for i = 1, #childs do
-			DelTree(childs[i])
-			del(childs[i])
-		end
-		del(childs)
-	end
-end
-
-local function CleanUserData(widget, event)
-
-	local user = widget:GetUserDataTable()
-
-	if user.path then
-		del(user.path)
-	end
-
-	if widget.type == "TreeGroup" then
-		local tree = user.tree
-		widget:SetTree(nil)
-		if tree then
-			for i = 1, #tree do
-				DelTree(tree[i])
-				del(tree[i])
-			end
-			del(tree)
-		end
-	end
-
-	if widget.type == "TabGroup" then
-		widget:SetTabs(nil)
-		if user.tablist then
-			del(user.tablist)
-		end
-	end
-
-	if widget.type == "DropdownGroup" then
-		widget:SetGroupList(nil)
-		if user.grouplist then
-			del(user.grouplist)
-		end
-		if user.orderlist then
-			del(user.orderlist)
-		end
-	end
-end
-
--- - Gets a status table for the given appname and options path.
--- @param appName The application name as given to `:RegisterOptionsTable()`
--- @param path The path to the options (a table with all group keys)
--- @return
-function AceConfigDialog:GetStatusTable(appName, path)
-	local status = self.Status
-
-	if not status[appName] then
-		status[appName] = {}
-		status[appName].status = {}
-		status[appName].children = {}
-	end
-
-	status = status[appName]
-
-	if path then
-		for i = 1, #path do
-			local v = path[i]
-			if not status.children[v] then
-				status.children[v] = {}
-				status.children[v].status = {}
-				status.children[v].children = {}
-			end
-			status = status.children[v]
-		end
-	end
-
-	return status.status
-end
-
---- Selects the specified path in the options window.
--- The path specified has to match the keys of the groups in the table.
--- @param appName The application name as given to `:RegisterOptionsTable()`
--- @param ... The path to the key that should be selected
-function AceConfigDialog:SelectGroup(appName, ...)
-	local path = new()
-
-
-	local app = reg:GetOptionsTable(appName)
-	if not app then
-		error(("%s isn't registed with AceConfigRegistry, unable to open config"):format(appName), 2)
-	end
-	local options = app("dialog", MAJOR)
-	local group = options
-	local status = self:GetStatusTable(appName, path)
-	if not status.groups then
-		status.groups = {}
-	end
-	status = status.groups
-	local treevalue
-	local treestatus
-
-	for n = 1, select("#",...) do
-		local key = select(n, ...)
-
-		if group.childGroups == "tab" or group.childGroups == "select" then
-			--if this is a tab or select group, select the group
-			status.selected = key
-			--children of this group are no longer extra levels of a tree
-			treevalue = nil
-		else
-			--tree group by default
-			if treevalue then
-				--this is an extra level of a tree group, build a uniquevalue for it
-				treevalue = treevalue.."\001"..key
-			else
-				--this is the top level of a tree group, the uniquevalue is the same as the key
-				treevalue = key
-				if not status.groups then
-					status.groups = {}
-				end
-				--save this trees status table for any extra levels or groups
-				treestatus = status
-			end
-			--make sure that the tree entry is open, and select it.
-			--the selected group will be overwritten if a child is the final target but still needs to be open
-			treestatus.selected = treevalue
-			treestatus.groups[treevalue] = true
-
-		end
-
-		--move to the next group in the path
-		group = GetSubOption(group, key)
-		if not group then
-			break
-		end
-		tinsert(path, key)
-		status = self:GetStatusTable(appName, path)
-		if not status.groups then
-			status.groups = {}
-		end
-		status = status.groups
-	end
-
-	del(path)
-	reg:NotifyChange(appName)
-end
-
-local function OptionOnMouseOver(widget, event)
-	--show a tooltip/set the status bar to the desc text
-	local user = widget:GetUserDataTable()
-	local opt = user.option
-	local options = user.options
-	local path = user.path
-	local appName = user.appName
-
-	GameTooltip:SetOwner(widget.frame, "ANCHOR_TOPRIGHT")
-	local name = GetOptionsMemberValue("name", opt, options, path, appName)
-	local desc = GetOptionsMemberValue("desc", opt, options, path, appName)
-	local usage = GetOptionsMemberValue("usage", opt, options, path, appName)
-	local descStyle = opt.descStyle
-
-	if descStyle and descStyle ~= "tooltip" then return end
-
-	GameTooltip:SetText(name, 1, .82, 0, true)
-
-	if opt.type == "multiselect" then
-		GameTooltip:AddLine(user.text, 0.5, 0.5, 0.8, true)
-	end
-	if type(desc) == "string" then
-		GameTooltip:AddLine(desc, 1, 1, 1, true)
-	end
-	if type(usage) == "string" then
-		GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true)
-	end
-
-	GameTooltip:Show()
-end
-
-local function OptionOnMouseLeave(widget, event)
-	GameTooltip:Hide()
-end
-
-local function GetFuncName(option)
-	local type = option.type
-	if type == "execute" then
-		return "func"
-	else
-		return "set"
-	end
-end
-local function confirmPopup(appName, rootframe, basepath, info, message, func, ...)
-	if not StaticPopupDialogs["ACECONFIGDIALOG30_CONFIRM_DIALOG"] then
-		StaticPopupDialogs["ACECONFIGDIALOG30_CONFIRM_DIALOG"] = {}
-	end
-	local t = StaticPopupDialogs["ACECONFIGDIALOG30_CONFIRM_DIALOG"]
-	for k in pairs(t) do
-		t[k] = nil
-	end
-	t.text = message
-	t.button1 = ACCEPT
-	t.button2 = CANCEL
-	t.preferredIndex = STATICPOPUP_NUMDIALOGS
-	local dialog, oldstrata
-	t.OnAccept = function()
-		safecall(func, unpack(t))
-		if dialog and oldstrata then
-			dialog:SetFrameStrata(oldstrata)
-		end
-		AceConfigDialog:Open(appName, rootframe, unpack(basepath or emptyTbl))
-		del(info)
-	end
-	t.OnCancel = function()
-		if dialog and oldstrata then
-			dialog:SetFrameStrata(oldstrata)
-		end
-		AceConfigDialog:Open(appName, rootframe, unpack(basepath or emptyTbl))
-		del(info)
-	end
-	for i = 1, select("#", ...) do
-		t[i] = select(i, ...) or false
-	end
-	t.timeout = 0
-	t.whileDead = 1
-	t.hideOnEscape = 1
-
-	dialog = StaticPopup_Show("ACECONFIGDIALOG30_CONFIRM_DIALOG")
-	if dialog then
-		oldstrata = dialog:GetFrameStrata()
-		dialog:SetFrameStrata("TOOLTIP")
-	end
-end
-
-local function validationErrorPopup(message)
-	if not StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] then
-		StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"] = {}
-	end
-	local t = StaticPopupDialogs["ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG"]
-	t.text = message
-	t.button1 = OKAY
-	t.preferredIndex = STATICPOPUP_NUMDIALOGS
-	local dialog, oldstrata
-	t.OnAccept = function()
-		if dialog and oldstrata then
-			dialog:SetFrameStrata(oldstrata)
-		end
-	end
-	t.timeout = 0
-	t.whileDead = 1
-	t.hideOnEscape = 1
-
-	dialog = StaticPopup_Show("ACECONFIGDIALOG30_VALIDATION_ERROR_DIALOG")
-	if dialog then
-		oldstrata = dialog:GetFrameStrata()
-		dialog:SetFrameStrata("TOOLTIP")
-	end
-end
-
-local function ActivateControl(widget, event, ...)
-	--This function will call the set / execute handler for the widget
-	--widget:GetUserDataTable() contains the needed info
-	local user = widget:GetUserDataTable()
-	local option = user.option
-	local options = user.options
-	local path = user.path
-	local info = new()
-
-	local func
-	local group = options
-	local funcname = GetFuncName(option)
-	local handler
-	local confirm
-	local validate
-	--build the info table containing the path
-	-- pick up functions while traversing the tree
-	if group[funcname] ~= nil then
-		func =  group[funcname]
-	end
-	handler = group.handler or handler
-	confirm = group.confirm
-	validate = group.validate
-	for i = 1, #path do
-		local v = path[i]
-		group = GetSubOption(group, v)
-		info[i] = v
-		if group[funcname] ~= nil then
-			func =  group[funcname]
-		end
-		handler = group.handler or handler
-		if group.confirm ~= nil then
-			confirm = group.confirm
-		end
-		if group.validate ~= nil then
-			validate = group.validate
-		end
-	end
-
-	info.options = options
-	info.appName = user.appName
-	info.arg = option.arg
-	info.handler = handler
-	info.option = option
-	info.type = option.type
-	info.uiType = "dialog"
-	info.uiName = MAJOR
-
-	local name
-	if type(option.name) == "function" then
-		name = option.name(info)
-	elseif type(option.name) == "string" then
-		name = option.name
-	else
-		name = ""
-	end
-	local usage = option.usage
-	local pattern = option.pattern
-
-	local validated = true
-
-	if option.type == "input" then
-		if type(pattern)=="string" then
-			if not strmatch(..., pattern) then
-				validated = false
-			end
-		end
-	end
-
-	local success
-	if validated and option.type ~= "execute" then
-		if type(validate) == "string" then
-			if handler and handler[validate] then
-				success, validated = safecall(handler[validate], handler, info, ...)
-				if not success then validated = false end
-			else
-				error(format("Method %s doesn't exist in handler for type execute", validate))
-			end
-		elseif type(validate) == "function" then
-			success, validated = safecall(validate, info, ...)
-			if not success then validated = false end
-		end
-	end
-
-	local rootframe = user.rootframe
-	if not validated or type(validated) == "string" then
-		if not validated then
-			if usage then
-				validated = name..": "..usage
-			else
-				if pattern then
-					validated = name..": Expected "..pattern
-				else
-					validated = name..": Invalid Value"
-				end
-			end
-		end
-
-		-- show validate message
-		if rootframe.SetStatusText then
-			rootframe:SetStatusText(validated)
-		else
-			validationErrorPopup(validated)
-		end
-		PlaySound(882) -- SOUNDKIT.IG_PLAYER_INVITE_DECLINE || _DECLINE is actually missing from the table
-		del(info)
-		return true
-	else
-
-		local confirmText = option.confirmText
-		--call confirm func/method
-		if type(confirm) == "string" then
-			if handler and handler[confirm] then
-				success, confirm = safecall(handler[confirm], handler, info, ...)
-				if success and type(confirm) == "string" then
-					confirmText = confirm
-					confirm = true
-				elseif not success then
-					confirm = false
-				end
-			else
-				error(format("Method %s doesn't exist in handler for type confirm", confirm))
-			end
-		elseif type(confirm) == "function" then
-			success, confirm = safecall(confirm, info, ...)
-			if success and type(confirm) == "string" then
-				confirmText = confirm
-				confirm = true
-			elseif not success then
-				confirm = false
-			end
-		end
-
-		--confirm if needed
-		if type(confirm) == "boolean" then
-			if confirm then
-				if not confirmText then
-					local name, desc = option.name, option.desc
-					if type(name) == "function" then
-						name = name(info)
-					end
-					if type(desc) == "function" then
-						desc = desc(info)
-					end
-					confirmText = name
-					if desc then
-						confirmText = confirmText.." - "..desc
-					end
-				end
-
-				local iscustom = user.rootframe:GetUserData("iscustom")
-				local rootframe
-
-				if iscustom then
-					rootframe = user.rootframe
-				end
-				local basepath = user.rootframe:GetUserData("basepath")
-				if type(func) == "string" then
-					if handler and handler[func] then
-						confirmPopup(user.appName, rootframe, basepath, info, confirmText, handler[func], handler, info, ...)
-					else
-						error(format("Method %s doesn't exist in handler for type func", func))
-					end
-				elseif type(func) == "function" then
-					confirmPopup(user.appName, rootframe, basepath, info, confirmText, func, info, ...)
-				end
-				--func will be called and info deleted when the confirm dialog is responded to
-				return
-			end
-		end
-
-		--call the function
-		if type(func) == "string" then
-			if handler and handler[func] then
-				safecall(handler[func],handler, info, ...)
-			else
-				error(format("Method %s doesn't exist in handler for type func", func))
-			end
-		elseif type(func) == "function" then
-			safecall(func,info, ...)
-		end
-
-
-
-		local iscustom = user.rootframe:GetUserData("iscustom")
-		local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
-		--full refresh of the frame, some controls dont cause this on all events
-		if option.type == "color" then
-			if event == "OnValueConfirmed" then
-
-				if iscustom then
-					AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
-				else
-					AceConfigDialog:Open(user.appName, unpack(basepath))
-				end
-			end
-		elseif option.type == "range" then
-			if event == "OnMouseUp" then
-				if iscustom then
-					AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
-				else
-					AceConfigDialog:Open(user.appName, unpack(basepath))
-				end
-			end
-		--multiselects don't cause a refresh on 'OnValueChanged' only 'OnClosed'
-		elseif option.type == "multiselect" then
-			user.valuechanged = true
-		else
-			if iscustom then
-				AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
-			else
-				AceConfigDialog:Open(user.appName, unpack(basepath))
-			end
-		end
-
-	end
-	del(info)
-end
-
-local function ActivateSlider(widget, event, value)
-	local option = widget:GetUserData("option")
-	local min, max, step = option.min or (not option.softMin and 0 or nil), option.max or (not option.softMax and 100 or nil), option.step
-	if min then
-		if step then
-			value = math_floor((value - min) / step + 0.5) * step + min
-		end
-		value = math_max(value, min)
-	end
-	if max then
-		value = math_min(value, max)
-	end
-	ActivateControl(widget,event,value)
-end
-
---called from a checkbox that is part of an internally created multiselect group
---this type is safe to refresh on activation of one control
-local function ActivateMultiControl(widget, event, ...)
-	ActivateControl(widget, event, widget:GetUserData("value"), ...)
-	local user = widget:GetUserDataTable()
-	local iscustom = user.rootframe:GetUserData("iscustom")
-	local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
-	if iscustom then
-		AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
-	else
-		AceConfigDialog:Open(user.appName, unpack(basepath))
-	end
-end
-
-local function MultiControlOnClosed(widget, event, ...)
-	local user = widget:GetUserDataTable()
-	if user.valuechanged then
-		local iscustom = user.rootframe:GetUserData("iscustom")
-		local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
-		if iscustom then
-			AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
-		else
-			AceConfigDialog:Open(user.appName, unpack(basepath))
-		end
-	end
-end
-
-local function FrameOnClose(widget, event)
-	local appName = widget:GetUserData("appName")
-	AceConfigDialog.OpenFrames[appName] = nil
-	gui:Release(widget)
-end
-
-local function CheckOptionHidden(option, options, path, appName)
-	--check for a specific boolean option
-	local hidden = pickfirstset(option.dialogHidden,option.guiHidden)
-	if hidden ~= nil then
-		return hidden
-	end
-
-	return GetOptionsMemberValue("hidden", option, options, path, appName)
-end
-
-local function CheckOptionDisabled(option, options, path, appName)
-	--check for a specific boolean option
-	local disabled = pickfirstset(option.dialogDisabled,option.guiDisabled)
-	if disabled ~= nil then
-		return disabled
-	end
-
-	return GetOptionsMemberValue("disabled", option, options, path, appName)
-end
---[[
-local function BuildTabs(group, options, path, appName)
-	local tabs = new()
-	local text = new()
-	local keySort = new()
-	local opts = new()
-
-	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
-
-	for i = 1, #keySort do
-		local k = keySort[i]
-		local v = opts[k]
-		if v.type == "group" then
-			path[#path+1] = k
-			local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
-			local hidden = CheckOptionHidden(v, options, path, appName)
-			if not inline and not hidden then
-				tinsert(tabs, k)
-				text[k] = GetOptionsMemberValue("name", v, options, path, appName)
-			end
-			path[#path] = nil
-		end
-	end
-
-	del(keySort)
-	del(opts)
-
-	return tabs, text
-end
-]]
-local function BuildSelect(group, options, path, appName)
-	local groups = new()
-	local order = new()
-	local keySort = new()
-	local opts = new()
-
-	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
-
-	for i = 1, #keySort do
-		local k = keySort[i]
-		local v = opts[k]
-		if v.type == "group" then
-			path[#path+1] = k
-			local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
-			local hidden = CheckOptionHidden(v, options, path, appName)
-			if not inline and not hidden then
-				groups[k] = GetOptionsMemberValue("name", v, options, path, appName)
-				tinsert(order, k)
-			end
-			path[#path] = nil
-		end
-	end
-
-	del(opts)
-	del(keySort)
-
-	return groups, order
-end
-
-local function BuildSubGroups(group, tree, options, path, appName)
-	local keySort = new()
-	local opts = new()
-
-	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
-
-	for i = 1, #keySort do
-		local k = keySort[i]
-		local v = opts[k]
-		if v.type == "group" then
-			path[#path+1] = k
-			local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
-			local hidden = CheckOptionHidden(v, options, path, appName)
-			if not inline and not hidden then
-				local entry = new()
-				entry.value = k
-				entry.text = GetOptionsMemberValue("name", v, options, path, appName)
-				entry.icon = GetOptionsMemberValue("icon", v, options, path, appName)
-				entry.iconCoords = GetOptionsMemberValue("iconCoords", v, options, path, appName)
-				entry.disabled = CheckOptionDisabled(v, options, path, appName)
-				if not tree.children then tree.children = new() end
-				tinsert(tree.children,entry)
-				if (v.childGroups or "tree") == "tree" then
-					BuildSubGroups(v,entry, options, path, appName)
-				end
-			end
-			path[#path] = nil
-		end
-	end
-
-	del(keySort)
-	del(opts)
-end
-
-local function BuildGroups(group, options, path, appName, recurse)
-	local tree = new()
-	local keySort = new()
-	local opts = new()
-
-	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
-
-	for i = 1, #keySort do
-		local k = keySort[i]
-		local v = opts[k]
-		if v.type == "group" then
-			path[#path+1] = k
-			local inline = pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
-			local hidden = CheckOptionHidden(v, options, path, appName)
-			if not inline and not hidden then
-				local entry = new()
-				entry.value = k
-				entry.text = GetOptionsMemberValue("name", v, options, path, appName)
-				entry.icon = GetOptionsMemberValue("icon", v, options, path, appName)
-				entry.iconCoords = GetOptionsMemberValue("iconCoords", v, options, path, appName)
-				entry.disabled = CheckOptionDisabled(v, options, path, appName)
-				tinsert(tree,entry)
-				if recurse and (v.childGroups or "tree") == "tree" then
-					BuildSubGroups(v,entry, options, path, appName)
-				end
-			end
-			path[#path] = nil
-		end
-	end
-	del(keySort)
-	del(opts)
-	return tree
-end
-
-local function InjectInfo(control, options, option, path, rootframe, appName)
-	local user = control:GetUserDataTable()
-	for i = 1, #path do
-		user[i] = path[i]
-	end
-	user.rootframe = rootframe
-	user.option = option
-	user.options = options
-	user.path = copy(path)
-	user.appName = appName
-	control:SetCallback("OnRelease", CleanUserData)
-	control:SetCallback("OnLeave", OptionOnMouseLeave)
-	control:SetCallback("OnEnter", OptionOnMouseOver)
-end
-
-
---[[
-	options - root of the options table being fed
-	container - widget that controls will be placed in
-	rootframe - Frame object the options are in
-	path - table with the keys to get to the group being fed
---]]
-
-local function FeedOptions(appName, options,container,rootframe,path,group,inline)
-	local keySort = new()
-	local opts = new()
-
-	BuildSortedOptionsTable(group, keySort, opts, options, path, appName)
-
-	for i = 1, #keySort do
-		local k = keySort[i]
-		local v = opts[k]
-		tinsert(path, k)
-		local hidden = CheckOptionHidden(v, options, path, appName)
-		local name = GetOptionsMemberValue("name", v, options, path, appName)
-		if not hidden then
-			if v.type == "group" then
-				if inline or pickfirstset(v.dialogInline,v.guiInline,v.inline, false) then
-					--Inline group
-					local GroupContainer
-					if name and name ~= "" then
-						GroupContainer = gui:Create("InlineGroup")
-						GroupContainer:SetTitle(name or "")
-					else
-						GroupContainer = gui:Create("SimpleGroup")
-					end
-
-					GroupContainer.width = "fill"
-					GroupContainer:SetLayout("flow")
-					container:AddChild(GroupContainer)
-					FeedOptions(appName,options,GroupContainer,rootframe,path,v,true)
-				end
-			else
-				--Control to feed
-				local control
-
-				local name = GetOptionsMemberValue("name", v, options, path, appName)
-
-				if v.type == "execute" then
-
-					local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
-					local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
-
-					if type(image) == "string" or type(image) == "number" then
-						control = gui:Create("Icon")
-						if not width then
-							width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
-						end
-						if not height then
-							height = GetOptionsMemberValue("imageHeight",v, options, path, appName)
-						end
-						if type(imageCoords) == "table" then
-							control:SetImage(image, unpack(imageCoords))
-						else
-							control:SetImage(image)
-						end
-						if type(width) ~= "number" then
-							width = 32
-						end
-						if type(height) ~= "number" then
-							height = 32
-						end
-						control:SetImageSize(width, height)
-						control:SetLabel(name)
-					else
-						control = gui:Create("Button")
-						control:SetText(name)
-					end
-					control:SetCallback("OnClick",ActivateControl)
-
-				elseif v.type == "input" then
-					local controlType = v.dialogControl or v.control or (v.multiline and "MultiLineEditBox") or "EditBox"
-					control = gui:Create(controlType)
-					if not control then
-						geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType)))
-						control = gui:Create(v.multiline and "MultiLineEditBox" or "EditBox")
-					end
-
-					if v.multiline and control.SetNumLines then
-						control:SetNumLines(tonumber(v.multiline) or 4)
-					end
-					control:SetLabel(name)
-					control:SetCallback("OnEnterPressed",ActivateControl)
-					local text = GetOptionsMemberValue("get",v, options, path, appName)
-					if type(text) ~= "string" then
-						text = ""
-					end
-					control:SetText(text)
-
-				elseif v.type == "toggle" then
-					control = gui:Create("CheckBox")
-					control:SetLabel(name)
-					control:SetTriState(v.tristate)
-					local value = GetOptionsMemberValue("get",v, options, path, appName)
-					control:SetValue(value)
-					control:SetCallback("OnValueChanged",ActivateControl)
-
-					if v.descStyle == "inline" then
-						local desc = GetOptionsMemberValue("desc", v, options, path, appName)
-						control:SetDescription(desc)
-					end
-
-					local image = GetOptionsMemberValue("image", v, options, path, appName)
-					local imageCoords = GetOptionsMemberValue("imageCoords", v, options, path, appName)
-
-					if type(image) == "string" or type(image) == "number" then
-						if type(imageCoords) == "table" then
-							control:SetImage(image, unpack(imageCoords))
-						else
-							control:SetImage(image)
-						end
-					end
-				elseif v.type == "range" then
-					control = gui:Create("Slider")
-					control:SetLabel(name)
-					control:SetSliderValues(v.softMin or v.min or 0, v.softMax or v.max or 100, v.bigStep or v.step or 0)
-					control:SetIsPercent(v.isPercent)
-					local value = GetOptionsMemberValue("get",v, options, path, appName)
-					if type(value) ~= "number" then
-						value = 0
-					end
-					control:SetValue(value)
-					control:SetCallback("OnValueChanged",ActivateSlider)
-					control:SetCallback("OnMouseUp",ActivateSlider)
-
-				elseif v.type == "select" then
-					local values = GetOptionsMemberValue("values", v, options, path, appName)
-					if v.style == "radio" then
-						local disabled = CheckOptionDisabled(v, options, path, appName)
-						local width = GetOptionsMemberValue("width",v,options,path,appName)
-						control = gui:Create("InlineGroup")
-						control:SetLayout("Flow")
-						control:SetTitle(name)
-						control.width = "fill"
-
-						control:PauseLayout()
-						local optionValue = GetOptionsMemberValue("get",v, options, path, appName)
-						local t = {}
-						for value, text in pairs(values) do
-							t[#t+1]=value
-						end
-						tsort(t)
-						for k, value in ipairs(t) do
-							local text = values[value]
-							local radio = gui:Create("CheckBox")
-							radio:SetLabel(text)
-							radio:SetUserData("value", value)
-							radio:SetUserData("text", text)
-							radio:SetDisabled(disabled)
-							radio:SetType("radio")
-							radio:SetValue(optionValue == value)
-							radio:SetCallback("OnValueChanged", ActivateMultiControl)
-							InjectInfo(radio, options, v, path, rootframe, appName)
-							control:AddChild(radio)
-							if width == "double" then
-								radio:SetWidth(width_multiplier * 2)
-							elseif width == "half" then
-								radio:SetWidth(width_multiplier / 2)
-							elseif (type(width) == "number") then
-								radio:SetWidth(width_multiplier * width)
-							elseif width == "full" then
-								radio.width = "fill"
-							else
-								radio:SetWidth(width_multiplier)
-							end
-						end
-						control:ResumeLayout()
-						control:DoLayout()
-					else
-						local controlType = v.dialogControl or v.control or "Dropdown"
-						control = gui:Create(controlType)
-						if not control then
-							geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType)))
-							control = gui:Create("Dropdown")
-						end
-						local itemType = v.itemControl
-						if itemType and not gui:GetWidgetVersion(itemType) then
-							geterrorhandler()(("Invalid Custom Item Type - %s"):format(tostring(itemType)))
-							itemType = nil
-						end
-						control:SetLabel(name)
-						control:SetList(values, nil, itemType)
-						local value = GetOptionsMemberValue("get",v, options, path, appName)
-						if not values[value] then
-							value = nil
-						end
-						control:SetValue(value)
-						control:SetCallback("OnValueChanged", ActivateControl)
-					end
-
-				elseif v.type == "multiselect" then
-					local values = GetOptionsMemberValue("values", v, options, path, appName)
-					local disabled = CheckOptionDisabled(v, options, path, appName)
-
-					local controlType = v.dialogControl or v.control
-
-					local valuesort = new()
-					if values then
-						for value, text in pairs(values) do
-							tinsert(valuesort, value)
-						end
-					end
-					tsort(valuesort)
-
-					if controlType then
-						control = gui:Create(controlType)
-						if not control then
-							geterrorhandler()(("Invalid Custom Control Type - %s"):format(tostring(controlType)))
-						end
-					end
-					if control then
-						control:SetMultiselect(true)
-						control:SetLabel(name)
-						control:SetList(values)
-						control:SetDisabled(disabled)
-						control:SetCallback("OnValueChanged",ActivateControl)
-						control:SetCallback("OnClosed", MultiControlOnClosed)
-						local width = GetOptionsMemberValue("width",v,options,path,appName)
-						if width == "double" then
-							control:SetWidth(width_multiplier * 2)
-						elseif width == "half" then
-							control:SetWidth(width_multiplier / 2)
-						elseif (type(width) == "number") then
-							control:SetWidth(width_multiplier * width)
-						elseif width == "full" then
-							control.width = "fill"
-						else
-							control:SetWidth(width_multiplier)
-						end
-						--check:SetTriState(v.tristate)
-						for i = 1, #valuesort do
-							local key = valuesort[i]
-							local value = GetOptionsMemberValue("get",v, options, path, appName, key)
-							control:SetItemValue(key,value)
-						end
-					else
-						control = gui:Create("InlineGroup")
-						control:SetLayout("Flow")
-						control:SetTitle(name)
-						control.width = "fill"
-
-						control:PauseLayout()
-						local width = GetOptionsMemberValue("width",v,options,path,appName)
-						for i = 1, #valuesort do
-							local value = valuesort[i]
-							local text = values[value]
-							local check = gui:Create("CheckBox")
-							check:SetLabel(text)
-							check:SetUserData("value", value)
-							check:SetUserData("text", text)
-							check:SetDisabled(disabled)
-							check:SetTriState(v.tristate)
-							check:SetValue(GetOptionsMemberValue("get",v, options, path, appName, value))
-							check:SetCallback("OnValueChanged",ActivateMultiControl)
-							InjectInfo(check, options, v, path, rootframe, appName)
-							control:AddChild(check)
-							if width == "double" then
-								check:SetWidth(width_multiplier * 2)
-							elseif width == "half" then
-								check:SetWidth(width_multiplier / 2)
-							elseif (type(width) == "number") then
-								control:SetWidth(width_multiplier * width)
-							elseif width == "full" then
-								check.width = "fill"
-							else
-								check:SetWidth(width_multiplier)
-							end
-						end
-						control:ResumeLayout()
-						control:DoLayout()
-
-
-					end
-
-					del(valuesort)
-
-				elseif v.type == "color" then
-					control = gui:Create("ColorPicker")
-					control:SetLabel(name)
-					control:SetHasAlpha(GetOptionsMemberValue("hasAlpha",v, options, path, appName))
-					control:SetColor(GetOptionsMemberValue("get",v, options, path, appName))
-					control:SetCallback("OnValueChanged",ActivateControl)
-					control:SetCallback("OnValueConfirmed",ActivateControl)
-
-				elseif v.type == "keybinding" then
-					control = gui:Create("Keybinding")
-					control:SetLabel(name)
-					control:SetKey(GetOptionsMemberValue("get",v, options, path, appName))
-					control:SetCallback("OnKeyChanged",ActivateControl)
-
-				elseif v.type == "header" then
-					control = gui:Create("Heading")
-					control:SetText(name)
-					control.width = "fill"
-
-				elseif v.type == "description" then
-					control = gui:Create("Label")
-					control:SetText(name)
-
-					local fontSize = GetOptionsMemberValue("fontSize",v, options, path, appName)
-					if fontSize == "medium" then
-						control:SetFontObject(GameFontHighlight)
-					elseif fontSize == "large" then
-						control:SetFontObject(GameFontHighlightLarge)
-					else -- small or invalid
-						control:SetFontObject(GameFontHighlightSmall)
-					end
-
-					local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
-					local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
-
-					if type(image) == "string" or type(image) == "number" then
-						if not width then
-							width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
-						end
-						if not height then
-							height = GetOptionsMemberValue("imageHeight",v, options, path, appName)
-						end
-						if type(imageCoords) == "table" then
-							control:SetImage(image, unpack(imageCoords))
-						else
-							control:SetImage(image)
-						end
-						if type(width) ~= "number" then
-							width = 32
-						end
-						if type(height) ~= "number" then
-							height = 32
-						end
-						control:SetImageSize(width, height)
-					end
-					local width = GetOptionsMemberValue("width",v,options,path,appName)
-					control.width = not width and "fill"
-				end
-
-				--Common Init
-				if control then
-					if control.width ~= "fill" then
-						local width = GetOptionsMemberValue("width",v,options,path,appName)
-						if width == "double" then
-							control:SetWidth(width_multiplier * 2)
-						elseif width == "half" then
-							control:SetWidth(width_multiplier / 2)
-						elseif (type(width) == "number") then
-							control:SetWidth(width_multiplier * width)
-						elseif width == "full" then
-							control.width = "fill"
-						else
-							control:SetWidth(width_multiplier)
-						end
-					end
-					if control.SetDisabled then
-						local disabled = CheckOptionDisabled(v, options, path, appName)
-						control:SetDisabled(disabled)
-					end
-
-					InjectInfo(control, options, v, path, rootframe, appName)
-					container:AddChild(control)
-				end
-
-			end
-		end
-		tremove(path)
-	end
-	container:ResumeLayout()
-	container:DoLayout()
-	del(keySort)
-	del(opts)
-end
-
-local function BuildPath(path, ...)
-	for i = 1, select("#",...)  do
-		tinsert(path, (select(i,...)))
-	end
-end
-
-
-local function TreeOnButtonEnter(widget, event, uniquevalue, button)
-	local user = widget:GetUserDataTable()
-	if not user then return end
-	local options = user.options
-	local option = user.option
-	local path = user.path
-	local appName = user.appName
-
-	local feedpath = new()
-	for i = 1, #path do
-		feedpath[i] = path[i]
-	end
-
-	BuildPath(feedpath, ("\001"):split(uniquevalue))
-	local group = options
-	for i = 1, #feedpath do
-		if not group then return end
-		group = GetSubOption(group, feedpath[i])
-	end
-
-	local name = GetOptionsMemberValue("name", group, options, feedpath, appName)
-	local desc = GetOptionsMemberValue("desc", group, options, feedpath, appName)
-
-	GameTooltip:SetOwner(button, "ANCHOR_NONE")
-	if widget.type == "TabGroup" then
-		GameTooltip:SetPoint("BOTTOM",button,"TOP")
-	else
-		GameTooltip:SetPoint("LEFT",button,"RIGHT")
-	end
-
-	GameTooltip:SetText(name, 1, .82, 0, true)
-
-	if type(desc) == "string" then
-		GameTooltip:AddLine(desc, 1, 1, 1, true)
-	end
-
-	GameTooltip:Show()
-end
-
-local function TreeOnButtonLeave(widget, event, value, button)
-	GameTooltip:Hide()
-end
-
-
-local function GroupExists(appName, options, path, uniquevalue)
-	if not uniquevalue then return false end
-
-	local feedpath = new()
-	local temppath = new()
-	for i = 1, #path do
-		feedpath[i] = path[i]
-	end
-
-	BuildPath(feedpath, ("\001"):split(uniquevalue))
-
-	local group = options
-	for i = 1, #feedpath do
-		local v = feedpath[i]
-		temppath[i] = v
-		group = GetSubOption(group, v)
-
-		if not group or group.type ~= "group" or CheckOptionHidden(group, options, temppath, appName) then
-			del(feedpath)
-			del(temppath)
-			return false
-		end
-	end
-	del(feedpath)
-	del(temppath)
-	return true
-end
-
-local function GroupSelected(widget, event, uniquevalue)
-
-	local user = widget:GetUserDataTable()
-
-	local options = user.options
-	local option = user.option
-	local path = user.path
-	local rootframe = user.rootframe
-
-	local feedpath = new()
-	for i = 1, #path do
-		feedpath[i] = path[i]
-	end
-
-	BuildPath(feedpath, ("\001"):split(uniquevalue))
-	local group = options
-	for i = 1, #feedpath do
-		group = GetSubOption(group, feedpath[i])
-	end
-	widget:ReleaseChildren()
-	AceConfigDialog:FeedGroup(user.appName,options,widget,rootframe,feedpath)
-
-	del(feedpath)
-end
-
-
-
---[[
--- INTERNAL --
-This function will feed one group, and any inline child groups into the given container
-Select Groups will only have the selection control (tree, tabs, dropdown) fed in
-and have a group selected, this event will trigger the feeding of child groups
-
-Rules:
-	If the group is Inline, FeedOptions
-	If the group has no child groups, FeedOptions
-
-	If the group is a tab or select group, FeedOptions then add the Group Control
-	If the group is a tree group FeedOptions then
-		its parent isnt a tree group:  then add the tree control containing this and all child tree groups
-		if its parent is a tree group, its already a node on a tree
---]]
-
-function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isRoot)
-	local group = options
-	--follow the path to get to the curent group
-	local inline
-	local grouptype, parenttype = options.childGroups, "none"
-
-
-	for i = 1, #path do
-		local v = path[i]
-		group = GetSubOption(group, v)
-		inline = inline or pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
-		parenttype = grouptype
-		grouptype = group.childGroups
-	end
-
-	if not parenttype then
-		parenttype = "tree"
-	end
-
-	--check if the group has child groups
-	local hasChildGroups
-	for k, v in pairs(group.args) do
-		if v.type == "group" and not pickfirstset(v.dialogInline,v.guiInline,v.inline, false) and not CheckOptionHidden(v, options, path, appName) then
-			hasChildGroups = true
-		end
-	end
-	if group.plugins then
-		for plugin, t in pairs(group.plugins) do
-			for k, v in pairs(t) do
-				if v.type == "group" and not pickfirstset(v.dialogInline,v.guiInline,v.inline, false) and not CheckOptionHidden(v, options, path, appName) then
-					hasChildGroups = true
-				end
-			end
-		end
-	end
-
-	container:SetLayout("flow")
-	local scroll
-
-	--Add a scrollframe if we are not going to add a group control, this is the inverse of the conditions for that later on
-	if (not (hasChildGroups and not inline)) or (grouptype ~= "tab" and grouptype ~= "select" and (parenttype == "tree" and not isRoot)) then
-		if container.type ~= "InlineGroup" and container.type ~= "SimpleGroup" then
-			scroll = gui:Create("ScrollFrame")
-			scroll:SetLayout("flow")
-			scroll.width = "fill"
-			scroll.height = "fill"
-			container:SetLayout("fill")
-			container:AddChild(scroll)
-			container = scroll
-		end
-	end
-
-	FeedOptions(appName,options,container,rootframe,path,group,nil)
-
-	if scroll then
-		container:PerformLayout()
-		local status = self:GetStatusTable(appName, path)
-		if not status.scroll then
-			status.scroll = {}
-		end
-		scroll:SetStatusTable(status.scroll)
-	end
-
-	if hasChildGroups and not inline then
-		local name = GetOptionsMemberValue("name", group, options, path, appName)
-		if grouptype == "tab" then
-
-			local tab = gui:Create("TabGroup")
-			InjectInfo(tab, options, group, path, rootframe, appName)
-			tab:SetCallback("OnGroupSelected", GroupSelected)
-			tab:SetCallback("OnTabEnter", TreeOnButtonEnter)
-			tab:SetCallback("OnTabLeave", TreeOnButtonLeave)
-
-			local status = AceConfigDialog:GetStatusTable(appName, path)
-			if not status.groups then
-				status.groups = {}
-			end
-			tab:SetStatusTable(status.groups)
-			tab.width = "fill"
-			tab.height = "fill"
-
-			local tabs = BuildGroups(group, options, path, appName)
-			tab:SetTabs(tabs)
-			tab:SetUserData("tablist", tabs)
-
-			for i = 1, #tabs do
-				local entry = tabs[i]
-				if not entry.disabled then
-					tab:SelectTab((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or entry.value)
-					break
-				end
-			end
-
-			container:AddChild(tab)
-
-		elseif grouptype == "select" then
-
-			local select = gui:Create("DropdownGroup")
-			select:SetTitle(name)
-			InjectInfo(select, options, group, path, rootframe, appName)
-			select:SetCallback("OnGroupSelected", GroupSelected)
-			local status = AceConfigDialog:GetStatusTable(appName, path)
-			if not status.groups then
-				status.groups = {}
-			end
-			select:SetStatusTable(status.groups)
-			local grouplist, orderlist = BuildSelect(group, options, path, appName)
-			select:SetGroupList(grouplist, orderlist)
-			select:SetUserData("grouplist", grouplist)
-			select:SetUserData("orderlist", orderlist)
-
-			local firstgroup = orderlist[1]
-			if firstgroup then
-				select:SetGroup((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or firstgroup)
-			end
-
-			select.width = "fill"
-			select.height = "fill"
-
-			container:AddChild(select)
-
-		--assume tree group by default
-		--if parenttype is tree then this group is already a node on that tree
-		elseif (parenttype ~= "tree") or isRoot then
-			local tree = gui:Create("TreeGroup")
-			InjectInfo(tree, options, group, path, rootframe, appName)
-			tree:EnableButtonTooltips(false)
-
-			tree.width = "fill"
-			tree.height = "fill"
-
-			tree:SetCallback("OnGroupSelected", GroupSelected)
-			tree:SetCallback("OnButtonEnter", TreeOnButtonEnter)
-			tree:SetCallback("OnButtonLeave", TreeOnButtonLeave)
-
-			local status = AceConfigDialog:GetStatusTable(appName, path)
-			if not status.groups then
-				status.groups = {}
-			end
-			local treedefinition = BuildGroups(group, options, path, appName, true)
-			tree:SetStatusTable(status.groups)
-
-			tree:SetTree(treedefinition)
-			tree:SetUserData("tree",treedefinition)
-
-			for i = 1, #treedefinition do
-				local entry = treedefinition[i]
-				if not entry.disabled then
-					tree:SelectByValue((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or entry.value)
-					break
-				end
-			end
-
-			container:AddChild(tree)
-		end
-	end
-end
-
-local old_CloseSpecialWindows
-
-
-local function RefreshOnUpdate(this)
-	for appName in pairs(this.closing) do
-		if AceConfigDialog.OpenFrames[appName] then
-			AceConfigDialog.OpenFrames[appName]:Hide()
-		end
-		if AceConfigDialog.BlizOptions and AceConfigDialog.BlizOptions[appName] then
-			for key, widget in pairs(AceConfigDialog.BlizOptions[appName]) do
-				if not widget:IsVisible() then
-					widget:ReleaseChildren()
-				end
-			end
-		end
-		this.closing[appName] = nil
-	end
-
-	if this.closeAll then
-		for k, v in pairs(AceConfigDialog.OpenFrames) do
-			if not this.closeAllOverride[k] then
-				v:Hide()
-			end
-		end
-		this.closeAll = nil
-		wipe(this.closeAllOverride)
-	end
-
-	for appName in pairs(this.apps) do
-		if AceConfigDialog.OpenFrames[appName] then
-			local user = AceConfigDialog.OpenFrames[appName]:GetUserDataTable()
-			AceConfigDialog:Open(appName, unpack(user.basepath or emptyTbl))
-		end
-		if AceConfigDialog.BlizOptions and AceConfigDialog.BlizOptions[appName] then
-			for key, widget in pairs(AceConfigDialog.BlizOptions[appName]) do
-				local user = widget:GetUserDataTable()
-				if widget:IsVisible() then
-					AceConfigDialog:Open(widget:GetUserData("appName"), widget, unpack(user.basepath or emptyTbl))
-				end
-			end
-		end
-		this.apps[appName] = nil
-	end
-	this:SetScript("OnUpdate", nil)
-end
-
--- Upgrade the OnUpdate script as well, if needed.
-if AceConfigDialog.frame:GetScript("OnUpdate") then
-	AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
-end
-
---- Close all open options windows
-function AceConfigDialog:CloseAll()
-	AceConfigDialog.frame.closeAll = true
-	AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
-	if next(self.OpenFrames) then
-		return true
-	end
-end
-
---- Close a specific options window.
--- @param appName The application name as given to `:RegisterOptionsTable()`
-function AceConfigDialog:Close(appName)
-	if self.OpenFrames[appName] then
-		AceConfigDialog.frame.closing[appName] = true
-		AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
-		return true
-	end
-end
-
--- Internal -- Called by AceConfigRegistry
-function AceConfigDialog:ConfigTableChanged(event, appName)
-	AceConfigDialog.frame.apps[appName] = true
-	AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
-end
-
-reg.RegisterCallback(AceConfigDialog, "ConfigTableChange", "ConfigTableChanged")
-
---- Sets the default size of the options window for a specific application.
--- @param appName The application name as given to `:RegisterOptionsTable()`
--- @param width The default width
--- @param height The default height
-function AceConfigDialog:SetDefaultSize(appName, width, height)
-	local status = AceConfigDialog:GetStatusTable(appName)
-	if type(width) == "number" and type(height) == "number" then
-		status.width = width
-		status.height = height
-	end
-end
-
---- Open an option window at the specified path (if any).
--- This function can optionally feed the group into a pre-created container
--- instead of creating a new container frame.
--- @paramsig appName [, container][, ...]
--- @param appName The application name as given to `:RegisterOptionsTable()`
--- @param container An optional container frame to feed the options into
--- @param ... The path to open after creating the options window (see `:SelectGroup` for details)
-function AceConfigDialog:Open(appName, container, ...)
-	if not old_CloseSpecialWindows then
-		old_CloseSpecialWindows = CloseSpecialWindows
-		CloseSpecialWindows = function()
-			local found = old_CloseSpecialWindows()
-			return self:CloseAll() or found
-		end
-	end
-	local app = reg:GetOptionsTable(appName)
-	if not app then
-		error(("%s isn't registed with AceConfigRegistry, unable to open config"):format(appName), 2)
-	end
-	local options = app("dialog", MAJOR)
-
-	local f
-
-	local path = new()
-	local name = GetOptionsMemberValue("name", options, options, path, appName)
-
-	--If an optional path is specified add it to the path table before feeding the options
-	--as container is optional as well it may contain the first element of the path
-	if type(container) == "string" then
-		tinsert(path, container)
-		container = nil
-	end
-	for n = 1, select("#",...) do
-		tinsert(path, (select(n, ...)))
-	end
-
-	local option = options
-	if type(container) == "table" and container.type == "BlizOptionsGroup" and #path > 0 then
-		for i = 1, #path do
-			option = options.args[path[i]]
-		end
-		name = format("%s - %s", name, GetOptionsMemberValue("name", option, options, path, appName))
-	end
-
-	--if a container is given feed into that
-	if container then
-		f = container
-		f:ReleaseChildren()
-		f:SetUserData("appName", appName)
-		f:SetUserData("iscustom", true)
-		if #path > 0 then
-			f:SetUserData("basepath", copy(path))
-		end
-		local status = AceConfigDialog:GetStatusTable(appName)
-		if not status.width then
-			status.width =  700
-		end
-		if not status.height then
-			status.height = 500
-		end
-		if f.SetStatusTable then
-			f:SetStatusTable(status)
-		end
-		if f.SetTitle then
-			f:SetTitle(name or "")
-		end
-	else
-		if not self.OpenFrames[appName] then
-			f = gui:Create("Frame")
-			self.OpenFrames[appName] = f
-		else
-			f = self.OpenFrames[appName]
-		end
-		f:ReleaseChildren()
-		f:SetCallback("OnClose", FrameOnClose)
-		f:SetUserData("appName", appName)
-		if #path > 0 then
-			f:SetUserData("basepath", copy(path))
-		end
-		f:SetTitle(name or "")
-		local status = AceConfigDialog:GetStatusTable(appName)
-		f:SetStatusTable(status)
-	end
-
-	self:FeedGroup(appName,options,f,f,path,true)
-	if f.Show then
-		f:Show()
-	end
-	del(path)
-
-	if AceConfigDialog.frame.closeAll then
-		-- close all is set, but thats not good, since we're just opening here, so force it
-		AceConfigDialog.frame.closeAllOverride[appName] = true
-	end
-end
-
--- convert pre-39 BlizOptions structure to the new format
-if oldminor and oldminor < 39 and AceConfigDialog.BlizOptions then
-	local old = AceConfigDialog.BlizOptions
-	local new = {}
-	for key, widget in pairs(old) do
-		local appName = widget:GetUserData("appName")
-		if not new[appName] then new[appName] = {} end
-		new[appName][key] = widget
-	end
-	AceConfigDialog.BlizOptions = new
-else
-	AceConfigDialog.BlizOptions = AceConfigDialog.BlizOptions or {}
-end
-
-local function FeedToBlizPanel(widget, event)
-	local path = widget:GetUserData("path")
-	AceConfigDialog:Open(widget:GetUserData("appName"), widget, unpack(path or emptyTbl))
-end
-
-local function ClearBlizPanel(widget, event)
-	local appName = widget:GetUserData("appName")
-	AceConfigDialog.frame.closing[appName] = true
-	AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
-end
-
---- Add an option table into the Blizzard Interface Options panel.
--- You can optionally supply a descriptive name to use and a parent frame to use,
--- as well as a path in the options table.\\
--- If no name is specified, the appName will be used instead.
---
--- If you specify a proper `parent` (by name), the interface options will generate a
--- tree layout. Note that only one level of children is supported, so the parent always
--- has to be a head-level note.
---
--- This function returns a reference to the container frame registered with the Interface
--- Options. You can use this reference to open the options with the API function
--- `InterfaceOptionsFrame_OpenToCategory`.
--- @param appName The application name as given to `:RegisterOptionsTable()`
--- @param name A descriptive name to display in the options tree (defaults to appName)
--- @param parent The parent to use in the interface options tree.
--- @param ... The path in the options table to feed into the interface options panel.
--- @return The reference to the frame registered into the Interface Options.
-function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
-	local BlizOptions = AceConfigDialog.BlizOptions
-
-	local key = appName
-	for n = 1, select("#", ...) do
-		key = key.."\001"..select(n, ...)
-	end
-
-	if not BlizOptions[appName] then
-		BlizOptions[appName] = {}
-	end
-
-	if not BlizOptions[appName][key] then
-		local group = gui:Create("BlizOptionsGroup")
-		BlizOptions[appName][key] = group
-		group:SetName(name or appName, parent)
-
-		group:SetTitle(name or appName)
-		group:SetUserData("appName", appName)
-		if select("#", ...) > 0 then
-			local path = {}
-			for n = 1, select("#",...) do
-				tinsert(path, (select(n, ...)))
-			end
-			group:SetUserData("path", path)
-		end
-		group:SetCallback("OnShow", FeedToBlizPanel)
-		group:SetCallback("OnHide", ClearBlizPanel)
-		InterfaceOptions_AddCategory(group.frame)
-		return group.frame
-	else
-		error(("%s has already been added to the Blizzard Options Window with the given path"):format(appName), 2)
-	end
-end
diff --git a/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml b/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml
deleted file mode 100644
index 8e1e606..0000000
--- a/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceConfigDialog-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua b/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
deleted file mode 100644
index f8ac3f9..0000000
--- a/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
+++ /dev/null
@@ -1,350 +0,0 @@
---- AceConfigRegistry-3.0 handles central registration of options tables in use by addons and modules.\\
--- Options tables can be registered as raw tables, OR as function refs that return a table.\\
--- Such functions receive three arguments: "uiType", "uiName", "appName". \\
--- * Valid **uiTypes**: "cmd", "dropdown", "dialog". This is verified by the library at call time. \\
--- * The **uiName** field is expected to contain the full name of the calling addon, including version, e.g. "FooBar-1.0". This is verified by the library at call time.\\
--- * The **appName** field is the options table name as given at registration time \\
---
--- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
--- @class file
--- @name AceConfigRegistry-3.0
--- @release $Id: AceConfigRegistry-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $
-local CallbackHandler = LibStub("CallbackHandler-1.0")
-
-local MAJOR, MINOR = "AceConfigRegistry-3.0", 18
-local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceConfigRegistry then return end
-
-AceConfigRegistry.tables = AceConfigRegistry.tables or {}
-
-if not AceConfigRegistry.callbacks then
-	AceConfigRegistry.callbacks = CallbackHandler:New(AceConfigRegistry)
-end
-
--- Lua APIs
-local tinsert, tconcat = table.insert, table.concat
-local strfind, strmatch = string.find, string.match
-local type, tostring, select, pairs = type, tostring, select, pairs
-local error, assert = error, assert
-
------------------------------------------------------------------------
--- Validating options table consistency:
-
-
-AceConfigRegistry.validated = {
-	-- list of options table names ran through :ValidateOptionsTable automatically.
-	-- CLEARED ON PURPOSE, since newer versions may have newer validators
-	cmd = {},
-	dropdown = {},
-	dialog = {},
-}
-
-
-
-local function err(msg, errlvl, ...)
-	local t = {}
-	for i=select("#",...),1,-1 do
-		tinsert(t, (select(i, ...)))
-	end
-	error(MAJOR..":ValidateOptionsTable(): "..tconcat(t,".")..msg, errlvl+2)
-end
-
-
-local isstring={["string"]=true, _="string"}
-local isstringfunc={["string"]=true,["function"]=true, _="string or funcref"}
-local istable={["table"]=true,   _="table"}
-local ismethodtable={["table"]=true,["string"]=true,["function"]=true,   _="methodname, funcref or table"}
-local optstring={["nil"]=true,["string"]=true, _="string"}
-local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"}
-local optstringnumberfunc={["nil"]=true,["string"]=true,["number"]=true,["function"]=true, _="string, number or funcref"}
-local optnumber={["nil"]=true,["number"]=true, _="number"}
-local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"}
-local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true},  _="methodname, funcref or false"}
-local optmethodnumber={["nil"]=true,["string"]=true,["function"]=true,["number"]=true,  _="methodname, funcref or number"}
-local optmethodtable={["nil"]=true,["string"]=true,["function"]=true,["table"]=true,  _="methodname, funcref or table"}
-local optmethodbool={["nil"]=true,["string"]=true,["function"]=true,["boolean"]=true,  _="methodname, funcref or boolean"}
-local opttable={["nil"]=true,["table"]=true,  _="table"}
-local optbool={["nil"]=true,["boolean"]=true,  _="boolean"}
-local optboolnumber={["nil"]=true,["boolean"]=true,["number"]=true,  _="boolean or number"}
-local optstringnumber={["nil"]=true,["string"]=true,["number"]=true, _="string or number"}
-
-local basekeys={
-	type=isstring,
-	name=isstringfunc,
-	desc=optstringfunc,
-	descStyle=optstring,
-	order=optmethodnumber,
-	validate=optmethodfalse,
-	confirm=optmethodbool,
-	confirmText=optstring,
-	disabled=optmethodbool,
-	hidden=optmethodbool,
-		guiHidden=optmethodbool,
-		dialogHidden=optmethodbool,
-		dropdownHidden=optmethodbool,
-	cmdHidden=optmethodbool,
-	icon=optstringnumberfunc,
-	iconCoords=optmethodtable,
-	handler=opttable,
-	get=optmethodfalse,
-	set=optmethodfalse,
-	func=optmethodfalse,
-	arg={["*"]=true},
-	width=optstringnumber,
-}
-
-local typedkeys={
-	header={},
-	description={
-		image=optstringnumberfunc,
-		imageCoords=optmethodtable,
-		imageHeight=optnumber,
-		imageWidth=optnumber,
-		fontSize=optstringfunc,
-	},
-	group={
-		args=istable,
-		plugins=opttable,
-		inline=optbool,
-			cmdInline=optbool,
-			guiInline=optbool,
-			dropdownInline=optbool,
-			dialogInline=optbool,
-		childGroups=optstring,
-	},
-	execute={
-		image=optstringnumberfunc,
-		imageCoords=optmethodtable,
-		imageHeight=optnumber,
-		imageWidth=optnumber,
-	},
-	input={
-		pattern=optstring,
-		usage=optstring,
-		control=optstring,
-		dialogControl=optstring,
-		dropdownControl=optstring,
-		multiline=optboolnumber,
-	},
-	toggle={
-		tristate=optbool,
-		image=optstringnumberfunc,
-		imageCoords=optmethodtable,
-	},
-	tristate={
-	},
-	range={
-		min=optnumber,
-		softMin=optnumber,
-		max=optnumber,
-		softMax=optnumber,
-		step=optnumber,
-		bigStep=optnumber,
-		isPercent=optbool,
-	},
-	select={
-		values=ismethodtable,
-		style={
-			["nil"]=true,
-			["string"]={dropdown=true,radio=true},
-			_="string: 'dropdown' or 'radio'"
-		},
-		control=optstring,
-		dialogControl=optstring,
-		dropdownControl=optstring,
-		itemControl=optstring,
-	},
-	multiselect={
-		values=ismethodtable,
-		style=optstring,
-		tristate=optbool,
-		control=optstring,
-		dialogControl=optstring,
-		dropdownControl=optstring,
-	},
-	color={
-		hasAlpha=optmethodbool,
-	},
-	keybinding={
-		-- TODO
-	},
-}
-
-local function validateKey(k,errlvl,...)
-	errlvl=(errlvl or 0)+1
-	if type(k)~="string" then
-		err("["..tostring(k).."] - key is not a string", errlvl,...)
-	end
-	if strfind(k, "[%c\127]") then
-		err("["..tostring(k).."] - key name contained control characters", errlvl,...)
-	end
-end
-
-local function validateVal(v, oktypes, errlvl,...)
-	errlvl=(errlvl or 0)+1
-	local isok=oktypes[type(v)] or oktypes["*"]
-
-	if not isok then
-		err(": expected a "..oktypes._..", got '"..tostring(v).."'", errlvl,...)
-	end
-	if type(isok)=="table" then		-- isok was a table containing specific values to be tested for!
-		if not isok[v] then
-			err(": did not expect "..type(v).." value '"..tostring(v).."'", errlvl,...)
-		end
-	end
-end
-
-local function validate(options,errlvl,...)
-	errlvl=(errlvl or 0)+1
-	-- basic consistency
-	if type(options)~="table" then
-		err(": expected a table, got a "..type(options), errlvl,...)
-	end
-	if type(options.type)~="string" then
-		err(".type: expected a string, got a "..type(options.type), errlvl,...)
-	end
-
-	-- get type and 'typedkeys' member
-	local tk = typedkeys[options.type]
-	if not tk then
-		err(".type: unknown type '"..options.type.."'", errlvl,...)
-	end
-
-	-- make sure that all options[] are known parameters
-	for k,v in pairs(options) do
-		if not (tk[k] or basekeys[k]) then
-			err(": unknown parameter", errlvl,tostring(k),...)
-		end
-	end
-
-	-- verify that required params are there, and that everything is the right type
-	for k,oktypes in pairs(basekeys) do
-		validateVal(options[k], oktypes, errlvl,k,...)
-	end
-	for k,oktypes in pairs(tk) do
-		validateVal(options[k], oktypes, errlvl,k,...)
-	end
-
-	-- extra logic for groups
-	if options.type=="group" then
-		for k,v in pairs(options.args) do
-			validateKey(k,errlvl,"args",...)
-			validate(v, errlvl,k,"args",...)
-		end
-		if options.plugins then
-			for plugname,plugin in pairs(options.plugins) do
-				if type(plugin)~="table" then
-					err(": expected a table, got '"..tostring(plugin).."'", errlvl,tostring(plugname),"plugins",...)
-				end
-				for k,v in pairs(plugin) do
-					validateKey(k,errlvl,tostring(plugname),"plugins",...)
-					validate(v, errlvl,k,tostring(plugname),"plugins",...)
-				end
-			end
-		end
-	end
-end
-
-
---- Validates basic structure and integrity of an options table \\
--- Does NOT verify that get/set etc actually exist, since they can be defined at any depth
--- @param options The table to be validated
--- @param name The name of the table to be validated (shown in any error message)
--- @param errlvl (optional number) error level offset, default 0 (=errors point to the function calling :ValidateOptionsTable)
-function AceConfigRegistry:ValidateOptionsTable(options,name,errlvl)
-	errlvl=(errlvl or 0)+1
-	name = name or "Optionstable"
-	if not options.name then
-		options.name=name	-- bit of a hack, the root level doesn't really need a .name :-/
-	end
-	validate(options,errlvl,name)
-end
-
---- Fires a "ConfigTableChange" callback for those listening in on it, allowing config GUIs to refresh.
--- You should call this function if your options table changed from any outside event, like a game event
--- or a timer.
--- @param appName The application name as given to `:RegisterOptionsTable()`
-function AceConfigRegistry:NotifyChange(appName)
-	if not AceConfigRegistry.tables[appName] then return end
-	AceConfigRegistry.callbacks:Fire("ConfigTableChange", appName)
-end
-
--- -------------------------------------------------------------------
--- Registering and retreiving options tables:
-
-
--- validateGetterArgs: helper function for :GetOptionsTable (or, rather, the getter functions returned by it)
-
-local function validateGetterArgs(uiType, uiName, errlvl)
-	errlvl=(errlvl or 0)+2
-	if uiType~="cmd" and uiType~="dropdown" and uiType~="dialog" then
-		error(MAJOR..": Requesting options table: 'uiType' - invalid configuration UI type, expected 'cmd', 'dropdown' or 'dialog'", errlvl)
-	end
-	if not strmatch(uiName, "[A-Za-z]%-[0-9]") then	-- Expecting e.g. "MyLib-1.2"
-		error(MAJOR..": Requesting options table: 'uiName' - badly formatted or missing version number. Expected e.g. 'MyLib-1.2'", errlvl)
-	end
-end
-
---- Register an options table with the config registry.
--- @param appName The application name as given to `:RegisterOptionsTable()`
--- @param options The options table, OR a function reference that generates it on demand. \\
--- See the top of the page for info on arguments passed to such functions.
--- @param skipValidation Skip options table validation (primarily useful for extremely huge options, with a noticeable slowdown)
-function AceConfigRegistry:RegisterOptionsTable(appName, options, skipValidation)
-	if type(options)=="table" then
-		if options.type~="group" then	-- quick sanity checker
-			error(MAJOR..": RegisterOptionsTable(appName, options): 'options' - missing type='group' member in root group", 2)
-		end
-		AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
-			errlvl=(errlvl or 0)+1
-			validateGetterArgs(uiType, uiName, errlvl)
-			if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
-				AceConfigRegistry:ValidateOptionsTable(options, appName, errlvl)	-- upgradable
-				AceConfigRegistry.validated[uiType][appName] = true
-			end
-			return options
-		end
-	elseif type(options)=="function" then
-		AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
-			errlvl=(errlvl or 0)+1
-			validateGetterArgs(uiType, uiName, errlvl)
-			local tab = assert(options(uiType, uiName, appName))
-			if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
-				AceConfigRegistry:ValidateOptionsTable(tab, appName, errlvl)	-- upgradable
-				AceConfigRegistry.validated[uiType][appName] = true
-			end
-			return tab
-		end
-	else
-		error(MAJOR..": RegisterOptionsTable(appName, options): 'options' - expected table or function reference", 2)
-	end
-end
-
---- Returns an iterator of ["appName"]=funcref pairs
-function AceConfigRegistry:IterateOptionsTables()
-	return pairs(AceConfigRegistry.tables)
-end
-
-
-
-
---- Query the registry for a specific options table.
--- If only appName is given, a function is returned which you
--- can call with (uiType,uiName) to get the table.\\
--- If uiType&uiName are given, the table is returned.
--- @param appName The application name as given to `:RegisterOptionsTable()`
--- @param uiType The type of UI to get the table for, one of "cmd", "dropdown", "dialog"
--- @param uiName The name of the library/addon querying for the table, e.g. "MyLib-1.0"
-function AceConfigRegistry:GetOptionsTable(appName, uiType, uiName)
-	local f = AceConfigRegistry.tables[appName]
-	if not f then
-		return nil
-	end
-
-	if uiType then
-		return f(uiType,uiName,1)	-- get the table for us
-	else
-		return f	-- return the function
-	end
-end
diff --git a/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml b/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml
deleted file mode 100644
index 4ea69ca..0000000
--- a/Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceConfigRegistry-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceConsole-3.0/AceConsole-3.0.lua b/Libs/AceConsole-3.0/AceConsole-3.0.lua
deleted file mode 100644
index 0567a65..0000000
--- a/Libs/AceConsole-3.0/AceConsole-3.0.lua
+++ /dev/null
@@ -1,250 +0,0 @@
---- **AceConsole-3.0** provides registration facilities for slash commands.
--- You can register slash commands to your custom functions and use the `GetArgs` function to parse them
--- to your addons individual needs.
---
--- **AceConsole-3.0** can be embeded into your addon, either explicitly by calling AceConsole:Embed(MyAddon) or by
--- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
--- and can be accessed directly, without having to explicitly call AceConsole itself.\\
--- It is recommended to embed AceConsole, otherwise you'll have to specify a custom `self` on all calls you
--- make into AceConsole.
--- @class file
--- @name AceConsole-3.0
--- @release $Id: AceConsole-3.0.lua 1143 2016-07-11 08:52:03Z nevcairiel $
-local MAJOR,MINOR = "AceConsole-3.0", 7
-
-local AceConsole, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceConsole then return end -- No upgrade needed
-
-AceConsole.embeds = AceConsole.embeds or {} -- table containing objects AceConsole is embedded in.
-AceConsole.commands = AceConsole.commands or {} -- table containing commands registered
-AceConsole.weakcommands = AceConsole.weakcommands or {} -- table containing self, command => func references for weak commands that don't persist through enable/disable
-
--- Lua APIs
-local tconcat, tostring, select = table.concat, tostring, select
-local type, pairs, error = type, pairs, error
-local format, strfind, strsub = string.format, string.find, string.sub
-local max = math.max
-
--- WoW APIs
-local _G = _G
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: DEFAULT_CHAT_FRAME, SlashCmdList, hash_SlashCmdList
-
-local tmp={}
-local function Print(self,frame,...)
-	local n=0
-	if self ~= AceConsole then
-		n=n+1
-		tmp[n] = "|cff33ff99"..tostring( self ).."|r:"
-	end
-	for i=1, select("#", ...) do
-		n=n+1
-		tmp[n] = tostring(select(i, ...))
-	end
-	frame:AddMessage( tconcat(tmp," ",1,n) )
-end
-
---- Print to DEFAULT_CHAT_FRAME or given ChatFrame (anything with an .AddMessage function)
--- @paramsig [chatframe ,] ...
--- @param chatframe Custom ChatFrame to print to (or any frame with an .AddMessage function)
--- @param ... List of any values to be printed
-function AceConsole:Print(...)
-	local frame = ...
-	if type(frame) == "table" and frame.AddMessage then	-- Is first argument something with an .AddMessage member?
-		return Print(self, frame, select(2,...))
-	else
-		return Print(self, DEFAULT_CHAT_FRAME, ...)
-	end
-end
-
-
---- Formatted (using format()) print to DEFAULT_CHAT_FRAME or given ChatFrame (anything with an .AddMessage function)
--- @paramsig [chatframe ,] "format"[, ...]
--- @param chatframe Custom ChatFrame to print to (or any frame with an .AddMessage function)
--- @param format Format string - same syntax as standard Lua format()
--- @param ... Arguments to the format string
-function AceConsole:Printf(...)
-	local frame = ...
-	if type(frame) == "table" and frame.AddMessage then	-- Is first argument something with an .AddMessage member?
-		return Print(self, frame, format(select(2,...)))
-	else
-		return Print(self, DEFAULT_CHAT_FRAME, format(...))
-	end
-end
-
-
-
-
---- Register a simple chat command
--- @param command Chat command to be registered WITHOUT leading "/"
--- @param func Function to call when the slash command is being used (funcref or methodname)
--- @param persist if false, the command will be soft disabled/enabled when aceconsole is used as a mixin (default: true)
-function AceConsole:RegisterChatCommand( command, func, persist )
-	if type(command)~="string" then error([[Usage: AceConsole:RegisterChatCommand( "command", func[, persist ]): 'command' - expected a string]], 2) end
-
-	if persist==nil then persist=true end	-- I'd rather have my addon's "/addon enable" around if the author screws up. Having some extra slash regged when it shouldnt be isn't as destructive. True is a better default. /Mikk
-
-	local name = "ACECONSOLE_"..command:upper()
-
-	if type( func ) == "string" then
-		SlashCmdList[name] = function(input, editBox)
-			self[func](self, input, editBox)
-		end
-	else
-		SlashCmdList[name] = func
-	end
-	_G["SLASH_"..name.."1"] = "/"..command:lower()
-	AceConsole.commands[command] = name
-	-- non-persisting commands are registered for enabling disabling
-	if not persist then
-		if not AceConsole.weakcommands[self] then AceConsole.weakcommands[self] = {} end
-		AceConsole.weakcommands[self][command] = func
-	end
-	return true
-end
-
---- Unregister a chatcommand
--- @param command Chat command to be unregistered WITHOUT leading "/"
-function AceConsole:UnregisterChatCommand( command )
-	local name = AceConsole.commands[command]
-	if name then
-		SlashCmdList[name] = nil
-		_G["SLASH_" .. name .. "1"] = nil
-		hash_SlashCmdList["/" .. command:upper()] = nil
-		AceConsole.commands[command] = nil
-	end
-end
-
---- Get an iterator over all Chat Commands registered with AceConsole
--- @return Iterator (pairs) over all commands
-function AceConsole:IterateChatCommands() return pairs(AceConsole.commands) end
-
-
-local function nils(n, ...)
-	if n>1 then
-		return nil, nils(n-1, ...)
-	elseif n==1 then
-		return nil, ...
-	else
-		return ...
-	end
-end
-
-
---- Retreive one or more space-separated arguments from a string.
--- Treats quoted strings and itemlinks as non-spaced.
--- @param str The raw argument string
--- @param numargs How many arguments to get (default 1)
--- @param startpos Where in the string to start scanning (default  1)
--- @return Returns arg1, arg2, ..., nextposition\\
--- Missing arguments will be returned as nils. 'nextposition' is returned as 1e9 at the end of the string.
-function AceConsole:GetArgs(str, numargs, startpos)
-	numargs = numargs or 1
-	startpos = max(startpos or 1, 1)
-
-	local pos=startpos
-
-	-- find start of new arg
-	pos = strfind(str, "[^ ]", pos)
-	if not pos then	-- whoops, end of string
-		return nils(numargs, 1e9)
-	end
-
-	if numargs<1 then
-		return pos
-	end
-
-	-- quoted or space separated? find out which pattern to use
-	local delim_or_pipe
-	local ch = strsub(str, pos, pos)
-	if ch=='"' then
-		pos = pos + 1
-		delim_or_pipe='([|"])'
-	elseif ch=="'" then
-		pos = pos + 1
-		delim_or_pipe="([|'])"
-	else
-		delim_or_pipe="([| ])"
-	end
-
-	startpos = pos
-
-	while true do
-		-- find delimiter or hyperlink
-		local ch,_
-		pos,_,ch = strfind(str, delim_or_pipe, pos)
-
-		if not pos then break end
-
-		if ch=="|" then
-			-- some kind of escape
-
-			if strsub(str,pos,pos+1)=="|H" then
-				-- It's a |H....|hhyper link!|h
-				pos=strfind(str, "|h", pos+2)	-- first |h
-				if not pos then break end
-
-				pos=strfind(str, "|h", pos+2)	-- second |h
-				if not pos then break end
-			elseif strsub(str,pos, pos+1) == "|T" then
-				-- It's a |T....|t  texture
-				pos=strfind(str, "|t", pos+2)
-				if not pos then break end
-			end
-
-			pos=pos+2 -- skip past this escape (last |h if it was a hyperlink)
-
-		else
-			-- found delimiter, done with this arg
-			return strsub(str, startpos, pos-1), AceConsole:GetArgs(str, numargs-1, pos+1)
-		end
-
-	end
-
-	-- search aborted, we hit end of string. return it all as one argument. (yes, even if it's an unterminated quote or hyperlink)
-	return strsub(str, startpos), nils(numargs-1, 1e9)
-end
-
-
---- embedding and embed handling
-
-local mixins = {
-	"Print",
-	"Printf",
-	"RegisterChatCommand",
-	"UnregisterChatCommand",
-	"GetArgs",
-}
-
--- Embeds AceConsole into the target object making the functions from the mixins list available on target:..
--- @param target target object to embed AceBucket in
-function AceConsole:Embed( target )
-	for k, v in pairs( mixins ) do
-		target[v] = self[v]
-	end
-	self.embeds[target] = true
-	return target
-end
-
-function AceConsole:OnEmbedEnable( target )
-	if AceConsole.weakcommands[target] then
-		for command, func in pairs( AceConsole.weakcommands[target] ) do
-			target:RegisterChatCommand( command, func, false, true ) -- nonpersisting and silent registry
-		end
-	end
-end
-
-function AceConsole:OnEmbedDisable( target )
-	if AceConsole.weakcommands[target] then
-		for command, func in pairs( AceConsole.weakcommands[target] ) do
-			target:UnregisterChatCommand( command ) -- TODO: this could potentially unregister a command from another application in case of command conflicts. Do we care?
-		end
-	end
-end
-
-for addon in pairs(AceConsole.embeds) do
-	AceConsole:Embed(addon)
-end
diff --git a/Libs/AceConsole-3.0/AceConsole-3.0.xml b/Libs/AceConsole-3.0/AceConsole-3.0.xml
deleted file mode 100644
index 4f4699a..0000000
--- a/Libs/AceConsole-3.0/AceConsole-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceConsole-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceDB-3.0/AceDB-3.0.lua b/Libs/AceDB-3.0/AceDB-3.0.lua
deleted file mode 100644
index b42b442..0000000
--- a/Libs/AceDB-3.0/AceDB-3.0.lua
+++ /dev/null
@@ -1,746 +0,0 @@
---- **AceDB-3.0** manages the SavedVariables of your addon.
--- It offers profile management, smart defaults and namespaces for modules.\\
--- Data can be saved in different data-types, depending on its intended usage.
--- The most common data-type is the `profile` type, which allows the user to choose
--- the active profile, and manage the profiles of all of his characters.\\
--- The following data types are available:
--- * **char** Character-specific data. Every character has its own database.
--- * **realm** Realm-specific data. All of the players characters on the same realm share this database.
--- * **class** Class-specific data. All of the players characters of the same class share this database.
--- * **race** Race-specific data. All of the players characters of the same race share this database.
--- * **faction** Faction-specific data. All of the players characters of the same faction share this database.
--- * **factionrealm** Faction and realm specific data. All of the players characters on the same realm and of the same faction share this database.
--- * **locale** Locale specific data, based on the locale of the players game client.
--- * **global** Global Data. All characters on the same account share this database.
--- * **profile** Profile-specific data. All characters using the same profile share this database. The user can control which profile should be used.
---
--- Creating a new Database using the `:New` function will return a new DBObject. A database will inherit all functions
--- of the DBObjectLib listed here. \\
--- If you create a new namespaced child-database (`:RegisterNamespace`), you'll get a DBObject as well, but note
--- that the child-databases cannot individually change their profile, and are linked to their parents profile - and because of that,
--- the profile related APIs are not available. Only `:RegisterDefaults` and `:ResetProfile` are available on child-databases.
---
--- For more details on how to use AceDB-3.0, see the [[AceDB-3.0 Tutorial]].
---
--- You may also be interested in [[libdualspec-1-0|LibDualSpec-1.0]] to do profile switching automatically when switching specs.
---
--- @usage
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("DBExample")
---
--- -- declare defaults to be used in the DB
--- local defaults = {
---   profile = {
---     setting = true,
---   }
--- }
---
--- function MyAddon:OnInitialize()
---   -- Assuming the .toc says ## SavedVariables: MyAddonDB
---   self.db = LibStub("AceDB-3.0"):New("MyAddonDB", defaults, true)
--- end
--- @class file
--- @name AceDB-3.0.lua
--- @release $Id: AceDB-3.0.lua 1142 2016-07-11 08:36:19Z nevcairiel $
-local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 26
-local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
-
-if not AceDB then return end -- No upgrade needed
-
--- Lua APIs
-local type, pairs, next, error = type, pairs, next, error
-local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget
-
--- WoW APIs
-local _G = _G
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: LibStub
-
-AceDB.db_registry = AceDB.db_registry or {}
-AceDB.frame = AceDB.frame or CreateFrame("Frame")
-
-local CallbackHandler
-local CallbackDummy = { Fire = function() end }
-
-local DBObjectLib = {}
-
---[[-------------------------------------------------------------------------
-	AceDB Utility Functions
----------------------------------------------------------------------------]]
-
--- Simple shallow copy for copying defaults
-local function copyTable(src, dest)
-	if type(dest) ~= "table" then dest = {} end
-	if type(src) == "table" then
-		for k,v in pairs(src) do
-			if type(v) == "table" then
-				-- try to index the key first so that the metatable creates the defaults, if set, and use that table
-				v = copyTable(v, dest[k])
-			end
-			dest[k] = v
-		end
-	end
-	return dest
-end
-
--- Called to add defaults to a section of the database
---
--- When a ["*"] default section is indexed with a new key, a table is returned
--- and set in the host table.  These tables must be cleaned up by removeDefaults
--- in order to ensure we don't write empty default tables.
-local function copyDefaults(dest, src)
-	-- this happens if some value in the SV overwrites our default value with a non-table
-	--if type(dest) ~= "table" then return end
-	for k, v in pairs(src) do
-		if k == "*" or k == "**" then
-			if type(v) == "table" then
-				-- This is a metatable used for table defaults
-				local mt = {
-					-- This handles the lookup and creation of new subtables
-					__index = function(t,k)
-							if k == nil then return nil end
-							local tbl = {}
-							copyDefaults(tbl, v)
-							rawset(t, k, tbl)
-							return tbl
-						end,
-				}
-				setmetatable(dest, mt)
-				-- handle already existing tables in the SV
-				for dk, dv in pairs(dest) do
-					if not rawget(src, dk) and type(dv) == "table" then
-						copyDefaults(dv, v)
-					end
-				end
-			else
-				-- Values are not tables, so this is just a simple return
-				local mt = {__index = function(t,k) return k~=nil and v or nil end}
-				setmetatable(dest, mt)
-			end
-		elseif type(v) == "table" then
-			if not rawget(dest, k) then rawset(dest, k, {}) end
-			if type(dest[k]) == "table" then
-				copyDefaults(dest[k], v)
-				if src['**'] then
-					copyDefaults(dest[k], src['**'])
-				end
-			end
-		else
-			if rawget(dest, k) == nil then
-				rawset(dest, k, v)
-			end
-		end
-	end
-end
-
--- Called to remove all defaults in the default table from the database
-local function removeDefaults(db, defaults, blocker)
-	-- remove all metatables from the db, so we don't accidentally create new sub-tables through them
-	setmetatable(db, nil)
-	-- loop through the defaults and remove their content
-	for k,v in pairs(defaults) do
-		if k == "*" or k == "**" then
-			if type(v) == "table" then
-				-- Loop through all the actual k,v pairs and remove
-				for key, value in pairs(db) do
-					if type(value) == "table" then
-						-- if the key was not explicitly specified in the defaults table, just strip everything from * and ** tables
-						if defaults[key] == nil and (not blocker or blocker[key] == nil) then
-							removeDefaults(value, v)
-							-- if the table is empty afterwards, remove it
-							if next(value) == nil then
-								db[key] = nil
-							end
-						-- if it was specified, only strip ** content, but block values which were set in the key table
-						elseif k == "**" then
-							removeDefaults(value, v, defaults[key])
-						end
-					end
-				end
-			elseif k == "*" then
-				-- check for non-table default
-				for key, value in pairs(db) do
-					if defaults[key] == nil and v == value then
-						db[key] = nil
-					end
-				end
-			end
-		elseif type(v) == "table" and type(db[k]) == "table" then
-			-- if a blocker was set, dive into it, to allow multi-level defaults
-			removeDefaults(db[k], v, blocker and blocker[k])
-			if next(db[k]) == nil then
-				db[k] = nil
-			end
-		else
-			-- check if the current value matches the default, and that its not blocked by another defaults table
-			if db[k] == defaults[k] and (not blocker or blocker[k] == nil) then
-				db[k] = nil
-			end
-		end
-	end
-end
-
--- This is called when a table section is first accessed, to set up the defaults
-local function initSection(db, section, svstore, key, defaults)
-	local sv = rawget(db, "sv")
-
-	local tableCreated
-	if not sv[svstore] then sv[svstore] = {} end
-	if not sv[svstore][key] then
-		sv[svstore][key] = {}
-		tableCreated = true
-	end
-
-	local tbl = sv[svstore][key]
-
-	if defaults then
-		copyDefaults(tbl, defaults)
-	end
-	rawset(db, section, tbl)
-
-	return tableCreated, tbl
-end
-
--- Metatable to handle the dynamic creation of sections and copying of sections.
-local dbmt = {
-	__index = function(t, section)
-			local keys = rawget(t, "keys")
-			local key = keys[section]
-			if key then
-				local defaultTbl = rawget(t, "defaults")
-				local defaults = defaultTbl and defaultTbl[section]
-
-				if section == "profile" then
-					local new = initSection(t, section, "profiles", key, defaults)
-					if new then
-						-- Callback: OnNewProfile, database, newProfileKey
-						t.callbacks:Fire("OnNewProfile", t, key)
-					end
-				elseif section == "profiles" then
-					local sv = rawget(t, "sv")
-					if not sv.profiles then sv.profiles = {} end
-					rawset(t, "profiles", sv.profiles)
-				elseif section == "global" then
-					local sv = rawget(t, "sv")
-					if not sv.global then sv.global = {} end
-					if defaults then
-						copyDefaults(sv.global, defaults)
-					end
-					rawset(t, section, sv.global)
-				else
-					initSection(t, section, section, key, defaults)
-				end
-			end
-
-			return rawget(t, section)
-		end
-}
-
-local function validateDefaults(defaults, keyTbl, offset)
-	if not defaults then return end
-	offset = offset or 0
-	for k in pairs(defaults) do
-		if not keyTbl[k] or k == "profiles" then
-			error(("Usage: AceDBObject:RegisterDefaults(defaults): '%s' is not a valid datatype."):format(k), 3 + offset)
-		end
-	end
-end
-
-local preserve_keys = {
-	["callbacks"] = true,
-	["RegisterCallback"] = true,
-	["UnregisterCallback"] = true,
-	["UnregisterAllCallbacks"] = true,
-	["children"] = true,
-}
-
-local realmKey = GetRealmName()
-local charKey = UnitName("player") .. " - " .. realmKey
-local _, classKey = UnitClass("player")
-local _, raceKey = UnitRace("player")
-local factionKey = UnitFactionGroup("player")
-local factionrealmKey = factionKey .. " - " .. realmKey
-local localeKey = GetLocale():lower()
-
-local regionTable = { "US", "KR", "EU", "TW", "CN" }
-local regionKey = regionTable[GetCurrentRegion()]
-local factionrealmregionKey = factionrealmKey .. " - " .. regionKey
-
--- Actual database initialization function
-local function initdb(sv, defaults, defaultProfile, olddb, parent)
-	-- Generate the database keys for each section
-
-	-- map "true" to our "Default" profile
-	if defaultProfile == true then defaultProfile = "Default" end
-
-	local profileKey
-	if not parent then
-		-- Make a container for profile keys
-		if not sv.profileKeys then sv.profileKeys = {} end
-
-		-- Try to get the profile selected from the char db
-		profileKey = sv.profileKeys[charKey] or defaultProfile or charKey
-
-		-- save the selected profile for later
-		sv.profileKeys[charKey] = profileKey
-	else
-		-- Use the profile of the parents DB
-		profileKey = parent.keys.profile or defaultProfile or charKey
-
-		-- clear the profileKeys in the DB, namespaces don't need to store them
-		sv.profileKeys = nil
-	end
-
-	-- This table contains keys that enable the dynamic creation
-	-- of each section of the table.  The 'global' and 'profiles'
-	-- have a key of true, since they are handled in a special case
-	local keyTbl= {
-		["char"] = charKey,
-		["realm"] = realmKey,
-		["class"] = classKey,
-		["race"] = raceKey,
-		["faction"] = factionKey,
-		["factionrealm"] = factionrealmKey,
-		["factionrealmregion"] = factionrealmregionKey,
-		["profile"] = profileKey,
-		["locale"] = localeKey,
-		["global"] = true,
-		["profiles"] = true,
-	}
-
-	validateDefaults(defaults, keyTbl, 1)
-
-	-- This allows us to use this function to reset an entire database
-	-- Clear out the old database
-	if olddb then
-		for k,v in pairs(olddb) do if not preserve_keys[k] then olddb[k] = nil end end
-	end
-
-	-- Give this database the metatable so it initializes dynamically
-	local db = setmetatable(olddb or {}, dbmt)
-
-	if not rawget(db, "callbacks") then
-		-- try to load CallbackHandler-1.0 if it loaded after our library
-		if not CallbackHandler then CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0", true) end
-		db.callbacks = CallbackHandler and CallbackHandler:New(db) or CallbackDummy
-	end
-
-	-- Copy methods locally into the database object, to avoid hitting
-	-- the metatable when calling methods
-
-	if not parent then
-		for name, func in pairs(DBObjectLib) do
-			db[name] = func
-		end
-	else
-		-- hack this one in
-		db.RegisterDefaults = DBObjectLib.RegisterDefaults
-		db.ResetProfile = DBObjectLib.ResetProfile
-	end
-
-	-- Set some properties in the database object
-	db.profiles = sv.profiles
-	db.keys = keyTbl
-	db.sv = sv
-	--db.sv_name = name
-	db.defaults = defaults
-	db.parent = parent
-
-	-- store the DB in the registry
-	AceDB.db_registry[db] = true
-
-	return db
-end
-
--- handle PLAYER_LOGOUT
--- strip all defaults from all databases
--- and cleans up empty sections
-local function logoutHandler(frame, event)
-	if event == "PLAYER_LOGOUT" then
-		for db in pairs(AceDB.db_registry) do
-			db.callbacks:Fire("OnDatabaseShutdown", db)
-			db:RegisterDefaults(nil)
-
-			-- cleanup sections that are empty without defaults
-			local sv = rawget(db, "sv")
-			for section in pairs(db.keys) do
-				if rawget(sv, section) then
-					-- global is special, all other sections have sub-entrys
-					-- also don't delete empty profiles on main dbs, only on namespaces
-					if section ~= "global" and (section ~= "profiles" or rawget(db, "parent")) then
-						for key in pairs(sv[section]) do
-							if not next(sv[section][key]) then
-								sv[section][key] = nil
-							end
-						end
-					end
-					if not next(sv[section]) then
-						sv[section] = nil
-					end
-				end
-			end
-		end
-	end
-end
-
-AceDB.frame:RegisterEvent("PLAYER_LOGOUT")
-AceDB.frame:SetScript("OnEvent", logoutHandler)
-
-
---[[-------------------------------------------------------------------------
-	AceDB Object Method Definitions
----------------------------------------------------------------------------]]
-
---- Sets the defaults table for the given database object by clearing any
--- that are currently set, and then setting the new defaults.
--- @param defaults A table of defaults for this database
-function DBObjectLib:RegisterDefaults(defaults)
-	if defaults and type(defaults) ~= "table" then
-		error("Usage: AceDBObject:RegisterDefaults(defaults): 'defaults' - table or nil expected.", 2)
-	end
-
-	validateDefaults(defaults, self.keys)
-
-	-- Remove any currently set defaults
-	if self.defaults then
-		for section,key in pairs(self.keys) do
-			if self.defaults[section] and rawget(self, section) then
-				removeDefaults(self[section], self.defaults[section])
-			end
-		end
-	end
-
-	-- Set the DBObject.defaults table
-	self.defaults = defaults
-
-	-- Copy in any defaults, only touching those sections already created
-	if defaults then
-		for section,key in pairs(self.keys) do
-			if defaults[section] and rawget(self, section) then
-				copyDefaults(self[section], defaults[section])
-			end
-		end
-	end
-end
-
---- Changes the profile of the database and all of it's namespaces to the
--- supplied named profile
--- @param name The name of the profile to set as the current profile
-function DBObjectLib:SetProfile(name)
-	if type(name) ~= "string" then
-		error("Usage: AceDBObject:SetProfile(name): 'name' - string expected.", 2)
-	end
-
-	-- changing to the same profile, dont do anything
-	if name == self.keys.profile then return end
-
-	local oldProfile = self.profile
-	local defaults = self.defaults and self.defaults.profile
-
-	-- Callback: OnProfileShutdown, database
-	self.callbacks:Fire("OnProfileShutdown", self)
-
-	if oldProfile and defaults then
-		-- Remove the defaults from the old profile
-		removeDefaults(oldProfile, defaults)
-	end
-
-	self.profile = nil
-	self.keys["profile"] = name
-
-	-- if the storage exists, save the new profile
-	-- this won't exist on namespaces.
-	if self.sv.profileKeys then
-		self.sv.profileKeys[charKey] = name
-	end
-
-	-- populate to child namespaces
-	if self.children then
-		for _, db in pairs(self.children) do
-			DBObjectLib.SetProfile(db, name)
-		end
-	end
-
-	-- Callback: OnProfileChanged, database, newProfileKey
-	self.callbacks:Fire("OnProfileChanged", self, name)
-end
-
---- Returns a table with the names of the existing profiles in the database.
--- You can optionally supply a table to re-use for this purpose.
--- @param tbl A table to store the profile names in (optional)
-function DBObjectLib:GetProfiles(tbl)
-	if tbl and type(tbl) ~= "table" then
-		error("Usage: AceDBObject:GetProfiles(tbl): 'tbl' - table or nil expected.", 2)
-	end
-
-	-- Clear the container table
-	if tbl then
-		for k,v in pairs(tbl) do tbl[k] = nil end
-	else
-		tbl = {}
-	end
-
-	local curProfile = self.keys.profile
-
-	local i = 0
-	for profileKey in pairs(self.profiles) do
-		i = i + 1
-		tbl[i] = profileKey
-		if curProfile and profileKey == curProfile then curProfile = nil end
-	end
-
-	-- Add the current profile, if it hasn't been created yet
-	if curProfile then
-		i = i + 1
-		tbl[i] = curProfile
-	end
-
-	return tbl, i
-end
-
---- Returns the current profile name used by the database
-function DBObjectLib:GetCurrentProfile()
-	return self.keys.profile
-end
-
---- Deletes a named profile.  This profile must not be the active profile.
--- @param name The name of the profile to be deleted
--- @param silent If true, do not raise an error when the profile does not exist
-function DBObjectLib:DeleteProfile(name, silent)
-	if type(name) ~= "string" then
-		error("Usage: AceDBObject:DeleteProfile(name): 'name' - string expected.", 2)
-	end
-
-	if self.keys.profile == name then
-		error("Cannot delete the active profile in an AceDBObject.", 2)
-	end
-
-	if not rawget(self.profiles, name) and not silent then
-		error("Cannot delete profile '" .. name .. "'. It does not exist.", 2)
-	end
-
-	self.profiles[name] = nil
-
-	-- populate to child namespaces
-	if self.children then
-		for _, db in pairs(self.children) do
-			DBObjectLib.DeleteProfile(db, name, true)
-		end
-	end
-
-	-- switch all characters that use this profile back to the default
-	if self.sv.profileKeys then
-		for key, profile in pairs(self.sv.profileKeys) do
-			if profile == name then
-				self.sv.profileKeys[key] = nil
-			end
-		end
-	end
-
-	-- Callback: OnProfileDeleted, database, profileKey
-	self.callbacks:Fire("OnProfileDeleted", self, name)
-end
-
---- Copies a named profile into the current profile, overwriting any conflicting
--- settings.
--- @param name The name of the profile to be copied into the current profile
--- @param silent If true, do not raise an error when the profile does not exist
-function DBObjectLib:CopyProfile(name, silent)
-	if type(name) ~= "string" then
-		error("Usage: AceDBObject:CopyProfile(name): 'name' - string expected.", 2)
-	end
-
-	if name == self.keys.profile then
-		error("Cannot have the same source and destination profiles.", 2)
-	end
-
-	if not rawget(self.profiles, name) and not silent then
-		error("Cannot copy profile '" .. name .. "'. It does not exist.", 2)
-	end
-
-	-- Reset the profile before copying
-	DBObjectLib.ResetProfile(self, nil, true)
-
-	local profile = self.profile
-	local source = self.profiles[name]
-
-	copyTable(source, profile)
-
-	-- populate to child namespaces
-	if self.children then
-		for _, db in pairs(self.children) do
-			DBObjectLib.CopyProfile(db, name, true)
-		end
-	end
-
-	-- Callback: OnProfileCopied, database, sourceProfileKey
-	self.callbacks:Fire("OnProfileCopied", self, name)
-end
-
---- Resets the current profile to the default values (if specified).
--- @param noChildren if set to true, the reset will not be populated to the child namespaces of this DB object
--- @param noCallbacks if set to true, won't fire the OnProfileReset callback
-function DBObjectLib:ResetProfile(noChildren, noCallbacks)
-	local profile = self.profile
-
-	for k,v in pairs(profile) do
-		profile[k] = nil
-	end
-
-	local defaults = self.defaults and self.defaults.profile
-	if defaults then
-		copyDefaults(profile, defaults)
-	end
-
-	-- populate to child namespaces
-	if self.children and not noChildren then
-		for _, db in pairs(self.children) do
-			DBObjectLib.ResetProfile(db, nil, noCallbacks)
-		end
-	end
-
-	-- Callback: OnProfileReset, database
-	if not noCallbacks then
-		self.callbacks:Fire("OnProfileReset", self)
-	end
-end
-
---- Resets the entire database, using the string defaultProfile as the new default
--- profile.
--- @param defaultProfile The profile name to use as the default
-function DBObjectLib:ResetDB(defaultProfile)
-	if defaultProfile and type(defaultProfile) ~= "string" then
-		error("Usage: AceDBObject:ResetDB(defaultProfile): 'defaultProfile' - string or nil expected.", 2)
-	end
-
-	local sv = self.sv
-	for k,v in pairs(sv) do
-		sv[k] = nil
-	end
-
-	local parent = self.parent
-
-	initdb(sv, self.defaults, defaultProfile, self)
-
-	-- fix the child namespaces
-	if self.children then
-		if not sv.namespaces then sv.namespaces = {} end
-		for name, db in pairs(self.children) do
-			if not sv.namespaces[name] then sv.namespaces[name] = {} end
-			initdb(sv.namespaces[name], db.defaults, self.keys.profile, db, self)
-		end
-	end
-
-	-- Callback: OnDatabaseReset, database
-	self.callbacks:Fire("OnDatabaseReset", self)
-	-- Callback: OnProfileChanged, database, profileKey
-	self.callbacks:Fire("OnProfileChanged", self, self.keys["profile"])
-
-	return self
-end
-
---- Creates a new database namespace, directly tied to the database.  This
--- is a full scale database in it's own rights other than the fact that
--- it cannot control its profile individually
--- @param name The name of the new namespace
--- @param defaults A table of values to use as defaults
-function DBObjectLib:RegisterNamespace(name, defaults)
-	if type(name) ~= "string" then
-		error("Usage: AceDBObject:RegisterNamespace(name, defaults): 'name' - string expected.", 2)
-	end
-	if defaults and type(defaults) ~= "table" then
-		error("Usage: AceDBObject:RegisterNamespace(name, defaults): 'defaults' - table or nil expected.", 2)
-	end
-	if self.children and self.children[name] then
-		error ("Usage: AceDBObject:RegisterNamespace(name, defaults): 'name' - a namespace with that name already exists.", 2)
-	end
-
-	local sv = self.sv
-	if not sv.namespaces then sv.namespaces = {} end
-	if not sv.namespaces[name] then
-		sv.namespaces[name] = {}
-	end
-
-	local newDB = initdb(sv.namespaces[name], defaults, self.keys.profile, nil, self)
-
-	if not self.children then self.children = {} end
-	self.children[name] = newDB
-	return newDB
-end
-
---- Returns an already existing namespace from the database object.
--- @param name The name of the new namespace
--- @param silent if true, the addon is optional, silently return nil if its not found
--- @usage
--- local namespace = self.db:GetNamespace('namespace')
--- @return the namespace object if found
-function DBObjectLib:GetNamespace(name, silent)
-	if type(name) ~= "string" then
-		error("Usage: AceDBObject:GetNamespace(name): 'name' - string expected.", 2)
-	end
-	if not silent and not (self.children and self.children[name]) then
-		error ("Usage: AceDBObject:GetNamespace(name): 'name' - namespace does not exist.", 2)
-	end
-	if not self.children then self.children = {} end
-	return self.children[name]
-end
-
---[[-------------------------------------------------------------------------
-	AceDB Exposed Methods
----------------------------------------------------------------------------]]
-
---- Creates a new database object that can be used to handle database settings and profiles.
--- By default, an empty DB is created, using a character specific profile.
---
--- You can override the default profile used by passing any profile name as the third argument,
--- or by passing //true// as the third argument to use a globally shared profile called "Default".
---
--- Note that there is no token replacement in the default profile name, passing a defaultProfile as "char"
--- will use a profile named "char", and not a character-specific profile.
--- @param tbl The name of variable, or table to use for the database
--- @param defaults A table of database defaults
--- @param defaultProfile The name of the default profile. If not set, a character specific profile will be used as the default.
--- You can also pass //true// to use a shared global profile called "Default".
--- @usage
--- -- Create an empty DB using a character-specific default profile.
--- self.db = LibStub("AceDB-3.0"):New("MyAddonDB")
--- @usage
--- -- Create a DB using defaults and using a shared default profile
--- self.db = LibStub("AceDB-3.0"):New("MyAddonDB", defaults, true)
-function AceDB:New(tbl, defaults, defaultProfile)
-	if type(tbl) == "string" then
-		local name = tbl
-		tbl = _G[name]
-		if not tbl then
-			tbl = {}
-			_G[name] = tbl
-		end
-	end
-
-	if type(tbl) ~= "table" then
-		error("Usage: AceDB:New(tbl, defaults, defaultProfile): 'tbl' - table expected.", 2)
-	end
-
-	if defaults and type(defaults) ~= "table" then
-		error("Usage: AceDB:New(tbl, defaults, defaultProfile): 'defaults' - table expected.", 2)
-	end
-
-	if defaultProfile and type(defaultProfile) ~= "string" and defaultProfile ~= true then
-		error("Usage: AceDB:New(tbl, defaults, defaultProfile): 'defaultProfile' - string or true expected.", 2)
-	end
-
-	return initdb(tbl, defaults, defaultProfile)
-end
-
--- upgrade existing databases
-for db in pairs(AceDB.db_registry) do
-	if not db.parent then
-		for name,func in pairs(DBObjectLib) do
-			db[name] = func
-		end
-	else
-		db.RegisterDefaults = DBObjectLib.RegisterDefaults
-		db.ResetProfile = DBObjectLib.ResetProfile
-	end
-end
diff --git a/Libs/AceDB-3.0/AceDB-3.0.xml b/Libs/AceDB-3.0/AceDB-3.0.xml
deleted file mode 100644
index 108fc70..0000000
--- a/Libs/AceDB-3.0/AceDB-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceDB-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua b/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
deleted file mode 100644
index 5028fef..0000000
--- a/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
+++ /dev/null
@@ -1,460 +0,0 @@
---- AceDBOptions-3.0 provides a universal AceConfig options screen for managing AceDB-3.0 profiles.
--- @class file
--- @name AceDBOptions-3.0
--- @release $Id: AceDBOptions-3.0.lua 1140 2016-07-03 07:53:29Z nevcairiel $
-local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 15
-local AceDBOptions, oldminor = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
-
-if not AceDBOptions then return end -- No upgrade needed
-
--- Lua APIs
-local pairs, next = pairs, next
-
--- WoW APIs
-local UnitClass = UnitClass
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: NORMAL_FONT_COLOR_CODE, FONT_COLOR_CODE_CLOSE
-
-AceDBOptions.optionTables = AceDBOptions.optionTables or {}
-AceDBOptions.handlers = AceDBOptions.handlers or {}
-
---[[
-	Localization of AceDBOptions-3.0
-]]
-
-local L = {
-	choose = "Existing Profiles",
-	choose_desc = "You can either create a new profile by entering a name in the editbox, or choose one of the already existing profiles.",
-	choose_sub = "Select one of your currently available profiles.",
-	copy = "Copy From",
-	copy_desc = "Copy the settings from one existing profile into the currently active profile.",
-	current = "Current Profile:",
-	default = "Default",
-	delete = "Delete a Profile",
-	delete_confirm = "Are you sure you want to delete the selected profile?",
-	delete_desc = "Delete existing and unused profiles from the database to save space, and cleanup the SavedVariables file.",
-	delete_sub = "Deletes a profile from the database.",
-	intro = "You can change the active database profile, so you can have different settings for every character.",
-	new = "New",
-	new_sub = "Create a new empty profile.",
-	profiles = "Profiles",
-	profiles_sub = "Manage Profiles",
-	reset = "Reset Profile",
-	reset_desc = "Reset the current profile back to its default values, in case your configuration is broken, or you simply want to start over.",
-	reset_sub = "Reset the current profile to the default",
-}
-
-local LOCALE = GetLocale()
-if LOCALE == "deDE" then
-	L["choose"] = "Vorhandene Profile"
-	L["choose_desc"] = "Du kannst ein neues Profil erstellen, indem du einen neuen Namen in der Eingabebox 'Neu' eingibst, oder wähle eines der vorhandenen Profile aus."
-	L["choose_sub"] = "Wählt ein bereits vorhandenes Profil aus."
-	L["copy"] = "Kopieren von..."
-	L["copy_desc"] = "Kopiere die Einstellungen von einem vorhandenen Profil in das aktive Profil."
-	L["current"] = "Aktuelles Profil:"
-	L["default"] = "Standard"
-	L["delete"] = "Profil löschen"
-	L["delete_confirm"] = "Willst du das ausgewählte Profil wirklich löschen?"
-	L["delete_desc"] = "Lösche vorhandene oder unbenutzte Profile aus der Datenbank, um Platz zu sparen und die SavedVariables-Datei 'sauber' zu halten."
-	L["delete_sub"] = "Löscht ein Profil aus der Datenbank."
-	L["intro"] = "Hier kannst du das aktive Datenbankprofil ändern, damit du verschiedene Einstellungen für jeden Charakter erstellen kannst, wodurch eine sehr flexible Konfiguration möglich wird."
-	L["new"] = "Neu"
-	L["new_sub"] = "Ein neues Profil erstellen."
-	L["profiles"] = "Profile"
-	L["profiles_sub"] = "Profile verwalten"
-	L["reset"] = "Profil zurücksetzen"
-	L["reset_desc"] = "Setzt das momentane Profil auf Standardwerte zurück, für den Fall, dass mit der Konfiguration etwas schief lief oder weil du einfach neu starten willst."
-	L["reset_sub"] = "Das aktuelle Profil auf Standard zurücksetzen."
-elseif LOCALE == "frFR" then
-	L["choose"] = "Profils existants"
-	L["choose_desc"] = "Vous pouvez créer un nouveau profil en entrant un nouveau nom dans la boîte de saisie, ou en choississant un des profils déjà existants."
-	L["choose_sub"] = "Permet de choisir un des profils déjà disponibles."
-	L["copy"] = "Copier à partir de"
-	L["copy_desc"] = "Copie les paramètres d'un profil déjà existant dans le profil actuellement actif."
-	L["current"] = "Profil actuel :"
-	L["default"] = "Défaut"
-	L["delete"] = "Supprimer un profil"
-	L["delete_confirm"] = "Etes-vous sûr de vouloir supprimer le profil sélectionné ?"
-	L["delete_desc"] = "Supprime les profils existants inutilisés de la base de données afin de gagner de la place et de nettoyer le fichier SavedVariables."
-	L["delete_sub"] = "Supprime un profil de la base de données."
-	L["intro"] = "Vous pouvez changer le profil actuel afin d'avoir des paramètres différents pour chaque personnage, permettant ainsi d'avoir une configuration très flexible."
-	L["new"] = "Nouveau"
-	L["new_sub"] = "Créée un nouveau profil vierge."
-	L["profiles"] = "Profils"
-	L["profiles_sub"] = "Gestion des profils"
-	L["reset"] = "Réinitialiser le profil"
-	L["reset_desc"] = "Réinitialise le profil actuel au cas où votre configuration est corrompue ou si vous voulez tout simplement faire table rase."
-	L["reset_sub"] = "Réinitialise le profil actuel avec les paramètres par défaut."
-elseif LOCALE == "koKR" then
-	L["choose"] = "저장 중인 프로필"
-	L["choose_desc"] = "입력창에 새로운 이름을 입력하거나 저장 중인 프로필 중 하나를 선택하여 새로운 프로필을 만들 수 있습니다."
-	L["choose_sub"] = "현재 이용할 수 있는 프로필 중 하나를 선택합니다."
-	L["copy"] = "복사해오기"
-	L["copy_desc"] = "현재 사용 중인 프로필에 선택한 프로필의 설정을 복사합니다."
-	L["current"] = "현재 프로필:"
-	L["default"] = "기본값"
-	L["delete"] = "프로필 삭제"
-	L["delete_confirm"] = "정말로 선택한 프로필을 삭제할까요?"
-	L["delete_desc"] = "저장 공간 절약과 SavedVariables 파일의 정리를 위해 데이터베이스에서 사용하지 않는 프로필을 삭제하세요."
-	L["delete_sub"] = "데이터베이스의 프로필을 삭제합니다."
-	L["intro"] = "활성 데이터베이스 프로필을 변경할 수 있고, 각 캐릭터 별로 다른 설정을 할 수 있습니다."
-	L["new"] = "새로운 프로필"
-	L["new_sub"] = "새로운 프로필을 만듭니다."
-	L["profiles"] = "프로필"
-	L["profiles_sub"] = "프로필 관리"
-	L["reset"] = "프로필 초기화"
-	L["reset_desc"] = "설정이 깨졌거나 처음부터 다시 설정을 원하는 경우, 현재 프로필을 기본값으로 초기화하세요."
-	L["reset_sub"] = "현재 프로필을 기본값으로 초기화합니다"
-elseif LOCALE == "esES" or LOCALE == "esMX" then
-	L["choose"] = "Perfiles existentes"
-	L["choose_desc"] = "Puedes crear un nuevo perfil introduciendo un nombre en el recuadro o puedes seleccionar un perfil de los ya existentes."
-	L["choose_sub"] = "Selecciona uno de los perfiles disponibles."
-	L["copy"] = "Copiar de"
-	L["copy_desc"] = "Copia los ajustes de un perfil existente al perfil actual."
-	L["current"] = "Perfil actual:"
-	L["default"] = "Por defecto"
-	L["delete"] = "Borrar un Perfil"
-	L["delete_confirm"] = "¿Estas seguro que quieres borrar el perfil seleccionado?"
-	L["delete_desc"] = "Borra los perfiles existentes y sin uso de la base de datos para ganar espacio y limpiar el archivo SavedVariables."
-	L["delete_sub"] = "Borra un perfil de la base de datos."
-	L["intro"] = "Puedes cambiar el perfil activo de tal manera que cada personaje tenga diferentes configuraciones."
-	L["new"] = "Nuevo"
-	L["new_sub"] = "Crear un nuevo perfil vacio."
-	L["profiles"] = "Perfiles"
-	L["profiles_sub"] = "Manejar Perfiles"
-	L["reset"] = "Reiniciar Perfil"
-	L["reset_desc"] = "Reinicia el perfil actual a los valores por defectos, en caso de que se haya estropeado la configuración o quieras volver a empezar de nuevo."
-	L["reset_sub"] = "Reinicar el perfil actual al de por defecto"
-elseif LOCALE == "zhTW" then
-	L["choose"] = "現有的設定檔"
-	L["choose_desc"] = "您可以在文字方塊內輸入名字以建立新的設定檔,或是選擇一個現有的設定檔使用。"
-	L["choose_sub"] = "從當前可用的設定檔裡面選擇一個。"
-	L["copy"] = "複製自"
-	L["copy_desc"] = "從一個現有的設定檔,將設定複製到現在使用中的設定檔。"
-	L["current"] = "目前設定檔:"
-	L["default"] = "預設"
-	L["delete"] = "刪除一個設定檔"
-	L["delete_confirm"] = "確定要刪除所選擇的設定檔嗎?"
-	L["delete_desc"] = "從資料庫裡刪除不再使用的設定檔,以節省空間,並且清理 SavedVariables 檔案。"
-	L["delete_sub"] = "從資料庫裡刪除一個設定檔。"
-	L["intro"] = "您可以從資料庫中選擇一個設定檔來使用,如此就可以讓每個角色使用不同的設定。"
-	L["new"] = "新建"
-	L["new_sub"] = "新建一個空的設定檔。"
-	L["profiles"] = "設定檔"
-	L["profiles_sub"] = "管理設定檔"
-	L["reset"] = "重置設定檔"
-	L["reset_desc"] = "將現用的設定檔重置為預設值;用於設定檔損壞,或者單純想要重來的情況。"
-	L["reset_sub"] = "將目前的設定檔重置為預設值"
-elseif LOCALE == "zhCN" then
-	L["choose"] = "现有的配置文件"
-	L["choose_desc"] = "你可以通过在文本框内输入一个名字创立一个新的配置文件,也可以选择一个已经存在的配置文件。"
-	L["choose_sub"] = "从当前可用的配置文件里面选择一个。"
-	L["copy"] = "复制自"
-	L["copy_desc"] = "从当前某个已保存的配置文件复制到当前正使用的配置文件。"
-	L["current"] = "当前配置文件:"
-	L["default"] = "默认"
-	L["delete"] = "删除一个配置文件"
-	L["delete_confirm"] = "你确定要删除所选择的配置文件么?"
-	L["delete_desc"] = "从数据库里删除不再使用的配置文件,以节省空间,并且清理SavedVariables文件。"
-	L["delete_sub"] = "从数据库里删除一个配置文件。"
-	L["intro"] = "你可以选择一个活动的数据配置文件,这样你的每个角色就可以拥有不同的设置值,可以给你的插件配置带来极大的灵活性。"
-	L["new"] = "新建"
-	L["new_sub"] = "新建一个空的配置文件。"
-	L["profiles"] = "配置文件"
-	L["profiles_sub"] = "管理配置文件"
-	L["reset"] = "重置配置文件"
-	L["reset_desc"] = "将当前的配置文件恢复到它的默认值,用于你的配置文件损坏,或者你只是想重来的情况。"
-	L["reset_sub"] = "将当前的配置文件恢复为默认值"
-elseif LOCALE == "ruRU" then
-	L["choose"] = "Существующие профили"
-	L["choose_desc"] = "Вы можете создать новый профиль, введя название в поле ввода, или выбрать один из уже существующих профилей."
-	L["choose_sub"] = "Выбор одиного из уже доступных профилей"
-	L["copy"] = "Скопировать из"
-	L["copy_desc"] = "Скопировать настройки из выбранного профиля в активный."
-	L["current"] = "Текущий профиль:"
-	L["default"] = "По умолчанию"
-	L["delete"] = "Удалить профиль"
-	L["delete_confirm"] = "Вы уверены, что вы хотите удалить выбранный профиль?"
-	L["delete_desc"] = "Удалить существующий и неиспользуемый профиль из БД для сохранения места, и очистить SavedVariables файл."
-	L["delete_sub"] = "Удаление профиля из БД"
-	L["intro"] = "Изменяя активный профиль, вы можете задать различные настройки модификаций для каждого персонажа."
-	L["new"] = "Новый"
-	L["new_sub"] = "Создать новый чистый профиль"
-	L["profiles"] = "Профили"
-	L["profiles_sub"] = "Управление профилями"
-	L["reset"] = "Сброс профиля"
-	L["reset_desc"] = "Сбросить текущий профиль к стандартным настройкам, если ваша конфигурация испорчена или вы хотите настроить всё заново."
-	L["reset_sub"] = "Сброс текущего профиля на стандартный"
-elseif LOCALE == "itIT" then
-	L["choose"] = "Profili Esistenti"
-	L["choose_desc"] = "Puoi creare un nuovo profilo digitando il nome della casella di testo, oppure scegliendone uno tra i profili già esistenti."
-	L["choose_sub"] = "Seleziona uno dei profili attualmente disponibili."
-	L["copy"] = "Copia Da"
-	L["copy_desc"] = "Copia le impostazioni da un profilo esistente, nel profilo attivo in questo momento."
-	L["current"] = "Profilo Attivo:"
-	L["default"] = "Standard"
-	L["delete"] = "Cancella un Profilo"
-	L["delete_confirm"] = "Sei sicuro di voler cancellare il profilo selezionato?"
-	L["delete_desc"] = "Cancella i profili non utilizzati dal database per risparmiare spazio e mantenere puliti i file di configurazione SavedVariables."
-	L["delete_sub"] = "Cancella un profilo dal Database."
-	L["intro"] = "Puoi cambiare il profilo attivo, in modo da usare impostazioni diverse per ogni personaggio."
-	L["new"] = "Nuovo"
-	L["new_sub"] = "Crea un nuovo profilo vuoto."
-	L["profiles"] = "Profili"
-	L["profiles_sub"] = "Gestisci Profili"
-	L["reset"] = "Reimposta Profilo"
-	L["reset_desc"] = "Riporta il tuo profilo attivo alle sue impostazioni predefinite, nel caso in cui la tua configurazione si sia corrotta, o semplicemente tu voglia re-inizializzarla."
-	L["reset_sub"] = "Reimposta il profilo ai suoi valori predefiniti."
-elseif LOCALE == "ptBR" then
-	L["choose"] = "Perfis Existentes"
-	L["choose_desc"] = "Você pode tanto criar um perfil novo tanto digitando um nome na caixa de texto, quanto escolher um dos perfis já existentes."
-	L["choose_sub"] = "Selecione um de seus perfis atualmente disponíveis."
-	L["copy"] = "Copiar De"
-	L["copy_desc"] = "Copia as definições de um perfil existente no perfil atualmente ativo."
-	L["current"] = "Perfil Autal:"
-	L["default"] = "Padrão"
-	L["delete"] = "Remover um Perfil"
-	L["delete_confirm"] = "Tem certeza que deseja remover o perfil selecionado?"
-	L["delete_desc"] = "Remove perfis existentes e inutilizados do banco de dados para economizar espaço, e limpar o arquivo SavedVariables."
-	L["delete_sub"] = "Remove um perfil do banco de dados."
-	L["intro"] = "Você pode alterar o perfil do banco de dados ativo, para que possa ter definições diferentes para cada personagem."
-	L["new"] = "Novo"
-	L["new_sub"] = "Cria um novo perfil vazio."
-	L["profiles"] = "Perfis"
-	L["profiles_sub"] = "Gerenciar Perfis"
-	L["reset"] = "Resetar Perfil"
-	L["reset_desc"] = "Reseta o perfil atual para os valores padrões, no caso de sua configuração estar quebrada, ou simplesmente se deseja começar novamente."
-	L["reset_sub"] = "Resetar o perfil atual ao padrão"
-end
-
-local defaultProfiles
-local tmpprofiles = {}
-
--- Get a list of available profiles for the specified database.
--- You can specify which profiles to include/exclude in the list using the two boolean parameters listed below.
--- @param db The db object to retrieve the profiles from
--- @param common If true, getProfileList will add the default profiles to the return list, even if they have not been created yet
--- @param nocurrent If true, then getProfileList will not display the current profile in the list
--- @return Hashtable of all profiles with the internal name as keys and the display name as value.
-local function getProfileList(db, common, nocurrent)
-	local profiles = {}
-
-	-- copy existing profiles into the table
-	local currentProfile = db:GetCurrentProfile()
-	for i,v in pairs(db:GetProfiles(tmpprofiles)) do
-		if not (nocurrent and v == currentProfile) then
-			profiles[v] = v
-		end
-	end
-
-	-- add our default profiles to choose from ( or rename existing profiles)
-	for k,v in pairs(defaultProfiles) do
-		if (common or profiles[k]) and not (nocurrent and k == currentProfile) then
-			profiles[k] = v
-		end
-	end
-
-	return profiles
-end
-
---[[
-	OptionsHandlerPrototype
-	prototype class for handling the options in a sane way
-]]
-local OptionsHandlerPrototype = {}
-
---[[ Reset the profile ]]
-function OptionsHandlerPrototype:Reset()
-	self.db:ResetProfile()
-end
-
---[[ Set the profile to value ]]
-function OptionsHandlerPrototype:SetProfile(info, value)
-	self.db:SetProfile(value)
-end
-
---[[ returns the currently active profile ]]
-function OptionsHandlerPrototype:GetCurrentProfile()
-	return self.db:GetCurrentProfile()
-end
-
---[[
-	List all active profiles
-	you can control the output with the .arg variable
-	currently four modes are supported
-
-	(empty) - return all available profiles
-	"nocurrent" - returns all available profiles except the currently active profile
-	"common" - returns all avaialble profiles + some commonly used profiles ("char - realm", "realm", "class", "Default")
-	"both" - common except the active profile
-]]
-function OptionsHandlerPrototype:ListProfiles(info)
-	local arg = info.arg
-	local profiles
-	if arg == "common" and not self.noDefaultProfiles then
-		profiles = getProfileList(self.db, true, nil)
-	elseif arg == "nocurrent" then
-		profiles = getProfileList(self.db, nil, true)
-	elseif arg == "both" then -- currently not used
-		profiles = getProfileList(self.db, (not self.noDefaultProfiles) and true, true)
-	else
-		profiles = getProfileList(self.db)
-	end
-
-	return profiles
-end
-
-function OptionsHandlerPrototype:HasNoProfiles(info)
-	local profiles = self:ListProfiles(info)
-	return ((not next(profiles)) and true or false)
-end
-
---[[ Copy a profile ]]
-function OptionsHandlerPrototype:CopyProfile(info, value)
-	self.db:CopyProfile(value)
-end
-
---[[ Delete a profile from the db ]]
-function OptionsHandlerPrototype:DeleteProfile(info, value)
-	self.db:DeleteProfile(value)
-end
-
---[[ fill defaultProfiles with some generic values ]]
-local function generateDefaultProfiles(db)
-	defaultProfiles = {
-		["Default"] = L["default"],
-		[db.keys.char] = db.keys.char,
-		[db.keys.realm] = db.keys.realm,
-		[db.keys.class] = UnitClass("player")
-	}
-end
-
---[[ create and return a handler object for the db, or upgrade it if it already existed ]]
-local function getOptionsHandler(db, noDefaultProfiles)
-	if not defaultProfiles then
-		generateDefaultProfiles(db)
-	end
-
-	local handler = AceDBOptions.handlers[db] or { db = db, noDefaultProfiles = noDefaultProfiles }
-
-	for k,v in pairs(OptionsHandlerPrototype) do
-		handler[k] = v
-	end
-
-	AceDBOptions.handlers[db] = handler
-	return handler
-end
-
---[[
-	the real options table
-]]
-local optionsTable = {
-	desc = {
-		order = 1,
-		type = "description",
-		name = L["intro"] .. "\n",
-	},
-	descreset = {
-		order = 9,
-		type = "description",
-		name = L["reset_desc"],
-	},
-	reset = {
-		order = 10,
-		type = "execute",
-		name = L["reset"],
-		desc = L["reset_sub"],
-		func = "Reset",
-	},
-	current = {
-		order = 11,
-		type = "description",
-		name = function(info) return L["current"] .. " " .. NORMAL_FONT_COLOR_CODE .. info.handler:GetCurrentProfile() .. FONT_COLOR_CODE_CLOSE end,
-		width = "default",
-	},
-	choosedesc = {
-		order = 20,
-		type = "description",
-		name = "\n" .. L["choose_desc"],
-	},
-	new = {
-		name = L["new"],
-		desc = L["new_sub"],
-		type = "input",
-		order = 30,
-		get = false,
-		set = "SetProfile",
-	},
-	choose = {
-		name = L["choose"],
-		desc = L["choose_sub"],
-		type = "select",
-		order = 40,
-		get = "GetCurrentProfile",
-		set = "SetProfile",
-		values = "ListProfiles",
-		arg = "common",
-	},
-	copydesc = {
-		order = 50,
-		type = "description",
-		name = "\n" .. L["copy_desc"],
-	},
-	copyfrom = {
-		order = 60,
-		type = "select",
-		name = L["copy"],
-		desc = L["copy_desc"],
-		get = false,
-		set = "CopyProfile",
-		values = "ListProfiles",
-		disabled = "HasNoProfiles",
-		arg = "nocurrent",
-	},
-	deldesc = {
-		order = 70,
-		type = "description",
-		name = "\n" .. L["delete_desc"],
-	},
-	delete = {
-		order = 80,
-		type = "select",
-		name = L["delete"],
-		desc = L["delete_sub"],
-		get = false,
-		set = "DeleteProfile",
-		values = "ListProfiles",
-		disabled = "HasNoProfiles",
-		arg = "nocurrent",
-		confirm = true,
-		confirmText = L["delete_confirm"],
-	},
-}
-
---- Get/Create a option table that you can use in your addon to control the profiles of AceDB-3.0.
--- @param db The database object to create the options table for.
--- @return The options table to be used in AceConfig-3.0
--- @usage
--- -- Assuming `options` is your top-level options table and `self.db` is your database:
--- options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
-function AceDBOptions:GetOptionsTable(db, noDefaultProfiles)
-	local tbl = AceDBOptions.optionTables[db] or {
-			type = "group",
-			name = L["profiles"],
-			desc = L["profiles_sub"],
-		}
-
-	tbl.handler = getOptionsHandler(db, noDefaultProfiles)
-	tbl.args = optionsTable
-
-	AceDBOptions.optionTables[db] = tbl
-	return tbl
-end
-
--- upgrade existing tables
-for db,tbl in pairs(AceDBOptions.optionTables) do
-	tbl.handler = getOptionsHandler(db)
-	tbl.args = optionsTable
-end
diff --git a/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml b/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml
deleted file mode 100644
index 51305f9..0000000
--- a/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceDBOptions-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceEvent-3.0/AceEvent-3.0.lua b/Libs/AceEvent-3.0/AceEvent-3.0.lua
deleted file mode 100644
index bbf55c2..0000000
--- a/Libs/AceEvent-3.0/AceEvent-3.0.lua
+++ /dev/null
@@ -1,126 +0,0 @@
---- AceEvent-3.0 provides event registration and secure dispatching.
--- All dispatching is done using **CallbackHandler-1.0**. AceEvent is a simple wrapper around
--- CallbackHandler, and dispatches all game events or addon message to the registrees.
---
--- **AceEvent-3.0** can be embeded into your addon, either explicitly by calling AceEvent:Embed(MyAddon) or by
--- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
--- and can be accessed directly, without having to explicitly call AceEvent itself.\\
--- It is recommended to embed AceEvent, otherwise you'll have to specify a custom `self` on all calls you
--- make into AceEvent.
--- @class file
--- @name AceEvent-3.0
--- @release $Id: AceEvent-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
-local CallbackHandler = LibStub("CallbackHandler-1.0")
-
-local MAJOR, MINOR = "AceEvent-3.0", 4
-local AceEvent = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceEvent then return end
-
--- Lua APIs
-local pairs = pairs
-
-AceEvent.frame = AceEvent.frame or CreateFrame("Frame", "AceEvent30Frame") -- our event frame
-AceEvent.embeds = AceEvent.embeds or {} -- what objects embed this lib
-
--- APIs and registry for blizzard events, using CallbackHandler lib
-if not AceEvent.events then
-	AceEvent.events = CallbackHandler:New(AceEvent,
-		"RegisterEvent", "UnregisterEvent", "UnregisterAllEvents")
-end
-
-function AceEvent.events:OnUsed(target, eventname)
-	AceEvent.frame:RegisterEvent(eventname)
-end
-
-function AceEvent.events:OnUnused(target, eventname)
-	AceEvent.frame:UnregisterEvent(eventname)
-end
-
-
--- APIs and registry for IPC messages, using CallbackHandler lib
-if not AceEvent.messages then
-	AceEvent.messages = CallbackHandler:New(AceEvent,
-		"RegisterMessage", "UnregisterMessage", "UnregisterAllMessages"
-	)
-	AceEvent.SendMessage = AceEvent.messages.Fire
-end
-
---- embedding and embed handling
-local mixins = {
-	"RegisterEvent", "UnregisterEvent",
-	"RegisterMessage", "UnregisterMessage",
-	"SendMessage",
-	"UnregisterAllEvents", "UnregisterAllMessages",
-}
-
---- Register for a Blizzard Event.
--- The callback will be called with the optional `arg` as the first argument (if supplied), and the event name as the second (or first, if no arg was supplied)
--- Any arguments to the event will be passed on after that.
--- @name AceEvent:RegisterEvent
--- @class function
--- @paramsig event[, callback [, arg]]
--- @param event The event to register for
--- @param callback The callback function to call when the event is triggered (funcref or method, defaults to a method with the event name)
--- @param arg An optional argument to pass to the callback function
-
---- Unregister an event.
--- @name AceEvent:UnregisterEvent
--- @class function
--- @paramsig event
--- @param event The event to unregister
-
---- Register for a custom AceEvent-internal message.
--- The callback will be called with the optional `arg` as the first argument (if supplied), and the event name as the second (or first, if no arg was supplied)
--- Any arguments to the event will be passed on after that.
--- @name AceEvent:RegisterMessage
--- @class function
--- @paramsig message[, callback [, arg]]
--- @param message The message to register for
--- @param callback The callback function to call when the message is triggered (funcref or method, defaults to a method with the event name)
--- @param arg An optional argument to pass to the callback function
-
---- Unregister a message
--- @name AceEvent:UnregisterMessage
--- @class function
--- @paramsig message
--- @param message The message to unregister
-
---- Send a message over the AceEvent-3.0 internal message system to other addons registered for this message.
--- @name AceEvent:SendMessage
--- @class function
--- @paramsig message, ...
--- @param message The message to send
--- @param ... Any arguments to the message
-
-
--- Embeds AceEvent into the target object making the functions from the mixins list available on target:..
--- @param target target object to embed AceEvent in
-function AceEvent:Embed(target)
-	for k, v in pairs(mixins) do
-		target[v] = self[v]
-	end
-	self.embeds[target] = true
-	return target
-end
-
--- AceEvent:OnEmbedDisable( target )
--- target (object) - target object that is being disabled
---
--- Unregister all events messages etc when the target disables.
--- this method should be called by the target manually or by an addon framework
-function AceEvent:OnEmbedDisable(target)
-	target:UnregisterAllEvents()
-	target:UnregisterAllMessages()
-end
-
--- Script to fire blizzard events into the event listeners
-local events = AceEvent.events
-AceEvent.frame:SetScript("OnEvent", function(this, event, ...)
-	events:Fire(event, ...)
-end)
-
---- Finally: upgrade our old embeds
-for target, v in pairs(AceEvent.embeds) do
-	AceEvent:Embed(target)
-end
diff --git a/Libs/AceEvent-3.0/AceEvent-3.0.xml b/Libs/AceEvent-3.0/AceEvent-3.0.xml
deleted file mode 100644
index 41ef791..0000000
--- a/Libs/AceEvent-3.0/AceEvent-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceEvent-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc
deleted file mode 100644
index 3644493..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets.toc
+++ /dev/null
@@ -1,19 +0,0 @@
-## Interface: 60200
-## X-Curse-Packaged-Version: r53
-## X-Curse-Project-Name: AceGUI-3.0-SharedMediaWidgets
-## X-Curse-Project-ID: ace-gui-3-0-shared-media-widgets
-## X-Curse-Repository-ID: wow/ace-gui-3-0-shared-media-widgets/mainline
-
-## Title: Lib: AceGUI-3.0-SharedMediaWidgets
-## Notes: Enables AceGUI-3.0 widgets for the 5 basic SharedMedia-3.0 types
-## Author: Yssaril
-## OptionalDeps: Ace3, LibSharedMedia-3.0, Libstub, CallbackHandler-1.0
-## X-Category: Library
-
-#@no-lib-strip@
-# Libs\Libstub\Libstub.lua
-# Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
-# Libs\AceGUI-3.0\AceGUI-3.0.xml
-#@end-no-lib-strip@
-
-widget.xml
\ No newline at end of file
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
deleted file mode 100644
index 0b75952..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
+++ /dev/null
@@ -1,235 +0,0 @@
--- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
--- Widget created by Yssaril
-
-local AceGUI = LibStub("AceGUI-3.0")
-local Media = LibStub("LibSharedMedia-3.0")
-
-local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
-
-do
-	local widgetType = "LSM30_Background"
-	local widgetVersion = 11
-
-	local contentFrameCache = {}
-	local function ReturnSelf(self)
-		self:ClearAllPoints()
-		self:Hide()
-		self.check:Hide()
-		table.insert(contentFrameCache, self)
-	end
-
-	local function ContentOnClick(this, button)
-		local self = this.obj
-		self:Fire("OnValueChanged", this.text:GetText())
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function ContentOnEnter(this, button)
-		local self = this.obj
-		local text = this.text:GetText()
-		local background = self.list[text] ~= text and self.list[text] or Media:Fetch('background',text)
-		self.dropdown.bgTex:SetTexture(background)
-	end
-
-	local function GetContentLine()
-		local frame
-		if next(contentFrameCache) then
-			frame = table.remove(contentFrameCache)
-		else
-			frame = CreateFrame("Button", nil, UIParent)
-				--frame:SetWidth(200)
-				frame:SetHeight(18)
-				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
-				frame:SetScript("OnClick", ContentOnClick)
-				frame:SetScript("OnEnter", ContentOnEnter)
-
-			local check = frame:CreateTexture("OVERLAY")
-				check:SetWidth(16)
-				check:SetHeight(16)
-				check:SetPoint("LEFT",frame,"LEFT",1,-1)
-				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
-				check:Hide()
-			frame.check = check
-
-			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
-				local font, size = text:GetFont()
-				text:SetFont(font,size,"OUTLINE")
-
-				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
-				text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
-				text:SetJustifyH("LEFT")
-				text:SetText("Test Test Test Test Test Test Test")
-			frame.text = text
-
-			frame.ReturnSelf = ReturnSelf
-		end
-		frame:Show()
-		return frame
-	end
-
-	local function OnAcquire(self)
-		self:SetHeight(44)
-		self:SetWidth(200)
-	end
-
-	local function OnRelease(self)
-		self:SetText("")
-		self:SetLabel("")
-		self:SetDisabled(false)
-
-		self.value = nil
-		self.list = nil
-		self.open = nil
-		self.hasClose = nil
-
-		self.frame:ClearAllPoints()
-		self.frame:Hide()
-	end
-
-	local function SetValue(self, value) -- Set the value to an item in the List.
-		if self.list then
-			self:SetText(value or "")
-		end
-		self.value = value
-	end
-
-	local function GetValue(self)
-		return self.value
-	end
-
-	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
-		self.list = list or Media:HashTable("background")
-	end
-
-
-	local function SetText(self, text) -- Set the text displayed in the box.
-		self.frame.text:SetText(text or "")
-		local background = self.list[text] ~= text and self.list[text] or Media:Fetch('background',text)
-
-		self.frame.displayButton:SetBackdrop({bgFile = background,
-			edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
-			edgeSize = 16,
-			insets = { left = 4, right = 4, top = 4, bottom = 4 }})
-	end
-
-	local function SetLabel(self, text) -- Set the text for the label.
-		self.frame.label:SetText(text or "")
-	end
-
-	local function AddItem(self, key, value) -- Add an item to the list.
-		self.list = self.list or {}
-		self.list[key] = value
-	end
-	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
-
-	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
-	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
-	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
-
-	local function SetDisabled(self, disabled) -- Disable the widget.
-		self.disabled = disabled
-		if disabled then
-			self.frame:Disable()
-			self.frame.displayButton:SetBackdropColor(.2,.2,.2,1)
-		else
-			self.frame:Enable()
-			self.frame.displayButton:SetBackdropColor(1,1,1,1)
-		end
-	end
-
-	local function textSort(a,b)
-		return string.upper(a) < string.upper(b)
-	end
-
-	local sortedlist = {}
-	local function ToggleDrop(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-			AceGUI:ClearFocus()
-		else
-			AceGUI:SetFocus(self)
-			self.dropdown = AGSMW:GetDropDownFrame()
-			local width = self.frame:GetWidth()
-			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
-			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
-			for k, v in pairs(self.list) do
-				sortedlist[#sortedlist+1] = k
-			end
-			table.sort(sortedlist, textSort)
-			for i, k in ipairs(sortedlist) do
-				local f = GetContentLine()
-				f.text:SetText(k)
-				--print(k)
-				if k == self.value then
-					f.check:Show()
-				end
-				f.obj = self
-				f.dropdown = self.dropdown
-				self.dropdown:AddFrame(f)
-			end
-			wipe(sortedlist)
-		end
-	end
-
-	local function ClearFocus(self)
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function OnHide(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function Drop_OnEnter(this)
-		this.obj:Fire("OnEnter")
-	end
-
-	local function Drop_OnLeave(this)
-		this.obj:Fire("OnLeave")
-	end
-
-	local function Constructor()
-		local frame = AGSMW:GetBaseFrameWithWindow()
-		local self = {}
-
-		self.type = widgetType
-		self.frame = frame
-		frame.obj = self
-		frame.dropButton.obj = self
-		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
-		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
-		frame.dropButton:SetScript("OnClick",ToggleDrop)
-		frame:SetScript("OnHide", OnHide)
-
-		self.alignoffset = 31
-
-		self.OnRelease = OnRelease
-		self.OnAcquire = OnAcquire
-		self.ClearFocus = ClearFocus
-		self.SetText = SetText
-		self.SetValue = SetValue
-		self.GetValue = GetValue
-		self.SetList = SetList
-		self.SetLabel = SetLabel
-		self.SetDisabled = SetDisabled
-		self.AddItem = AddItem
-		self.SetMultiselect = SetMultiselect
-		self.GetMultiselect = GetMultiselect
-		self.SetItemValue = SetItemValue
-		self.SetItemDisabled = SetItemDisabled
-		self.ToggleDrop = ToggleDrop
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
-
-end
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
deleted file mode 100644
index 0cd2959..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
+++ /dev/null
@@ -1,230 +0,0 @@
--- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
--- Widget created by Yssaril
-
-local AceGUI = LibStub("AceGUI-3.0")
-local Media = LibStub("LibSharedMedia-3.0")
-
-local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
-
-do
-	local widgetType = "LSM30_Border"
-	local widgetVersion = 11
-
-	local contentFrameCache = {}
-	local function ReturnSelf(self)
-		self:ClearAllPoints()
-		self:Hide()
-		self.check:Hide()
-		table.insert(contentFrameCache, self)
-	end
-
-	local function ContentOnClick(this, button)
-		local self = this.obj
-		self:Fire("OnValueChanged", this.text:GetText())
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function ContentOnEnter(this, button)
-		local self = this.obj
-		local text = this.text:GetText()
-		local border = self.list[text] ~= text and self.list[text] or Media:Fetch('border',text)
-		this.dropdown:SetBackdrop({edgeFile = border,
-			bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
-			tile = true, tileSize = 16, edgeSize = 16,
-			insets = { left = 4, right = 4, top = 4, bottom = 4 }})
-	end
-
-	local function GetContentLine()
-		local frame
-		if next(contentFrameCache) then
-			frame = table.remove(contentFrameCache)
-		else
-			frame = CreateFrame("Button", nil, UIParent)
-				--frame:SetWidth(200)
-				frame:SetHeight(18)
-				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
-				frame:SetScript("OnClick", ContentOnClick)
-				frame:SetScript("OnEnter", ContentOnEnter)
-			local check = frame:CreateTexture("OVERLAY")
-				check:SetWidth(16)
-				check:SetHeight(16)
-				check:SetPoint("LEFT",frame,"LEFT",1,-1)
-				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
-				check:Hide()
-			frame.check = check
-			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
-				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
-				text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
-				text:SetJustifyH("LEFT")
-				text:SetText("Test Test Test Test Test Test Test")
-			frame.text = text
-			frame.ReturnSelf = ReturnSelf
-		end
-		frame:Show()
-		return frame
-	end
-
-	local function OnAcquire(self)
-		self:SetHeight(44)
-		self:SetWidth(200)
-	end
-
-	local function OnRelease(self)
-		self:SetText("")
-		self:SetLabel("")
-		self:SetDisabled(false)
-
-		self.value = nil
-		self.list = nil
-		self.open = nil
-		self.hasClose = nil
-
-		self.frame:ClearAllPoints()
-		self.frame:Hide()
-	end
-
-	local function SetValue(self, value) -- Set the value to an item in the List.
-		if self.list then
-			self:SetText(value or "")
-		end
-		self.value = value
-	end
-
-	local function GetValue(self)
-		return self.value
-	end
-
-	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
-		self.list = list or Media:HashTable("border")
-	end
-
-
-	local function SetText(self, text) -- Set the text displayed in the box.
-		self.frame.text:SetText(text or "")
-		local border = self.list[text] ~= text and self.list[text] or Media:Fetch('border',text)
-
-		self.frame.displayButton:SetBackdrop({edgeFile = border,
-			bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
-			tile = true, tileSize = 16, edgeSize = 16,
-			insets = { left = 4, right = 4, top = 4, bottom = 4 }})
-	end
-
-	local function SetLabel(self, text) -- Set the text for the label.
-		self.frame.label:SetText(text or "")
-	end
-
-	local function AddItem(self, key, value) -- Add an item to the list.
-		self.list = self.list or {}
-		self.list[key] = value
-	end
-	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
-
-	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
-	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
-	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
-
-	local function SetDisabled(self, disabled) -- Disable the widget.
-		self.disabled = disabled
-		if disabled then
-			self.frame:Disable()
-		else
-			self.frame:Enable()
-		end
-	end
-
-	local function textSort(a,b)
-		return string.upper(a) < string.upper(b)
-	end
-
-	local sortedlist = {}
-	local function ToggleDrop(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-			AceGUI:ClearFocus()
-		else
-			AceGUI:SetFocus(self)
-			self.dropdown = AGSMW:GetDropDownFrame()
-			local width = self.frame:GetWidth()
-			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
-			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
-			for k, v in pairs(self.list) do
-				sortedlist[#sortedlist+1] = k
-			end
-			table.sort(sortedlist, textSort)
-			for i, k in ipairs(sortedlist) do
-				local f = GetContentLine()
-				f.text:SetText(k)
-				--print(k)
-				if k == self.value then
-					f.check:Show()
-				end
-				f.obj = self
-				f.dropdown = self.dropdown
-				self.dropdown:AddFrame(f)
-			end
-			wipe(sortedlist)
-		end
-	end
-
-	local function ClearFocus(self)
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function OnHide(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function Drop_OnEnter(this)
-		this.obj:Fire("OnEnter")
-	end
-
-	local function Drop_OnLeave(this)
-		this.obj:Fire("OnLeave")
-	end
-
-	local function Constructor()
-		local frame = AGSMW:GetBaseFrameWithWindow()
-		local self = {}
-
-		self.type = widgetType
-		self.frame = frame
-		frame.obj = self
-		frame.dropButton.obj = self
-		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
-		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
-		frame.dropButton:SetScript("OnClick",ToggleDrop)
-		frame:SetScript("OnHide", OnHide)
-
-		self.alignoffset = 31
-
-		self.OnRelease = OnRelease
-		self.OnAcquire = OnAcquire
-		self.ClearFocus = ClearFocus
-		self.SetText = SetText
-		self.SetValue = SetValue
-		self.GetValue = GetValue
-		self.SetList = SetList
-		self.SetLabel = SetLabel
-		self.SetDisabled = SetDisabled
-		self.AddItem = AddItem
-		self.SetMultiselect = SetMultiselect
-		self.GetMultiselect = GetMultiselect
-		self.SetItemValue = SetItemValue
-		self.SetItemDisabled = SetItemDisabled
-		self.ToggleDrop = ToggleDrop
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
-
-end
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
deleted file mode 100644
index eadf35f..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
+++ /dev/null
@@ -1,216 +0,0 @@
--- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
--- Widget created by Yssaril
-
-local AceGUI = LibStub("AceGUI-3.0")
-local Media = LibStub("LibSharedMedia-3.0")
-
-local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
-
-do
-	local widgetType = "LSM30_Font"
-	local widgetVersion = 11
-
-	local contentFrameCache = {}
-	local function ReturnSelf(self)
-		self:ClearAllPoints()
-		self:Hide()
-		self.check:Hide()
-		table.insert(contentFrameCache, self)
-	end
-
-	local function ContentOnClick(this, button)
-		local self = this.obj
-		self:Fire("OnValueChanged", this.text:GetText())
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function GetContentLine()
-		local frame
-		if next(contentFrameCache) then
-			frame = table.remove(contentFrameCache)
-		else
-			frame = CreateFrame("Button", nil, UIParent)
-				--frame:SetWidth(200)
-				frame:SetHeight(18)
-				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
-				frame:SetScript("OnClick", ContentOnClick)
-			local check = frame:CreateTexture("OVERLAY")
-				check:SetWidth(16)
-				check:SetHeight(16)
-				check:SetPoint("LEFT",frame,"LEFT",1,-1)
-				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
-				check:Hide()
-			frame.check = check
-			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
-				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
-				text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
-				text:SetJustifyH("LEFT")
-				text:SetText("Test Test Test Test Test Test Test")
-			frame.text = text
-			frame.ReturnSelf = ReturnSelf
-		end
-		frame:Show()
-		return frame
-	end
-
-	local function OnAcquire(self)
-		self:SetHeight(44)
-		self:SetWidth(200)
-	end
-
-	local function OnRelease(self)
-		self:SetText("")
-		self:SetLabel("")
-		self:SetDisabled(false)
-
-		self.value = nil
-		self.list = nil
-		self.open = nil
-		self.hasClose = nil
-
-		self.frame:ClearAllPoints()
-		self.frame:Hide()
-	end
-
-	local function SetValue(self, value) -- Set the value to an item in the List.
-		if self.list then
-			self:SetText(value or "")
-		end
-		self.value = value
-	end
-
-	local function GetValue(self)
-		return self.value
-	end
-
-	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
-		self.list = list or Media:HashTable("font")
-	end
-
-	local function SetText(self, text) -- Set the text displayed in the box.
-		self.frame.text:SetText(text or "")
-		local font = self.list[text] ~= text and self.list[text] or Media:Fetch('font',text)
-		local _, size, outline= self.frame.text:GetFont()
-		self.frame.text:SetFont(font,size,outline)
-	end
-
-	local function SetLabel(self, text) -- Set the text for the label.
-		self.frame.label:SetText(text or "")
-	end
-
-	local function AddItem(self, key, value) -- Add an item to the list.
-		self.list = self.list or {}
-		self.list[key] = value
-	end
-	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
-
-	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
-	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
-	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
-
-	local function SetDisabled(self, disabled) -- Disable the widget.
-		self.disabled = disabled
-		if disabled then
-			self.frame:Disable()
-		else
-			self.frame:Enable()
-		end
-	end
-
-	local function textSort(a,b)
-		return string.upper(a) < string.upper(b)
-	end
-
-	local sortedlist = {}
-	local function ToggleDrop(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-			AceGUI:ClearFocus()
-		else
-			AceGUI:SetFocus(self)
-			self.dropdown = AGSMW:GetDropDownFrame()
-			local width = self.frame:GetWidth()
-			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
-			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
-			for k, v in pairs(self.list) do
-				sortedlist[#sortedlist+1] = k
-			end
-			table.sort(sortedlist, textSort)
-			for i, k in ipairs(sortedlist) do
-				local f = GetContentLine()
-				local _, size, outline= f.text:GetFont()
-				local font = self.list[k] ~= k and self.list[k] or Media:Fetch('font',k)
-				f.text:SetFont(font,size,outline)
-				f.text:SetText(k)
-				if k == self.value then
-					f.check:Show()
-				end
-				f.obj = self
-				self.dropdown:AddFrame(f)
-			end
-			wipe(sortedlist)
-		end
-	end
-
-	local function ClearFocus(self)
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function OnHide(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function Drop_OnEnter(this)
-		this.obj:Fire("OnEnter")
-	end
-
-	local function Drop_OnLeave(this)
-		this.obj:Fire("OnLeave")
-	end
-
-	local function Constructor()
-		local frame = AGSMW:GetBaseFrame()
-		local self = {}
-
-		self.type = widgetType
-		self.frame = frame
-		frame.obj = self
-		frame.dropButton.obj = self
-		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
-		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
-		frame.dropButton:SetScript("OnClick",ToggleDrop)
-		frame:SetScript("OnHide", OnHide)
-
-		self.alignoffset = 31
-
-		self.OnRelease = OnRelease
-		self.OnAcquire = OnAcquire
-		self.ClearFocus = ClearFocus
-		self.SetText = SetText
-		self.SetValue = SetValue
-		self.GetValue = GetValue
-		self.SetList = SetList
-		self.SetLabel = SetLabel
-		self.SetDisabled = SetDisabled
-		self.AddItem = AddItem
-		self.SetMultiselect = SetMultiselect
-		self.GetMultiselect = GetMultiselect
-		self.SetItemValue = SetItemValue
-		self.SetItemDisabled = SetItemDisabled
-		self.ToggleDrop = ToggleDrop
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
-
-end
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua
deleted file mode 100644
index 7725598..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SharedFunctions.lua
+++ /dev/null
@@ -1,55 +0,0 @@
--- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
--- Widget created by Yssaril
-LoadAddOn("LibSharedMedia-3.0")
-local AceGUI = LibStub("AceGUI-3.0")
-local Media = LibStub("LibSharedMedia-3.0")
-
-AceGUISharedMediaWidgets = {}
-do
-	AceGUIWidgetLSMlists = {
-		['font'] = Media:HashTable("font"),
-		['sound'] = Media:HashTable("sound"),
-		['statusbar'] = Media:HashTable("statusbar"),
-		['border'] = Media:HashTable("border"),
-		['background'] = Media:HashTable("background"),
-	}
-
-	local min, max, floor = math.min, math.max, math.floor
-
-	local function fixlevels(parent,...)
-		local i = 1
-		local child = select(i, ...)
-		while child do
-			child:SetFrameLevel(parent:GetFrameLevel()+1)
-			fixlevels(child, child:GetChildren())
-			i = i + 1
-			child = select(i, ...)
-		end
-	end
-
-	local function OnItemValueChanged(this, event, checked)
-		local self = this.userdata.obj
-		if self.multiselect then
-			self:Fire("OnValueChanged", this.userdata.value, checked)
-		else
-			if checked then
-				self:SetValue(this.userdata.value)
-				self:Fire("OnValueChanged", this.userdata.value)
-			else
-				this:SetValue(true)
-			end
-			self.pullout:Close()
-		end
-	end
-
-	local function SetValue(self, value)
-		if value then
-			self:SetText(value or "")
-		end
-		self.value = value
-	end
-
-	AceGUISharedMediaWidgets.fixlevels = fixlevels
-	AceGUISharedMediaWidgets.OnItemValueChanged = OnItemValueChanged
-	AceGUISharedMediaWidgets.SetValue = SetValue
-end
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
deleted file mode 100644
index 1d39c28..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
+++ /dev/null
@@ -1,264 +0,0 @@
--- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
--- Widget created by Yssaril
-
-local AceGUI = LibStub("AceGUI-3.0")
-local Media = LibStub("LibSharedMedia-3.0")
-
-local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
-
-do
-	local widgetType = "LSM30_Sound"
-	local widgetVersion = 11
-
-	local contentFrameCache = {}
-	local function ReturnSelf(self)
-		self:ClearAllPoints()
-		self:Hide()
-		self.check:Hide()
-		table.insert(contentFrameCache, self)
-	end
-
-	local function ContentOnClick(this, button)
-		local self = this.obj
-		self:Fire("OnValueChanged", this.text:GetText())
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function ContentSpeakerOnClick(this, button)
-		local self = this.frame.obj
-		local sound = this.frame.text:GetText()
-		PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound), "Master")
-	end
-
-	local function GetContentLine()
-		local frame
-		if next(contentFrameCache) then
-			frame = table.remove(contentFrameCache)
-		else
-			frame = CreateFrame("Button", nil, UIParent)
-				--frame:SetWidth(200)
-				frame:SetHeight(18)
-				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
-				frame:SetScript("OnClick", ContentOnClick)
-			local check = frame:CreateTexture("OVERLAY")
-				check:SetWidth(16)
-				check:SetHeight(16)
-				check:SetPoint("LEFT",frame,"LEFT",1,-1)
-				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
-				check:Hide()
-			frame.check = check
-
-			local soundbutton = CreateFrame("Button", nil, frame)
-				soundbutton:SetWidth(16)
-				soundbutton:SetHeight(16)
-				soundbutton:SetPoint("RIGHT",frame,"RIGHT",-1,0)
-				soundbutton.frame = frame
-				soundbutton:SetScript("OnClick", ContentSpeakerOnClick)
-			frame.soundbutton = soundbutton
-
-			local speaker = soundbutton:CreateTexture(nil, "BACKGROUND")
-				speaker:SetTexture("Interface\\Common\\VoiceChat-Speaker")
-				speaker:SetAllPoints(soundbutton)
-			frame.speaker = speaker
-			local speakeron = soundbutton:CreateTexture(nil, "HIGHLIGHT")
-				speakeron:SetTexture("Interface\\Common\\VoiceChat-On")
-				speakeron:SetAllPoints(soundbutton)
-			frame.speakeron = speakeron
-
-			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
-				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
-				text:SetPoint("BOTTOMRIGHT", soundbutton, "BOTTOMLEFT", -2, 0)
-				text:SetJustifyH("LEFT")
-				text:SetText("Test Test Test Test Test Test Test")
-			frame.text = text
-			frame.ReturnSelf = ReturnSelf
-		end
-		frame:Show()
-		return frame
-	end
-
-	local function OnAcquire(self)
-		self:SetHeight(44)
-		self:SetWidth(200)
-	end
-
-	local function OnRelease(self)
-		self:SetText("")
-		self:SetLabel("")
-		self:SetDisabled(false)
-
-		self.value = nil
-		self.list = nil
-		self.open = nil
-		self.hasClose = nil
-
-		self.frame:ClearAllPoints()
-		self.frame:Hide()
-	end
-
-	local function SetValue(self, value) -- Set the value to an item in the List.
-		if self.list then
-			self:SetText(value or "")
-		end
-		self.value = value
-	end
-
-	local function GetValue(self)
-		return self.value
-	end
-
-	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
-		self.list = list or Media:HashTable("sound")
-	end
-
-	local function SetText(self, text) -- Set the text displayed in the box.
-		self.frame.text:SetText(text or "")
-	end
-
-	local function SetLabel(self, text) -- Set the text for the label.
-		self.frame.label:SetText(text or "")
-	end
-
-	local function AddItem(self, key, value) -- Add an item to the list.
-		self.list = self.list or {}
-		self.list[key] = value
-	end
-	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
-
-	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
-	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
-	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
-
-	local function SetDisabled(self, disabled) -- Disable the widget.
-		self.disabled = disabled
-		if disabled then
-			self.frame:Disable()
-			self.speaker:SetDesaturated(true)
-			self.speakeron:SetDesaturated(true)
-		else
-			self.frame:Enable()
-			self.speaker:SetDesaturated(false)
-			self.speakeron:SetDesaturated(false)
-		end
-	end
-
-	local function textSort(a,b)
-		return string.upper(a) < string.upper(b)
-	end
-
-	local sortedlist = {}
-	local function ToggleDrop(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-			AceGUI:ClearFocus()
-		else
-			AceGUI:SetFocus(self)
-			self.dropdown = AGSMW:GetDropDownFrame()
-			local width = self.frame:GetWidth()
-			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
-			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
-			for k, v in pairs(self.list) do
-				sortedlist[#sortedlist+1] = k
-			end
-			table.sort(sortedlist, textSort)
-			for i, k in ipairs(sortedlist) do
-				local f = GetContentLine()
-				f.text:SetText(k)
-				if k == self.value then
-					f.check:Show()
-				end
-				f.obj = self
-				self.dropdown:AddFrame(f)
-			end
-			wipe(sortedlist)
-		end
-	end
-
-	local function ClearFocus(self)
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function OnHide(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function Drop_OnEnter(this)
-		this.obj:Fire("OnEnter")
-	end
-
-	local function Drop_OnLeave(this)
-		this.obj:Fire("OnLeave")
-	end
-
-	local function WidgetPlaySound(this)
-		local self = this.obj
-		local sound = self.frame.text:GetText()
-		PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound), "Master")
-	end
-
-	local function Constructor()
-		local frame = AGSMW:GetBaseFrame()
-		local self = {}
-
-		self.type = widgetType
-		self.frame = frame
-		frame.obj = self
-		frame.dropButton.obj = self
-		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
-		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
-		frame.dropButton:SetScript("OnClick",ToggleDrop)
-		frame:SetScript("OnHide", OnHide)
-
-
-		local soundbutton = CreateFrame("Button", nil, frame)
-			soundbutton:SetWidth(16)
-			soundbutton:SetHeight(16)
-			soundbutton:SetPoint("LEFT",frame.DLeft,"LEFT",26,1)
-			soundbutton:SetScript("OnClick", WidgetPlaySound)
-			soundbutton.obj = self
-		self.soundbutton = soundbutton
-		frame.text:SetPoint("LEFT",soundbutton,"RIGHT",2,0)
-
-
-		local speaker = soundbutton:CreateTexture(nil, "BACKGROUND")
-			speaker:SetTexture("Interface\\Common\\VoiceChat-Speaker")
-			speaker:SetAllPoints(soundbutton)
-		self.speaker = speaker
-		local speakeron = soundbutton:CreateTexture(nil, "HIGHLIGHT")
-			speakeron:SetTexture("Interface\\Common\\VoiceChat-On")
-			speakeron:SetAllPoints(soundbutton)
-		self.speakeron = speakeron
-
-		self.alignoffset = 31
-
-		self.OnRelease = OnRelease
-		self.OnAcquire = OnAcquire
-		self.ClearFocus = ClearFocus
-		self.SetText = SetText
-		self.SetValue = SetValue
-		self.GetValue = GetValue
-		self.SetList = SetList
-		self.SetLabel = SetLabel
-		self.SetDisabled = SetDisabled
-		self.AddItem = AddItem
-		self.SetMultiselect = SetMultiselect
-		self.GetMultiselect = GetMultiselect
-		self.SetItemValue = SetItemValue
-		self.SetItemDisabled = SetItemDisabled
-		self.ToggleDrop = ToggleDrop
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
-
-end
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
deleted file mode 100644
index 2d0e32c..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
+++ /dev/null
@@ -1,233 +0,0 @@
--- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
--- Widget created by Yssaril
-
-local AceGUI = LibStub("AceGUI-3.0")
-local Media = LibStub("LibSharedMedia-3.0")
-
-local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
-
-do
-	local widgetType = "LSM30_Statusbar"
-	local widgetVersion = 11
-
-	local contentFrameCache = {}
-	local function ReturnSelf(self)
-		self:ClearAllPoints()
-		self:Hide()
-		self.check:Hide()
-		table.insert(contentFrameCache, self)
-	end
-
-	local function ContentOnClick(this, button)
-		local self = this.obj
-		self:Fire("OnValueChanged", this.text:GetText())
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function GetContentLine()
-		local frame
-		if next(contentFrameCache) then
-			frame = table.remove(contentFrameCache)
-		else
-			frame = CreateFrame("Button", nil, UIParent)
-				--frame:SetWidth(200)
-				frame:SetHeight(18)
-				frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
-				frame:SetScript("OnClick", ContentOnClick)
-			local check = frame:CreateTexture("OVERLAY")
-				check:SetWidth(16)
-				check:SetHeight(16)
-				check:SetPoint("LEFT",frame,"LEFT",1,-1)
-				check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
-				check:Hide()
-			frame.check = check
-			local bar = frame:CreateTexture("ARTWORK")
-				bar:SetHeight(16)
-				bar:SetPoint("LEFT",check,"RIGHT",1,0)
-				bar:SetPoint("RIGHT",frame,"RIGHT",-1,0)
-			frame.bar = bar
-			local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
-
-				local font, size = text:GetFont()
-				text:SetFont(font,size,"OUTLINE")
-
-				text:SetPoint("TOPLEFT", check, "TOPRIGHT", 3, 0)
-				text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
-				text:SetJustifyH("LEFT")
-				text:SetText("Test Test Test Test Test Test Test")
-			frame.text = text
-			frame.ReturnSelf = ReturnSelf
-		end
-		frame:Show()
-		return frame
-	end
-
-	local function OnAcquire(self)
-		self:SetHeight(44)
-		self:SetWidth(200)
-	end
-
-	local function OnRelease(self)
-		self:SetText("")
-		self:SetLabel("")
-		self:SetDisabled(false)
-
-		self.value = nil
-		self.list = nil
-		self.open = nil
-		self.hasClose = nil
-
-		self.frame:ClearAllPoints()
-		self.frame:Hide()
-	end
-
-	local function SetValue(self, value) -- Set the value to an item in the List.
-		if self.list then
-			self:SetText(value or "")
-		end
-		self.value = value
-	end
-
-	local function GetValue(self)
-		return self.value
-	end
-
-	local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
-		self.list = list or Media:HashTable("statusbar")
-	end
-
-
-	local function SetText(self, text) -- Set the text displayed in the box.
-		self.frame.text:SetText(text or "")
-		local statusbar = self.list[text] ~= text and self.list[text] or Media:Fetch('statusbar',text)
-		self.bar:SetTexture(statusbar)
-	end
-
-	local function SetLabel(self, text) -- Set the text for the label.
-		self.frame.label:SetText(text or "")
-	end
-
-	local function AddItem(self, key, value) -- Add an item to the list.
-		self.list = self.list or {}
-		self.list[key] = value
-	end
-	local SetItemValue = AddItem -- Set the value of a item in the list. <<same as adding a new item>>
-
-	local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <<Dummy function to stay inline with the dropdown API>>
-	local function GetMultiselect() return false end-- Query the multi-select flag. <<Dummy function to stay inline with the dropdown API>>
-	local function SetItemDisabled(self, key) end-- Disable one item in the list. <<Dummy function to stay inline with the dropdown API>>
-
-	local function SetDisabled(self, disabled) -- Disable the widget.
-		self.disabled = disabled
-		if disabled then
-			self.frame:Disable()
-		else
-			self.frame:Enable()
-		end
-	end
-
-	local function textSort(a,b)
-		return string.upper(a) < string.upper(b)
-	end
-
-	local sortedlist = {}
-	local function ToggleDrop(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-			AceGUI:ClearFocus()
-		else
-			AceGUI:SetFocus(self)
-			self.dropdown = AGSMW:GetDropDownFrame()
-			local width = self.frame:GetWidth()
-			self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
-			self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
-			for k, v in pairs(self.list) do
-				sortedlist[#sortedlist+1] = k
-			end
-			table.sort(sortedlist, textSort)
-			for i, k in ipairs(sortedlist) do
-				local f = GetContentLine()
-				f.text:SetText(k)
-				--print(k)
-				if k == self.value then
-					f.check:Show()
-				end
-
-				local statusbar = self.list[k] ~= k and self.list[k] or Media:Fetch('statusbar',k)
-				f.bar:SetTexture(statusbar)
-				f.obj = self
-				f.dropdown = self.dropdown
-				self.dropdown:AddFrame(f)
-			end
-			wipe(sortedlist)
-		end
-	end
-
-	local function ClearFocus(self)
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function OnHide(this)
-		local self = this.obj
-		if self.dropdown then
-			self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
-		end
-	end
-
-	local function Drop_OnEnter(this)
-		this.obj:Fire("OnEnter")
-	end
-
-	local function Drop_OnLeave(this)
-		this.obj:Fire("OnLeave")
-	end
-
-	local function Constructor()
-		local frame = AGSMW:GetBaseFrame()
-		local self = {}
-
-		self.type = widgetType
-		self.frame = frame
-		frame.obj = self
-		frame.dropButton.obj = self
-		frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
-		frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
-		frame.dropButton:SetScript("OnClick",ToggleDrop)
-		frame:SetScript("OnHide", OnHide)
-
-		local bar = frame:CreateTexture(nil, "OVERLAY")
-			bar:SetPoint("TOPLEFT", frame,"TOPLEFT",6,-25)
-			bar:SetPoint("BOTTOMRIGHT", frame,"BOTTOMRIGHT", -21, 5)
-			bar:SetAlpha(0.5)
-		self.bar = bar
-
-		self.alignoffset = 31
-
-		self.OnRelease = OnRelease
-		self.OnAcquire = OnAcquire
-		self.ClearFocus = ClearFocus
-		self.SetText = SetText
-		self.SetValue = SetValue
-		self.GetValue = GetValue
-		self.SetList = SetList
-		self.SetLabel = SetLabel
-		self.SetDisabled = SetDisabled
-		self.AddItem = AddItem
-		self.SetMultiselect = SetMultiselect
-		self.GetMultiselect = GetMultiselect
-		self.SetItemValue = SetItemValue
-		self.SetItemDisabled = SetItemDisabled
-		self.ToggleDrop = ToggleDrop
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
-
-end
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
deleted file mode 100644
index 1af9928..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
+++ /dev/null
@@ -1,274 +0,0 @@
--- Widget created by Yssaril
---[===[@debug@
-local DataVersion = 9001 -- dev version always overwrites everything else :)
---@end-debug@]===]
---@non-debug@
-local DataVersion = 53
---@end-non-debug@
-local AGSMW = LibStub:NewLibrary("AceGUISharedMediaWidgets-1.0", DataVersion)
-
-if not AGSMW then
-  return	-- already loaded and no upgrade necessary
-end
-
-LoadAddOn("LibSharedMedia-3.0")
-local AceGUI = LibStub("AceGUI-3.0")
-local Media = LibStub("LibSharedMedia-3.0")
-
-AGSMW = AGSMW or {}
-
-AceGUIWidgetLSMlists = {
-	['font'] = Media:HashTable("font"),
-	['sound'] = Media:HashTable("sound"),
-	['statusbar'] = Media:HashTable("statusbar"),
-	['border'] = Media:HashTable("border"),
-	['background'] = Media:HashTable("background"),
-}
-
-do
-	local function disable(frame)
-		frame.label:SetTextColor(.5,.5,.5)
-		frame.text:SetTextColor(.5,.5,.5)
-		frame.dropButton:Disable()
-		if frame.displayButtonFont then
-			frame.displayButtonFont:SetTextColor(.5,.5,.5)
-			frame.displayButton:Disable()
-		end
-	end
-
-	local function enable(frame)
-		frame.label:SetTextColor(1,.82,0)
-		frame.text:SetTextColor(1,1,1)
-		frame.dropButton:Enable()
-		if frame.displayButtonFont then
-			frame.displayButtonFont:SetTextColor(1,1,1)
-			frame.displayButton:Enable()
-		end
-	end
-
-	local displayButtonBackdrop = {
-		edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
-		tile = true, tileSize = 16, edgeSize = 16,
-		insets = { left = 4, right = 4, top = 4, bottom = 4 },
-	}
-
-	-- create or retrieve BaseFrame
-	function AGSMW:GetBaseFrame()
-		local frame = CreateFrame("Frame", nil, UIParent)
-		frame:SetHeight(44)
-		frame:SetWidth(200)
-
-		local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
-			label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
-			label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
-			label:SetJustifyH("LEFT")
-			label:SetHeight(18)
-			label:SetText("")
-		frame.label = label
-
-		local DLeft = frame:CreateTexture(nil, "ARTWORK")
-			DLeft:SetWidth(25)
-			DLeft:SetHeight(64)
-			DLeft:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", -17, -21)
-			DLeft:SetTexture([[Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame]])
-			DLeft:SetTexCoord(0, 0.1953125, 0, 1)
-		frame.DLeft = DLeft
-
-		local DRight = frame:CreateTexture(nil, "ARTWORK")
-			DRight:SetWidth(25)
-			DRight:SetHeight(64)
-			DRight:SetPoint("TOP", DLeft, "TOP")
-			DRight:SetPoint("RIGHT", frame, "RIGHT", 17, 0)
-			DRight:SetTexture([[Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame]])
-			DRight:SetTexCoord(0.8046875, 1, 0, 1)
-		frame.DRight = DRight
-
-		local DMiddle = frame:CreateTexture(nil, "ARTWORK")
-			DMiddle:SetHeight(64)
-			DMiddle:SetPoint("TOP", DLeft, "TOP")
-			DMiddle:SetPoint("LEFT", DLeft, "RIGHT")
-			DMiddle:SetPoint("RIGHT", DRight, "LEFT")
-			DMiddle:SetTexture([[Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame]])
-			DMiddle:SetTexCoord(0.1953125, 0.8046875, 0, 1)
-		frame.DMiddle = DMiddle
-
-		local text = frame:CreateFontString(nil,"OVERLAY","GameFontHighlightSmall")
-			text:SetPoint("RIGHT",DRight,"RIGHT",-43,1)
-			text:SetPoint("LEFT",DLeft,"LEFT",26,1)
-			text:SetJustifyH("RIGHT")
-			text:SetHeight(18)
-			text:SetText("")
-		frame.text = text
-
-		local dropButton = CreateFrame("Button", nil, frame)
-			dropButton:SetWidth(24)
-			dropButton:SetHeight(24)
-			dropButton:SetPoint("TOPRIGHT", DRight, "TOPRIGHT", -16, -18)
-			dropButton:SetNormalTexture([[Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up]])
-			dropButton:SetPushedTexture([[Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down]])
-			dropButton:SetDisabledTexture([[Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled]])
-			dropButton:SetHighlightTexture([[Interface\Buttons\UI-Common-MouseHilight]], "ADD")
-		frame.dropButton = dropButton
-
-		frame.Disable = disable
-		frame.Enable = enable
-		return frame
-	end
-
-	function AGSMW:GetBaseFrameWithWindow()
-		local frame = self:GetBaseFrame()
-
-		local displayButton = CreateFrame("Button", nil, frame)
-			displayButton:SetHeight(42)
-			displayButton:SetWidth(42)
-			displayButton:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -2)
-			displayButton:SetBackdrop(displayButtonBackdrop)
-			displayButton:SetBackdropBorderColor(.5, .5, .5)
-		frame.displayButton = displayButton
-
-		frame.label:SetPoint("TOPLEFT",displayButton,"TOPRIGHT",1,2)
-
-		frame.DLeft:SetPoint("BOTTOMLEFT", displayButton, "BOTTOMRIGHT", -17, -20)
-
-		return frame
-	end
-
-end
-
-do
-
-	local sliderBackdrop = {
-		["bgFile"] = [[Interface\Buttons\UI-SliderBar-Background]],
-		["edgeFile"] = [[Interface\Buttons\UI-SliderBar-Border]],
-		["tile"] = true,
-		["edgeSize"] = 8,
-		["tileSize"] = 8,
-		["insets"] = {
-			["left"] = 3,
-			["right"] = 3,
-			["top"] = 3,
-			["bottom"] = 3,
-		},
-	}
-	local frameBackdrop = {
-		bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
-		edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]],
-		tile = true, tileSize = 32, edgeSize = 32,
-		insets = { left = 11, right = 12, top = 12, bottom = 9 },
-	}
-
-	local function OnMouseWheel(self, dir)
-		self.slider:SetValue(self.slider:GetValue()+(15*dir*-1))
-	end
-
-	local function AddFrame(self, frame)
-		frame:SetParent(self.contentframe)
-		frame:SetFrameStrata(self:GetFrameStrata())
-		frame:SetFrameLevel(self:GetFrameLevel() + 100)
-
-		if next(self.contentRepo) then
-			frame:SetPoint("TOPLEFT", self.contentRepo[#self.contentRepo], "BOTTOMLEFT", 0, 0)
-			frame:SetPoint("RIGHT", self.contentframe, "RIGHT", 0, 0)
-			self.contentframe:SetHeight(self.contentframe:GetHeight() + frame:GetHeight())
-			self.contentRepo[#self.contentRepo+1] = frame
-		else
-			self.contentframe:SetHeight(frame:GetHeight())
-			frame:SetPoint("TOPLEFT", self.contentframe, "TOPLEFT", 0, 0)
-			frame:SetPoint("RIGHT", self.contentframe, "RIGHT", 0, 0)
-			self.contentRepo[1] = frame
-		end
-
-		if self.contentframe:GetHeight() > UIParent:GetHeight()*2/5 - 20 then
-			self.scrollframe:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -28, 12)
-			self:SetHeight(UIParent:GetHeight()*2/5)
-			self.slider:Show()
-			self:SetScript("OnMouseWheel", OnMouseWheel)
-			self.scrollframe:UpdateScrollChildRect()
-			self.slider:SetMinMaxValues(0, self.contentframe:GetHeight()-self.scrollframe:GetHeight())
-		else
-			self.scrollframe:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -14, 12)
-			self:SetHeight(self.contentframe:GetHeight()+25)
-			self.slider:Hide()
-			self:SetScript("OnMouseWheel", nil)
-			self.scrollframe:UpdateScrollChildRect()
-			self.slider:SetMinMaxValues(0, 0)
-		end
-		self.contentframe:SetWidth(self.scrollframe:GetWidth())
-	end
-
-	local function ClearFrames(self)
-		for i, frame in ipairs(self.contentRepo) do
-			frame:ReturnSelf()
-			self.contentRepo[i] = nil
-		end
-	end
-
-	local function slider_OnValueChanged(self, value)
-		self.frame.scrollframe:SetVerticalScroll(value)
-	end
-
-	local DropDownCache = {}
-	function AGSMW:GetDropDownFrame()
-		local frame
-		if next(DropDownCache) then
-			frame = table.remove(DropDownCache)
-		else
-			frame = CreateFrame("Frame", nil, UIParent)
-				frame:SetClampedToScreen(true)
-				frame:SetWidth(188)
-				frame:SetBackdrop(frameBackdrop)
-				frame:SetFrameStrata("TOOLTIP")
-				frame:EnableMouseWheel(true)
-
-			local contentframe = CreateFrame("Frame", nil, frame)
-				contentframe:SetWidth(160)
-				contentframe:SetHeight(0)
-			frame.contentframe = contentframe
-
-			local scrollframe = CreateFrame("ScrollFrame", nil, frame)
-				scrollframe:SetWidth(160)
-				scrollframe:SetPoint("TOPLEFT", frame, "TOPLEFT", 14, -13)
-				scrollframe:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -14, 12)
-				scrollframe:SetScrollChild(contentframe)
-			frame.scrollframe = scrollframe
-
-			contentframe:SetPoint("TOPLEFT", scrollframe)
-			contentframe:SetPoint("TOPRIGHT", scrollframe)
-
-			local bgTex = frame:CreateTexture(nil, "ARTWORK")
-				bgTex:SetAllPoints(scrollframe)
-			frame.bgTex = bgTex
-
-			frame.AddFrame = AddFrame
-			frame.ClearFrames = ClearFrames
-			frame.contentRepo = {} -- store all our frames in here so we can get rid of them later
-
-			local slider = CreateFrame("Slider", nil, scrollframe)
-				slider:SetOrientation("VERTICAL")
-				slider:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -14, -10)
-				slider:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -14, 10)
-				slider:SetBackdrop(sliderBackdrop)
-				slider:SetThumbTexture([[Interface\Buttons\UI-SliderBar-Button-Vertical]])
-				slider:SetMinMaxValues(0, 1)
-				--slider:SetValueStep(1)
-				slider:SetWidth(12)
-				slider.frame = frame
-				slider:SetScript("OnValueChanged", slider_OnValueChanged)
-			frame.slider = slider
-		end
-		frame:SetHeight(UIParent:GetHeight()*2/5)
-		frame.slider:SetValue(0)
-		frame:Show()
-		return frame
-	end
-
-	function AGSMW:ReturnDropDownFrame(frame)
-		ClearFrames(frame)
-		frame:ClearAllPoints()
-		frame:Hide()
-		frame:SetBackdrop(frameBackdrop)
-		frame.bgTex:SetTexture(nil)
-		table.insert(DropDownCache, frame)
-		return nil
-	end
-end
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml b/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml
deleted file mode 100644
index 15cd102..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/AceGUI-3.0-SharedMediaWidgets/widget.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="prototypes.lua" />
-	<Script file="FontWidget.lua" />
-	<Script file="SoundWidget.lua" />
-	<Script file="StatusbarWidget.lua" />
-	<Script file="BorderWidget.lua" />
-	<Script file="BackgroundWidget.lua" />
-</Ui>
\ No newline at end of file
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt b/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt
deleted file mode 100644
index 2163c0d..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r48-release.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-------------------------------------------------------------------------
-r48 | funkydude | 2013-05-26 11:10:27 +0000 (Sun, 26 May 2013) | 1 line
-Changed paths:
-   A /tags/r48-release (from /trunk:47)
-
-Tagging as r48-release
-------------------------------------------------------------------------
-r47 | funkydude | 2013-05-26 11:09:17 +0000 (Sun, 26 May 2013) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0-SharedMediaWidgets.toc
-
-bump toc
-------------------------------------------------------------------------
-r46 | Phanx | 2013-01-02 06:47:48 +0000 (Wed, 02 Jan 2013) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
-
-Fixed an anchoring issue that could prevent interaction with menu buttons.
-------------------------------------------------------------------------
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt b/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt
deleted file mode 100644
index 91e3976..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-r53.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-------------------------------------------------------------------------
-r53 | nevcairiel | 2016-06-03 06:51:46 +0000 (Fri, 03 Jun 2016) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
-
-Remove SetPoint to UIParent, AceGUI-3.0 will properly position the element when its used
-------------------------------------------------------------------------
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt b/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt
deleted file mode 100644
index eeb78d0..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/Changelog-AceGUI-3.0-SharedMediaWidgets-v3.3.2.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-------------------------------------------------------------------------
-r19 | yssaril | 2009-12-05 07:44:46 +0000 (Sat, 05 Dec 2009) | 1 line
-Changed paths:
-   A /tags/v3.3.2 (from /trunk:18)
-
-Tagging as v3.3.2
-------------------------------------------------------------------------
-r18 | yssaril | 2009-12-05 07:43:22 +0000 (Sat, 05 Dec 2009) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
-   M /trunk/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
-   M /trunk/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
-   M /trunk/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
-   M /trunk/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
-
-fix dropdowns not clearing properly
-------------------------------------------------------------------------
diff --git a/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml b/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
deleted file mode 100644
index dd3eb2b..0000000
--- a/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Include file="AceGUI-3.0-SharedMediaWidgets\widget.xml" />
-</Ui>
\ No newline at end of file
diff --git a/Libs/AceGUI-3.0/AceGUI-3.0.lua b/Libs/AceGUI-3.0/AceGUI-3.0.lua
deleted file mode 100644
index 08904e4..0000000
--- a/Libs/AceGUI-3.0/AceGUI-3.0.lua
+++ /dev/null
@@ -1,1031 +0,0 @@
---- **AceGUI-3.0** provides access to numerous widgets which can be used to create GUIs.
--- AceGUI is used by AceConfigDialog to create the option GUIs, but you can use it by itself
--- to create any custom GUI. There are more extensive examples in the test suite in the Ace3
--- stand-alone distribution.
---
--- **Note**: When using AceGUI-3.0 directly, please do not modify the frames of the widgets directly,
--- as any "unknown" change to the widgets will cause addons that get your widget out of the widget pool
--- to misbehave. If you think some part of a widget should be modifiable, please open a ticket, and we"ll
--- implement a proper API to modify it.
--- @usage
--- local AceGUI = LibStub("AceGUI-3.0")
--- -- Create a container frame
--- local f = AceGUI:Create("Frame")
--- f:SetCallback("OnClose",function(widget) AceGUI:Release(widget) end)
--- f:SetTitle("AceGUI-3.0 Example")
--- f:SetStatusText("Status Bar")
--- f:SetLayout("Flow")
--- -- Create a button
--- local btn = AceGUI:Create("Button")
--- btn:SetWidth(170)
--- btn:SetText("Button !")
--- btn:SetCallback("OnClick", function() print("Click!") end)
--- -- Add the button to the container
--- f:AddChild(btn)
--- @class file
--- @name AceGUI-3.0
--- @release $Id: AceGUI-3.0.lua 1177 2018-06-25 12:12:48Z nevcairiel $
-local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 36
-local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
-
-if not AceGUI then return end -- No upgrade needed
-
--- Lua APIs
-local tconcat, tremove, tinsert = table.concat, table.remove, table.insert
-local select, pairs, next, type = select, pairs, next, type
-local error, assert, loadstring = error, assert, loadstring
-local setmetatable, rawget, rawset = setmetatable, rawget, rawset
-local math_max = math.max
-
--- WoW APIs
-local UIParent = UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: geterrorhandler, LibStub
-
---local con = LibStub("AceConsole-3.0",true)
-
-AceGUI.WidgetRegistry = AceGUI.WidgetRegistry or {}
-AceGUI.LayoutRegistry = AceGUI.LayoutRegistry or {}
-AceGUI.WidgetBase = AceGUI.WidgetBase or {}
-AceGUI.WidgetContainerBase = AceGUI.WidgetContainerBase or {}
-AceGUI.WidgetVersions = AceGUI.WidgetVersions or {}
-
--- local upvalues
-local WidgetRegistry = AceGUI.WidgetRegistry
-local LayoutRegistry = AceGUI.LayoutRegistry
-local WidgetVersions = AceGUI.WidgetVersions
-
---[[
-	 xpcall safecall implementation
-]]
-local xpcall = xpcall
-
-local function errorhandler(err)
-	return geterrorhandler()(err)
-end
-
-local function CreateDispatcher(argCount)
-	local code = [[
-		local xpcall, eh = ...
-		local method, ARGS
-		local function call() return method(ARGS) end
-
-		local function dispatch(func, ...)
-			method = func
-			if not method then return end
-			ARGS = ...
-			return xpcall(call, eh)
-		end
-
-		return dispatch
-	]]
-
-	local ARGS = {}
-	for i = 1, argCount do ARGS[i] = "arg"..i end
-	code = code:gsub("ARGS", tconcat(ARGS, ", "))
-	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
-end
-
-local Dispatchers = setmetatable({}, {__index=function(self, argCount)
-	local dispatcher = CreateDispatcher(argCount)
-	rawset(self, argCount, dispatcher)
-	return dispatcher
-end})
-Dispatchers[0] = function(func)
-	return xpcall(func, errorhandler)
-end
-
-local function safecall(func, ...)
-	return Dispatchers[select("#", ...)](func, ...)
-end
-
--- Recycling functions
-local newWidget, delWidget
-do
-	-- Version Upgrade in Minor 29
-	-- Internal Storage of the objects changed, from an array table
-	-- to a hash table, and additionally we introduced versioning on
-	-- the widgets which would discard all widgets from a pre-29 version
-	-- anyway, so we just clear the storage now, and don't try to
-	-- convert the storage tables to the new format.
-	-- This should generally not cause *many* widgets to end up in trash,
-	-- since once dialogs are opened, all addons should be loaded already
-	-- and AceGUI should be on the latest version available on the users
-	-- setup.
-	-- -- nevcairiel - Nov 2nd, 2009
-	if oldminor and oldminor < 29 and AceGUI.objPools then
-		AceGUI.objPools = nil
-	end
-
-	AceGUI.objPools = AceGUI.objPools or {}
-	local objPools = AceGUI.objPools
-	--Returns a new instance, if none are available either returns a new table or calls the given contructor
-	function newWidget(type)
-		if not WidgetRegistry[type] then
-			error("Attempt to instantiate unknown widget type", 2)
-		end
-
-		if not objPools[type] then
-			objPools[type] = {}
-		end
-
-		local newObj = next(objPools[type])
-		if not newObj then
-			newObj = WidgetRegistry[type]()
-			newObj.AceGUIWidgetVersion = WidgetVersions[type]
-		else
-			objPools[type][newObj] = nil
-			-- if the widget is older then the latest, don't even try to reuse it
-			-- just forget about it, and grab a new one.
-			if not newObj.AceGUIWidgetVersion or newObj.AceGUIWidgetVersion < WidgetVersions[type] then
-				return newWidget(type)
-			end
-		end
-		return newObj
-	end
-	-- Releases an instance to the Pool
-	function delWidget(obj,type)
-		if not objPools[type] then
-			objPools[type] = {}
-		end
-		if objPools[type][obj] then
-			error("Attempt to Release Widget that is already released", 2)
-		end
-		objPools[type][obj] = true
-	end
-end
-
-
--------------------
--- API Functions --
--------------------
-
--- Gets a widget Object
-
---- Create a new Widget of the given type.
--- This function will instantiate a new widget (or use one from the widget pool), and call the
--- OnAcquire function on it, before returning.
--- @param type The type of the widget.
--- @return The newly created widget.
-function AceGUI:Create(type)
-	if WidgetRegistry[type] then
-		local widget = newWidget(type)
-
-		if rawget(widget, "Acquire") then
-			widget.OnAcquire = widget.Acquire
-			widget.Acquire = nil
-		elseif rawget(widget, "Aquire") then
-			widget.OnAcquire = widget.Aquire
-			widget.Aquire = nil
-		end
-
-		if rawget(widget, "Release") then
-			widget.OnRelease = rawget(widget, "Release")
-			widget.Release = nil
-		end
-
-		if widget.OnAcquire then
-			widget:OnAcquire()
-		else
-			error(("Widget type %s doesn't supply an OnAcquire Function"):format(type))
-		end
-		-- Set the default Layout ("List")
-		safecall(widget.SetLayout, widget, "List")
-		safecall(widget.ResumeLayout, widget)
-		return widget
-	end
-end
-
---- Releases a widget Object.
--- This function calls OnRelease on the widget and places it back in the widget pool.
--- Any data on the widget is being erased, and the widget will be hidden.\\
--- If this widget is a Container-Widget, all of its Child-Widgets will be releases as well.
--- @param widget The widget to release
-function AceGUI:Release(widget)
-	safecall(widget.PauseLayout, widget)
-	widget:Fire("OnRelease")
-	safecall(widget.ReleaseChildren, widget)
-
-	if widget.OnRelease then
-		widget:OnRelease()
---	else
---		error(("Widget type %s doesn't supply an OnRelease Function"):format(widget.type))
-	end
-	for k in pairs(widget.userdata) do
-		widget.userdata[k] = nil
-	end
-	for k in pairs(widget.events) do
-		widget.events[k] = nil
-	end
-	widget.width = nil
-	widget.relWidth = nil
-	widget.height = nil
-	widget.relHeight = nil
-	widget.noAutoHeight = nil
-	widget.frame:ClearAllPoints()
-	widget.frame:Hide()
-	widget.frame:SetParent(UIParent)
-	widget.frame.width = nil
-	widget.frame.height = nil
-	if widget.content then
-		widget.content.width = nil
-		widget.content.height = nil
-	end
-	delWidget(widget, widget.type)
-end
-
------------
--- Focus --
------------
-
-
---- Called when a widget has taken focus.
--- e.g. Dropdowns opening, Editboxes gaining kb focus
--- @param widget The widget that should be focused
-function AceGUI:SetFocus(widget)
-	if self.FocusedWidget and self.FocusedWidget ~= widget then
-		safecall(self.FocusedWidget.ClearFocus, self.FocusedWidget)
-	end
-	self.FocusedWidget = widget
-end
-
-
---- Called when something has happened that could cause widgets with focus to drop it
--- e.g. titlebar of a frame being clicked
-function AceGUI:ClearFocus()
-	if self.FocusedWidget then
-		safecall(self.FocusedWidget.ClearFocus, self.FocusedWidget)
-		self.FocusedWidget = nil
-	end
-end
-
--------------
--- Widgets --
--------------
---[[
-	Widgets must provide the following functions
-		OnAcquire() - Called when the object is acquired, should set everything to a default hidden state
-
-	And the following members
-		frame - the frame or derivitive object that will be treated as the widget for size and anchoring purposes
-		type - the type of the object, same as the name given to :RegisterWidget()
-
-	Widgets contain a table called userdata, this is a safe place to store data associated with the wigdet
-	It will be cleared automatically when a widget is released
-	Placing values directly into a widget object should be avoided
-
-	If the Widget can act as a container for other Widgets the following
-		content - frame or derivitive that children will be anchored to
-
-	The Widget can supply the following Optional Members
-		:OnRelease() - Called when the object is Released, should remove any additional anchors and clear any data
-		:OnWidthSet(width) - Called when the width of the widget is changed
-		:OnHeightSet(height) - Called when the height of the widget is changed
-			Widgets should not use the OnSizeChanged events of thier frame or content members, use these methods instead
-			AceGUI already sets a handler to the event
-		:LayoutFinished(width, height) - called after a layout has finished, the width and height will be the width and height of the
-			area used for controls. These can be nil if the layout used the existing size to layout the controls.
-
-]]
-
---------------------------
--- Widget Base Template --
---------------------------
-do
-	local WidgetBase = AceGUI.WidgetBase
-
-	WidgetBase.SetParent = function(self, parent)
-		local frame = self.frame
-		frame:SetParent(nil)
-		frame:SetParent(parent.content)
-		self.parent = parent
-	end
-
-	WidgetBase.SetCallback = function(self, name, func)
-		if type(func) == "function" then
-			self.events[name] = func
-		end
-	end
-
-	WidgetBase.Fire = function(self, name, ...)
-		if self.events[name] then
-			local success, ret = safecall(self.events[name], self, name, ...)
-			if success then
-				return ret
-			end
-		end
-	end
-
-	WidgetBase.SetWidth = function(self, width)
-		self.frame:SetWidth(width)
-		self.frame.width = width
-		if self.OnWidthSet then
-			self:OnWidthSet(width)
-		end
-	end
-
-	WidgetBase.SetRelativeWidth = function(self, width)
-		if width <= 0 or width > 1 then
-			error(":SetRelativeWidth(width): Invalid relative width.", 2)
-		end
-		self.relWidth = width
-		self.width = "relative"
-	end
-
-	WidgetBase.SetHeight = function(self, height)
-		self.frame:SetHeight(height)
-		self.frame.height = height
-		if self.OnHeightSet then
-			self:OnHeightSet(height)
-		end
-	end
-
-	--[[ WidgetBase.SetRelativeHeight = function(self, height)
-		if height <= 0 or height > 1 then
-			error(":SetRelativeHeight(height): Invalid relative height.", 2)
-		end
-		self.relHeight = height
-		self.height = "relative"
-	end ]]
-
-	WidgetBase.IsVisible = function(self)
-		return self.frame:IsVisible()
-	end
-
-	WidgetBase.IsShown= function(self)
-		return self.frame:IsShown()
-	end
-
-	WidgetBase.Release = function(self)
-		AceGUI:Release(self)
-	end
-
-	WidgetBase.SetPoint = function(self, ...)
-		return self.frame:SetPoint(...)
-	end
-
-	WidgetBase.ClearAllPoints = function(self)
-		return self.frame:ClearAllPoints()
-	end
-
-	WidgetBase.GetNumPoints = function(self)
-		return self.frame:GetNumPoints()
-	end
-
-	WidgetBase.GetPoint = function(self, ...)
-		return self.frame:GetPoint(...)
-	end
-
-	WidgetBase.GetUserDataTable = function(self)
-		return self.userdata
-	end
-
-	WidgetBase.SetUserData = function(self, key, value)
-		self.userdata[key] = value
-	end
-
-	WidgetBase.GetUserData = function(self, key)
-		return self.userdata[key]
-	end
-
-	WidgetBase.IsFullHeight = function(self)
-		return self.height == "fill"
-	end
-
-	WidgetBase.SetFullHeight = function(self, isFull)
-		if isFull then
-			self.height = "fill"
-		else
-			self.height = nil
-		end
-	end
-
-	WidgetBase.IsFullWidth = function(self)
-		return self.width == "fill"
-	end
-
-	WidgetBase.SetFullWidth = function(self, isFull)
-		if isFull then
-			self.width = "fill"
-		else
-			self.width = nil
-		end
-	end
-
---	local function LayoutOnUpdate(this)
---		this:SetScript("OnUpdate",nil)
---		this.obj:PerformLayout()
---	end
-
-	local WidgetContainerBase = AceGUI.WidgetContainerBase
-
-	WidgetContainerBase.PauseLayout = function(self)
-		self.LayoutPaused = true
-	end
-
-	WidgetContainerBase.ResumeLayout = function(self)
-		self.LayoutPaused = nil
-	end
-
-	WidgetContainerBase.PerformLayout = function(self)
-		if self.LayoutPaused then
-			return
-		end
-		safecall(self.LayoutFunc, self.content, self.children)
-	end
-
-	--call this function to layout, makes sure layed out objects get a frame to get sizes etc
-	WidgetContainerBase.DoLayout = function(self)
-		self:PerformLayout()
---		if not self.parent then
---			self.frame:SetScript("OnUpdate", LayoutOnUpdate)
---		end
-	end
-
-	WidgetContainerBase.AddChild = function(self, child, beforeWidget)
-		if beforeWidget then
-			local siblingIndex = 1
-			for _, widget in pairs(self.children) do
-				if widget == beforeWidget then
-					break
-				end
-				siblingIndex = siblingIndex + 1
-			end
-			tinsert(self.children, siblingIndex, child)
-		else
-			tinsert(self.children, child)
-		end
-		child:SetParent(self)
-		child.frame:Show()
-		self:DoLayout()
-	end
-
-	WidgetContainerBase.AddChildren = function(self, ...)
-		for i = 1, select("#", ...) do
-			local child = select(i, ...)
-			tinsert(self.children, child)
-			child:SetParent(self)
-			child.frame:Show()
-		end
-		self:DoLayout()
-	end
-
-	WidgetContainerBase.ReleaseChildren = function(self)
-		local children = self.children
-		for i = 1,#children do
-			AceGUI:Release(children[i])
-			children[i] = nil
-		end
-	end
-
-	WidgetContainerBase.SetLayout = function(self, Layout)
-		self.LayoutFunc = AceGUI:GetLayout(Layout)
-	end
-
-	WidgetContainerBase.SetAutoAdjustHeight = function(self, adjust)
-		if adjust then
-			self.noAutoHeight = nil
-		else
-			self.noAutoHeight = true
-		end
-	end
-
-	local function FrameResize(this)
-		local self = this.obj
-		if this:GetWidth() and this:GetHeight() then
-			if self.OnWidthSet then
-				self:OnWidthSet(this:GetWidth())
-			end
-			if self.OnHeightSet then
-				self:OnHeightSet(this:GetHeight())
-			end
-		end
-	end
-
-	local function ContentResize(this)
-		if this:GetWidth() and this:GetHeight() then
-			this.width = this:GetWidth()
-			this.height = this:GetHeight()
-			this.obj:DoLayout()
-		end
-	end
-
-	setmetatable(WidgetContainerBase, {__index=WidgetBase})
-
-	--One of these function should be called on each Widget Instance as part of its creation process
-
-	--- Register a widget-class as a container for newly created widgets.
-	-- @param widget The widget class
-	function AceGUI:RegisterAsContainer(widget)
-		widget.children = {}
-		widget.userdata = {}
-		widget.events = {}
-		widget.base = WidgetContainerBase
-		widget.content.obj = widget
-		widget.frame.obj = widget
-		widget.content:SetScript("OnSizeChanged", ContentResize)
-		widget.frame:SetScript("OnSizeChanged", FrameResize)
-		setmetatable(widget, {__index = WidgetContainerBase})
-		widget:SetLayout("List")
-		return widget
-	end
-
-	--- Register a widget-class as a widget.
-	-- @param widget The widget class
-	function AceGUI:RegisterAsWidget(widget)
-		widget.userdata = {}
-		widget.events = {}
-		widget.base = WidgetBase
-		widget.frame.obj = widget
-		widget.frame:SetScript("OnSizeChanged", FrameResize)
-		setmetatable(widget, {__index = WidgetBase})
-		return widget
-	end
-end
-
-
-
-
-------------------
--- Widget API   --
-------------------
-
---- Registers a widget Constructor, this function returns a new instance of the Widget
--- @param Name The name of the widget
--- @param Constructor The widget constructor function
--- @param Version The version of the widget
-function AceGUI:RegisterWidgetType(Name, Constructor, Version)
-	assert(type(Constructor) == "function")
-	assert(type(Version) == "number")
-
-	local oldVersion = WidgetVersions[Name]
-	if oldVersion and oldVersion >= Version then return end
-
-	WidgetVersions[Name] = Version
-	WidgetRegistry[Name] = Constructor
-end
-
---- Registers a Layout Function
--- @param Name The name of the layout
--- @param LayoutFunc Reference to the layout function
-function AceGUI:RegisterLayout(Name, LayoutFunc)
-	assert(type(LayoutFunc) == "function")
-	if type(Name) == "string" then
-		Name = Name:upper()
-	end
-	LayoutRegistry[Name] = LayoutFunc
-end
-
---- Get a Layout Function from the registry
--- @param Name The name of the layout
-function AceGUI:GetLayout(Name)
-	if type(Name) == "string" then
-		Name = Name:upper()
-	end
-	return LayoutRegistry[Name]
-end
-
-AceGUI.counts = AceGUI.counts or {}
-
---- A type-based counter to count the number of widgets created.
--- This is used by widgets that require a named frame, e.g. when a Blizzard
--- Template requires it.
--- @param type The widget type
-function AceGUI:GetNextWidgetNum(type)
-	if not self.counts[type] then
-		self.counts[type] = 0
-	end
-	self.counts[type] = self.counts[type] + 1
-	return self.counts[type]
-end
-
---- Return the number of created widgets for this type.
--- In contrast to GetNextWidgetNum, the number is not incremented.
--- @param type The widget type
-function AceGUI:GetWidgetCount(type)
-	return self.counts[type] or 0
-end
-
---- Return the version of the currently registered widget type.
--- @param type The widget type
-function AceGUI:GetWidgetVersion(type)
-	return WidgetVersions[type]
-end
-
--------------
--- Layouts --
--------------
-
---[[
-	A Layout is a func that takes 2 parameters
-		content - the frame that widgets will be placed inside
-		children - a table containing the widgets to layout
-]]
-
--- Very simple Layout, Children are stacked on top of each other down the left side
-AceGUI:RegisterLayout("List",
-	function(content, children)
-		local height = 0
-		local width = content.width or content:GetWidth() or 0
-		for i = 1, #children do
-			local child = children[i]
-
-			local frame = child.frame
-			frame:ClearAllPoints()
-			frame:Show()
-			if i == 1 then
-				frame:SetPoint("TOPLEFT", content)
-			else
-				frame:SetPoint("TOPLEFT", children[i-1].frame, "BOTTOMLEFT")
-			end
-
-			if child.width == "fill" then
-				child:SetWidth(width)
-				frame:SetPoint("RIGHT", content)
-
-				if child.DoLayout then
-					child:DoLayout()
-				end
-			elseif child.width == "relative" then
-				child:SetWidth(width * child.relWidth)
-
-				if child.DoLayout then
-					child:DoLayout()
-				end
-			end
-
-			height = height + (frame.height or frame:GetHeight() or 0)
-		end
-		safecall(content.obj.LayoutFinished, content.obj, nil, height)
-	end)
-
--- A single control fills the whole content area
-AceGUI:RegisterLayout("Fill",
-	function(content, children)
-		if children[1] then
-			children[1]:SetWidth(content:GetWidth() or 0)
-			children[1]:SetHeight(content:GetHeight() or 0)
-			children[1].frame:SetAllPoints(content)
-			children[1].frame:Show()
-			safecall(content.obj.LayoutFinished, content.obj, nil, children[1].frame:GetHeight())
-		end
-	end)
-
-local layoutrecursionblock = nil
-local function safelayoutcall(object, func, ...)
-	layoutrecursionblock = true
-	object[func](object, ...)
-	layoutrecursionblock = nil
-end
-
-AceGUI:RegisterLayout("Flow",
-	function(content, children)
-		if layoutrecursionblock then return end
-		--used height so far
-		local height = 0
-		--width used in the current row
-		local usedwidth = 0
-		--height of the current row
-		local rowheight = 0
-		local rowoffset = 0
-		local lastrowoffset
-
-		local width = content.width or content:GetWidth() or 0
-
-		--control at the start of the row
-		local rowstart
-		local rowstartoffset
-		local lastrowstart
-		local isfullheight
-
-		local frameoffset
-		local lastframeoffset
-		local oversize
-		for i = 1, #children do
-			local child = children[i]
-			oversize = nil
-			local frame = child.frame
-			local frameheight = frame.height or frame:GetHeight() or 0
-			local framewidth = frame.width or frame:GetWidth() or 0
-			lastframeoffset = frameoffset
-			-- HACK: Why did we set a frameoffset of (frameheight / 2) ?
-			-- That was moving all widgets half the widgets size down, is that intended?
-			-- Actually, it seems to be neccessary for many cases, we'll leave it in for now.
-			-- If widgets seem to anchor weirdly with this, provide a valid alignoffset for them.
-			-- TODO: Investigate moar!
-			frameoffset = child.alignoffset or (frameheight / 2)
-
-			if child.width == "relative" then
-				framewidth = width * child.relWidth
-			end
-
-			frame:Show()
-			frame:ClearAllPoints()
-			if i == 1 then
-				-- anchor the first control to the top left
-				frame:SetPoint("TOPLEFT", content)
-				rowheight = frameheight
-				rowoffset = frameoffset
-				rowstart = frame
-				rowstartoffset = frameoffset
-				usedwidth = framewidth
-				if usedwidth > width then
-					oversize = true
-				end
-			else
-				-- if there isn't available width for the control start a new row
-				-- if a control is "fill" it will be on a row of its own full width
-				if usedwidth == 0 or ((framewidth) + usedwidth > width) or child.width == "fill" then
-					if isfullheight then
-						-- a previous row has already filled the entire height, there's nothing we can usefully do anymore
-						-- (maybe error/warn about this?)
-						break
-					end
-					--anchor the previous row, we will now know its height and offset
-					rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -(height + (rowoffset - rowstartoffset) + 3))
-					height = height + rowheight + 3
-					--save this as the rowstart so we can anchor it after the row is complete and we have the max height and offset of controls in it
-					rowstart = frame
-					rowstartoffset = frameoffset
-					rowheight = frameheight
-					rowoffset = frameoffset
-					usedwidth = framewidth
-					if usedwidth > width then
-						oversize = true
-					end
-				-- put the control on the current row, adding it to the width and checking if the height needs to be increased
-				else
-					--handles cases where the new height is higher than either control because of the offsets
-					--math.max(rowheight-rowoffset+frameoffset, frameheight-frameoffset+rowoffset)
-
-					--offset is always the larger of the two offsets
-					rowoffset = math_max(rowoffset, frameoffset)
-					rowheight = math_max(rowheight, rowoffset + (frameheight / 2))
-
-					frame:SetPoint("TOPLEFT", children[i-1].frame, "TOPRIGHT", 0, frameoffset - lastframeoffset)
-					usedwidth = framewidth + usedwidth
-				end
-			end
-
-			if child.width == "fill" then
-				safelayoutcall(child, "SetWidth", width)
-				frame:SetPoint("RIGHT", content)
-
-				usedwidth = 0
-				rowstart = frame
-				rowstartoffset = frameoffset
-
-				if child.DoLayout then
-					child:DoLayout()
-				end
-				rowheight = frame.height or frame:GetHeight() or 0
-				rowoffset = child.alignoffset or (rowheight / 2)
-				rowstartoffset = rowoffset
-			elseif child.width == "relative" then
-				safelayoutcall(child, "SetWidth", width * child.relWidth)
-
-				if child.DoLayout then
-					child:DoLayout()
-				end
-			elseif oversize then
-				if width > 1 then
-					frame:SetPoint("RIGHT", content)
-				end
-			end
-
-			if child.height == "fill" then
-				frame:SetPoint("BOTTOM", content)
-				isfullheight = true
-			end
-		end
-
-		--anchor the last row, if its full height needs a special case since  its height has just been changed by the anchor
-		if isfullheight then
-			rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -height)
-		elseif rowstart then
-			rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -(height + (rowoffset - rowstartoffset) + 3))
-		end
-
-		height = height + rowheight + 3
-		safecall(content.obj.LayoutFinished, content.obj, nil, height)
-	end)
-
--- Get alignment method and value. Possible alignment methods are a callback, a number, "start", "middle", "end", "fill" or "TOPLEFT", "BOTTOMRIGHT" etc.
-local GetCellAlign = function (dir, tableObj, colObj, cellObj, cell, child)
-	local fn = cellObj and (cellObj["align" .. dir] or cellObj.align)
-			or colObj and (colObj["align" .. dir] or colObj.align)
-			or tableObj["align" .. dir] or tableObj.align
-			or "CENTERLEFT"
-	local child, cell, val = child or 0, cell or 0, nil
-
-	if type(fn) == "string" then
-		fn = fn:lower()
-		fn = dir == "V" and (fn:sub(1, 3) == "top" and "start" or fn:sub(1, 6) == "bottom" and "end" or fn:sub(1, 6) == "center" and "middle")
-		  or dir == "H" and (fn:sub(-4) == "left" and "start" or fn:sub(-5) == "right" and "end" or fn:sub(-6) == "center" and "middle")
-		  or fn
-		val = (fn == "start" or fn == "fill") and 0 or fn == "end" and cell - child or (cell - child) / 2
-	elseif type(fn) == "function" then
-		val = fn(child or 0, cell, dir)
-	else
-		val = fn
-	end
-
-	return fn, max(0, min(val, cell))
-end
-
--- Get width or height for multiple cells combined
-local GetCellDimension = function (dir, laneDim, from, to, space)
-	local dim = 0
-	for cell=from,to do
-		dim = dim + (laneDim[cell] or 0)
-	end
-	return dim + max(0, to - from) * (space or 0)
-end
-
---[[ Options
-============
-Container:
- - columns ({col, col, ...}): Column settings. "col" can be a number (<= 0: content width, <1: rel. width, <10: weight, >=10: abs. width) or a table with column setting.
- - space, spaceH, spaceV: Overall, horizontal and vertical spacing between cells.
- - align, alignH, alignV: Overall, horizontal and vertical cell alignment. See GetCellAlign() for possible values.
-Columns:
- - width: Fixed column width (nil or <=0: content width, <1: rel. width, >=1: abs. width).
- - min or 1: Min width for content based width
- - max or 2: Max width for content based width
- - weight: Flexible column width. The leftover width after accounting for fixed-width columns is distributed to weighted columns according to their weights.
- - align, alignH, alignV: Overwrites the container setting for alignment.
-Cell:
- - colspan: Makes a cell span multiple columns.
- - rowspan: Makes a cell span multiple rows.
- - align, alignH, alignV: Overwrites the container and column setting for alignment.
-]]
-AceGUI:RegisterLayout("Table",
-	function (content, children)
-		local obj = content.obj
-		obj:PauseLayout()
-
-		local tableObj = obj:GetUserData("table")
-		local cols = tableObj.columns
-		local spaceH = tableObj.spaceH or tableObj.space or 0
-		local spaceV = tableObj.spaceV or tableObj.space or 0
-		local totalH = (content:GetWidth() or content.width or 0) - spaceH * (#cols - 1)
-
-		-- We need to reuse these because layout events can come in very frequently
-		local layoutCache = obj:GetUserData("layoutCache")
-		if not layoutCache then
-			layoutCache = {{}, {}, {}, {}, {}, {}}
-			obj:SetUserData("layoutCache", layoutCache)
-		end
-		local t, laneH, laneV, rowspans, rowStart, colStart = unpack(layoutCache)
-
-		-- Create the grid
-		local n, slotFound = 0
-		for i,child in ipairs(children) do
-			if child:IsShown() then
-				repeat
-					n = n + 1
-					local col = (n - 1) % #cols + 1
-					local row = ceil(n / #cols)
-					local rowspan = rowspans[col]
-					local cell = rowspan and rowspan.child or child
-					local cellObj = cell:GetUserData("cell")
-					slotFound = not rowspan
-
-					-- Rowspan
-					if not rowspan and cellObj and cellObj.rowspan then
-						rowspan = {child = child, from = row, to = row + cellObj.rowspan - 1}
-						rowspans[col] = rowspan
-					end
-					if rowspan and i == #children then
-						rowspan.to = row
-					end
-
-					-- Colspan
-					local colspan = max(0, min((cellObj and cellObj.colspan or 1) - 1, #cols - col))
-					n = n + colspan
-
-					-- Place the cell
-					if not rowspan or rowspan.to == row then
-						t[n] = cell
-						rowStart[cell] = rowspan and rowspan.from or row
-						colStart[cell] = col
-
-						if rowspan then
-							rowspans[col] = nil
-						end
-					end
-				until slotFound
-			end
-		end
-
-		local rows = ceil(n / #cols)
-
-		-- Determine fixed size cols and collect weights
-		local extantH, totalWeight = totalH, 0
-		for col,colObj in ipairs(cols) do
-			laneH[col] = 0
-
-			if type(colObj) == "number" then
-				colObj = {[colObj >= 1 and colObj < 10 and "weight" or "width"] = colObj}
-				cols[col] = colObj
-			end
-
-			if colObj.weight then
-				-- Weight
-				totalWeight = totalWeight + (colObj.weight or 1)
-			else
-				if not colObj.width or colObj.width <= 0 then
-					-- Content width
-					for row=1,rows do
-						local child = t[(row - 1) * #cols + col]
-						if child then
-							local f = child.frame
-							f:ClearAllPoints()
-							local childH = f:GetWidth() or 0
-
-							laneH[col] = max(laneH[col], childH - GetCellDimension("H", laneH, colStart[child], col - 1, spaceH))
-						end
-					end
-
-					laneH[col] = max(colObj.min or colObj[1] or 0, min(laneH[col], colObj.max or colObj[2] or laneH[col]))
-				else
-					-- Rel./Abs. width
-					laneH[col] = colObj.width < 1 and colObj.width * totalH or colObj.width
-				end
-				extantH = max(0, extantH - laneH[col])
-			end
-		end
-
-		-- Determine sizes based on weight
-		local scale = totalWeight > 0 and extantH / totalWeight or 0
-		for col,colObj in pairs(cols) do
-			if colObj.weight then
-				laneH[col] = scale * colObj.weight
-			end
-		end
-
-		-- Arrange children
-		for row=1,rows do
-			local rowV = 0
-
-			-- Horizontal placement and sizing
-			for col=1,#cols do
-				local child = t[(row - 1) * #cols + col]
-				if child then
-					local colObj = cols[colStart[child]]
-					local cellObj = child:GetUserData("cell")
-					local offsetH = GetCellDimension("H", laneH, 1, colStart[child] - 1, spaceH) + (colStart[child] == 1 and 0 or spaceH)
-					local cellH = GetCellDimension("H", laneH, colStart[child], col, spaceH)
-
-					local f = child.frame
-					f:ClearAllPoints()
-					local childH = f:GetWidth() or 0
-
-					local alignFn, align = GetCellAlign("H", tableObj, colObj, cellObj, cellH, childH)
-					f:SetPoint("LEFT", content, offsetH + align, 0)
-					if child:IsFullWidth() or alignFn == "fill" or childH > cellH then
-						f:SetPoint("RIGHT", content, "LEFT", offsetH + align + cellH, 0)
-					end
-
-					if child.DoLayout then
-						child:DoLayout()
-					end
-
-					rowV = max(rowV, (f:GetHeight() or 0) - GetCellDimension("V", laneV, rowStart[child], row - 1, spaceV))
-				end
-			end
-
-			laneV[row] = rowV
-
-			-- Vertical placement and sizing
-			for col=1,#cols do
-				local child = t[(row - 1) * #cols + col]
-				if child then
-					local colObj = cols[colStart[child]]
-					local cellObj = child:GetUserData("cell")
-					local offsetV = GetCellDimension("V", laneV, 1, rowStart[child] - 1, spaceV) + (rowStart[child] == 1 and 0 or spaceV)
-					local cellV = GetCellDimension("V", laneV, rowStart[child], row, spaceV)
-
-					local f = child.frame
-					local childV = f:GetHeight() or 0
-
-					local alignFn, align = GetCellAlign("V", tableObj, colObj, cellObj, cellV, childV)
-					if child:IsFullHeight() or alignFn == "fill" then
-						f:SetHeight(cellV)
-					end
-					f:SetPoint("TOP", content, 0, -(offsetV + align))
-				end
-			end
-		end
-
-		-- Calculate total height
-		local totalV = GetCellDimension("V", laneV, 1, #laneV, spaceV)
-
-		-- Cleanup
-		for _,v in pairs(layoutCache) do wipe(v) end
-
-		safecall(obj.LayoutFinished, obj, nil, totalV)
-		obj:ResumeLayout()
-	end)
diff --git a/Libs/AceGUI-3.0/AceGUI-3.0.xml b/Libs/AceGUI-3.0/AceGUI-3.0.xml
deleted file mode 100644
index b515077..0000000
--- a/Libs/AceGUI-3.0/AceGUI-3.0.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceGUI-3.0.lua"/>
-	<!-- Container -->
-	<Script file="widgets\AceGUIContainer-BlizOptionsGroup.lua"/>
-	<Script file="widgets\AceGUIContainer-DropDownGroup.lua"/>
-	<Script file="widgets\AceGUIContainer-Frame.lua"/>
-	<Script file="widgets\AceGUIContainer-InlineGroup.lua"/>
-	<Script file="widgets\AceGUIContainer-ScrollFrame.lua"/>
-	<Script file="widgets\AceGUIContainer-SimpleGroup.lua"/>
-	<Script file="widgets\AceGUIContainer-TabGroup.lua"/>
-	<Script file="widgets\AceGUIContainer-TreeGroup.lua"/>
-	<Script file="widgets\AceGUIContainer-Window.lua"/>
-	<!-- Widgets -->
-	<Script file="widgets\AceGUIWidget-Button.lua"/>
-	<Script file="widgets\AceGUIWidget-CheckBox.lua"/>
-	<Script file="widgets\AceGUIWidget-ColorPicker.lua"/>
-	<Script file="widgets\AceGUIWidget-DropDown.lua"/>
-	<Script file="widgets\AceGUIWidget-DropDown-Items.lua"/>
-	<Script file="widgets\AceGUIWidget-EditBox.lua"/>
-	<Script file="widgets\AceGUIWidget-Heading.lua"/>
-	<Script file="widgets\AceGUIWidget-Icon.lua"/>
-	<Script file="widgets\AceGUIWidget-InteractiveLabel.lua"/>
-	<Script file="widgets\AceGUIWidget-Keybinding.lua"/>
-	<Script file="widgets\AceGUIWidget-Label.lua"/>
-	<Script file="widgets\AceGUIWidget-MultiLineEditBox.lua"/>
-	<Script file="widgets\AceGUIWidget-Slider.lua"/>
-</Ui>
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
deleted file mode 100644
index 9a48f8b..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
+++ /dev/null
@@ -1,138 +0,0 @@
---[[-----------------------------------------------------------------------------
-BlizOptionsGroup Container
-Simple container widget for the integration of AceGUI into the Blizzard Interface Options
--------------------------------------------------------------------------------]]
-local Type, Version = "BlizOptionsGroup", 21
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs = pairs
-
--- WoW APIs
-local CreateFrame = CreateFrame
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-
-local function OnShow(frame)
-	frame.obj:Fire("OnShow")
-end
-
-local function OnHide(frame)
-	frame.obj:Fire("OnHide")
-end
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-
-local function okay(frame)
-	frame.obj:Fire("okay")
-end
-
-local function cancel(frame)
-	frame.obj:Fire("cancel")
-end
-
-local function default(frame)
-	frame.obj:Fire("default")
-end
-
-local function refresh(frame)
-	frame.obj:Fire("refresh")
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetName()
-		self:SetTitle()
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		local contentwidth = width - 63
-		if contentwidth < 0 then
-			contentwidth = 0
-		end
-		content:SetWidth(contentwidth)
-		content.width = contentwidth
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		local contentheight = height - 26
-		if contentheight < 0 then
-			contentheight = 0
-		end
-		content:SetHeight(contentheight)
-		content.height = contentheight
-	end,
-
-	["SetName"] = function(self, name, parent)
-		self.frame.name = name
-		self.frame.parent = parent
-	end,
-
-	["SetTitle"] = function(self, title)
-		local content = self.content
-		content:ClearAllPoints()
-		if not title or title == "" then
-			content:SetPoint("TOPLEFT", 10, -10)
-			self.label:SetText("")
-		else
-			content:SetPoint("TOPLEFT", 10, -40)
-			self.label:SetText(title)
-		end
-		content:SetPoint("BOTTOMRIGHT", -10, 10)
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local frame = CreateFrame("Frame")
-	frame:Hide()
-
-	-- support functions for the Blizzard Interface Options
-	frame.okay = okay
-	frame.cancel = cancel
-	frame.default = default
-	frame.refresh = refresh
-
-	frame:SetScript("OnHide", OnHide)
-	frame:SetScript("OnShow", OnShow)
-
-	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
-	label:SetPoint("TOPLEFT", 10, -15)
-	label:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", 10, -45)
-	label:SetJustifyH("LEFT")
-	label:SetJustifyV("TOP")
-
-	--Container Support
-	local content = CreateFrame("Frame", nil, frame)
-	content:SetPoint("TOPLEFT", 10, -10)
-	content:SetPoint("BOTTOMRIGHT", -10, 10)
-
-	local widget = {
-		label   = label,
-		frame   = frame,
-		content = content,
-		type    = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
deleted file mode 100644
index b0f81b7..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
+++ /dev/null
@@ -1,157 +0,0 @@
---[[-----------------------------------------------------------------------------
-DropdownGroup Container
-Container controlled by a dropdown on the top.
--------------------------------------------------------------------------------]]
-local Type, Version = "DropdownGroup", 21
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local assert, pairs, type = assert, pairs, type
-
--- WoW APIs
-local CreateFrame = CreateFrame
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function SelectedGroup(self, event, value)
-	local group = self.parentgroup
-	local status = group.status or group.localstatus
-	status.selected = value
-	self.parentgroup:Fire("OnGroupSelected", value)
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self.dropdown:SetText("")
-		self:SetDropdownWidth(200)
-		self:SetTitle("")
-	end,
-
-	["OnRelease"] = function(self)
-		self.dropdown.list = nil
-		self.status = nil
-		for k in pairs(self.localstatus) do
-			self.localstatus[k] = nil
-		end
-	end,
-
-	["SetTitle"] = function(self, title)
-		self.titletext:SetText(title)
-		self.dropdown.frame:ClearAllPoints()
-		if title and title ~= "" then
-			self.dropdown.frame:SetPoint("TOPRIGHT", -2, 0)
-		else
-			self.dropdown.frame:SetPoint("TOPLEFT", -1, 0)
-		end
-	end,
-
-	["SetGroupList"] = function(self,list,order)
-		self.dropdown:SetList(list,order)
-	end,
-
-	["SetStatusTable"] = function(self, status)
-		assert(type(status) == "table")
-		self.status = status
-	end,
-
-	["SetGroup"] = function(self,group)
-		self.dropdown:SetValue(group)
-		local status = self.status or self.localstatus
-		status.selected = group
-		self:Fire("OnGroupSelected", group)
-	end,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		local contentwidth = width - 26
-		if contentwidth < 0 then
-			contentwidth = 0
-		end
-		content:SetWidth(contentwidth)
-		content.width = contentwidth
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		local contentheight = height - 63
-		if contentheight < 0 then
-			contentheight = 0
-		end
-		content:SetHeight(contentheight)
-		content.height = contentheight
-	end,
-
-	["LayoutFinished"] = function(self, width, height)
-		self:SetHeight((height or 0) + 63)
-	end,
-
-	["SetDropdownWidth"] = function(self, width)
-		self.dropdown:SetWidth(width)
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local PaneBackdrop  = {
-	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-	tile = true, tileSize = 16, edgeSize = 16,
-	insets = { left = 3, right = 3, top = 5, bottom = 3 }
-}
-
-local function Constructor()
-	local frame = CreateFrame("Frame")
-	frame:SetHeight(100)
-	frame:SetWidth(100)
-	frame:SetFrameStrata("FULLSCREEN_DIALOG")
-
-	local titletext = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
-	titletext:SetPoint("TOPLEFT", 4, -5)
-	titletext:SetPoint("TOPRIGHT", -4, -5)
-	titletext:SetJustifyH("LEFT")
-	titletext:SetHeight(18)
-
-	local dropdown = AceGUI:Create("Dropdown")
-	dropdown.frame:SetParent(frame)
-	dropdown.frame:SetFrameLevel(dropdown.frame:GetFrameLevel() + 2)
-	dropdown:SetCallback("OnValueChanged", SelectedGroup)
-	dropdown.frame:SetPoint("TOPLEFT", -1, 0)
-	dropdown.frame:Show()
-	dropdown:SetLabel("")
-
-	local border = CreateFrame("Frame", nil, frame)
-	border:SetPoint("TOPLEFT", 0, -26)
-	border:SetPoint("BOTTOMRIGHT", 0, 3)
-	border:SetBackdrop(PaneBackdrop)
-	border:SetBackdropColor(0.1,0.1,0.1,0.5)
-	border:SetBackdropBorderColor(0.4,0.4,0.4)
-
-	--Container Support
-	local content = CreateFrame("Frame", nil, border)
-	content:SetPoint("TOPLEFT", 10, -10)
-	content:SetPoint("BOTTOMRIGHT", -10, 10)
-
-	local widget = {
-		frame       = frame,
-		localstatus = {},
-		titletext   = titletext,
-		dropdown    = dropdown,
-		border      = border,
-		content     = content,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	dropdown.parentgroup = widget
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
deleted file mode 100644
index 80fd582..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
+++ /dev/null
@@ -1,316 +0,0 @@
---[[-----------------------------------------------------------------------------
-Frame Container
--------------------------------------------------------------------------------]]
-local Type, Version = "Frame", 26
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs, assert, type = pairs, assert, type
-local wipe = table.wipe
-
--- WoW APIs
-local PlaySound = PlaySound
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: CLOSE
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Button_OnClick(frame)
-	PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
-	frame.obj:Hide()
-end
-
-local function Frame_OnShow(frame)
-	frame.obj:Fire("OnShow")
-end
-
-local function Frame_OnClose(frame)
-	frame.obj:Fire("OnClose")
-end
-
-local function Frame_OnMouseDown(frame)
-	AceGUI:ClearFocus()
-end
-
-local function Title_OnMouseDown(frame)
-	frame:GetParent():StartMoving()
-	AceGUI:ClearFocus()
-end
-
-local function MoverSizer_OnMouseUp(mover)
-	local frame = mover:GetParent()
-	frame:StopMovingOrSizing()
-	local self = frame.obj
-	local status = self.status or self.localstatus
-	status.width = frame:GetWidth()
-	status.height = frame:GetHeight()
-	status.top = frame:GetTop()
-	status.left = frame:GetLeft()
-end
-
-local function SizerSE_OnMouseDown(frame)
-	frame:GetParent():StartSizing("BOTTOMRIGHT")
-	AceGUI:ClearFocus()
-end
-
-local function SizerS_OnMouseDown(frame)
-	frame:GetParent():StartSizing("BOTTOM")
-	AceGUI:ClearFocus()
-end
-
-local function SizerE_OnMouseDown(frame)
-	frame:GetParent():StartSizing("RIGHT")
-	AceGUI:ClearFocus()
-end
-
-local function StatusBar_OnEnter(frame)
-	frame.obj:Fire("OnEnterStatusBar")
-end
-
-local function StatusBar_OnLeave(frame)
-	frame.obj:Fire("OnLeaveStatusBar")
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self.frame:SetParent(UIParent)
-		self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
-		self:SetTitle()
-		self:SetStatusText()
-		self:ApplyStatus()
-		self:Show()
-        self:EnableResize(true)
-	end,
-
-	["OnRelease"] = function(self)
-		self.status = nil
-		wipe(self.localstatus)
-	end,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		local contentwidth = width - 34
-		if contentwidth < 0 then
-			contentwidth = 0
-		end
-		content:SetWidth(contentwidth)
-		content.width = contentwidth
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		local contentheight = height - 57
-		if contentheight < 0 then
-			contentheight = 0
-		end
-		content:SetHeight(contentheight)
-		content.height = contentheight
-	end,
-
-	["SetTitle"] = function(self, title)
-		self.titletext:SetText(title)
-		self.titlebg:SetWidth((self.titletext:GetWidth() or 0) + 10)
-	end,
-
-	["SetStatusText"] = function(self, text)
-		self.statustext:SetText(text)
-	end,
-
-	["Hide"] = function(self)
-		self.frame:Hide()
-	end,
-
-	["Show"] = function(self)
-		self.frame:Show()
-	end,
-
-	["EnableResize"] = function(self, state)
-		local func = state and "Show" or "Hide"
-		self.sizer_se[func](self.sizer_se)
-		self.sizer_s[func](self.sizer_s)
-		self.sizer_e[func](self.sizer_e)
-	end,
-
-	-- called to set an external table to store status in
-	["SetStatusTable"] = function(self, status)
-		assert(type(status) == "table")
-		self.status = status
-		self:ApplyStatus()
-	end,
-
-	["ApplyStatus"] = function(self)
-		local status = self.status or self.localstatus
-		local frame = self.frame
-		self:SetWidth(status.width or 700)
-		self:SetHeight(status.height or 500)
-		frame:ClearAllPoints()
-		if status.top and status.left then
-			frame:SetPoint("TOP", UIParent, "BOTTOM", 0, status.top)
-			frame:SetPoint("LEFT", UIParent, "LEFT", status.left, 0)
-		else
-			frame:SetPoint("CENTER")
-		end
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local FrameBackdrop = {
-	bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
-	edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
-	tile = true, tileSize = 32, edgeSize = 32,
-	insets = { left = 8, right = 8, top = 8, bottom = 8 }
-}
-
-local PaneBackdrop  = {
-	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-	tile = true, tileSize = 16, edgeSize = 16,
-	insets = { left = 3, right = 3, top = 5, bottom = 3 }
-}
-
-local function Constructor()
-	local frame = CreateFrame("Frame", nil, UIParent)
-	frame:Hide()
-
-	frame:EnableMouse(true)
-	frame:SetMovable(true)
-	frame:SetResizable(true)
-	frame:SetFrameStrata("FULLSCREEN_DIALOG")
-	frame:SetBackdrop(FrameBackdrop)
-	frame:SetBackdropColor(0, 0, 0, 1)
-	frame:SetMinResize(400, 200)
-	frame:SetToplevel(true)
-	frame:SetScript("OnShow", Frame_OnShow)
-	frame:SetScript("OnHide", Frame_OnClose)
-	frame:SetScript("OnMouseDown", Frame_OnMouseDown)
-
-	local closebutton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate")
-	closebutton:SetScript("OnClick", Button_OnClick)
-	closebutton:SetPoint("BOTTOMRIGHT", -27, 17)
-	closebutton:SetHeight(20)
-	closebutton:SetWidth(100)
-	closebutton:SetText(CLOSE)
-
-	local statusbg = CreateFrame("Button", nil, frame)
-	statusbg:SetPoint("BOTTOMLEFT", 15, 15)
-	statusbg:SetPoint("BOTTOMRIGHT", -132, 15)
-	statusbg:SetHeight(24)
-	statusbg:SetBackdrop(PaneBackdrop)
-	statusbg:SetBackdropColor(0.1,0.1,0.1)
-	statusbg:SetBackdropBorderColor(0.4,0.4,0.4)
-	statusbg:SetScript("OnEnter", StatusBar_OnEnter)
-	statusbg:SetScript("OnLeave", StatusBar_OnLeave)
-
-	local statustext = statusbg:CreateFontString(nil, "OVERLAY", "GameFontNormal")
-	statustext:SetPoint("TOPLEFT", 7, -2)
-	statustext:SetPoint("BOTTOMRIGHT", -7, 2)
-	statustext:SetHeight(20)
-	statustext:SetJustifyH("LEFT")
-	statustext:SetText("")
-
-	local titlebg = frame:CreateTexture(nil, "OVERLAY")
-	titlebg:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
-	titlebg:SetTexCoord(0.31, 0.67, 0, 0.63)
-	titlebg:SetPoint("TOP", 0, 12)
-	titlebg:SetWidth(100)
-	titlebg:SetHeight(40)
-
-	local title = CreateFrame("Frame", nil, frame)
-	title:EnableMouse(true)
-	title:SetScript("OnMouseDown", Title_OnMouseDown)
-	title:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
-	title:SetAllPoints(titlebg)
-
-	local titletext = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
-	titletext:SetPoint("TOP", titlebg, "TOP", 0, -14)
-
-	local titlebg_l = frame:CreateTexture(nil, "OVERLAY")
-	titlebg_l:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
-	titlebg_l:SetTexCoord(0.21, 0.31, 0, 0.63)
-	titlebg_l:SetPoint("RIGHT", titlebg, "LEFT")
-	titlebg_l:SetWidth(30)
-	titlebg_l:SetHeight(40)
-
-	local titlebg_r = frame:CreateTexture(nil, "OVERLAY")
-	titlebg_r:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
-	titlebg_r:SetTexCoord(0.67, 0.77, 0, 0.63)
-	titlebg_r:SetPoint("LEFT", titlebg, "RIGHT")
-	titlebg_r:SetWidth(30)
-	titlebg_r:SetHeight(40)
-
-	local sizer_se = CreateFrame("Frame", nil, frame)
-	sizer_se:SetPoint("BOTTOMRIGHT")
-	sizer_se:SetWidth(25)
-	sizer_se:SetHeight(25)
-	sizer_se:EnableMouse()
-	sizer_se:SetScript("OnMouseDown",SizerSE_OnMouseDown)
-	sizer_se:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
-
-	local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
-	line1:SetWidth(14)
-	line1:SetHeight(14)
-	line1:SetPoint("BOTTOMRIGHT", -8, 8)
-	line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
-	local x = 0.1 * 14/17
-	line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
-
-	local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
-	line2:SetWidth(8)
-	line2:SetHeight(8)
-	line2:SetPoint("BOTTOMRIGHT", -8, 8)
-	line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
-	local x = 0.1 * 8/17
-	line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
-
-	local sizer_s = CreateFrame("Frame", nil, frame)
-	sizer_s:SetPoint("BOTTOMRIGHT", -25, 0)
-	sizer_s:SetPoint("BOTTOMLEFT")
-	sizer_s:SetHeight(25)
-	sizer_s:EnableMouse(true)
-	sizer_s:SetScript("OnMouseDown", SizerS_OnMouseDown)
-	sizer_s:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
-
-	local sizer_e = CreateFrame("Frame", nil, frame)
-	sizer_e:SetPoint("BOTTOMRIGHT", 0, 25)
-	sizer_e:SetPoint("TOPRIGHT")
-	sizer_e:SetWidth(25)
-	sizer_e:EnableMouse(true)
-	sizer_e:SetScript("OnMouseDown", SizerE_OnMouseDown)
-	sizer_e:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
-
-	--Container Support
-	local content = CreateFrame("Frame", nil, frame)
-	content:SetPoint("TOPLEFT", 17, -27)
-	content:SetPoint("BOTTOMRIGHT", -17, 40)
-
-	local widget = {
-		localstatus = {},
-		titletext   = titletext,
-		statustext  = statustext,
-		titlebg     = titlebg,
-		sizer_se    = sizer_se,
-		sizer_s     = sizer_s,
-		sizer_e     = sizer_e,
-		content     = content,
-		frame       = frame,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	closebutton.obj, statusbg.obj = widget, widget
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
deleted file mode 100644
index f3db7d6..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
+++ /dev/null
@@ -1,103 +0,0 @@
---[[-----------------------------------------------------------------------------
-InlineGroup Container
-Simple container widget that creates a visible "box" with an optional title.
--------------------------------------------------------------------------------]]
-local Type, Version = "InlineGroup", 21
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs = pairs
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetWidth(300)
-		self:SetHeight(100)
-		self:SetTitle("")
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["SetTitle"] = function(self,title)
-		self.titletext:SetText(title)
-	end,
-
-
-	["LayoutFinished"] = function(self, width, height)
-		if self.noAutoHeight then return end
-		self:SetHeight((height or 0) + 40)
-	end,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		local contentwidth = width - 20
-		if contentwidth < 0 then
-			contentwidth = 0
-		end
-		content:SetWidth(contentwidth)
-		content.width = contentwidth
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		local contentheight = height - 20
-		if contentheight < 0 then
-			contentheight = 0
-		end
-		content:SetHeight(contentheight)
-		content.height = contentheight
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local PaneBackdrop  = {
-	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-	tile = true, tileSize = 16, edgeSize = 16,
-	insets = { left = 3, right = 3, top = 5, bottom = 3 }
-}
-
-local function Constructor()
-	local frame = CreateFrame("Frame", nil, UIParent)
-	frame:SetFrameStrata("FULLSCREEN_DIALOG")
-
-	local titletext = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
-	titletext:SetPoint("TOPLEFT", 14, 0)
-	titletext:SetPoint("TOPRIGHT", -14, 0)
-	titletext:SetJustifyH("LEFT")
-	titletext:SetHeight(18)
-
-	local border = CreateFrame("Frame", nil, frame)
-	border:SetPoint("TOPLEFT", 0, -17)
-	border:SetPoint("BOTTOMRIGHT", -1, 3)
-	border:SetBackdrop(PaneBackdrop)
-	border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
-	border:SetBackdropBorderColor(0.4, 0.4, 0.4)
-
-	--Container Support
-	local content = CreateFrame("Frame", nil, border)
-	content:SetPoint("TOPLEFT", 10, -10)
-	content:SetPoint("BOTTOMRIGHT", -10, 10)
-
-	local widget = {
-		frame     = frame,
-		content   = content,
-		titletext = titletext,
-		type      = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
deleted file mode 100644
index 9afb54b..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
+++ /dev/null
@@ -1,204 +0,0 @@
---[[-----------------------------------------------------------------------------
-ScrollFrame Container
-Plain container that scrolls its content and doesn't grow in height.
--------------------------------------------------------------------------------]]
-local Type, Version = "ScrollFrame", 24
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs, assert, type = pairs, assert, type
-local min, max, floor, abs = math.min, math.max, math.floor, math.abs
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-local function FixScrollOnUpdate(frame)
-	frame:SetScript("OnUpdate", nil)
-	frame.obj:FixScroll()
-end
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function ScrollFrame_OnMouseWheel(frame, value)
-	frame.obj:MoveScroll(value)
-end
-
-local function ScrollFrame_OnSizeChanged(frame)
-	frame:SetScript("OnUpdate", FixScrollOnUpdate)
-end
-
-local function ScrollBar_OnScrollValueChanged(frame, value)
-	frame.obj:SetScroll(value)
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetScroll(0)
-		self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate)
-	end,
-
-	["OnRelease"] = function(self)
-		self.status = nil
-		for k in pairs(self.localstatus) do
-			self.localstatus[k] = nil
-		end
-		self.scrollframe:SetPoint("BOTTOMRIGHT")
-		self.scrollbar:Hide()
-		self.scrollBarShown = nil
-		self.content.height, self.content.width = nil, nil
-	end,
-
-	["SetScroll"] = function(self, value)
-		local status = self.status or self.localstatus
-		local viewheight = self.scrollframe:GetHeight()
-		local height = self.content:GetHeight()
-		local offset
-
-		if viewheight > height then
-			offset = 0
-		else
-			offset = floor((height - viewheight) / 1000.0 * value)
-		end
-		self.content:ClearAllPoints()
-		self.content:SetPoint("TOPLEFT", 0, offset)
-		self.content:SetPoint("TOPRIGHT", 0, offset)
-		status.offset = offset
-		status.scrollvalue = value
-	end,
-
-	["MoveScroll"] = function(self, value)
-		local status = self.status or self.localstatus
-		local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight()
-
-		if self.scrollBarShown then
-			local diff = height - viewheight
-			local delta = 1
-			if value < 0 then
-				delta = -1
-			end
-			self.scrollbar:SetValue(min(max(status.scrollvalue + delta*(1000/(diff/45)),0), 1000))
-		end
-	end,
-
-	["FixScroll"] = function(self)
-		if self.updateLock then return end
-		self.updateLock = true
-		local status = self.status or self.localstatus
-		local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight()
-		local offset = status.offset or 0
-		local curvalue = self.scrollbar:GetValue()
-		-- Give us a margin of error of 2 pixels to stop some conditions that i would blame on floating point inaccuracys
-		-- No-one is going to miss 2 pixels at the bottom of the frame, anyhow!
-		if viewheight < height + 2 then
-			if self.scrollBarShown then
-				self.scrollBarShown = nil
-				self.scrollbar:Hide()
-				self.scrollbar:SetValue(0)
-				self.scrollframe:SetPoint("BOTTOMRIGHT")
-				self:DoLayout()
-			end
-		else
-			if not self.scrollBarShown then
-				self.scrollBarShown = true
-				self.scrollbar:Show()
-				self.scrollframe:SetPoint("BOTTOMRIGHT", -20, 0)
-				self:DoLayout()
-			end
-			local value = (offset / (viewheight - height) * 1000)
-			if value > 1000 then value = 1000 end
-			self.scrollbar:SetValue(value)
-			self:SetScroll(value)
-			if value < 1000 then
-				self.content:ClearAllPoints()
-				self.content:SetPoint("TOPLEFT", 0, offset)
-				self.content:SetPoint("TOPRIGHT", 0, offset)
-				status.offset = offset
-			end
-		end
-		self.updateLock = nil
-	end,
-
-	["LayoutFinished"] = function(self, width, height)
-		self.content:SetHeight(height or 0 + 20)
-		self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate)
-	end,
-
-	["SetStatusTable"] = function(self, status)
-		assert(type(status) == "table")
-		self.status = status
-		if not status.scrollvalue then
-			status.scrollvalue = 0
-		end
-	end,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		content.width = width
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		content.height = height
-	end
-}
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local frame = CreateFrame("Frame", nil, UIParent)
-	local num = AceGUI:GetNextWidgetNum(Type)
-
-	local scrollframe = CreateFrame("ScrollFrame", nil, frame)
-	scrollframe:SetPoint("TOPLEFT")
-	scrollframe:SetPoint("BOTTOMRIGHT")
-	scrollframe:EnableMouseWheel(true)
-	scrollframe:SetScript("OnMouseWheel", ScrollFrame_OnMouseWheel)
-	scrollframe:SetScript("OnSizeChanged", ScrollFrame_OnSizeChanged)
-
-	local scrollbar = CreateFrame("Slider", ("AceConfigDialogScrollFrame%dScrollBar"):format(num), scrollframe, "UIPanelScrollBarTemplate")
-	scrollbar:SetPoint("TOPLEFT", scrollframe, "TOPRIGHT", 4, -16)
-	scrollbar:SetPoint("BOTTOMLEFT", scrollframe, "BOTTOMRIGHT", 4, 16)
-	scrollbar:SetMinMaxValues(0, 1000)
-	scrollbar:SetValueStep(1)
-	scrollbar:SetValue(0)
-	scrollbar:SetWidth(16)
-	scrollbar:Hide()
-	-- set the script as the last step, so it doesn't fire yet
-	scrollbar:SetScript("OnValueChanged", ScrollBar_OnScrollValueChanged)
-
-	local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
-	scrollbg:SetAllPoints(scrollbar)
-	scrollbg:SetColorTexture(0, 0, 0, 0.4)
-
-	--Container Support
-	local content = CreateFrame("Frame", nil, scrollframe)
-	content:SetPoint("TOPLEFT")
-	content:SetPoint("TOPRIGHT")
-	content:SetHeight(400)
-	scrollframe:SetScrollChild(content)
-
-	local widget = {
-		localstatus = { scrollvalue = 0 },
-		scrollframe = scrollframe,
-		scrollbar   = scrollbar,
-		content     = content,
-		frame       = frame,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	scrollframe.obj, scrollbar.obj = widget, widget
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua
deleted file mode 100644
index 57512c3..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua
+++ /dev/null
@@ -1,69 +0,0 @@
---[[-----------------------------------------------------------------------------
-SimpleGroup Container
-Simple container widget that just groups widgets.
--------------------------------------------------------------------------------]]
-local Type, Version = "SimpleGroup", 20
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs = pairs
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetWidth(300)
-		self:SetHeight(100)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["LayoutFinished"] = function(self, width, height)
-		if self.noAutoHeight then return end
-		self:SetHeight(height or 0)
-	end,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		content:SetWidth(width)
-		content.width = width
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		content:SetHeight(height)
-		content.height = height
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local frame = CreateFrame("Frame", nil, UIParent)
-	frame:SetFrameStrata("FULLSCREEN_DIALOG")
-
-	--Container Support
-	local content = CreateFrame("Frame", nil, frame)
-	content:SetPoint("TOPLEFT")
-	content:SetPoint("BOTTOMRIGHT")
-
-	local widget = {
-		frame     = frame,
-		content   = content,
-		type      = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
deleted file mode 100644
index 95544c5..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
+++ /dev/null
@@ -1,350 +0,0 @@
---[[-----------------------------------------------------------------------------
-TabGroup Container
-Container that uses tabs on top to switch between groups.
--------------------------------------------------------------------------------]]
-local Type, Version = "TabGroup", 36
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs, ipairs, assert, type, wipe = pairs, ipairs, assert, type, wipe
-
--- WoW APIs
-local PlaySound = PlaySound
-local CreateFrame, UIParent = CreateFrame, UIParent
-local _G = _G
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: PanelTemplates_TabResize, PanelTemplates_SetDisabledTabState, PanelTemplates_SelectTab, PanelTemplates_DeselectTab
-
--- local upvalue storage used by BuildTabs
-local widths = {}
-local rowwidths = {}
-local rowends = {}
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-local function UpdateTabLook(frame)
-	if frame.disabled then
-		PanelTemplates_SetDisabledTabState(frame)
-	elseif frame.selected then
-		PanelTemplates_SelectTab(frame)
-	else
-		PanelTemplates_DeselectTab(frame)
-	end
-end
-
-local function Tab_SetText(frame, text)
-	frame:_SetText(text)
-	local width = frame.obj.frame.width or frame.obj.frame:GetWidth() or 0
-	PanelTemplates_TabResize(frame, 0, nil, nil, width, frame:GetFontString():GetStringWidth())
-end
-
-local function Tab_SetSelected(frame, selected)
-	frame.selected = selected
-	UpdateTabLook(frame)
-end
-
-local function Tab_SetDisabled(frame, disabled)
-	frame.disabled = disabled
-	UpdateTabLook(frame)
-end
-
-local function BuildTabsOnUpdate(frame)
-	local self = frame.obj
-	self:BuildTabs()
-	frame:SetScript("OnUpdate", nil)
-end
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Tab_OnClick(frame)
-	if not (frame.selected or frame.disabled) then
-		PlaySound(841) -- SOUNDKIT.IG_CHARACTER_INFO_TAB
-		frame.obj:SelectTab(frame.value)
-	end
-end
-
-local function Tab_OnEnter(frame)
-	local self = frame.obj
-	self:Fire("OnTabEnter", self.tabs[frame.id].value, frame)
-end
-
-local function Tab_OnLeave(frame)
-	local self = frame.obj
-	self:Fire("OnTabLeave", self.tabs[frame.id].value, frame)
-end
-
-local function Tab_OnShow(frame)
-	_G[frame:GetName().."HighlightTexture"]:SetWidth(frame:GetTextWidth() + 30)
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetTitle()
-	end,
-
-	["OnRelease"] = function(self)
-		self.status = nil
-		for k in pairs(self.localstatus) do
-			self.localstatus[k] = nil
-		end
-		self.tablist = nil
-		for _, tab in pairs(self.tabs) do
-			tab:Hide()
-		end
-	end,
-
-	["CreateTab"] = function(self, id)
-		local tabname = ("AceGUITabGroup%dTab%d"):format(self.num, id)
-		local tab = CreateFrame("Button", tabname, self.border, "OptionsFrameTabButtonTemplate")
-		tab.obj = self
-		tab.id = id
-
-		tab.text = _G[tabname .. "Text"]
-		tab.text:ClearAllPoints()
-		tab.text:SetPoint("LEFT", 14, -3)
-		tab.text:SetPoint("RIGHT", -12, -3)
-
-		tab:SetScript("OnClick", Tab_OnClick)
-		tab:SetScript("OnEnter", Tab_OnEnter)
-		tab:SetScript("OnLeave", Tab_OnLeave)
-		tab:SetScript("OnShow", Tab_OnShow)
-
-		tab._SetText = tab.SetText
-		tab.SetText = Tab_SetText
-		tab.SetSelected = Tab_SetSelected
-		tab.SetDisabled = Tab_SetDisabled
-
-		return tab
-	end,
-
-	["SetTitle"] = function(self, text)
-		self.titletext:SetText(text or "")
-		if text and text ~= "" then
-			self.alignoffset = 25
-		else
-			self.alignoffset = 18
-		end
-		self:BuildTabs()
-	end,
-
-	["SetStatusTable"] = function(self, status)
-		assert(type(status) == "table")
-		self.status = status
-	end,
-
-	["SelectTab"] = function(self, value)
-		local status = self.status or self.localstatus
-		local found
-		for i, v in ipairs(self.tabs) do
-			if v.value == value then
-				v:SetSelected(true)
-				found = true
-			else
-				v:SetSelected(false)
-			end
-		end
-		status.selected = value
-		if found then
-			self:Fire("OnGroupSelected",value)
-		end
-	end,
-
-	["SetTabs"] = function(self, tabs)
-		self.tablist = tabs
-		self:BuildTabs()
-	end,
-
-
-	["BuildTabs"] = function(self)
-		local hastitle = (self.titletext:GetText() and self.titletext:GetText() ~= "")
-		local status = self.status or self.localstatus
-		local tablist = self.tablist
-		local tabs = self.tabs
-
-		if not tablist then return end
-
-		local width = self.frame.width or self.frame:GetWidth() or 0
-
-		wipe(widths)
-		wipe(rowwidths)
-		wipe(rowends)
-
-		--Place Text into tabs and get thier initial width
-		for i, v in ipairs(tablist) do
-			local tab = tabs[i]
-			if not tab then
-				tab = self:CreateTab(i)
-				tabs[i] = tab
-			end
-
-			tab:Show()
-			tab:SetText(v.text)
-			tab:SetDisabled(v.disabled)
-			tab.value = v.value
-
-			widths[i] = tab:GetWidth() - 6 --tabs are anchored 10 pixels from the right side of the previous one to reduce spacing, but add a fixed 4px padding for the text
-		end
-
-		for i = (#tablist)+1, #tabs, 1 do
-			tabs[i]:Hide()
-		end
-
-		--First pass, find the minimum number of rows needed to hold all tabs and the initial tab layout
-		local numtabs = #tablist
-		local numrows = 1
-		local usedwidth = 0
-
-		for i = 1, #tablist do
-			--If this is not the first tab of a row and there isn't room for it
-			if usedwidth ~= 0 and (width - usedwidth - widths[i]) < 0 then
-				rowwidths[numrows] = usedwidth + 10 --first tab in each row takes up an extra 10px
-				rowends[numrows] = i - 1
-				numrows = numrows + 1
-				usedwidth = 0
-			end
-			usedwidth = usedwidth + widths[i]
-		end
-		rowwidths[numrows] = usedwidth + 10 --first tab in each row takes up an extra 10px
-		rowends[numrows] = #tablist
-
-		--Fix for single tabs being left on the last row, move a tab from the row above if applicable
-		if numrows > 1 then
-			--if the last row has only one tab
-			if rowends[numrows-1] == numtabs-1 then
-				--if there are more than 2 tabs in the 2nd last row
-				if (numrows == 2 and rowends[numrows-1] > 2) or (rowends[numrows] - rowends[numrows-1] > 2) then
-					--move 1 tab from the second last row to the last, if there is enough space
-					if (rowwidths[numrows] + widths[numtabs-1]) <= width then
-						rowends[numrows-1] = rowends[numrows-1] - 1
-						rowwidths[numrows] = rowwidths[numrows] + widths[numtabs-1]
-						rowwidths[numrows-1] = rowwidths[numrows-1] - widths[numtabs-1]
-					end
-				end
-			end
-		end
-
-		--anchor the rows as defined and resize tabs to fill thier row
-		local starttab = 1
-		for row, endtab in ipairs(rowends) do
-			local first = true
-			for tabno = starttab, endtab do
-				local tab = tabs[tabno]
-				tab:ClearAllPoints()
-				if first then
-					tab:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, -(hastitle and 14 or 7)-(row-1)*20 )
-					first = false
-				else
-					tab:SetPoint("LEFT", tabs[tabno-1], "RIGHT", -10, 0)
-				end
-			end
-
-			-- equal padding for each tab to fill the available width,
-			-- if the used space is above 75% already
-			-- the 18 pixel is the typical width of a scrollbar, so we can have a tab group inside a scrolling frame,
-			-- and not have the tabs jump around funny when switching between tabs that need scrolling and those that don't
-			local padding = 0
-			if not (numrows == 1 and rowwidths[1] < width*0.75 - 18) then
-				padding = (width - rowwidths[row]) / (endtab - starttab+1)
-			end
-
-			for i = starttab, endtab do
-				PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width, tabs[i]:GetFontString():GetStringWidth())
-			end
-			starttab = endtab + 1
-		end
-
-		self.borderoffset = (hastitle and 17 or 10)+((numrows)*20)
-		self.border:SetPoint("TOPLEFT", 1, -self.borderoffset)
-	end,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		local contentwidth = width - 60
-		if contentwidth < 0 then
-			contentwidth = 0
-		end
-		content:SetWidth(contentwidth)
-		content.width = contentwidth
-		self:BuildTabs(self)
-		self.frame:SetScript("OnUpdate", BuildTabsOnUpdate)
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		local contentheight = height - (self.borderoffset + 23)
-		if contentheight < 0 then
-			contentheight = 0
-		end
-		content:SetHeight(contentheight)
-		content.height = contentheight
-	end,
-
-	["LayoutFinished"] = function(self, width, height)
-		if self.noAutoHeight then return end
-		self:SetHeight((height or 0) + (self.borderoffset + 23))
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local PaneBackdrop  = {
-	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-	tile = true, tileSize = 16, edgeSize = 16,
-	insets = { left = 3, right = 3, top = 5, bottom = 3 }
-}
-
-local function Constructor()
-	local num = AceGUI:GetNextWidgetNum(Type)
-	local frame = CreateFrame("Frame",nil,UIParent)
-	frame:SetHeight(100)
-	frame:SetWidth(100)
-	frame:SetFrameStrata("FULLSCREEN_DIALOG")
-
-	local titletext = frame:CreateFontString(nil,"OVERLAY","GameFontNormal")
-	titletext:SetPoint("TOPLEFT", 14, 0)
-	titletext:SetPoint("TOPRIGHT", -14, 0)
-	titletext:SetJustifyH("LEFT")
-	titletext:SetHeight(18)
-	titletext:SetText("")
-
-	local border = CreateFrame("Frame", nil, frame)
-	border:SetPoint("TOPLEFT", 1, -27)
-	border:SetPoint("BOTTOMRIGHT", -1, 3)
-	border:SetBackdrop(PaneBackdrop)
-	border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
-	border:SetBackdropBorderColor(0.4, 0.4, 0.4)
-
-	local content = CreateFrame("Frame", nil, border)
-	content:SetPoint("TOPLEFT", 10, -7)
-	content:SetPoint("BOTTOMRIGHT", -10, 7)
-
-	local widget = {
-		num          = num,
-		frame        = frame,
-		localstatus  = {},
-		alignoffset  = 18,
-		titletext    = titletext,
-		border       = border,
-		borderoffset = 27,
-		tabs         = {},
-		content      = content,
-		type         = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
deleted file mode 100644
index 236f633..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
+++ /dev/null
@@ -1,720 +0,0 @@
---[[-----------------------------------------------------------------------------
-TreeGroup Container
-Container that uses a tree control to switch between groups.
--------------------------------------------------------------------------------]]
-local Type, Version = "TreeGroup", 41
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
-local WoW80 = select(4, GetBuildInfo()) >= 80000
-
--- Lua APIs
-local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
-local math_min, math_max, floor = math.min, math.max, floor
-local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GameTooltip, FONT_COLOR_CODE_CLOSE
-
--- Recycling functions
-local new, del
-do
-	local pool = setmetatable({},{__mode='k'})
-	function new()
-		local t = next(pool)
-		if t then
-			pool[t] = nil
-			return t
-		else
-			return {}
-		end
-	end
-	function del(t)
-		for k in pairs(t) do
-			t[k] = nil
-		end
-		pool[t] = true
-	end
-end
-
-local DEFAULT_TREE_WIDTH = 175
-local DEFAULT_TREE_SIZABLE = true
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-local function GetButtonUniqueValue(line)
-	local parent = line.parent
-	if parent and parent.value then
-		return GetButtonUniqueValue(parent).."\001"..line.value
-	else
-		return line.value
-	end
-end
-
-local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
-	local self = button.obj
-	local toggle = button.toggle
-	local frame = self.frame
-	local text = treeline.text or ""
-	local icon = treeline.icon
-	local iconCoords = treeline.iconCoords
-	local level = treeline.level
-	local value = treeline.value
-	local uniquevalue = treeline.uniquevalue
-	local disabled = treeline.disabled
-
-	button.treeline = treeline
-	button.value = value
-	button.uniquevalue = uniquevalue
-	if selected then
-		button:LockHighlight()
-		button.selected = true
-	else
-		button:UnlockHighlight()
-		button.selected = false
-	end
-	local normalTexture = button:GetNormalTexture()
-	local line = button.line
-	button.level = level
-	if ( level == 1 ) then
-		button:SetNormalFontObject("GameFontNormal")
-		button:SetHighlightFontObject("GameFontHighlight")
-		button.text:SetPoint("LEFT", (icon and 16 or 0) + 8, 2)
-	else
-		button:SetNormalFontObject("GameFontHighlightSmall")
-		button:SetHighlightFontObject("GameFontHighlightSmall")
-		button.text:SetPoint("LEFT", (icon and 16 or 0) + 8 * level, 2)
-	end
-
-	if disabled then
-		button:EnableMouse(false)
-		button.text:SetText("|cff808080"..text..FONT_COLOR_CODE_CLOSE)
-	else
-		button.text:SetText(text)
-		button:EnableMouse(true)
-	end
-
-	if icon then
-		button.icon:SetTexture(icon)
-		button.icon:SetPoint("LEFT", 8 * level, (level == 1) and 0 or 1)
-	else
-		button.icon:SetTexture(nil)
-	end
-
-	if iconCoords then
-		button.icon:SetTexCoord(unpack(iconCoords))
-	else
-		button.icon:SetTexCoord(0, 1, 0, 1)
-	end
-
-	if canExpand then
-		if not isExpanded then
-			toggle:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-UP")
-			toggle:SetPushedTexture("Interface\\Buttons\\UI-PlusButton-DOWN")
-		else
-			toggle:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-UP")
-			toggle:SetPushedTexture("Interface\\Buttons\\UI-MinusButton-DOWN")
-		end
-		toggle:Show()
-	else
-		toggle:Hide()
-	end
-end
-
-local function ShouldDisplayLevel(tree)
-	local result = false
-	for k, v in ipairs(tree) do
-		if v.children == nil and v.visible ~= false then
-			result = true
-		elseif v.children then
-			result = result or ShouldDisplayLevel(v.children)
-		end
-		if result then return result end
-	end
-	return false
-end
-
-local function addLine(self, v, tree, level, parent)
-	local line = new()
-	line.value = v.value
-	line.text = v.text
-	line.icon = v.icon
-	line.iconCoords = v.iconCoords
-	line.disabled = v.disabled
-	line.tree = tree
-	line.level = level
-	line.parent = parent
-	line.visible = v.visible
-	line.uniquevalue = GetButtonUniqueValue(line)
-	if v.children then
-		line.hasChildren = true
-	else
-		line.hasChildren = nil
-	end
-	self.lines[#self.lines+1] = line
-	return line
-end
-
---fire an update after one frame to catch the treeframes height
-local function FirstFrameUpdate(frame)
-	local self = frame.obj
-	frame:SetScript("OnUpdate", nil)
-	self:RefreshTree(nil, true)
-end
-
-local function BuildUniqueValue(...)
-	local n = select('#', ...)
-	if n == 1 then
-		return ...
-	else
-		return (...).."\001"..BuildUniqueValue(select(2,...))
-	end
-end
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Expand_OnClick(frame)
-	local button = frame.button
-	local self = button.obj
-	local status = (self.status or self.localstatus).groups
-	status[button.uniquevalue] = not status[button.uniquevalue]
-	self:RefreshTree()
-end
-
-local function Button_OnClick(frame)
-	local self = frame.obj
-	self:Fire("OnClick", frame.uniquevalue, frame.selected)
-	if not frame.selected then
-		self:SetSelected(frame.uniquevalue)
-		frame.selected = true
-		frame:LockHighlight()
-		self:RefreshTree()
-	end
-	AceGUI:ClearFocus()
-end
-
-local function Button_OnDoubleClick(button)
-	local self = button.obj
-	local status = self.status or self.localstatus
-	local status = (self.status or self.localstatus).groups
-	status[button.uniquevalue] = not status[button.uniquevalue]
-	self:RefreshTree()
-end
-
-local function Button_OnEnter(frame)
-	local self = frame.obj
-	self:Fire("OnButtonEnter", frame.uniquevalue, frame)
-
-	if self.enabletooltips then
-		GameTooltip:SetOwner(frame, "ANCHOR_NONE")
-		GameTooltip:SetPoint("LEFT",frame,"RIGHT")
-		GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
-
-		GameTooltip:Show()
-	end
-end
-
-local function Button_OnLeave(frame)
-	local self = frame.obj
-	self:Fire("OnButtonLeave", frame.uniquevalue, frame)
-
-	if self.enabletooltips then
-		GameTooltip:Hide()
-	end
-end
-
-local function OnScrollValueChanged(frame, value)
-	if frame.obj.noupdate then return end
-	local self = frame.obj
-	local status = self.status or self.localstatus
-	status.scrollvalue = floor(value + 0.5)
-	self:RefreshTree()
-	AceGUI:ClearFocus()
-end
-
-local function Tree_OnSizeChanged(frame)
-	frame.obj:RefreshTree()
-end
-
-local function Tree_OnMouseWheel(frame, delta)
-	local self = frame.obj
-	if self.showscroll then
-		local scrollbar = self.scrollbar
-		local min, max = scrollbar:GetMinMaxValues()
-		local value = scrollbar:GetValue()
-		local newvalue = math_min(max,math_max(min,value - delta))
-		if value ~= newvalue then
-			scrollbar:SetValue(newvalue)
-		end
-	end
-end
-
-local function Dragger_OnLeave(frame)
-	frame:SetBackdropColor(1, 1, 1, 0)
-end
-
-local function Dragger_OnEnter(frame)
-	frame:SetBackdropColor(1, 1, 1, 0.8)
-end
-
-local function Dragger_OnMouseDown(frame)
-	local treeframe = frame:GetParent()
-	treeframe:StartSizing("RIGHT")
-end
-
-local function Dragger_OnMouseUp(frame)
-	local treeframe = frame:GetParent()
-	local self = treeframe.obj
-	local frame = treeframe:GetParent()
-	treeframe:StopMovingOrSizing()
-	--treeframe:SetScript("OnUpdate", nil)
-	treeframe:SetUserPlaced(false)
-	--Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize
-	treeframe:SetHeight(0)
-	treeframe:SetPoint("TOPLEFT", frame, "TOPLEFT",0,0)
-	treeframe:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT",0,0)
-
-	local status = self.status or self.localstatus
-	status.treewidth = treeframe:GetWidth()
-
-	treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth())
-	-- recalculate the content width
-	treeframe.obj:OnWidthSet(status.fullwidth)
-	-- update the layout of the content
-	treeframe.obj:DoLayout()
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
-		self:EnableButtonTooltips(true)
-		self.frame:SetScript("OnUpdate", FirstFrameUpdate)
-	end,
-
-	["OnRelease"] = function(self)
-		self.status = nil
-		self.tree = nil
-		self.frame:SetScript("OnUpdate", nil)
-		for k, v in pairs(self.localstatus) do
-			if k == "groups" then
-				for k2 in pairs(v) do
-					v[k2] = nil
-				end
-			else
-				self.localstatus[k] = nil
-			end
-		end
-		self.localstatus.scrollvalue = 0
-		self.localstatus.treewidth = DEFAULT_TREE_WIDTH
-		self.localstatus.treesizable = DEFAULT_TREE_SIZABLE
-	end,
-
-	["EnableButtonTooltips"] = function(self, enable)
-		self.enabletooltips = enable
-	end,
-
-	["CreateButton"] = function(self)
-		local num = AceGUI:GetNextWidgetNum("TreeGroupButton")
-		local button = CreateFrame("Button", ("AceGUI30TreeButton%d"):format(num), self.treeframe, "OptionsListButtonTemplate")
-		button.obj = self
-
-		local icon = button:CreateTexture(nil, "OVERLAY")
-		icon:SetWidth(14)
-		icon:SetHeight(14)
-		button.icon = icon
-
-		button:SetScript("OnClick",Button_OnClick)
-		button:SetScript("OnDoubleClick", Button_OnDoubleClick)
-		button:SetScript("OnEnter",Button_OnEnter)
-		button:SetScript("OnLeave",Button_OnLeave)
-
-		button.toggle.button = button
-		button.toggle:SetScript("OnClick",Expand_OnClick)
-
-		button.text:SetHeight(14) -- Prevents text wrapping
-
-		return button
-	end,
-
-	["SetStatusTable"] = function(self, status)
-		assert(type(status) == "table")
-		self.status = status
-		if not status.groups then
-			status.groups = {}
-		end
-		if not status.scrollvalue then
-			status.scrollvalue = 0
-		end
-		if not status.treewidth then
-			status.treewidth = DEFAULT_TREE_WIDTH
-		end
-		if status.treesizable == nil then
-			status.treesizable = DEFAULT_TREE_SIZABLE
-		end
-		self:SetTreeWidth(status.treewidth,status.treesizable)
-		self:RefreshTree()
-	end,
-
-	--sets the tree to be displayed
-	["SetTree"] = function(self, tree, filter)
-		self.filter = filter
-		if tree then
-			assert(type(tree) == "table")
-		end
-		self.tree = tree
-		self:RefreshTree()
-	end,
-
-	["BuildLevel"] = function(self, tree, level, parent)
-		local groups = (self.status or self.localstatus).groups
-		local hasChildren = self.hasChildren
-
-		for i, v in ipairs(tree) do
-			if v.children then
-				if not self.filter or ShouldDisplayLevel(v.children) then
-					local line = addLine(self, v, tree, level, parent)
-					if groups[line.uniquevalue] then
-						self:BuildLevel(v.children, level+1, line)
-					end
-				end
-			elseif v.visible ~= false or not self.filter then
-				addLine(self, v, tree, level, parent)
-			end
-		end
-	end,
-
-	["RefreshTree"] = function(self,scrollToSelection,fromOnUpdate)
-		local buttons = self.buttons
-		local lines = self.lines
-
-		for i, v in ipairs(buttons) do
-			v:Hide()
-		end
-		while lines[1] do
-			local t = tremove(lines)
-			for k in pairs(t) do
-				t[k] = nil
-			end
-			del(t)
-		end
-
-		if not self.tree then return end
-		--Build the list of visible entries from the tree and status tables
-		local status = self.status or self.localstatus
-		local groupstatus = status.groups
-		local tree = self.tree
-
-		local treeframe = self.treeframe
-
-		status.scrollToSelection = status.scrollToSelection or scrollToSelection	-- needs to be cached in case the control hasn't been drawn yet (code bails out below)
-
-		self:BuildLevel(tree, 1)
-
-		local numlines = #lines
-
-		local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
-		if maxlines <= 0 then return end
-
-		-- workaround for lag spikes on WoW 8.0
-		if WoW80 and self.frame:GetParent() == UIParent and not fromOnUpdate then
-			self.frame:SetScript("OnUpdate", FirstFrameUpdate)
-			return
-		end
-
-		local first, last
-
-		scrollToSelection = status.scrollToSelection
-		status.scrollToSelection = nil
-
-		if numlines <= maxlines then
-			--the whole tree fits in the frame
-			status.scrollvalue = 0
-			self:ShowScroll(false)
-			first, last = 1, numlines
-		else
-			self:ShowScroll(true)
-			--scrolling will be needed
-			self.noupdate = true
-			self.scrollbar:SetMinMaxValues(0, numlines - maxlines)
-			--check if we are scrolled down too far
-			if numlines - status.scrollvalue < maxlines then
-				status.scrollvalue = numlines - maxlines
-			end
-			self.noupdate = nil
-			first, last = status.scrollvalue+1, status.scrollvalue + maxlines
-			--show selection?
-			if scrollToSelection and status.selected then
-				local show
-				for i,line in ipairs(lines) do	-- find the line number
-					if line.uniquevalue==status.selected then
-						show=i
-					end
-				end
-				if not show then
-					-- selection was deleted or something?
-				elseif show>=first and show<=last then
-					-- all good
-				else
-					-- scrolling needed!
-					if show<first then
-						status.scrollvalue = show-1
-					else
-						status.scrollvalue = show-maxlines
-					end
-					first, last = status.scrollvalue+1, status.scrollvalue + maxlines
-				end
-			end
-			if self.scrollbar:GetValue() ~= status.scrollvalue then
-				self.scrollbar:SetValue(status.scrollvalue)
-			end
-		end
-
-		local buttonnum = 1
-		for i = first, last do
-			local line = lines[i]
-			local button = buttons[buttonnum]
-			if not button then
-				button = self:CreateButton()
-
-				buttons[buttonnum] = button
-				button:SetParent(treeframe)
-				button:SetFrameLevel(treeframe:GetFrameLevel()+1)
-				button:ClearAllPoints()
-				if buttonnum == 1 then
-					if self.showscroll then
-						button:SetPoint("TOPRIGHT", -22, -10)
-						button:SetPoint("TOPLEFT", 0, -10)
-					else
-						button:SetPoint("TOPRIGHT", 0, -10)
-						button:SetPoint("TOPLEFT", 0, -10)
-					end
-				else
-					button:SetPoint("TOPRIGHT", buttons[buttonnum-1], "BOTTOMRIGHT",0,0)
-					button:SetPoint("TOPLEFT", buttons[buttonnum-1], "BOTTOMLEFT",0,0)
-				end
-			end
-
-			UpdateButton(button, line, status.selected == line.uniquevalue, line.hasChildren, groupstatus[line.uniquevalue] )
-			button:Show()
-			buttonnum = buttonnum + 1
-		end
-
-	end,
-
-	["SetSelected"] = function(self, value)
-		local status = self.status or self.localstatus
-		if status.selected ~= value then
-			status.selected = value
-			self:Fire("OnGroupSelected", value)
-		end
-	end,
-
-	["Select"] = function(self, uniquevalue, ...)
-		self.filter = false
-		local status = self.status or self.localstatus
-		local groups = status.groups
-		local path = {...}
-		for i = 1, #path do
-			groups[tconcat(path, "\001", 1, i)] = true
-		end
-		status.selected = uniquevalue
-		self:RefreshTree(true)
-		self:Fire("OnGroupSelected", uniquevalue)
-	end,
-
-	["SelectByPath"] = function(self, ...)
-		self:Select(BuildUniqueValue(...), ...)
-	end,
-
-	["SelectByValue"] = function(self, uniquevalue)
-		self:Select(uniquevalue, ("\001"):split(uniquevalue))
-	end,
-
-	["ShowScroll"] = function(self, show)
-		self.showscroll = show
-		if show then
-			self.scrollbar:Show()
-			if self.buttons[1] then
-				self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",-22,-10)
-			end
-		else
-			self.scrollbar:Hide()
-			if self.buttons[1] then
-				self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",0,-10)
-			end
-		end
-	end,
-
-	["OnWidthSet"] = function(self, width)
-		local content = self.content
-		local treeframe = self.treeframe
-		local status = self.status or self.localstatus
-		status.fullwidth = width
-
-		local contentwidth = width - status.treewidth - 20
-		if contentwidth < 0 then
-			contentwidth = 0
-		end
-		content:SetWidth(contentwidth)
-		content.width = contentwidth
-
-		local maxtreewidth = math_min(400, width - 50)
-
-		if maxtreewidth > 100 and status.treewidth > maxtreewidth then
-			self:SetTreeWidth(maxtreewidth, status.treesizable)
-		end
-		treeframe:SetMaxResize(maxtreewidth, 1600)
-	end,
-
-	["OnHeightSet"] = function(self, height)
-		local content = self.content
-		local contentheight = height - 20
-		if contentheight < 0 then
-			contentheight = 0
-		end
-		content:SetHeight(contentheight)
-		content.height = contentheight
-	end,
-
-	["SetTreeWidth"] = function(self, treewidth, resizable)
-		if not resizable then
-			if type(treewidth) == 'number' then
-				resizable = false
-			elseif type(treewidth) == 'boolean' then
-				resizable = treewidth
-				treewidth = DEFAULT_TREE_WIDTH
-			else
-				resizable = false
-				treewidth = DEFAULT_TREE_WIDTH
-			end
-		end
-		self.treeframe:SetWidth(treewidth)
-		self.dragger:EnableMouse(resizable)
-
-		local status = self.status or self.localstatus
-		status.treewidth = treewidth
-		status.treesizable = resizable
-
-		-- recalculate the content width
-		if status.fullwidth then
-			self:OnWidthSet(status.fullwidth)
-		end
-	end,
-
-	["GetTreeWidth"] = function(self)
-		local status = self.status or self.localstatus
-		return status.treewidth or DEFAULT_TREE_WIDTH
-	end,
-
-	["LayoutFinished"] = function(self, width, height)
-		if self.noAutoHeight then return end
-		self:SetHeight((height or 0) + 20)
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local PaneBackdrop  = {
-	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-	tile = true, tileSize = 16, edgeSize = 16,
-	insets = { left = 3, right = 3, top = 5, bottom = 3 }
-}
-
-local DraggerBackdrop  = {
-	bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
-	edgeFile = nil,
-	tile = true, tileSize = 16, edgeSize = 0,
-	insets = { left = 3, right = 3, top = 7, bottom = 7 }
-}
-
-local function Constructor()
-	local num = AceGUI:GetNextWidgetNum(Type)
-	local frame = CreateFrame("Frame", nil, UIParent)
-
-	local treeframe = CreateFrame("Frame", nil, frame)
-	treeframe:SetPoint("TOPLEFT")
-	treeframe:SetPoint("BOTTOMLEFT")
-	treeframe:SetWidth(DEFAULT_TREE_WIDTH)
-	treeframe:EnableMouseWheel(true)
-	treeframe:SetBackdrop(PaneBackdrop)
-	treeframe:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
-	treeframe:SetBackdropBorderColor(0.4, 0.4, 0.4)
-	treeframe:SetResizable(true)
-	treeframe:SetMinResize(100, 1)
-	treeframe:SetMaxResize(400, 1600)
-	treeframe:SetScript("OnUpdate", FirstFrameUpdate)
-	treeframe:SetScript("OnSizeChanged", Tree_OnSizeChanged)
-	treeframe:SetScript("OnMouseWheel", Tree_OnMouseWheel)
-
-	local dragger = CreateFrame("Frame", nil, treeframe)
-	dragger:SetWidth(8)
-	dragger:SetPoint("TOP", treeframe, "TOPRIGHT")
-	dragger:SetPoint("BOTTOM", treeframe, "BOTTOMRIGHT")
-	dragger:SetBackdrop(DraggerBackdrop)
-	dragger:SetBackdropColor(1, 1, 1, 0)
-	dragger:SetScript("OnEnter", Dragger_OnEnter)
-	dragger:SetScript("OnLeave", Dragger_OnLeave)
-	dragger:SetScript("OnMouseDown", Dragger_OnMouseDown)
-	dragger:SetScript("OnMouseUp", Dragger_OnMouseUp)
-
-	local scrollbar = CreateFrame("Slider", ("AceConfigDialogTreeGroup%dScrollBar"):format(num), treeframe, "UIPanelScrollBarTemplate")
-	scrollbar:SetScript("OnValueChanged", nil)
-	scrollbar:SetPoint("TOPRIGHT", -10, -26)
-	scrollbar:SetPoint("BOTTOMRIGHT", -10, 26)
-	scrollbar:SetMinMaxValues(0,0)
-	scrollbar:SetValueStep(1)
-	scrollbar:SetValue(0)
-	scrollbar:SetWidth(16)
-	scrollbar:SetScript("OnValueChanged", OnScrollValueChanged)
-
-	local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
-	scrollbg:SetAllPoints(scrollbar)
-	scrollbg:SetColorTexture(0,0,0,0.4)
-
-	local border = CreateFrame("Frame",nil,frame)
-	border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
-	border:SetPoint("BOTTOMRIGHT")
-	border:SetBackdrop(PaneBackdrop)
-	border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
-	border:SetBackdropBorderColor(0.4, 0.4, 0.4)
-
-	--Container Support
-	local content = CreateFrame("Frame", nil, border)
-	content:SetPoint("TOPLEFT", 10, -10)
-	content:SetPoint("BOTTOMRIGHT", -10, 10)
-
-	local widget = {
-		frame        = frame,
-		lines        = {},
-		levels       = {},
-		buttons      = {},
-		hasChildren  = {},
-		localstatus  = { groups = {}, scrollvalue = 0 },
-		filter       = false,
-		treeframe    = treeframe,
-		dragger      = dragger,
-		scrollbar    = scrollbar,
-		border       = border,
-		content      = content,
-		type         = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	treeframe.obj, dragger.obj, scrollbar.obj = widget, widget, widget
-
-	return AceGUI:RegisterAsContainer(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua b/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
deleted file mode 100644
index 6825420..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
+++ /dev/null
@@ -1,336 +0,0 @@
-local AceGUI = LibStub("AceGUI-3.0")
-
--- Lua APIs
-local pairs, assert, type = pairs, assert, type
-
--- WoW APIs
-local PlaySound = PlaySound
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GameFontNormal
-
-----------------
--- Main Frame --
-----------------
---[[
-	Events :
-		OnClose
-
-]]
-do
-	local Type = "Window"
-	local Version = 6
-
-	local function frameOnShow(this)
-		this.obj:Fire("OnShow")
-	end
-
-	local function frameOnClose(this)
-		this.obj:Fire("OnClose")
-	end
-
-	local function closeOnClick(this)
-		PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
-		this.obj:Hide()
-	end
-
-	local function frameOnMouseDown(this)
-		AceGUI:ClearFocus()
-	end
-
-	local function titleOnMouseDown(this)
-		this:GetParent():StartMoving()
-		AceGUI:ClearFocus()
-	end
-
-	local function frameOnMouseUp(this)
-		local frame = this:GetParent()
-		frame:StopMovingOrSizing()
-		local self = frame.obj
-		local status = self.status or self.localstatus
-		status.width = frame:GetWidth()
-		status.height = frame:GetHeight()
-		status.top = frame:GetTop()
-		status.left = frame:GetLeft()
-	end
-
-	local function sizerseOnMouseDown(this)
-		this:GetParent():StartSizing("BOTTOMRIGHT")
-		AceGUI:ClearFocus()
-	end
-
-	local function sizersOnMouseDown(this)
-		this:GetParent():StartSizing("BOTTOM")
-		AceGUI:ClearFocus()
-	end
-
-	local function sizereOnMouseDown(this)
-		this:GetParent():StartSizing("RIGHT")
-		AceGUI:ClearFocus()
-	end
-
-	local function sizerOnMouseUp(this)
-		this:GetParent():StopMovingOrSizing()
-	end
-
-	local function SetTitle(self,title)
-		self.titletext:SetText(title)
-	end
-
-	local function SetStatusText(self,text)
-		-- self.statustext:SetText(text)
-	end
-
-	local function Hide(self)
-		self.frame:Hide()
-	end
-
-	local function Show(self)
-		self.frame:Show()
-	end
-
-	local function OnAcquire(self)
-		self.frame:SetParent(UIParent)
-		self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
-		self:ApplyStatus()
-		self:EnableResize(true)
-		self:Show()
-	end
-
-	local function OnRelease(self)
-		self.status = nil
-		for k in pairs(self.localstatus) do
-			self.localstatus[k] = nil
-		end
-	end
-
-	-- called to set an external table to store status in
-	local function SetStatusTable(self, status)
-		assert(type(status) == "table")
-		self.status = status
-		self:ApplyStatus()
-	end
-
-	local function ApplyStatus(self)
-		local status = self.status or self.localstatus
-		local frame = self.frame
-		self:SetWidth(status.width or 700)
-		self:SetHeight(status.height or 500)
-		if status.top and status.left then
-			frame:SetPoint("TOP",UIParent,"BOTTOM",0,status.top)
-			frame:SetPoint("LEFT",UIParent,"LEFT",status.left,0)
-		else
-			frame:SetPoint("CENTER",UIParent,"CENTER")
-		end
-	end
-
-	local function OnWidthSet(self, width)
-		local content = self.content
-		local contentwidth = width - 34
-		if contentwidth < 0 then
-			contentwidth = 0
-		end
-		content:SetWidth(contentwidth)
-		content.width = contentwidth
-	end
-
-
-	local function OnHeightSet(self, height)
-		local content = self.content
-		local contentheight = height - 57
-		if contentheight < 0 then
-			contentheight = 0
-		end
-		content:SetHeight(contentheight)
-		content.height = contentheight
-	end
-
-	local function EnableResize(self, state)
-		local func = state and "Show" or "Hide"
-		self.sizer_se[func](self.sizer_se)
-		self.sizer_s[func](self.sizer_s)
-		self.sizer_e[func](self.sizer_e)
-	end
-
-	local function Constructor()
-		local frame = CreateFrame("Frame",nil,UIParent)
-		local self = {}
-		self.type = "Window"
-
-		self.Hide = Hide
-		self.Show = Show
-		self.SetTitle =  SetTitle
-		self.OnRelease = OnRelease
-		self.OnAcquire = OnAcquire
-		self.SetStatusText = SetStatusText
-		self.SetStatusTable = SetStatusTable
-		self.ApplyStatus = ApplyStatus
-		self.OnWidthSet = OnWidthSet
-		self.OnHeightSet = OnHeightSet
-		self.EnableResize = EnableResize
-
-		self.localstatus = {}
-
-		self.frame = frame
-		frame.obj = self
-		frame:SetWidth(700)
-		frame:SetHeight(500)
-		frame:SetPoint("CENTER",UIParent,"CENTER",0,0)
-		frame:EnableMouse()
-		frame:SetMovable(true)
-		frame:SetResizable(true)
-		frame:SetFrameStrata("FULLSCREEN_DIALOG")
-		frame:SetScript("OnMouseDown", frameOnMouseDown)
-
-		frame:SetScript("OnShow",frameOnShow)
-		frame:SetScript("OnHide",frameOnClose)
-		frame:SetMinResize(240,240)
-		frame:SetToplevel(true)
-
-		local titlebg = frame:CreateTexture(nil, "BACKGROUND")
-		titlebg:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Title-Background]])
-		titlebg:SetPoint("TOPLEFT", 9, -6)
-		titlebg:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", -28, -24)
-
-		local dialogbg = frame:CreateTexture(nil, "BACKGROUND")
-		dialogbg:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
-		dialogbg:SetPoint("TOPLEFT", 8, -24)
-		dialogbg:SetPoint("BOTTOMRIGHT", -6, 8)
-		dialogbg:SetVertexColor(0, 0, 0, .75)
-
-		local topleft = frame:CreateTexture(nil, "BORDER")
-		topleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
-		topleft:SetWidth(64)
-		topleft:SetHeight(64)
-		topleft:SetPoint("TOPLEFT")
-		topleft:SetTexCoord(0.501953125, 0.625, 0, 1)
-
-		local topright = frame:CreateTexture(nil, "BORDER")
-		topright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
-		topright:SetWidth(64)
-		topright:SetHeight(64)
-		topright:SetPoint("TOPRIGHT")
-		topright:SetTexCoord(0.625, 0.75, 0, 1)
-
-		local top = frame:CreateTexture(nil, "BORDER")
-		top:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
-		top:SetHeight(64)
-		top:SetPoint("TOPLEFT", topleft, "TOPRIGHT")
-		top:SetPoint("TOPRIGHT", topright, "TOPLEFT")
-		top:SetTexCoord(0.25, 0.369140625, 0, 1)
-
-		local bottomleft = frame:CreateTexture(nil, "BORDER")
-		bottomleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
-		bottomleft:SetWidth(64)
-		bottomleft:SetHeight(64)
-		bottomleft:SetPoint("BOTTOMLEFT")
-		bottomleft:SetTexCoord(0.751953125, 0.875, 0, 1)
-
-		local bottomright = frame:CreateTexture(nil, "BORDER")
-		bottomright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
-		bottomright:SetWidth(64)
-		bottomright:SetHeight(64)
-		bottomright:SetPoint("BOTTOMRIGHT")
-		bottomright:SetTexCoord(0.875, 1, 0, 1)
-
-		local bottom = frame:CreateTexture(nil, "BORDER")
-		bottom:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
-		bottom:SetHeight(64)
-		bottom:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMRIGHT")
-		bottom:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMLEFT")
-		bottom:SetTexCoord(0.376953125, 0.498046875, 0, 1)
-
-		local left = frame:CreateTexture(nil, "BORDER")
-		left:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
-		left:SetWidth(64)
-		left:SetPoint("TOPLEFT", topleft, "BOTTOMLEFT")
-		left:SetPoint("BOTTOMLEFT", bottomleft, "TOPLEFT")
-		left:SetTexCoord(0.001953125, 0.125, 0, 1)
-
-		local right = frame:CreateTexture(nil, "BORDER")
-		right:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
-		right:SetWidth(64)
-		right:SetPoint("TOPRIGHT", topright, "BOTTOMRIGHT")
-		right:SetPoint("BOTTOMRIGHT", bottomright, "TOPRIGHT")
-		right:SetTexCoord(0.1171875, 0.2421875, 0, 1)
-
-		local close = CreateFrame("Button", nil, frame, "UIPanelCloseButton")
-		close:SetPoint("TOPRIGHT", 2, 1)
-		close:SetScript("OnClick", closeOnClick)
-		self.closebutton = close
-		close.obj = self
-
-		local titletext = frame:CreateFontString(nil, "ARTWORK")
-		titletext:SetFontObject(GameFontNormal)
-		titletext:SetPoint("TOPLEFT", 12, -8)
-		titletext:SetPoint("TOPRIGHT", -32, -8)
-		self.titletext = titletext
-
-		local title = CreateFrame("Button", nil, frame)
-		title:SetPoint("TOPLEFT", titlebg)
-		title:SetPoint("BOTTOMRIGHT", titlebg)
-		title:EnableMouse()
-		title:SetScript("OnMouseDown",titleOnMouseDown)
-		title:SetScript("OnMouseUp", frameOnMouseUp)
-		self.title = title
-
-		local sizer_se = CreateFrame("Frame",nil,frame)
-		sizer_se:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
-		sizer_se:SetWidth(25)
-		sizer_se:SetHeight(25)
-		sizer_se:EnableMouse()
-		sizer_se:SetScript("OnMouseDown",sizerseOnMouseDown)
-		sizer_se:SetScript("OnMouseUp", sizerOnMouseUp)
-		self.sizer_se = sizer_se
-
-		local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
-		self.line1 = line1
-		line1:SetWidth(14)
-		line1:SetHeight(14)
-		line1:SetPoint("BOTTOMRIGHT", -8, 8)
-		line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
-		local x = 0.1 * 14/17
-		line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
-
-		local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
-		self.line2 = line2
-		line2:SetWidth(8)
-		line2:SetHeight(8)
-		line2:SetPoint("BOTTOMRIGHT", -8, 8)
-		line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
-		local x = 0.1 * 8/17
-		line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
-
-		local sizer_s = CreateFrame("Frame",nil,frame)
-		sizer_s:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-25,0)
-		sizer_s:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0)
-		sizer_s:SetHeight(25)
-		sizer_s:EnableMouse()
-		sizer_s:SetScript("OnMouseDown",sizersOnMouseDown)
-		sizer_s:SetScript("OnMouseUp", sizerOnMouseUp)
-		self.sizer_s = sizer_s
-
-		local sizer_e = CreateFrame("Frame",nil,frame)
-		sizer_e:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,25)
-		sizer_e:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
-		sizer_e:SetWidth(25)
-		sizer_e:EnableMouse()
-		sizer_e:SetScript("OnMouseDown",sizereOnMouseDown)
-		sizer_e:SetScript("OnMouseUp", sizerOnMouseUp)
-		self.sizer_e = sizer_e
-
-		--Container Support
-		local content = CreateFrame("Frame",nil,frame)
-		self.content = content
-		content.obj = self
-		content:SetPoint("TOPLEFT",frame,"TOPLEFT",12,-32)
-		content:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-12,13)
-
-		AceGUI:RegisterAsContainer(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(Type,Constructor,Version)
-end
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
deleted file mode 100644
index 0a23be4..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
+++ /dev/null
@@ -1,103 +0,0 @@
---[[-----------------------------------------------------------------------------
-Button Widget
-Graphical Button.
--------------------------------------------------------------------------------]]
-local Type, Version = "Button", 24
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs = pairs
-
--- WoW APIs
-local _G = _G
-local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Button_OnClick(frame, ...)
-	AceGUI:ClearFocus()
-	PlaySound(852) -- SOUNDKIT.IG_MAINMENU_OPTION
-	frame.obj:Fire("OnClick", ...)
-end
-
-local function Control_OnEnter(frame)
-	frame.obj:Fire("OnEnter")
-end
-
-local function Control_OnLeave(frame)
-	frame.obj:Fire("OnLeave")
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		-- restore default values
-		self:SetHeight(24)
-		self:SetWidth(200)
-		self:SetDisabled(false)
-		self:SetAutoWidth(false)
-		self:SetText()
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["SetText"] = function(self, text)
-		self.text:SetText(text)
-		if self.autoWidth then
-			self:SetWidth(self.text:GetStringWidth() + 30)
-		end
-	end,
-
-	["SetAutoWidth"] = function(self, autoWidth)
-		self.autoWidth = autoWidth
-		if self.autoWidth then
-			self:SetWidth(self.text:GetStringWidth() + 30)
-		end
-	end,
-
-	["SetDisabled"] = function(self, disabled)
-		self.disabled = disabled
-		if disabled then
-			self.frame:Disable()
-		else
-			self.frame:Enable()
-		end
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
-	local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate")
-	frame:Hide()
-
-	frame:EnableMouse(true)
-	frame:SetScript("OnClick", Button_OnClick)
-	frame:SetScript("OnEnter", Control_OnEnter)
-	frame:SetScript("OnLeave", Control_OnLeave)
-
-	local text = frame:GetFontString()
-	text:ClearAllPoints()
-	text:SetPoint("TOPLEFT", 15, -1)
-	text:SetPoint("BOTTOMRIGHT", -15, 1)
-	text:SetJustifyV("MIDDLE")
-
-	local widget = {
-		text  = text,
-		frame = frame,
-		type  = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
deleted file mode 100644
index 44cab23..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
+++ /dev/null
@@ -1,296 +0,0 @@
---[[-----------------------------------------------------------------------------
-Checkbox Widget
--------------------------------------------------------------------------------]]
-local Type, Version = "CheckBox", 24
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local select, pairs = select, pairs
-
--- WoW APIs
-local PlaySound = PlaySound
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: SetDesaturation, GameFontHighlight
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-local function AlignImage(self)
-	local img = self.image:GetTexture()
-	self.text:ClearAllPoints()
-	if not img then
-		self.text:SetPoint("LEFT", self.checkbg, "RIGHT")
-		self.text:SetPoint("RIGHT")
-	else
-		self.text:SetPoint("LEFT", self.checkbg, "RIGHT", self.image:GetWidth() + 2, 0)
-		self.text:SetPoint("RIGHT")
-	end
-end
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Control_OnEnter(frame)
-	frame.obj:Fire("OnEnter")
-end
-
-local function Control_OnLeave(frame)
-	frame.obj:Fire("OnLeave")
-end
-
-local function CheckBox_OnMouseDown(frame)
-	local self = frame.obj
-	if not self.disabled then
-		if self.image:GetTexture() then
-			self.text:SetPoint("LEFT", self.image,"RIGHT", 2, -1)
-		else
-			self.text:SetPoint("LEFT", self.checkbg, "RIGHT", 1, -1)
-		end
-	end
-	AceGUI:ClearFocus()
-end
-
-local function CheckBox_OnMouseUp(frame)
-	local self = frame.obj
-	if not self.disabled then
-		self:ToggleChecked()
-
-		if self.checked then
-			PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
-		else -- for both nil and false (tristate)
-			PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
-		end
-
-		self:Fire("OnValueChanged", self.checked)
-		AlignImage(self)
-	end
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetType()
-		self:SetValue(false)
-		self:SetTriState(nil)
-		-- height is calculated from the width and required space for the description
-		self:SetWidth(200)
-		self:SetImage()
-		self:SetDisabled(nil)
-		self:SetDescription(nil)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["OnWidthSet"] = function(self, width)
-		if self.desc then
-			self.desc:SetWidth(width - 30)
-			if self.desc:GetText() and self.desc:GetText() ~= "" then
-				self:SetHeight(28 + self.desc:GetHeight())
-			end
-		end
-	end,
-
-	["SetDisabled"] = function(self, disabled)
-		self.disabled = disabled
-		if disabled then
-			self.frame:Disable()
-			self.text:SetTextColor(0.5, 0.5, 0.5)
-			SetDesaturation(self.check, true)
-			if self.desc then
-				self.desc:SetTextColor(0.5, 0.5, 0.5)
-			end
-		else
-			self.frame:Enable()
-			self.text:SetTextColor(1, 1, 1)
-			if self.tristate and self.checked == nil then
-				SetDesaturation(self.check, true)
-			else
-				SetDesaturation(self.check, false)
-			end
-			if self.desc then
-				self.desc:SetTextColor(1, 1, 1)
-			end
-		end
-	end,
-
-	["SetValue"] = function(self,value)
-		local check = self.check
-		self.checked = value
-		if value then
-			SetDesaturation(self.check, false)
-			self.check:Show()
-		else
-			--Nil is the unknown tristate value
-			if self.tristate and value == nil then
-				SetDesaturation(self.check, true)
-				self.check:Show()
-			else
-				SetDesaturation(self.check, false)
-				self.check:Hide()
-			end
-		end
-		self:SetDisabled(self.disabled)
-	end,
-
-	["GetValue"] = function(self)
-		return self.checked
-	end,
-
-	["SetTriState"] = function(self, enabled)
-		self.tristate = enabled
-		self:SetValue(self:GetValue())
-	end,
-
-	["SetType"] = function(self, type)
-		local checkbg = self.checkbg
-		local check = self.check
-		local highlight = self.highlight
-
-		local size
-		if type == "radio" then
-			size = 16
-			checkbg:SetTexture("Interface\\Buttons\\UI-RadioButton")
-			checkbg:SetTexCoord(0, 0.25, 0, 1)
-			check:SetTexture("Interface\\Buttons\\UI-RadioButton")
-			check:SetTexCoord(0.25, 0.5, 0, 1)
-			check:SetBlendMode("ADD")
-			highlight:SetTexture("Interface\\Buttons\\UI-RadioButton")
-			highlight:SetTexCoord(0.5, 0.75, 0, 1)
-		else
-			size = 24
-			checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up")
-			checkbg:SetTexCoord(0, 1, 0, 1)
-			check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
-			check:SetTexCoord(0, 1, 0, 1)
-			check:SetBlendMode("BLEND")
-			highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight")
-			highlight:SetTexCoord(0, 1, 0, 1)
-		end
-		checkbg:SetHeight(size)
-		checkbg:SetWidth(size)
-	end,
-
-	["ToggleChecked"] = function(self)
-		local value = self:GetValue()
-		if self.tristate then
-			--cycle in true, nil, false order
-			if value then
-				self:SetValue(nil)
-			elseif value == nil then
-				self:SetValue(false)
-			else
-				self:SetValue(true)
-			end
-		else
-			self:SetValue(not self:GetValue())
-		end
-	end,
-
-	["SetLabel"] = function(self, label)
-		self.text:SetText(label)
-	end,
-
-	["SetDescription"] = function(self, desc)
-		if desc then
-			if not self.desc then
-				local desc = self.frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
-				desc:ClearAllPoints()
-				desc:SetPoint("TOPLEFT", self.checkbg, "TOPRIGHT", 5, -21)
-				desc:SetWidth(self.frame.width - 30)
-				desc:SetPoint("RIGHT", self.frame, "RIGHT", -30, 0)
-				desc:SetJustifyH("LEFT")
-				desc:SetJustifyV("TOP")
-				self.desc = desc
-			end
-			self.desc:Show()
-			--self.text:SetFontObject(GameFontNormal)
-			self.desc:SetText(desc)
-			self:SetHeight(28 + self.desc:GetHeight())
-		else
-			if self.desc then
-				self.desc:SetText("")
-				self.desc:Hide()
-			end
-			--self.text:SetFontObject(GameFontHighlight)
-			self:SetHeight(24)
-		end
-	end,
-
-	["SetImage"] = function(self, path, ...)
-		local image = self.image
-		image:SetTexture(path)
-
-		if image:GetTexture() then
-			local n = select("#", ...)
-			if n == 4 or n == 8 then
-				image:SetTexCoord(...)
-			else
-				image:SetTexCoord(0, 1, 0, 1)
-			end
-		end
-		AlignImage(self)
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local frame = CreateFrame("Button", nil, UIParent)
-	frame:Hide()
-
-	frame:EnableMouse(true)
-	frame:SetScript("OnEnter", Control_OnEnter)
-	frame:SetScript("OnLeave", Control_OnLeave)
-	frame:SetScript("OnMouseDown", CheckBox_OnMouseDown)
-	frame:SetScript("OnMouseUp", CheckBox_OnMouseUp)
-
-	local checkbg = frame:CreateTexture(nil, "ARTWORK")
-	checkbg:SetWidth(24)
-	checkbg:SetHeight(24)
-	checkbg:SetPoint("TOPLEFT")
-	checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up")
-
-	local check = frame:CreateTexture(nil, "OVERLAY")
-	check:SetAllPoints(checkbg)
-	check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
-
-	local text = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
-	text:SetJustifyH("LEFT")
-	text:SetHeight(18)
-	text:SetPoint("LEFT", checkbg, "RIGHT")
-	text:SetPoint("RIGHT")
-
-	local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
-	highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight")
-	highlight:SetBlendMode("ADD")
-	highlight:SetAllPoints(checkbg)
-
-	local image = frame:CreateTexture(nil, "OVERLAY")
-	image:SetHeight(16)
-	image:SetWidth(16)
-	image:SetPoint("LEFT", checkbg, "RIGHT", 1, 0)
-
-	local widget = {
-		checkbg   = checkbg,
-		check     = check,
-		text      = text,
-		highlight = highlight,
-		image     = image,
-		frame     = frame,
-		type      = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
deleted file mode 100644
index 05e2b57..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
+++ /dev/null
@@ -1,188 +0,0 @@
---[[-----------------------------------------------------------------------------
-ColorPicker Widget
--------------------------------------------------------------------------------]]
-local Type, Version = "ColorPicker", 23
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs = pairs
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: ShowUIPanel, HideUIPanel, ColorPickerFrame, OpacitySliderFrame
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-local function ColorCallback(self, r, g, b, a, isAlpha)
-	if not self.HasAlpha then
-		a = 1
-	end
-	self:SetColor(r, g, b, a)
-	if ColorPickerFrame:IsVisible() then
-		--colorpicker is still open
-		self:Fire("OnValueChanged", r, g, b, a)
-	else
-		--colorpicker is closed, color callback is first, ignore it,
-		--alpha callback is the final call after it closes so confirm now
-		if isAlpha then
-			self:Fire("OnValueConfirmed", r, g, b, a)
-		end
-	end
-end
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Control_OnEnter(frame)
-	frame.obj:Fire("OnEnter")
-end
-
-local function Control_OnLeave(frame)
-	frame.obj:Fire("OnLeave")
-end
-
-local function ColorSwatch_OnClick(frame)
-	HideUIPanel(ColorPickerFrame)
-	local self = frame.obj
-	if not self.disabled then
-		ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
-		ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10)
-		ColorPickerFrame:SetClampedToScreen(true)
-
-		ColorPickerFrame.func = function()
-			local r, g, b = ColorPickerFrame:GetColorRGB()
-			local a = 1 - OpacitySliderFrame:GetValue()
-			ColorCallback(self, r, g, b, a)
-		end
-
-		ColorPickerFrame.hasOpacity = self.HasAlpha
-		ColorPickerFrame.opacityFunc = function()
-			local r, g, b = ColorPickerFrame:GetColorRGB()
-			local a = 1 - OpacitySliderFrame:GetValue()
-			ColorCallback(self, r, g, b, a, true)
-		end
-
-		local r, g, b, a = self.r, self.g, self.b, self.a
-		if self.HasAlpha then
-			ColorPickerFrame.opacity = 1 - (a or 0)
-		end
-		ColorPickerFrame:SetColorRGB(r, g, b)
-
-		ColorPickerFrame.cancelFunc = function()
-			ColorCallback(self, r, g, b, a, true)
-		end
-
-		ShowUIPanel(ColorPickerFrame)
-	end
-	AceGUI:ClearFocus()
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetHeight(24)
-		self:SetWidth(200)
-		self:SetHasAlpha(false)
-		self:SetColor(0, 0, 0, 1)
-		self:SetDisabled(nil)
-		self:SetLabel(nil)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["SetLabel"] = function(self, text)
-		self.text:SetText(text)
-	end,
-
-	["SetColor"] = function(self, r, g, b, a)
-		self.r = r
-		self.g = g
-		self.b = b
-		self.a = a or 1
-		self.colorSwatch:SetVertexColor(r, g, b, a)
-	end,
-
-	["SetHasAlpha"] = function(self, HasAlpha)
-		self.HasAlpha = HasAlpha
-	end,
-
-	["SetDisabled"] = function(self, disabled)
-		self.disabled = disabled
-		if self.disabled then
-			self.frame:Disable()
-			self.text:SetTextColor(0.5, 0.5, 0.5)
-		else
-			self.frame:Enable()
-			self.text:SetTextColor(1, 1, 1)
-		end
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local frame = CreateFrame("Button", nil, UIParent)
-	frame:Hide()
-
-	frame:EnableMouse(true)
-	frame:SetScript("OnEnter", Control_OnEnter)
-	frame:SetScript("OnLeave", Control_OnLeave)
-	frame:SetScript("OnClick", ColorSwatch_OnClick)
-
-	local colorSwatch = frame:CreateTexture(nil, "OVERLAY")
-	colorSwatch:SetWidth(19)
-	colorSwatch:SetHeight(19)
-	colorSwatch:SetTexture("Interface\\ChatFrame\\ChatFrameColorSwatch")
-	colorSwatch:SetPoint("LEFT")
-
-	local texture = frame:CreateTexture(nil, "BACKGROUND")
-	texture:SetWidth(16)
-	texture:SetHeight(16)
-	texture:SetColorTexture(1, 1, 1)
-	texture:SetPoint("CENTER", colorSwatch)
-	texture:Show()
-
-	local checkers = frame:CreateTexture(nil, "BACKGROUND")
-	checkers:SetWidth(14)
-	checkers:SetHeight(14)
-	checkers:SetTexture("Tileset\\Generic\\Checkers")
-	checkers:SetTexCoord(.25, 0, 0.5, .25)
-	checkers:SetDesaturated(true)
-	checkers:SetVertexColor(1, 1, 1, 0.75)
-	checkers:SetPoint("CENTER", colorSwatch)
-	checkers:Show()
-
-	local text = frame:CreateFontString(nil,"OVERLAY","GameFontHighlight")
-	text:SetHeight(24)
-	text:SetJustifyH("LEFT")
-	text:SetTextColor(1, 1, 1)
-	text:SetPoint("LEFT", colorSwatch, "RIGHT", 2, 0)
-	text:SetPoint("RIGHT")
-
-	--local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
-	--highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
-	--highlight:SetBlendMode("ADD")
-	--highlight:SetAllPoints(frame)
-
-	local widget = {
-		colorSwatch = colorSwatch,
-		text        = text,
-		frame       = frame,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
deleted file mode 100644
index 5748e4f..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
+++ /dev/null
@@ -1,471 +0,0 @@
---[[ $Id: AceGUIWidget-DropDown-Items.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]--
-
-local AceGUI = LibStub("AceGUI-3.0")
-
--- Lua APIs
-local select, assert = select, assert
-
--- WoW APIs
-local PlaySound = PlaySound
-local CreateFrame = CreateFrame
-
-local function fixlevels(parent,...)
-	local i = 1
-	local child = select(i, ...)
-	while child do
-		child:SetFrameLevel(parent:GetFrameLevel()+1)
-		fixlevels(child, child:GetChildren())
-		i = i + 1
-		child = select(i, ...)
-	end
-end
-
-local function fixstrata(strata, parent, ...)
-	local i = 1
-	local child = select(i, ...)
-	parent:SetFrameStrata(strata)
-	while child do
-		fixstrata(strata, child, child:GetChildren())
-		i = i + 1
-		child = select(i, ...)
-	end
-end
-
--- ItemBase is the base "class" for all dropdown items.
--- Each item has to use ItemBase.Create(widgetType) to
--- create an initial 'self' value.
--- ItemBase will add common functions and ui event handlers.
--- Be sure to keep basic usage when you override functions.
-
-local ItemBase = {
-	-- NOTE: The ItemBase version is added to each item's version number
-	--       to ensure proper updates on ItemBase changes.
-	--       Use at least 1000er steps.
-	version = 1000,
-	counter = 0,
-}
-
-function ItemBase.Frame_OnEnter(this)
-	local self = this.obj
-
-	if self.useHighlight then
-		self.highlight:Show()
-	end
-	self:Fire("OnEnter")
-
-	if self.specialOnEnter then
-		self.specialOnEnter(self)
-	end
-end
-
-function ItemBase.Frame_OnLeave(this)
-	local self = this.obj
-
-	self.highlight:Hide()
-	self:Fire("OnLeave")
-
-	if self.specialOnLeave then
-		self.specialOnLeave(self)
-	end
-end
-
--- exported, AceGUI callback
-function ItemBase.OnAcquire(self)
-	self.frame:SetToplevel(true)
-	self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
-end
-
--- exported, AceGUI callback
-function ItemBase.OnRelease(self)
-	self:SetDisabled(false)
-	self.pullout = nil
-	self.frame:SetParent(nil)
-	self.frame:ClearAllPoints()
-	self.frame:Hide()
-end
-
--- exported
--- NOTE: this is called by a Dropdown-Pullout.
---       Do not call this method directly
-function ItemBase.SetPullout(self, pullout)
-	self.pullout = pullout
-
-	self.frame:SetParent(nil)
-	self.frame:SetParent(pullout.itemFrame)
-	self.parent = pullout.itemFrame
-	fixlevels(pullout.itemFrame, pullout.itemFrame:GetChildren())
-end
-
--- exported
-function ItemBase.SetText(self, text)
-	self.text:SetText(text or "")
-end
-
--- exported
-function ItemBase.GetText(self)
-	return self.text:GetText()
-end
-
--- exported
-function ItemBase.SetPoint(self, ...)
-	self.frame:SetPoint(...)
-end
-
--- exported
-function ItemBase.Show(self)
-	self.frame:Show()
-end
-
--- exported
-function ItemBase.Hide(self)
-	self.frame:Hide()
-end
-
--- exported
-function ItemBase.SetDisabled(self, disabled)
-	self.disabled = disabled
-	if disabled then
-		self.useHighlight = false
-		self.text:SetTextColor(.5, .5, .5)
-	else
-		self.useHighlight = true
-		self.text:SetTextColor(1, 1, 1)
-	end
-end
-
--- exported
--- NOTE: this is called by a Dropdown-Pullout.
---       Do not call this method directly
-function ItemBase.SetOnLeave(self, func)
-	self.specialOnLeave = func
-end
-
--- exported
--- NOTE: this is called by a Dropdown-Pullout.
---       Do not call this method directly
-function ItemBase.SetOnEnter(self, func)
-	self.specialOnEnter = func
-end
-
-function ItemBase.Create(type)
-	-- NOTE: Most of the following code is copied from AceGUI-3.0/Dropdown widget
-	local count = AceGUI:GetNextWidgetNum(type)
-	local frame = CreateFrame("Button", "AceGUI30DropDownItem"..count)
-	local self = {}
-	self.frame = frame
-	frame.obj = self
-	self.type = type
-
-	self.useHighlight = true
-
-	frame:SetHeight(17)
-	frame:SetFrameStrata("FULLSCREEN_DIALOG")
-
-	local text = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
-	text:SetTextColor(1,1,1)
-	text:SetJustifyH("LEFT")
-	text:SetPoint("TOPLEFT",frame,"TOPLEFT",18,0)
-	text:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-8,0)
-	self.text = text
-
-	local highlight = frame:CreateTexture(nil, "OVERLAY")
-	highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
-	highlight:SetBlendMode("ADD")
-	highlight:SetHeight(14)
-	highlight:ClearAllPoints()
-	highlight:SetPoint("RIGHT",frame,"RIGHT",-3,0)
-	highlight:SetPoint("LEFT",frame,"LEFT",5,0)
-	highlight:Hide()
-	self.highlight = highlight
-
-	local check = frame:CreateTexture("OVERLAY")
-	check:SetWidth(16)
-	check:SetHeight(16)
-	check:SetPoint("LEFT",frame,"LEFT",3,-1)
-	check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
-	check:Hide()
-	self.check = check
-
-	local sub = frame:CreateTexture("OVERLAY")
-	sub:SetWidth(16)
-	sub:SetHeight(16)
-	sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
-	sub:SetTexture("Interface\\ChatFrame\\ChatFrameExpandArrow")
-	sub:Hide()
-	self.sub = sub
-
-	frame:SetScript("OnEnter", ItemBase.Frame_OnEnter)
-	frame:SetScript("OnLeave", ItemBase.Frame_OnLeave)
-
-	self.OnAcquire = ItemBase.OnAcquire
-	self.OnRelease = ItemBase.OnRelease
-
-	self.SetPullout = ItemBase.SetPullout
-	self.GetText    = ItemBase.GetText
-	self.SetText    = ItemBase.SetText
-	self.SetDisabled = ItemBase.SetDisabled
-
-	self.SetPoint   = ItemBase.SetPoint
-	self.Show       = ItemBase.Show
-	self.Hide       = ItemBase.Hide
-
-	self.SetOnLeave = ItemBase.SetOnLeave
-	self.SetOnEnter = ItemBase.SetOnEnter
-
-	return self
-end
-
--- Register a dummy LibStub library to retrieve the ItemBase, so other addons can use it.
-local IBLib = LibStub:NewLibrary("AceGUI-3.0-DropDown-ItemBase", ItemBase.version)
-if IBLib then
-	IBLib.GetItemBase = function() return ItemBase end
-end
-
---[[
-	Template for items:
-
--- Item:
---
-do
-	local widgetType = "Dropdown-Item-"
-	local widgetVersion = 1
-
-	local function Constructor()
-		local self = ItemBase.Create(widgetType)
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
-end
---]]
-
--- Item: Header
--- A single text entry.
--- Special: Different text color and no highlight
-do
-	local widgetType = "Dropdown-Item-Header"
-	local widgetVersion = 1
-
-	local function OnEnter(this)
-		local self = this.obj
-		self:Fire("OnEnter")
-
-		if self.specialOnEnter then
-			self.specialOnEnter(self)
-		end
-	end
-
-	local function OnLeave(this)
-		local self = this.obj
-		self:Fire("OnLeave")
-
-		if self.specialOnLeave then
-			self.specialOnLeave(self)
-		end
-	end
-
-	-- exported, override
-	local function SetDisabled(self, disabled)
-		ItemBase.SetDisabled(self, disabled)
-		if not disabled then
-			self.text:SetTextColor(1, 1, 0)
-		end
-	end
-
-	local function Constructor()
-		local self = ItemBase.Create(widgetType)
-
-		self.SetDisabled = SetDisabled
-
-		self.frame:SetScript("OnEnter", OnEnter)
-		self.frame:SetScript("OnLeave", OnLeave)
-
-		self.text:SetTextColor(1, 1, 0)
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
-end
-
--- Item: Execute
--- A simple button
-do
-	local widgetType = "Dropdown-Item-Execute"
-	local widgetVersion = 1
-
-	local function Frame_OnClick(this, button)
-		local self = this.obj
-		if self.disabled then return end
-		self:Fire("OnClick")
-		if self.pullout then
-			self.pullout:Close()
-		end
-	end
-
-	local function Constructor()
-		local self = ItemBase.Create(widgetType)
-
-		self.frame:SetScript("OnClick", Frame_OnClick)
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
-end
-
--- Item: Toggle
--- Some sort of checkbox for dropdown menus.
--- Does not close the pullout on click.
-do
-	local widgetType = "Dropdown-Item-Toggle"
-	local widgetVersion = 4
-
-	local function UpdateToggle(self)
-		if self.value then
-			self.check:Show()
-		else
-			self.check:Hide()
-		end
-	end
-
-	local function OnRelease(self)
-		ItemBase.OnRelease(self)
-		self:SetValue(nil)
-	end
-
-	local function Frame_OnClick(this, button)
-		local self = this.obj
-		if self.disabled then return end
-		self.value = not self.value
-		if self.value then
-			PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
-		else
-			PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
-		end
-		UpdateToggle(self)
-		self:Fire("OnValueChanged", self.value)
-	end
-
-	-- exported
-	local function SetValue(self, value)
-		self.value = value
-		UpdateToggle(self)
-	end
-
-	-- exported
-	local function GetValue(self)
-		return self.value
-	end
-
-	local function Constructor()
-		local self = ItemBase.Create(widgetType)
-
-		self.frame:SetScript("OnClick", Frame_OnClick)
-
-		self.SetValue = SetValue
-		self.GetValue = GetValue
-		self.OnRelease = OnRelease
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
-end
-
--- Item: Menu
--- Shows a submenu on mouse over
--- Does not close the pullout on click
-do
-	local widgetType = "Dropdown-Item-Menu"
-	local widgetVersion = 2
-
-	local function OnEnter(this)
-		local self = this.obj
-		self:Fire("OnEnter")
-
-		if self.specialOnEnter then
-			self.specialOnEnter(self)
-		end
-
-		self.highlight:Show()
-
-		if not self.disabled and self.submenu then
-			self.submenu:Open("TOPLEFT", self.frame, "TOPRIGHT", self.pullout:GetRightBorderWidth(), 0, self.frame:GetFrameLevel() + 100)
-		end
-	end
-
-	local function OnHide(this)
-		local self = this.obj
-		if self.submenu then
-			self.submenu:Close()
-		end
-	end
-
-	-- exported
-	local function SetMenu(self, menu)
-		assert(menu.type == "Dropdown-Pullout")
-		self.submenu = menu
-	end
-
-	-- exported
-	local function CloseMenu(self)
-		self.submenu:Close()
-	end
-
-	local function Constructor()
-		local self = ItemBase.Create(widgetType)
-
-		self.sub:Show()
-
-		self.frame:SetScript("OnEnter", OnEnter)
-		self.frame:SetScript("OnHide", OnHide)
-
-		self.SetMenu   = SetMenu
-		self.CloseMenu = CloseMenu
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
-end
-
--- Item: Separator
--- A single line to separate items
-do
-	local widgetType = "Dropdown-Item-Separator"
-	local widgetVersion = 2
-
-	-- exported, override
-	local function SetDisabled(self, disabled)
-		ItemBase.SetDisabled(self, disabled)
-		self.useHighlight = false
-	end
-
-	local function Constructor()
-		local self = ItemBase.Create(widgetType)
-
-		self.SetDisabled = SetDisabled
-
-		local line = self.frame:CreateTexture(nil, "OVERLAY")
-		line:SetHeight(1)
-		line:SetColorTexture(.5, .5, .5)
-		line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
-		line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0)
-
-		self.text:Hide()
-
-		self.useHighlight = false
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
-end
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
deleted file mode 100644
index cf0b0aa..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
+++ /dev/null
@@ -1,737 +0,0 @@
---[[ $Id: AceGUIWidget-DropDown.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]--
-local AceGUI = LibStub("AceGUI-3.0")
-
--- Lua APIs
-local min, max, floor = math.min, math.max, math.floor
-local select, pairs, ipairs, type = select, pairs, ipairs, type
-local tsort = table.sort
-
--- WoW APIs
-local PlaySound = PlaySound
-local UIParent, CreateFrame = UIParent, CreateFrame
-local _G = _G
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: CLOSE
-
-local function fixlevels(parent,...)
-	local i = 1
-	local child = select(i, ...)
-	while child do
-		child:SetFrameLevel(parent:GetFrameLevel()+1)
-		fixlevels(child, child:GetChildren())
-		i = i + 1
-		child = select(i, ...)
-	end
-end
-
-local function fixstrata(strata, parent, ...)
-	local i = 1
-	local child = select(i, ...)
-	parent:SetFrameStrata(strata)
-	while child do
-		fixstrata(strata, child, child:GetChildren())
-		i = i + 1
-		child = select(i, ...)
-	end
-end
-
-do
-	local widgetType = "Dropdown-Pullout"
-	local widgetVersion = 3
-
-	--[[ Static data ]]--
-
-	local backdrop = {
-		bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-		edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
-		edgeSize = 32,
-		tileSize = 32,
-		tile = true,
-		insets = { left = 11, right = 12, top = 12, bottom = 11 },
-	}
-	local sliderBackdrop  = {
-		bgFile = "Interface\\Buttons\\UI-SliderBar-Background",
-		edgeFile = "Interface\\Buttons\\UI-SliderBar-Border",
-		tile = true, tileSize = 8, edgeSize = 8,
-		insets = { left = 3, right = 3, top = 3, bottom = 3 }
-	}
-
-	local defaultWidth = 200
-	local defaultMaxHeight = 600
-
-	--[[ UI Event Handlers ]]--
-
-	-- HACK: This should be no part of the pullout, but there
-	--       is no other 'clean' way to response to any item-OnEnter
-	--       Used to close Submenus when an other item is entered
-	local function OnEnter(item)
-		local self = item.pullout
-		for k, v in ipairs(self.items) do
-			if v.CloseMenu and v ~= item then
-				v:CloseMenu()
-			end
-		end
-	end
-
-	-- See the note in Constructor() for each scroll related function
-	local function OnMouseWheel(this, value)
-		this.obj:MoveScroll(value)
-	end
-
-	local function OnScrollValueChanged(this, value)
-		this.obj:SetScroll(value)
-	end
-
-	local function OnSizeChanged(this)
-		this.obj:FixScroll()
-	end
-
-	--[[ Exported methods ]]--
-
-	-- exported
-	local function SetScroll(self, value)
-		local status = self.scrollStatus
-		local frame, child = self.scrollFrame, self.itemFrame
-		local height, viewheight = frame:GetHeight(), child:GetHeight()
-
-		local offset
-		if height > viewheight then
-			offset = 0
-		else
-			offset = floor((viewheight - height) / 1000 * value)
-		end
-		child:ClearAllPoints()
-		child:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, offset)
-		child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", self.slider:IsShown() and -12 or 0, offset)
-		status.offset = offset
-		status.scrollvalue = value
-	end
-
-	-- exported
-	local function MoveScroll(self, value)
-		local status = self.scrollStatus
-		local frame, child = self.scrollFrame, self.itemFrame
-		local height, viewheight = frame:GetHeight(), child:GetHeight()
-
-		if height > viewheight then
-			self.slider:Hide()
-		else
-			self.slider:Show()
-			local diff = height - viewheight
-			local delta = 1
-			if value < 0 then
-				delta = -1
-			end
-			self.slider:SetValue(min(max(status.scrollvalue + delta*(1000/(diff/45)),0), 1000))
-		end
-	end
-
-	-- exported
-	local function FixScroll(self)
-		local status = self.scrollStatus
-		local frame, child = self.scrollFrame, self.itemFrame
-		local height, viewheight = frame:GetHeight(), child:GetHeight()
-		local offset = status.offset or 0
-
-		if viewheight < height then
-			self.slider:Hide()
-			child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, offset)
-			self.slider:SetValue(0)
-		else
-			self.slider:Show()
-			local value = (offset / (viewheight - height) * 1000)
-			if value > 1000 then value = 1000 end
-			self.slider:SetValue(value)
-			self:SetScroll(value)
-			if value < 1000 then
-				child:ClearAllPoints()
-				child:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, offset)
-				child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -12, offset)
-				status.offset = offset
-			end
-		end
-	end
-
-	-- exported, AceGUI callback
-	local function OnAcquire(self)
-		self.frame:SetParent(UIParent)
-		--self.itemFrame:SetToplevel(true)
-	end
-
-	-- exported, AceGUI callback
-	local function OnRelease(self)
-		self:Clear()
-		self.frame:ClearAllPoints()
-		self.frame:Hide()
-	end
-
-	-- exported
-	local function AddItem(self, item)
-		self.items[#self.items + 1] = item
-
-		local h = #self.items * 16
-		self.itemFrame:SetHeight(h)
-		self.frame:SetHeight(min(h + 34, self.maxHeight)) -- +34: 20 for scrollFrame placement (10 offset) and +14 for item placement
-
-		item.frame:SetPoint("LEFT", self.itemFrame, "LEFT")
-		item.frame:SetPoint("RIGHT", self.itemFrame, "RIGHT")
-
-		item:SetPullout(self)
-		item:SetOnEnter(OnEnter)
-	end
-
-	-- exported
-	local function Open(self, point, relFrame, relPoint, x, y)
-		local items = self.items
-		local frame = self.frame
-		local itemFrame = self.itemFrame
-
-		frame:SetPoint(point, relFrame, relPoint, x, y)
-
-
-		local height = 8
-		for i, item in pairs(items) do
-			if i == 1 then
-				item:SetPoint("TOP", itemFrame, "TOP", 0, -2)
-			else
-				item:SetPoint("TOP", items[i-1].frame, "BOTTOM", 0, 1)
-			end
-
-			item:Show()
-
-			height = height + 16
-		end
-		itemFrame:SetHeight(height)
-		fixstrata("TOOLTIP", frame, frame:GetChildren())
-		frame:Show()
-		self:Fire("OnOpen")
-	end
-
-	-- exported
-	local function Close(self)
-		self.frame:Hide()
-		self:Fire("OnClose")
-	end
-
-	-- exported
-	local function Clear(self)
-		local items = self.items
-		for i, item in pairs(items) do
-			AceGUI:Release(item)
-			items[i] = nil
-		end
-	end
-
-	-- exported
-	local function IterateItems(self)
-		return ipairs(self.items)
-	end
-
-	-- exported
-	local function SetHideOnLeave(self, val)
-		self.hideOnLeave = val
-	end
-
-	-- exported
-	local function SetMaxHeight(self, height)
-		self.maxHeight = height or defaultMaxHeight
-		if self.frame:GetHeight() > height then
-			self.frame:SetHeight(height)
-		elseif (self.itemFrame:GetHeight() + 34) < height then
-			self.frame:SetHeight(self.itemFrame:GetHeight() + 34) -- see :AddItem
-		end
-	end
-
-	-- exported
-	local function GetRightBorderWidth(self)
-		return 6 + (self.slider:IsShown() and 12 or 0)
-	end
-
-	-- exported
-	local function GetLeftBorderWidth(self)
-		return 6
-	end
-
-	--[[ Constructor ]]--
-
-	local function Constructor()
-		local count = AceGUI:GetNextWidgetNum(widgetType)
-		local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent)
-		local self = {}
-		self.count = count
-		self.type = widgetType
-		self.frame = frame
-		frame.obj = self
-
-		self.OnAcquire = OnAcquire
-		self.OnRelease = OnRelease
-
-		self.AddItem = AddItem
-		self.Open    = Open
-		self.Close   = Close
-		self.Clear   = Clear
-		self.IterateItems = IterateItems
-		self.SetHideOnLeave = SetHideOnLeave
-
-		self.SetScroll  = SetScroll
-		self.MoveScroll = MoveScroll
-		self.FixScroll  = FixScroll
-
-		self.SetMaxHeight = SetMaxHeight
-		self.GetRightBorderWidth = GetRightBorderWidth
-		self.GetLeftBorderWidth = GetLeftBorderWidth
-
-		self.items = {}
-
-		self.scrollStatus = {
-			scrollvalue = 0,
-		}
-
-		self.maxHeight = defaultMaxHeight
-
-		frame:SetBackdrop(backdrop)
-		frame:SetBackdropColor(0, 0, 0)
-		frame:SetFrameStrata("FULLSCREEN_DIALOG")
-		frame:SetClampedToScreen(true)
-		frame:SetWidth(defaultWidth)
-		frame:SetHeight(self.maxHeight)
-		--frame:SetToplevel(true)
-
-		-- NOTE: The whole scroll frame code is copied from the AceGUI-3.0 widget ScrollFrame
-		local scrollFrame = CreateFrame("ScrollFrame", nil, frame)
-		local itemFrame = CreateFrame("Frame", nil, scrollFrame)
-
-		self.scrollFrame = scrollFrame
-		self.itemFrame = itemFrame
-
-		scrollFrame.obj = self
-		itemFrame.obj = self
-
-		local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame)
-		slider:SetOrientation("VERTICAL")
-		slider:SetHitRectInsets(0, 0, -10, 0)
-		slider:SetBackdrop(sliderBackdrop)
-		slider:SetWidth(8)
-		slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Vertical")
-		slider:SetFrameStrata("FULLSCREEN_DIALOG")
-		self.slider = slider
-		slider.obj = self
-
-		scrollFrame:SetScrollChild(itemFrame)
-		scrollFrame:SetPoint("TOPLEFT", frame, "TOPLEFT", 6, -12)
-		scrollFrame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -6, 12)
-		scrollFrame:EnableMouseWheel(true)
-		scrollFrame:SetScript("OnMouseWheel", OnMouseWheel)
-		scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
-		scrollFrame:SetToplevel(true)
-		scrollFrame:SetFrameStrata("FULLSCREEN_DIALOG")
-
-		itemFrame:SetPoint("TOPLEFT", scrollFrame, "TOPLEFT", 0, 0)
-		itemFrame:SetPoint("TOPRIGHT", scrollFrame, "TOPRIGHT", -12, 0)
-		itemFrame:SetHeight(400)
-		itemFrame:SetToplevel(true)
-		itemFrame:SetFrameStrata("FULLSCREEN_DIALOG")
-
-		slider:SetPoint("TOPLEFT", scrollFrame, "TOPRIGHT", -16, 0)
-		slider:SetPoint("BOTTOMLEFT", scrollFrame, "BOTTOMRIGHT", -16, 0)
-		slider:SetScript("OnValueChanged", OnScrollValueChanged)
-		slider:SetMinMaxValues(0, 1000)
-		slider:SetValueStep(1)
-		slider:SetValue(0)
-
-		scrollFrame:Show()
-		itemFrame:Show()
-		slider:Hide()
-
-		self:FixScroll()
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
-end
-
-do
-	local widgetType = "Dropdown"
-	local widgetVersion = 31
-
-	--[[ Static data ]]--
-
-	--[[ UI event handler ]]--
-
-	local function Control_OnEnter(this)
-		this.obj.button:LockHighlight()
-		this.obj:Fire("OnEnter")
-	end
-
-	local function Control_OnLeave(this)
-		this.obj.button:UnlockHighlight()
-		this.obj:Fire("OnLeave")
-	end
-
-	local function Dropdown_OnHide(this)
-		local self = this.obj
-		if self.open then
-			self.pullout:Close()
-		end
-	end
-
-	local function Dropdown_TogglePullout(this)
-		local self = this.obj
-		PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
-		if self.open then
-			self.open = nil
-			self.pullout:Close()
-			AceGUI:ClearFocus()
-		else
-			self.open = true
-			self.pullout:SetWidth(self.pulloutWidth or self.frame:GetWidth())
-			self.pullout:Open("TOPLEFT", self.frame, "BOTTOMLEFT", 0, self.label:IsShown() and -2 or 0)
-			AceGUI:SetFocus(self)
-		end
-	end
-
-	local function OnPulloutOpen(this)
-		local self = this.userdata.obj
-		local value = self.value
-
-		if not self.multiselect then
-			for i, item in this:IterateItems() do
-				item:SetValue(item.userdata.value == value)
-			end
-		end
-
-		self.open = true
-		self:Fire("OnOpened")
-	end
-
-	local function OnPulloutClose(this)
-		local self = this.userdata.obj
-		self.open = nil
-		self:Fire("OnClosed")
-	end
-
-	local function ShowMultiText(self)
-		local text
-		for i, widget in self.pullout:IterateItems() do
-			if widget.type == "Dropdown-Item-Toggle" then
-				if widget:GetValue() then
-					if text then
-						text = text..", "..widget:GetText()
-					else
-						text = widget:GetText()
-					end
-				end
-			end
-		end
-		self:SetText(text)
-	end
-
-	local function OnItemValueChanged(this, event, checked)
-		local self = this.userdata.obj
-
-		if self.multiselect then
-			self:Fire("OnValueChanged", this.userdata.value, checked)
-			ShowMultiText(self)
-		else
-			if checked then
-				self:SetValue(this.userdata.value)
-				self:Fire("OnValueChanged", this.userdata.value)
-			else
-				this:SetValue(true)
-			end
-			if self.open then
-				self.pullout:Close()
-			end
-		end
-	end
-
-	--[[ Exported methods ]]--
-
-	-- exported, AceGUI callback
-	local function OnAcquire(self)
-		local pullout = AceGUI:Create("Dropdown-Pullout")
-		self.pullout = pullout
-		pullout.userdata.obj = self
-		pullout:SetCallback("OnClose", OnPulloutClose)
-		pullout:SetCallback("OnOpen", OnPulloutOpen)
-		self.pullout.frame:SetFrameLevel(self.frame:GetFrameLevel() + 1)
-		fixlevels(self.pullout.frame, self.pullout.frame:GetChildren())
-
-		self:SetHeight(44)
-		self:SetWidth(200)
-		self:SetLabel()
-		self:SetPulloutWidth(nil)
-	end
-
-	-- exported, AceGUI callback
-	local function OnRelease(self)
-		if self.open then
-			self.pullout:Close()
-		end
-		AceGUI:Release(self.pullout)
-		self.pullout = nil
-
-		self:SetText("")
-		self:SetDisabled(false)
-		self:SetMultiselect(false)
-
-		self.value = nil
-		self.list = nil
-		self.open = nil
-		self.hasClose = nil
-
-		self.frame:ClearAllPoints()
-		self.frame:Hide()
-	end
-
-	-- exported
-	local function SetDisabled(self, disabled)
-		self.disabled = disabled
-		if disabled then
-			self.text:SetTextColor(0.5,0.5,0.5)
-			self.button:Disable()
-			self.button_cover:Disable()
-			self.label:SetTextColor(0.5,0.5,0.5)
-		else
-			self.button:Enable()
-			self.button_cover:Enable()
-			self.label:SetTextColor(1,.82,0)
-			self.text:SetTextColor(1,1,1)
-		end
-	end
-
-	-- exported
-	local function ClearFocus(self)
-		if self.open then
-			self.pullout:Close()
-		end
-	end
-
-	-- exported
-	local function SetText(self, text)
-		self.text:SetText(text or "")
-	end
-
-	-- exported
-	local function SetLabel(self, text)
-		if text and text ~= "" then
-			self.label:SetText(text)
-			self.label:Show()
-			self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-14)
-			self:SetHeight(40)
-			self.alignoffset = 26
-		else
-			self.label:SetText("")
-			self.label:Hide()
-			self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,0)
-			self:SetHeight(26)
-			self.alignoffset = 12
-		end
-	end
-
-	-- exported
-	local function SetValue(self, value)
-		if self.list then
-			self:SetText(self.list[value] or "")
-		end
-		self.value = value
-	end
-
-	-- exported
-	local function GetValue(self)
-		return self.value
-	end
-
-	-- exported
-	local function SetItemValue(self, item, value)
-		if not self.multiselect then return end
-		for i, widget in self.pullout:IterateItems() do
-			if widget.userdata.value == item then
-				if widget.SetValue then
-					widget:SetValue(value)
-				end
-			end
-		end
-		ShowMultiText(self)
-	end
-
-	-- exported
-	local function SetItemDisabled(self, item, disabled)
-		for i, widget in self.pullout:IterateItems() do
-			if widget.userdata.value == item then
-				widget:SetDisabled(disabled)
-			end
-		end
-	end
-
-	local function AddListItem(self, value, text, itemType)
-		if not itemType then itemType = "Dropdown-Item-Toggle" end
-		local exists = AceGUI:GetWidgetVersion(itemType)
-		if not exists then error(("The given item type, %q, does not exist within AceGUI-3.0"):format(tostring(itemType)), 2) end
-
-		local item = AceGUI:Create(itemType)
-		item:SetText(text)
-		item.userdata.obj = self
-		item.userdata.value = value
-		item:SetCallback("OnValueChanged", OnItemValueChanged)
-		self.pullout:AddItem(item)
-	end
-
-	local function AddCloseButton(self)
-		if not self.hasClose then
-			local close = AceGUI:Create("Dropdown-Item-Execute")
-			close:SetText(CLOSE)
-			self.pullout:AddItem(close)
-			self.hasClose = true
-		end
-	end
-
-	-- exported
-	local sortlist = {}
-	local function SetList(self, list, order, itemType)
-		self.list = list
-		self.pullout:Clear()
-		self.hasClose = nil
-		if not list then return end
-
-		if type(order) ~= "table" then
-			for v in pairs(list) do
-				sortlist[#sortlist + 1] = v
-			end
-			tsort(sortlist)
-
-			for i, key in ipairs(sortlist) do
-				AddListItem(self, key, list[key], itemType)
-				sortlist[i] = nil
-			end
-		else
-			for i, key in ipairs(order) do
-				AddListItem(self, key, list[key], itemType)
-			end
-		end
-		if self.multiselect then
-			ShowMultiText(self)
-			AddCloseButton(self)
-		end
-	end
-
-	-- exported
-	local function AddItem(self, value, text, itemType)
-		if self.list then
-			self.list[value] = text
-			AddListItem(self, value, text, itemType)
-		end
-	end
-
-	-- exported
-	local function SetMultiselect(self, multi)
-		self.multiselect = multi
-		if multi then
-			ShowMultiText(self)
-			AddCloseButton(self)
-		end
-	end
-
-	-- exported
-	local function GetMultiselect(self)
-		return self.multiselect
-	end
-
-	local function SetPulloutWidth(self, width)
-		self.pulloutWidth = width
-	end
-
-	--[[ Constructor ]]--
-
-	local function Constructor()
-		local count = AceGUI:GetNextWidgetNum(widgetType)
-		local frame = CreateFrame("Frame", nil, UIParent)
-		local dropdown = CreateFrame("Frame", "AceGUI30DropDown"..count, frame, "UIDropDownMenuTemplate")
-
-		local self = {}
-		self.type = widgetType
-		self.frame = frame
-		self.dropdown = dropdown
-		self.count = count
-		frame.obj = self
-		dropdown.obj = self
-
-		self.OnRelease   = OnRelease
-		self.OnAcquire   = OnAcquire
-
-		self.ClearFocus  = ClearFocus
-
-		self.SetText     = SetText
-		self.SetValue    = SetValue
-		self.GetValue    = GetValue
-		self.SetList     = SetList
-		self.SetLabel    = SetLabel
-		self.SetDisabled = SetDisabled
-		self.AddItem     = AddItem
-		self.SetMultiselect = SetMultiselect
-		self.GetMultiselect = GetMultiselect
-		self.SetItemValue = SetItemValue
-		self.SetItemDisabled = SetItemDisabled
-		self.SetPulloutWidth = SetPulloutWidth
-
-		self.alignoffset = 26
-
-		frame:SetScript("OnHide",Dropdown_OnHide)
-
-		dropdown:ClearAllPoints()
-		dropdown:SetPoint("TOPLEFT",frame,"TOPLEFT",-15,0)
-		dropdown:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",17,0)
-		dropdown:SetScript("OnHide", nil)
-
-		local left = _G[dropdown:GetName() .. "Left"]
-		local middle = _G[dropdown:GetName() .. "Middle"]
-		local right = _G[dropdown:GetName() .. "Right"]
-
-		middle:ClearAllPoints()
-		right:ClearAllPoints()
-
-		middle:SetPoint("LEFT", left, "RIGHT", 0, 0)
-		middle:SetPoint("RIGHT", right, "LEFT", 0, 0)
-		right:SetPoint("TOPRIGHT", dropdown, "TOPRIGHT", 0, 17)
-
-		local button = _G[dropdown:GetName() .. "Button"]
-		self.button = button
-		button.obj = self
-		button:SetScript("OnEnter",Control_OnEnter)
-		button:SetScript("OnLeave",Control_OnLeave)
-		button:SetScript("OnClick",Dropdown_TogglePullout)
-
-		local button_cover = CreateFrame("BUTTON",nil,self.frame)
-		self.button_cover = button_cover
-		button_cover.obj = self
-		button_cover:SetPoint("TOPLEFT",self.frame,"BOTTOMLEFT",0,25)
-		button_cover:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT")
-		button_cover:SetScript("OnEnter",Control_OnEnter)
-		button_cover:SetScript("OnLeave",Control_OnLeave)
-		button_cover:SetScript("OnClick",Dropdown_TogglePullout)
-
-		local text = _G[dropdown:GetName() .. "Text"]
-		self.text = text
-		text.obj = self
-		text:ClearAllPoints()
-		text:SetPoint("RIGHT", right, "RIGHT" ,-43, 2)
-		text:SetPoint("LEFT", left, "LEFT", 25, 2)
-
-		local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
-		label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
-		label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
-		label:SetJustifyH("LEFT")
-		label:SetHeight(18)
-		label:Hide()
-		self.label = label
-
-		AceGUI:RegisterAsWidget(self)
-		return self
-	end
-
-	AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
-end
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
deleted file mode 100644
index 29f7e00..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
+++ /dev/null
@@ -1,263 +0,0 @@
---[[-----------------------------------------------------------------------------
-EditBox Widget
--------------------------------------------------------------------------------]]
-local Type, Version = "EditBox", 28
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local tostring, pairs = tostring, pairs
-
--- WoW APIs
-local PlaySound = PlaySound
-local GetCursorInfo, ClearCursor, GetSpellInfo = GetCursorInfo, ClearCursor, GetSpellInfo
-local CreateFrame, UIParent = CreateFrame, UIParent
-local _G = _G
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: AceGUIEditBoxInsertLink, ChatFontNormal, OKAY
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-if not AceGUIEditBoxInsertLink then
-	-- upgradeable hook
-	hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIEditBoxInsertLink(...) end)
-end
-
-function _G.AceGUIEditBoxInsertLink(text)
-	for i = 1, AceGUI:GetWidgetCount(Type) do
-		local editbox = _G["AceGUI-3.0EditBox"..i]
-		if editbox and editbox:IsVisible() and editbox:HasFocus() then
-			editbox:Insert(text)
-			return true
-		end
-	end
-end
-
-local function ShowButton(self)
-	if not self.disablebutton then
-		self.button:Show()
-		self.editbox:SetTextInsets(0, 20, 3, 3)
-	end
-end
-
-local function HideButton(self)
-	self.button:Hide()
-	self.editbox:SetTextInsets(0, 0, 3, 3)
-end
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Control_OnEnter(frame)
-	frame.obj:Fire("OnEnter")
-end
-
-local function Control_OnLeave(frame)
-	frame.obj:Fire("OnLeave")
-end
-
-local function Frame_OnShowFocus(frame)
-	frame.obj.editbox:SetFocus()
-	frame:SetScript("OnShow", nil)
-end
-
-local function EditBox_OnEscapePressed(frame)
-	AceGUI:ClearFocus()
-end
-
-local function EditBox_OnEnterPressed(frame)
-	local self = frame.obj
-	local value = frame:GetText()
-	local cancel = self:Fire("OnEnterPressed", value)
-	if not cancel then
-		PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
-		HideButton(self)
-	end
-end
-
-local function EditBox_OnReceiveDrag(frame)
-	local self = frame.obj
-	local type, id, info = GetCursorInfo()
-	local name
-	if type == "item" then
-		name = info
-	elseif type == "spell" then
-		name = GetSpellInfo(id, info)
-	elseif type == "macro" then
-		name = GetMacroInfo(id)
-	end
-	if name then
-		self:SetText(name)
-		self:Fire("OnEnterPressed", name)
-		ClearCursor()
-		HideButton(self)
-		AceGUI:ClearFocus()
-	end
-end
-
-local function EditBox_OnTextChanged(frame)
-	local self = frame.obj
-	local value = frame:GetText()
-	if tostring(value) ~= tostring(self.lasttext) then
-		self:Fire("OnTextChanged", value)
-		self.lasttext = value
-		ShowButton(self)
-	end
-end
-
-local function EditBox_OnFocusGained(frame)
-	AceGUI:SetFocus(frame.obj)
-end
-
-local function Button_OnClick(frame)
-	local editbox = frame.obj.editbox
-	editbox:ClearFocus()
-	EditBox_OnEnterPressed(editbox)
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		-- height is controlled by SetLabel
-		self:SetWidth(200)
-		self:SetDisabled(false)
-		self:SetLabel()
-		self:SetText()
-		self:DisableButton(false)
-		self:SetMaxLetters(0)
-	end,
-
-	["OnRelease"] = function(self)
-		self:ClearFocus()
-	end,
-
-	["SetDisabled"] = function(self, disabled)
-		self.disabled = disabled
-		if disabled then
-			self.editbox:EnableMouse(false)
-			self.editbox:ClearFocus()
-			self.editbox:SetTextColor(0.5,0.5,0.5)
-			self.label:SetTextColor(0.5,0.5,0.5)
-		else
-			self.editbox:EnableMouse(true)
-			self.editbox:SetTextColor(1,1,1)
-			self.label:SetTextColor(1,.82,0)
-		end
-	end,
-
-	["SetText"] = function(self, text)
-		self.lasttext = text or ""
-		self.editbox:SetText(text or "")
-		self.editbox:SetCursorPosition(0)
-		HideButton(self)
-	end,
-
-	["GetText"] = function(self, text)
-		return self.editbox:GetText()
-	end,
-
-	["SetLabel"] = function(self, text)
-		if text and text ~= "" then
-			self.label:SetText(text)
-			self.label:Show()
-			self.editbox:SetPoint("TOPLEFT",self.frame,"TOPLEFT",7,-18)
-			self:SetHeight(44)
-			self.alignoffset = 30
-		else
-			self.label:SetText("")
-			self.label:Hide()
-			self.editbox:SetPoint("TOPLEFT",self.frame,"TOPLEFT",7,0)
-			self:SetHeight(26)
-			self.alignoffset = 12
-		end
-	end,
-
-	["DisableButton"] = function(self, disabled)
-		self.disablebutton = disabled
-		if disabled then
-			HideButton(self)
-		end
-	end,
-
-	["SetMaxLetters"] = function (self, num)
-		self.editbox:SetMaxLetters(num or 0)
-	end,
-
-	["ClearFocus"] = function(self)
-		self.editbox:ClearFocus()
-		self.frame:SetScript("OnShow", nil)
-	end,
-
-	["SetFocus"] = function(self)
-		self.editbox:SetFocus()
-		if not self.frame:IsShown() then
-			self.frame:SetScript("OnShow", Frame_OnShowFocus)
-		end
-	end,
-
-	["HighlightText"] = function(self, from, to)
-		self.editbox:HighlightText(from, to)
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local num  = AceGUI:GetNextWidgetNum(Type)
-	local frame = CreateFrame("Frame", nil, UIParent)
-	frame:Hide()
-
-	local editbox = CreateFrame("EditBox", "AceGUI-3.0EditBox"..num, frame, "InputBoxTemplate")
-	editbox:SetAutoFocus(false)
-	editbox:SetFontObject(ChatFontNormal)
-	editbox:SetScript("OnEnter", Control_OnEnter)
-	editbox:SetScript("OnLeave", Control_OnLeave)
-	editbox:SetScript("OnEscapePressed", EditBox_OnEscapePressed)
-	editbox:SetScript("OnEnterPressed", EditBox_OnEnterPressed)
-	editbox:SetScript("OnTextChanged", EditBox_OnTextChanged)
-	editbox:SetScript("OnReceiveDrag", EditBox_OnReceiveDrag)
-	editbox:SetScript("OnMouseDown", EditBox_OnReceiveDrag)
-	editbox:SetScript("OnEditFocusGained", EditBox_OnFocusGained)
-	editbox:SetTextInsets(0, 0, 3, 3)
-	editbox:SetMaxLetters(256)
-	editbox:SetPoint("BOTTOMLEFT", 6, 0)
-	editbox:SetPoint("BOTTOMRIGHT")
-	editbox:SetHeight(19)
-
-	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
-	label:SetPoint("TOPLEFT", 0, -2)
-	label:SetPoint("TOPRIGHT", 0, -2)
-	label:SetJustifyH("LEFT")
-	label:SetHeight(18)
-
-	local button = CreateFrame("Button", nil, editbox, "UIPanelButtonTemplate")
-	button:SetWidth(40)
-	button:SetHeight(20)
-	button:SetPoint("RIGHT", -2, 0)
-	button:SetText(OKAY)
-	button:SetScript("OnClick", Button_OnClick)
-	button:Hide()
-
-	local widget = {
-		alignoffset = 30,
-		editbox     = editbox,
-		label       = label,
-		button      = button,
-		frame       = frame,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	editbox.obj, button.obj = widget, widget
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
deleted file mode 100644
index 1aaf3f5..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Heading.lua
+++ /dev/null
@@ -1,78 +0,0 @@
---[[-----------------------------------------------------------------------------
-Heading Widget
--------------------------------------------------------------------------------]]
-local Type, Version = "Heading", 20
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs = pairs
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetText()
-		self:SetFullWidth()
-		self:SetHeight(18)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["SetText"] = function(self, text)
-		self.label:SetText(text or "")
-		if text and text ~= "" then
-			self.left:SetPoint("RIGHT", self.label, "LEFT", -5, 0)
-			self.right:Show()
-		else
-			self.left:SetPoint("RIGHT", -3, 0)
-			self.right:Hide()
-		end
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local frame = CreateFrame("Frame", nil, UIParent)
-	frame:Hide()
-
-	local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
-	label:SetPoint("TOP")
-	label:SetPoint("BOTTOM")
-	label:SetJustifyH("CENTER")
-
-	local left = frame:CreateTexture(nil, "BACKGROUND")
-	left:SetHeight(8)
-	left:SetPoint("LEFT", 3, 0)
-	left:SetPoint("RIGHT", label, "LEFT", -5, 0)
-	left:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
-	left:SetTexCoord(0.81, 0.94, 0.5, 1)
-
-	local right = frame:CreateTexture(nil, "BACKGROUND")
-	right:SetHeight(8)
-	right:SetPoint("RIGHT", -3, 0)
-	right:SetPoint("LEFT", label, "RIGHT", 5, 0)
-	right:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
-	right:SetTexCoord(0.81, 0.94, 0.5, 1)
-
-	local widget = {
-		label = label,
-		left  = left,
-		right = right,
-		frame = frame,
-		type  = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
deleted file mode 100644
index 561da73..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
+++ /dev/null
@@ -1,140 +0,0 @@
---[[-----------------------------------------------------------------------------
-Icon Widget
--------------------------------------------------------------------------------]]
-local Type, Version = "Icon", 21
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local select, pairs, print = select, pairs, print
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Control_OnEnter(frame)
-	frame.obj:Fire("OnEnter")
-end
-
-local function Control_OnLeave(frame)
-	frame.obj:Fire("OnLeave")
-end
-
-local function Button_OnClick(frame, button)
-	frame.obj:Fire("OnClick", button)
-	AceGUI:ClearFocus()
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetHeight(110)
-		self:SetWidth(110)
-		self:SetLabel()
-		self:SetImage(nil)
-		self:SetImageSize(64, 64)
-		self:SetDisabled(false)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["SetLabel"] = function(self, text)
-		if text and text ~= "" then
-			self.label:Show()
-			self.label:SetText(text)
-			self:SetHeight(self.image:GetHeight() + 25)
-		else
-			self.label:Hide()
-			self:SetHeight(self.image:GetHeight() + 10)
-		end
-	end,
-
-	["SetImage"] = function(self, path, ...)
-		local image = self.image
-		image:SetTexture(path)
-
-		if image:GetTexture() then
-			local n = select("#", ...)
-			if n == 4 or n == 8 then
-				image:SetTexCoord(...)
-			else
-				image:SetTexCoord(0, 1, 0, 1)
-			end
-		end
-	end,
-
-	["SetImageSize"] = function(self, width, height)
-		self.image:SetWidth(width)
-		self.image:SetHeight(height)
-		--self.frame:SetWidth(width + 30)
-		if self.label:IsShown() then
-			self:SetHeight(height + 25)
-		else
-			self:SetHeight(height + 10)
-		end
-	end,
-
-	["SetDisabled"] = function(self, disabled)
-		self.disabled = disabled
-		if disabled then
-			self.frame:Disable()
-			self.label:SetTextColor(0.5, 0.5, 0.5)
-			self.image:SetVertexColor(0.5, 0.5, 0.5, 0.5)
-		else
-			self.frame:Enable()
-			self.label:SetTextColor(1, 1, 1)
-			self.image:SetVertexColor(1, 1, 1, 1)
-		end
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local frame = CreateFrame("Button", nil, UIParent)
-	frame:Hide()
-
-	frame:EnableMouse(true)
-	frame:SetScript("OnEnter", Control_OnEnter)
-	frame:SetScript("OnLeave", Control_OnLeave)
-	frame:SetScript("OnClick", Button_OnClick)
-
-	local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlight")
-	label:SetPoint("BOTTOMLEFT")
-	label:SetPoint("BOTTOMRIGHT")
-	label:SetJustifyH("CENTER")
-	label:SetJustifyV("TOP")
-	label:SetHeight(18)
-
-	local image = frame:CreateTexture(nil, "BACKGROUND")
-	image:SetWidth(64)
-	image:SetHeight(64)
-	image:SetPoint("TOP", 0, -5)
-
-	local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
-	highlight:SetAllPoints(image)
-	highlight:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight")
-	highlight:SetTexCoord(0, 1, 0.23, 0.77)
-	highlight:SetBlendMode("ADD")
-
-	local widget = {
-		label = label,
-		image = image,
-		frame = frame,
-		type  = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	widget.SetText = function(self, ...) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(...) end
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua
deleted file mode 100644
index 036efee..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua
+++ /dev/null
@@ -1,101 +0,0 @@
---[[-----------------------------------------------------------------------------
-InteractiveLabel Widget
--------------------------------------------------------------------------------]]
-local Type, Version = "InteractiveLabel", 21
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local select, pairs = select, pairs
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GameFontHighlightSmall
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Control_OnEnter(frame)
-	frame.obj:Fire("OnEnter")
-end
-
-local function Control_OnLeave(frame)
-	frame.obj:Fire("OnLeave")
-end
-
-local function Label_OnClick(frame, button)
-	frame.obj:Fire("OnClick", button)
-	AceGUI:ClearFocus()
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:LabelOnAcquire()
-		self:SetHighlight()
-		self:SetHighlightTexCoord()
-		self:SetDisabled(false)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["SetHighlight"] = function(self, ...)
-		self.highlight:SetTexture(...)
-	end,
-
-	["SetHighlightTexCoord"] = function(self, ...)
-		local c = select("#", ...)
-		if c == 4 or c == 8 then
-			self.highlight:SetTexCoord(...)
-		else
-			self.highlight:SetTexCoord(0, 1, 0, 1)
-		end
-	end,
-
-	["SetDisabled"] = function(self,disabled)
-		self.disabled = disabled
-		if disabled then
-			self.frame:EnableMouse(false)
-			self.label:SetTextColor(0.5, 0.5, 0.5)
-		else
-			self.frame:EnableMouse(true)
-			self.label:SetTextColor(1, 1, 1)
-		end
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	-- create a Label type that we will hijack
-	local label = AceGUI:Create("Label")
-
-	local frame = label.frame
-	frame:EnableMouse(true)
-	frame:SetScript("OnEnter", Control_OnEnter)
-	frame:SetScript("OnLeave", Control_OnLeave)
-	frame:SetScript("OnMouseDown", Label_OnClick)
-
-	local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
-	highlight:SetTexture(nil)
-	highlight:SetAllPoints()
-	highlight:SetBlendMode("ADD")
-
-	label.highlight = highlight
-	label.type = Type
-	label.LabelOnAcquire = label.OnAcquire
-	for method, func in pairs(methods) do
-		label[method] = func
-	end
-
-	return label
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
-
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
deleted file mode 100644
index ec4cead..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
+++ /dev/null
@@ -1,249 +0,0 @@
---[[-----------------------------------------------------------------------------
-Keybinding Widget
-Set Keybindings in the Config UI.
--------------------------------------------------------------------------------]]
-local Type, Version = "Keybinding", 25
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs = pairs
-
--- WoW APIs
-local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: NOT_BOUND
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-
-local function Control_OnEnter(frame)
-	frame.obj:Fire("OnEnter")
-end
-
-local function Control_OnLeave(frame)
-	frame.obj:Fire("OnLeave")
-end
-
-local function Keybinding_OnClick(frame, button)
-	if button == "LeftButton" or button == "RightButton" then
-		local self = frame.obj
-		if self.waitingForKey then
-			frame:EnableKeyboard(false)
-			frame:EnableMouseWheel(false)
-			self.msgframe:Hide()
-			frame:UnlockHighlight()
-			self.waitingForKey = nil
-		else
-			frame:EnableKeyboard(true)
-			frame:EnableMouseWheel(true)
-			self.msgframe:Show()
-			frame:LockHighlight()
-			self.waitingForKey = true
-		end
-	end
-	AceGUI:ClearFocus()
-end
-
-local ignoreKeys = {
-	["BUTTON1"] = true, ["BUTTON2"] = true,
-	["UNKNOWN"] = true,
-	["LSHIFT"] = true, ["LCTRL"] = true, ["LALT"] = true,
-	["RSHIFT"] = true, ["RCTRL"] = true, ["RALT"] = true,
-}
-local function Keybinding_OnKeyDown(frame, key)
-	local self = frame.obj
-	if self.waitingForKey then
-		local keyPressed = key
-		if keyPressed == "ESCAPE" then
-			keyPressed = ""
-		else
-			if ignoreKeys[keyPressed] then return end
-			if IsShiftKeyDown() then
-				keyPressed = "SHIFT-"..keyPressed
-			end
-			if IsControlKeyDown() then
-				keyPressed = "CTRL-"..keyPressed
-			end
-			if IsAltKeyDown() then
-				keyPressed = "ALT-"..keyPressed
-			end
-		end
-
-		frame:EnableKeyboard(false)
-		frame:EnableMouseWheel(false)
-		self.msgframe:Hide()
-		frame:UnlockHighlight()
-		self.waitingForKey = nil
-
-		if not self.disabled then
-			self:SetKey(keyPressed)
-			self:Fire("OnKeyChanged", keyPressed)
-		end
-	end
-end
-
-local function Keybinding_OnMouseDown(frame, button)
-	if button == "LeftButton" or button == "RightButton" then
-		return
-	elseif button == "MiddleButton" then
-		button = "BUTTON3"
-	elseif button == "Button4" then
-		button = "BUTTON4"
-	elseif button == "Button5" then
-		button = "BUTTON5"
-	end
-	Keybinding_OnKeyDown(frame, button)
-end
-
-local function Keybinding_OnMouseWheel(frame, direction)
-	local button
-	if direction >= 0 then
-		button = "MOUSEWHEELUP"
-	else
-		button = "MOUSEWHEELDOWN"
-	end
-	Keybinding_OnKeyDown(frame, button)
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetWidth(200)
-		self:SetLabel("")
-		self:SetKey("")
-		self.waitingForKey = nil
-		self.msgframe:Hide()
-		self:SetDisabled(false)
-		self.button:EnableKeyboard(false)
-		self.button:EnableMouseWheel(false)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["SetDisabled"] = function(self, disabled)
-		self.disabled = disabled
-		if disabled then
-			self.button:Disable()
-			self.label:SetTextColor(0.5,0.5,0.5)
-		else
-			self.button:Enable()
-			self.label:SetTextColor(1,1,1)
-		end
-	end,
-
-	["SetKey"] = function(self, key)
-		if (key or "") == "" then
-			self.button:SetText(NOT_BOUND)
-			self.button:SetNormalFontObject("GameFontNormal")
-		else
-			self.button:SetText(key)
-			self.button:SetNormalFontObject("GameFontHighlight")
-		end
-	end,
-
-	["GetKey"] = function(self)
-		local key = self.button:GetText()
-		if key == NOT_BOUND then
-			key = nil
-		end
-		return key
-	end,
-
-	["SetLabel"] = function(self, label)
-		self.label:SetText(label or "")
-		if (label or "") == "" then
-			self.alignoffset = nil
-			self:SetHeight(24)
-		else
-			self.alignoffset = 30
-			self:SetHeight(44)
-		end
-	end,
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-
-local ControlBackdrop  = {
-	bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
-	edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-	tile = true, tileSize = 16, edgeSize = 16,
-	insets = { left = 3, right = 3, top = 3, bottom = 3 }
-}
-
-local function keybindingMsgFixWidth(frame)
-	frame:SetWidth(frame.msg:GetWidth() + 10)
-	frame:SetScript("OnUpdate", nil)
-end
-
-local function Constructor()
-	local name = "AceGUI30KeybindingButton" .. AceGUI:GetNextWidgetNum(Type)
-
-	local frame = CreateFrame("Frame", nil, UIParent)
-	local button = CreateFrame("Button", name, frame, "UIPanelButtonTemplate")
-
-	button:EnableMouse(true)
-	button:EnableMouseWheel(false)
-	button:RegisterForClicks("AnyDown")
-	button:SetScript("OnEnter", Control_OnEnter)
-	button:SetScript("OnLeave", Control_OnLeave)
-	button:SetScript("OnClick", Keybinding_OnClick)
-	button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
-	button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
-	button:SetScript("OnMouseWheel", Keybinding_OnMouseWheel)
-	button:SetPoint("BOTTOMLEFT")
-	button:SetPoint("BOTTOMRIGHT")
-	button:SetHeight(24)
-	button:EnableKeyboard(false)
-
-	local text = button:GetFontString()
-	text:SetPoint("LEFT", 7, 0)
-	text:SetPoint("RIGHT", -7, 0)
-
-	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
-	label:SetPoint("TOPLEFT")
-	label:SetPoint("TOPRIGHT")
-	label:SetJustifyH("CENTER")
-	label:SetHeight(18)
-
-	local msgframe = CreateFrame("Frame", nil, UIParent)
-	msgframe:SetHeight(30)
-	msgframe:SetBackdrop(ControlBackdrop)
-	msgframe:SetBackdropColor(0,0,0)
-	msgframe:SetFrameStrata("FULLSCREEN_DIALOG")
-	msgframe:SetFrameLevel(1000)
-	msgframe:SetToplevel(true)
-
-	local msg = msgframe:CreateFontString(nil, "OVERLAY", "GameFontNormal")
-	msg:SetText("Press a key to bind, ESC to clear the binding or click the button again to cancel.")
-	msgframe.msg = msg
-	msg:SetPoint("TOPLEFT", 5, -5)
-	msgframe:SetScript("OnUpdate", keybindingMsgFixWidth)
-	msgframe:SetPoint("BOTTOM", button, "TOP")
-	msgframe:Hide()
-
-	local widget = {
-		button      = button,
-		label       = label,
-		msgframe    = msgframe,
-		frame       = frame,
-		alignoffset = 30,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	button.obj = widget
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
deleted file mode 100644
index 75817a0..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
+++ /dev/null
@@ -1,173 +0,0 @@
---[[-----------------------------------------------------------------------------
-Label Widget
-Displays text and optionally an icon.
--------------------------------------------------------------------------------]]
-local Type, Version = "Label", 24
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local max, select, pairs = math.max, select, pairs
-
--- WoW APIs
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GameFontHighlightSmall
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-
-local function UpdateImageAnchor(self)
-	if self.resizing then return end
-	local frame = self.frame
-	local width = frame.width or frame:GetWidth() or 0
-	local image = self.image
-	local label = self.label
-	local height
-
-	label:ClearAllPoints()
-	image:ClearAllPoints()
-
-	if self.imageshown then
-		local imagewidth = image:GetWidth()
-		if (width - imagewidth) < 200 or (label:GetText() or "") == "" then
-			-- image goes on top centered when less than 200 width for the text, or if there is no text
-			image:SetPoint("TOP")
-			label:SetPoint("TOP", image, "BOTTOM")
-			label:SetPoint("LEFT")
-			label:SetWidth(width)
-			height = image:GetHeight() + label:GetHeight()
-		else
-			-- image on the left
-			image:SetPoint("TOPLEFT")
-			if image:GetHeight() > label:GetHeight() then
-				label:SetPoint("LEFT", image, "RIGHT", 4, 0)
-			else
-				label:SetPoint("TOPLEFT", image, "TOPRIGHT", 4, 0)
-			end
-			label:SetWidth(width - imagewidth - 4)
-			height = max(image:GetHeight(), label:GetHeight())
-		end
-	else
-		-- no image shown
-		label:SetPoint("TOPLEFT")
-		label:SetWidth(width)
-		height = label:GetHeight()
-	end
-
-	self.resizing = true
-	frame:SetHeight(height)
-	frame.height = height
-	self.resizing = nil
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		-- set the flag to stop constant size updates
-		self.resizing = true
-		-- height is set dynamically by the text and image size
-		self:SetWidth(200)
-		self:SetText()
-		self:SetImage(nil)
-		self:SetImageSize(16, 16)
-		self:SetColor()
-		self:SetFontObject()
-		self:SetJustifyH("LEFT")
-		self:SetJustifyV("TOP")
-
-		-- reset the flag
-		self.resizing = nil
-		-- run the update explicitly
-		UpdateImageAnchor(self)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["OnWidthSet"] = function(self, width)
-		UpdateImageAnchor(self)
-	end,
-
-	["SetText"] = function(self, text)
-		self.label:SetText(text)
-		UpdateImageAnchor(self)
-	end,
-
-	["SetColor"] = function(self, r, g, b)
-		if not (r and g and b) then
-			r, g, b = 1, 1, 1
-		end
-		self.label:SetVertexColor(r, g, b)
-	end,
-
-	["SetImage"] = function(self, path, ...)
-		local image = self.image
-		image:SetTexture(path)
-
-		if image:GetTexture() then
-			self.imageshown = true
-			local n = select("#", ...)
-			if n == 4 or n == 8 then
-				image:SetTexCoord(...)
-			else
-				image:SetTexCoord(0, 1, 0, 1)
-			end
-		else
-			self.imageshown = nil
-		end
-		UpdateImageAnchor(self)
-	end,
-
-	["SetFont"] = function(self, font, height, flags)
-		self.label:SetFont(font, height, flags)
-	end,
-
-	["SetFontObject"] = function(self, font)
-		self:SetFont((font or GameFontHighlightSmall):GetFont())
-	end,
-
-	["SetImageSize"] = function(self, width, height)
-		self.image:SetWidth(width)
-		self.image:SetHeight(height)
-		UpdateImageAnchor(self)
-	end,
-
-	["SetJustifyH"] = function(self, justifyH)
-		self.label:SetJustifyH(justifyH)
-	end,
-
-	["SetJustifyV"] = function(self, justifyV)
-		self.label:SetJustifyV(justifyV)
-	end,
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local function Constructor()
-	local frame = CreateFrame("Frame", nil, UIParent)
-	frame:Hide()
-
-	local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall")
-	local image = frame:CreateTexture(nil, "BACKGROUND")
-
-	-- create widget
-	local widget = {
-		label = label,
-		image = image,
-		frame = frame,
-		type  = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
deleted file mode 100644
index 9af4b87..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
+++ /dev/null
@@ -1,366 +0,0 @@
-local Type, Version = "MultiLineEditBox", 28
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local pairs = pairs
-
--- WoW APIs
-local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor
-local CreateFrame, UIParent = CreateFrame, UIParent
-local _G = _G
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: ACCEPT, ChatFontNormal
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-
-if not AceGUIMultiLineEditBoxInsertLink then
-	-- upgradeable hook
-	hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIMultiLineEditBoxInsertLink(...) end)
-end
-
-function _G.AceGUIMultiLineEditBoxInsertLink(text)
-	for i = 1, AceGUI:GetWidgetCount(Type) do
-		local editbox = _G[("MultiLineEditBox%uEdit"):format(i)]
-		if editbox and editbox:IsVisible() and editbox:HasFocus() then
-			editbox:Insert(text)
-			return true
-		end
-	end
-end
-
-
-local function Layout(self)
-	self:SetHeight(self.numlines * 14 + (self.disablebutton and 19 or 41) + self.labelHeight)
-
-	if self.labelHeight == 0 then
-		self.scrollBar:SetPoint("TOP", self.frame, "TOP", 0, -23)
-	else
-		self.scrollBar:SetPoint("TOP", self.label, "BOTTOM", 0, -19)
-	end
-
-	if self.disablebutton then
-		self.scrollBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 21)
-		self.scrollBG:SetPoint("BOTTOMLEFT", 0, 4)
-	else
-		self.scrollBar:SetPoint("BOTTOM", self.button, "TOP", 0, 18)
-		self.scrollBG:SetPoint("BOTTOMLEFT", self.button, "TOPLEFT")
-	end
-end
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function OnClick(self)                                                     -- Button
-	self = self.obj
-	self.editBox:ClearFocus()
-	if not self:Fire("OnEnterPressed", self.editBox:GetText()) then
-		self.button:Disable()
-	end
-end
-
-local function OnCursorChanged(self, _, y, _, cursorHeight)                      -- EditBox
-	self, y = self.obj.scrollFrame, -y
-	local offset = self:GetVerticalScroll()
-	if y < offset then
-		self:SetVerticalScroll(y)
-	else
-		y = y + cursorHeight - self:GetHeight()
-		if y > offset then
-			self:SetVerticalScroll(y)
-		end
-	end
-end
-
-local function OnEditFocusLost(self)                                             -- EditBox
-	self:HighlightText(0, 0)
-	self.obj:Fire("OnEditFocusLost")
-end
-
-local function OnEnter(self)                                                     -- EditBox / ScrollFrame
-	self = self.obj
-	if not self.entered then
-		self.entered = true
-		self:Fire("OnEnter")
-	end
-end
-
-local function OnLeave(self)                                                     -- EditBox / ScrollFrame
-	self = self.obj
-	if self.entered then
-		self.entered = nil
-		self:Fire("OnLeave")
-	end
-end
-
-local function OnMouseUp(self)                                                   -- ScrollFrame
-	self = self.obj.editBox
-	self:SetFocus()
-	self:SetCursorPosition(self:GetNumLetters())
-end
-
-local function OnReceiveDrag(self)                                               -- EditBox / ScrollFrame
-	local type, id, info = GetCursorInfo()
-	if type == "spell" then
-		info = GetSpellInfo(id, info)
-	elseif type ~= "item" then
-		return
-	end
-	ClearCursor()
-	self = self.obj
-	local editBox = self.editBox
-	if not editBox:HasFocus() then
-		editBox:SetFocus()
-		editBox:SetCursorPosition(editBox:GetNumLetters())
-	end
-	editBox:Insert(info)
-	self.button:Enable()
-end
-
-local function OnSizeChanged(self, width, height)                                -- ScrollFrame
-	self.obj.editBox:SetWidth(width)
-end
-
-local function OnTextChanged(self, userInput)                                    -- EditBox
-	if userInput then
-		self = self.obj
-		self:Fire("OnTextChanged", self.editBox:GetText())
-		self.button:Enable()
-	end
-end
-
-local function OnTextSet(self)                                                   -- EditBox
-	self:HighlightText(0, 0)
-	self:SetCursorPosition(self:GetNumLetters())
-	self:SetCursorPosition(0)
-	self.obj.button:Disable()
-end
-
-local function OnVerticalScroll(self, offset)                                    -- ScrollFrame
-	local editBox = self.obj.editBox
-	editBox:SetHitRectInsets(0, 0, offset, editBox:GetHeight() - offset - self:GetHeight())
-end
-
-local function OnShowFocus(frame)
-	frame.obj.editBox:SetFocus()
-	frame:SetScript("OnShow", nil)
-end
-
-local function OnEditFocusGained(frame)
-	AceGUI:SetFocus(frame.obj)
-	frame.obj:Fire("OnEditFocusGained")
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self.editBox:SetText("")
-		self:SetDisabled(false)
-		self:SetWidth(200)
-		self:DisableButton(false)
-		self:SetNumLines()
-		self.entered = nil
-		self:SetMaxLetters(0)
-	end,
-
-	["OnRelease"] = function(self)
-		self:ClearFocus()
-	end,
-
-	["SetDisabled"] = function(self, disabled)
-		local editBox = self.editBox
-		if disabled then
-			editBox:ClearFocus()
-			editBox:EnableMouse(false)
-			editBox:SetTextColor(0.5, 0.5, 0.5)
-			self.label:SetTextColor(0.5, 0.5, 0.5)
-			self.scrollFrame:EnableMouse(false)
-			self.button:Disable()
-		else
-			editBox:EnableMouse(true)
-			editBox:SetTextColor(1, 1, 1)
-			self.label:SetTextColor(1, 0.82, 0)
-			self.scrollFrame:EnableMouse(true)
-		end
-	end,
-
-	["SetLabel"] = function(self, text)
-		if text and text ~= "" then
-			self.label:SetText(text)
-			if self.labelHeight ~= 10 then
-				self.labelHeight = 10
-				self.label:Show()
-			end
-		elseif self.labelHeight ~= 0 then
-			self.labelHeight = 0
-			self.label:Hide()
-		end
-		Layout(self)
-	end,
-
-	["SetNumLines"] = function(self, value)
-		if not value or value < 4 then
-			value = 4
-		end
-		self.numlines = value
-		Layout(self)
-	end,
-
-	["SetText"] = function(self, text)
-		self.editBox:SetText(text)
-	end,
-
-	["GetText"] = function(self)
-		return self.editBox:GetText()
-	end,
-
-	["SetMaxLetters"] = function (self, num)
-		self.editBox:SetMaxLetters(num or 0)
-	end,
-
-	["DisableButton"] = function(self, disabled)
-		self.disablebutton = disabled
-		if disabled then
-			self.button:Hide()
-		else
-			self.button:Show()
-		end
-		Layout(self)
-	end,
-
-	["ClearFocus"] = function(self)
-		self.editBox:ClearFocus()
-		self.frame:SetScript("OnShow", nil)
-	end,
-
-	["SetFocus"] = function(self)
-		self.editBox:SetFocus()
-		if not self.frame:IsShown() then
-			self.frame:SetScript("OnShow", OnShowFocus)
-		end
-	end,
-
-	["HighlightText"] = function(self, from, to)
-		self.editBox:HighlightText(from, to)
-	end,
-
-	["GetCursorPosition"] = function(self)
-		return self.editBox:GetCursorPosition()
-	end,
-
-	["SetCursorPosition"] = function(self, ...)
-		return self.editBox:SetCursorPosition(...)
-	end,
-
-
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local backdrop = {
-	bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
-	edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], edgeSize = 16,
-	insets = { left = 4, right = 3, top = 4, bottom = 3 }
-}
-
-local function Constructor()
-	local frame = CreateFrame("Frame", nil, UIParent)
-	frame:Hide()
-
-	local widgetNum = AceGUI:GetNextWidgetNum(Type)
-
-	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
-	label:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, -4)
-	label:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, -4)
-	label:SetJustifyH("LEFT")
-	label:SetText(ACCEPT)
-	label:SetHeight(10)
-
-	local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate")
-	button:SetPoint("BOTTOMLEFT", 0, 4)
-	button:SetHeight(22)
-	button:SetWidth(label:GetStringWidth() + 24)
-	button:SetText(ACCEPT)
-	button:SetScript("OnClick", OnClick)
-	button:Disable()
-
-	local text = button:GetFontString()
-	text:ClearAllPoints()
-	text:SetPoint("TOPLEFT", button, "TOPLEFT", 5, -5)
-	text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -5, 1)
-	text:SetJustifyV("MIDDLE")
-
-	local scrollBG = CreateFrame("Frame", nil, frame)
-	scrollBG:SetBackdrop(backdrop)
-	scrollBG:SetBackdropColor(0, 0, 0)
-	scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4)
-
-	local scrollFrame = CreateFrame("ScrollFrame", ("%s%dScrollFrame"):format(Type, widgetNum), frame, "UIPanelScrollFrameTemplate")
-
-	local scrollBar = _G[scrollFrame:GetName() .. "ScrollBar"]
-	scrollBar:ClearAllPoints()
-	scrollBar:SetPoint("TOP", label, "BOTTOM", 0, -19)
-	scrollBar:SetPoint("BOTTOM", button, "TOP", 0, 18)
-	scrollBar:SetPoint("RIGHT", frame, "RIGHT")
-
-	scrollBG:SetPoint("TOPRIGHT", scrollBar, "TOPLEFT", 0, 19)
-	scrollBG:SetPoint("BOTTOMLEFT", button, "TOPLEFT")
-
-	scrollFrame:SetPoint("TOPLEFT", scrollBG, "TOPLEFT", 5, -6)
-	scrollFrame:SetPoint("BOTTOMRIGHT", scrollBG, "BOTTOMRIGHT", -4, 4)
-	scrollFrame:SetScript("OnEnter", OnEnter)
-	scrollFrame:SetScript("OnLeave", OnLeave)
-	scrollFrame:SetScript("OnMouseUp", OnMouseUp)
-	scrollFrame:SetScript("OnReceiveDrag", OnReceiveDrag)
-	scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
-	scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll)
-
-	local editBox = CreateFrame("EditBox", ("%s%dEdit"):format(Type, widgetNum), scrollFrame)
-	editBox:SetAllPoints()
-	editBox:SetFontObject(ChatFontNormal)
-	editBox:SetMultiLine(true)
-	editBox:EnableMouse(true)
-	editBox:SetAutoFocus(false)
-	editBox:SetCountInvisibleLetters(false)
-	editBox:SetScript("OnCursorChanged", OnCursorChanged)
-	editBox:SetScript("OnEditFocusLost", OnEditFocusLost)
-	editBox:SetScript("OnEnter", OnEnter)
-	editBox:SetScript("OnEscapePressed", editBox.ClearFocus)
-	editBox:SetScript("OnLeave", OnLeave)
-	editBox:SetScript("OnMouseDown", OnReceiveDrag)
-	editBox:SetScript("OnReceiveDrag", OnReceiveDrag)
-	editBox:SetScript("OnTextChanged", OnTextChanged)
-	editBox:SetScript("OnTextSet", OnTextSet)
-	editBox:SetScript("OnEditFocusGained", OnEditFocusGained)
-
-
-	scrollFrame:SetScrollChild(editBox)
-
-	local widget = {
-		button      = button,
-		editBox     = editBox,
-		frame       = frame,
-		label       = label,
-		labelHeight = 10,
-		numlines    = 4,
-		scrollBar   = scrollBar,
-		scrollBG    = scrollBG,
-		scrollFrame = scrollFrame,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	button.obj, editBox.obj, scrollFrame.obj = widget, widget, widget
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type, Constructor, Version)
diff --git a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua b/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
deleted file mode 100644
index 20d0887..0000000
--- a/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
+++ /dev/null
@@ -1,285 +0,0 @@
---[[-----------------------------------------------------------------------------
-Slider Widget
-Graphical Slider, like, for Range values.
--------------------------------------------------------------------------------]]
-local Type, Version = "Slider", 22
-local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
-if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-
--- Lua APIs
-local min, max, floor = math.min, math.max, math.floor
-local tonumber, pairs = tonumber, pairs
-
--- WoW APIs
-local PlaySound = PlaySound
-local CreateFrame, UIParent = CreateFrame, UIParent
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GameFontHighlightSmall
-
---[[-----------------------------------------------------------------------------
-Support functions
--------------------------------------------------------------------------------]]
-local function UpdateText(self)
-	local value = self.value or 0
-	if self.ispercent then
-		self.editbox:SetText(("%s%%"):format(floor(value * 1000 + 0.5) / 10))
-	else
-		self.editbox:SetText(floor(value * 100 + 0.5) / 100)
-	end
-end
-
-local function UpdateLabels(self)
-	local min, max = (self.min or 0), (self.max or 100)
-	if self.ispercent then
-		self.lowtext:SetFormattedText("%s%%", (min * 100))
-		self.hightext:SetFormattedText("%s%%", (max * 100))
-	else
-		self.lowtext:SetText(min)
-		self.hightext:SetText(max)
-	end
-end
-
---[[-----------------------------------------------------------------------------
-Scripts
--------------------------------------------------------------------------------]]
-local function Control_OnEnter(frame)
-	frame.obj:Fire("OnEnter")
-end
-
-local function Control_OnLeave(frame)
-	frame.obj:Fire("OnLeave")
-end
-
-local function Frame_OnMouseDown(frame)
-	frame.obj.slider:EnableMouseWheel(true)
-	AceGUI:ClearFocus()
-end
-
-local function Slider_OnValueChanged(frame)
-	local self = frame.obj
-	if not frame.setup then
-		local newvalue = frame:GetValue()
-		if self.step and self.step > 0 then
-			local min_value = self.min or 0
-			newvalue = floor((newvalue - min_value) / self.step + 0.5) * self.step + min_value
-		end
-		if newvalue ~= self.value and not self.disabled then
-			self.value = newvalue
-			self:Fire("OnValueChanged", newvalue)
-		end
-		if self.value then
-			UpdateText(self)
-		end
-	end
-end
-
-local function Slider_OnMouseUp(frame)
-	local self = frame.obj
-	self:Fire("OnMouseUp", self.value)
-end
-
-local function Slider_OnMouseWheel(frame, v)
-	local self = frame.obj
-	if not self.disabled then
-		local value = self.value
-		if v > 0 then
-			value = min(value + (self.step or 1), self.max)
-		else
-			value = max(value - (self.step or 1), self.min)
-		end
-		self.slider:SetValue(value)
-	end
-end
-
-local function EditBox_OnEscapePressed(frame)
-	frame:ClearFocus()
-end
-
-local function EditBox_OnEnterPressed(frame)
-	local self = frame.obj
-	local value = frame:GetText()
-	if self.ispercent then
-		value = value:gsub('%%', '')
-		value = tonumber(value) / 100
-	else
-		value = tonumber(value)
-	end
-
-	if value then
-		PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
-		self.slider:SetValue(value)
-		self:Fire("OnMouseUp", value)
-	end
-end
-
-local function EditBox_OnEnter(frame)
-	frame:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
-end
-
-local function EditBox_OnLeave(frame)
-	frame:SetBackdropBorderColor(0.3, 0.3, 0.3, 0.8)
-end
-
---[[-----------------------------------------------------------------------------
-Methods
--------------------------------------------------------------------------------]]
-local methods = {
-	["OnAcquire"] = function(self)
-		self:SetWidth(200)
-		self:SetHeight(44)
-		self:SetDisabled(false)
-		self:SetIsPercent(nil)
-		self:SetSliderValues(0,100,1)
-		self:SetValue(0)
-		self.slider:EnableMouseWheel(false)
-	end,
-
-	-- ["OnRelease"] = nil,
-
-	["SetDisabled"] = function(self, disabled)
-		self.disabled = disabled
-		if disabled then
-			self.slider:EnableMouse(false)
-			self.label:SetTextColor(.5, .5, .5)
-			self.hightext:SetTextColor(.5, .5, .5)
-			self.lowtext:SetTextColor(.5, .5, .5)
-			--self.valuetext:SetTextColor(.5, .5, .5)
-			self.editbox:SetTextColor(.5, .5, .5)
-			self.editbox:EnableMouse(false)
-			self.editbox:ClearFocus()
-		else
-			self.slider:EnableMouse(true)
-			self.label:SetTextColor(1, .82, 0)
-			self.hightext:SetTextColor(1, 1, 1)
-			self.lowtext:SetTextColor(1, 1, 1)
-			--self.valuetext:SetTextColor(1, 1, 1)
-			self.editbox:SetTextColor(1, 1, 1)
-			self.editbox:EnableMouse(true)
-		end
-	end,
-
-	["SetValue"] = function(self, value)
-		self.slider.setup = true
-		self.slider:SetValue(value)
-		self.value = value
-		UpdateText(self)
-		self.slider.setup = nil
-	end,
-
-	["GetValue"] = function(self)
-		return self.value
-	end,
-
-	["SetLabel"] = function(self, text)
-		self.label:SetText(text)
-	end,
-
-	["SetSliderValues"] = function(self, min, max, step)
-		local frame = self.slider
-		frame.setup = true
-		self.min = min
-		self.max = max
-		self.step = step
-		frame:SetMinMaxValues(min or 0,max or 100)
-		UpdateLabels(self)
-		frame:SetValueStep(step or 1)
-		if self.value then
-			frame:SetValue(self.value)
-		end
-		frame.setup = nil
-	end,
-
-	["SetIsPercent"] = function(self, value)
-		self.ispercent = value
-		UpdateLabels(self)
-		UpdateText(self)
-	end
-}
-
---[[-----------------------------------------------------------------------------
-Constructor
--------------------------------------------------------------------------------]]
-local SliderBackdrop  = {
-	bgFile = "Interface\\Buttons\\UI-SliderBar-Background",
-	edgeFile = "Interface\\Buttons\\UI-SliderBar-Border",
-	tile = true, tileSize = 8, edgeSize = 8,
-	insets = { left = 3, right = 3, top = 6, bottom = 6 }
-}
-
-local ManualBackdrop = {
-	bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
-	edgeFile = "Interface\\ChatFrame\\ChatFrameBackground",
-	tile = true, edgeSize = 1, tileSize = 5,
-}
-
-local function Constructor()
-	local frame = CreateFrame("Frame", nil, UIParent)
-
-	frame:EnableMouse(true)
-	frame:SetScript("OnMouseDown", Frame_OnMouseDown)
-
-	local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
-	label:SetPoint("TOPLEFT")
-	label:SetPoint("TOPRIGHT")
-	label:SetJustifyH("CENTER")
-	label:SetHeight(15)
-
-	local slider = CreateFrame("Slider", nil, frame)
-	slider:SetOrientation("HORIZONTAL")
-	slider:SetHeight(15)
-	slider:SetHitRectInsets(0, 0, -10, 0)
-	slider:SetBackdrop(SliderBackdrop)
-	slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Horizontal")
-	slider:SetPoint("TOP", label, "BOTTOM")
-	slider:SetPoint("LEFT", 3, 0)
-	slider:SetPoint("RIGHT", -3, 0)
-	slider:SetValue(0)
-	slider:SetScript("OnValueChanged",Slider_OnValueChanged)
-	slider:SetScript("OnEnter", Control_OnEnter)
-	slider:SetScript("OnLeave", Control_OnLeave)
-	slider:SetScript("OnMouseUp", Slider_OnMouseUp)
-	slider:SetScript("OnMouseWheel", Slider_OnMouseWheel)
-
-	local lowtext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
-	lowtext:SetPoint("TOPLEFT", slider, "BOTTOMLEFT", 2, 3)
-
-	local hightext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
-	hightext:SetPoint("TOPRIGHT", slider, "BOTTOMRIGHT", -2, 3)
-
-	local editbox = CreateFrame("EditBox", nil, frame)
-	editbox:SetAutoFocus(false)
-	editbox:SetFontObject(GameFontHighlightSmall)
-	editbox:SetPoint("TOP", slider, "BOTTOM")
-	editbox:SetHeight(14)
-	editbox:SetWidth(70)
-	editbox:SetJustifyH("CENTER")
-	editbox:EnableMouse(true)
-	editbox:SetBackdrop(ManualBackdrop)
-	editbox:SetBackdropColor(0, 0, 0, 0.5)
-	editbox:SetBackdropBorderColor(0.3, 0.3, 0.30, 0.80)
-	editbox:SetScript("OnEnter", EditBox_OnEnter)
-	editbox:SetScript("OnLeave", EditBox_OnLeave)
-	editbox:SetScript("OnEnterPressed", EditBox_OnEnterPressed)
-	editbox:SetScript("OnEscapePressed", EditBox_OnEscapePressed)
-
-	local widget = {
-		label       = label,
-		slider      = slider,
-		lowtext     = lowtext,
-		hightext    = hightext,
-		editbox     = editbox,
-		alignoffset = 25,
-		frame       = frame,
-		type        = Type
-	}
-	for method, func in pairs(methods) do
-		widget[method] = func
-	end
-	slider.obj, editbox.obj = widget, widget
-
-	return AceGUI:RegisterAsWidget(widget)
-end
-
-AceGUI:RegisterWidgetType(Type,Constructor,Version)
diff --git a/Libs/AceHook-3.0/AceHook-3.0.lua b/Libs/AceHook-3.0/AceHook-3.0.lua
deleted file mode 100644
index 8302334..0000000
--- a/Libs/AceHook-3.0/AceHook-3.0.lua
+++ /dev/null
@@ -1,511 +0,0 @@
---- **AceHook-3.0** offers safe Hooking/Unhooking of functions, methods and frame scripts.
--- Using AceHook-3.0 is recommended when you need to unhook your hooks again, so the hook chain isn't broken
--- when you manually restore the original function.
---
--- **AceHook-3.0** can be embeded into your addon, either explicitly by calling AceHook:Embed(MyAddon) or by
--- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
--- and can be accessed directly, without having to explicitly call AceHook itself.\\
--- It is recommended to embed AceHook, otherwise you'll have to specify a custom `self` on all calls you
--- make into AceHook.
--- @class file
--- @name AceHook-3.0
--- @release $Id: AceHook-3.0.lua 1118 2014-10-12 08:21:54Z nevcairiel $
-local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 8
-local AceHook, oldminor = LibStub:NewLibrary(ACEHOOK_MAJOR, ACEHOOK_MINOR)
-
-if not AceHook then return end -- No upgrade needed
-
-AceHook.embeded = AceHook.embeded or {}
-AceHook.registry = AceHook.registry or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end })
-AceHook.handlers = AceHook.handlers or {}
-AceHook.actives = AceHook.actives or {}
-AceHook.scripts = AceHook.scripts or {}
-AceHook.onceSecure = AceHook.onceSecure or {}
-AceHook.hooks = AceHook.hooks or {}
-
--- local upvalues
-local registry = AceHook.registry
-local handlers = AceHook.handlers
-local actives = AceHook.actives
-local scripts = AceHook.scripts
-local onceSecure = AceHook.onceSecure
-
--- Lua APIs
-local pairs, next, type = pairs, next, type
-local format = string.format
-local assert, error = assert, error
-
--- WoW APIs
-local issecurevariable, hooksecurefunc = issecurevariable, hooksecurefunc
-local _G = _G
-
--- functions for later definition
-local donothing, createHook, hook
-
-local protectedScripts = {
-	OnClick = true,
-}
-
--- upgrading of embeded is done at the bottom of the file
-
-local mixins = {
-	"Hook", "SecureHook",
-	"HookScript", "SecureHookScript",
-	"Unhook", "UnhookAll",
-	"IsHooked",
-	"RawHook", "RawHookScript"
-}
-
--- AceHook:Embed( target )
--- target (object) - target object to embed AceHook in
---
--- Embeds AceEevent into the target object making the functions from the mixins list available on target:..
-function AceHook:Embed( target )
-	for k, v in pairs( mixins ) do
-		target[v] = self[v]
-	end
-	self.embeded[target] = true
-	-- inject the hooks table safely
-	target.hooks = target.hooks or {}
-	return target
-end
-
--- AceHook:OnEmbedDisable( target )
--- target (object) - target object that is being disabled
---
--- Unhooks all hooks when the target disables.
--- this method should be called by the target manually or by an addon framework
-function AceHook:OnEmbedDisable( target )
-	target:UnhookAll()
-end
-
-function createHook(self, handler, orig, secure, failsafe)
-	local uid
-	local method = type(handler) == "string"
-	if failsafe and not secure then
-		-- failsafe hook creation
-		uid = function(...)
-			if actives[uid] then
-				if method then
-					self[handler](self, ...)
-				else
-					handler(...)
-				end
-			end
-			return orig(...)
-		end
-		-- /failsafe hook
-	else
-		-- all other hooks
-		uid = function(...)
-			if actives[uid] then
-				if method then
-					return self[handler](self, ...)
-				else
-					return handler(...)
-				end
-			elseif not secure then -- backup on non secure
-				return orig(...)
-			end
-		end
-		-- /hook
-	end
-	return uid
-end
-
-function donothing() end
-
-function hook(self, obj, method, handler, script, secure, raw, forceSecure, usage)
-	if not handler then handler = method end
-
-	-- These asserts make sure AceHooks's devs play by the rules.
-	assert(not script or type(script) == "boolean")
-	assert(not secure or type(secure) == "boolean")
-	assert(not raw or type(raw) == "boolean")
-	assert(not forceSecure or type(forceSecure) == "boolean")
-	assert(usage)
-
-	-- Error checking Battery!
-	if obj and type(obj) ~= "table" then
-		error(format("%s: 'object' - nil or table expected got %s", usage, type(obj)), 3)
-	end
-	if type(method) ~= "string" then
-		error(format("%s: 'method' - string expected got %s", usage, type(method)), 3)
-	end
-	if type(handler) ~= "string" and type(handler) ~= "function" then
-		error(format("%s: 'handler' - nil, string, or function expected got %s", usage, type(handler)), 3)
-	end
-	if type(handler) == "string" and type(self[handler]) ~= "function" then
-		error(format("%s: 'handler' - Handler specified does not exist at self[handler]", usage), 3)
-	end
-	if script then
-		if not obj or not obj.GetScript or not obj:HasScript(method) then
-			error(format("%s: You can only hook a script on a frame object", usage), 3)
-		end
-		if not secure and obj.IsProtected and obj:IsProtected() and protectedScripts[method] then
-			error(format("Cannot hook secure script %q; Use SecureHookScript(obj, method, [handler]) instead.", method), 3)
-		end
-	else
-		local issecure
-		if obj then
-			issecure = onceSecure[obj] and onceSecure[obj][method] or issecurevariable(obj, method)
-		else
-			issecure = onceSecure[method] or issecurevariable(method)
-		end
-		if issecure then
-			if forceSecure then
-				if obj then
-					onceSecure[obj] = onceSecure[obj] or {}
-					onceSecure[obj][method] = true
-				else
-					onceSecure[method] = true
-				end
-			elseif not secure then
-				error(format("%s: Attempt to hook secure function %s. Use `SecureHook' or add `true' to the argument list to override.", usage, method), 3)
-			end
-		end
-	end
-
-	local uid
-	if obj then
-		uid = registry[self][obj] and registry[self][obj][method]
-	else
-		uid = registry[self][method]
-	end
-
-	if uid then
-		if actives[uid] then
-			-- Only two sane choices exist here.  We either a) error 100% of the time or b) always unhook and then hook
-			-- choice b would likely lead to odd debuging conditions or other mysteries so we're going with a.
-			error(format("Attempting to rehook already active hook %s.", method))
-		end
-
-		if handlers[uid] == handler then -- turn on a decative hook, note enclosures break this ability, small memory leak
-			actives[uid] = true
-			return
-		elseif obj then -- is there any reason not to call unhook instead of doing the following several lines?
-			if self.hooks and self.hooks[obj] then
-				self.hooks[obj][method] = nil
-			end
-			registry[self][obj][method] = nil
-		else
-			if self.hooks then
-				self.hooks[method] = nil
-			end
-			registry[self][method] = nil
-		end
-		handlers[uid], actives[uid], scripts[uid] = nil, nil, nil
-		uid = nil
-	end
-
-	local orig
-	if script then
-		orig = obj:GetScript(method) or donothing
-	elseif obj then
-		orig = obj[method]
-	else
-		orig = _G[method]
-	end
-
-	if not orig then
-		error(format("%s: Attempting to hook a non existing target", usage), 3)
-	end
-
-	uid = createHook(self, handler, orig, secure, not (raw or secure))
-
-	if obj then
-		self.hooks[obj] = self.hooks[obj] or {}
-		registry[self][obj] = registry[self][obj] or {}
-		registry[self][obj][method] = uid
-
-		if not secure then
-			self.hooks[obj][method] = orig
-		end
-
-		if script then
-			if not secure then
-				obj:SetScript(method, uid)
-			else
-				obj:HookScript(method, uid)
-			end
-		else
-			if not secure then
-				obj[method] = uid
-			else
-				hooksecurefunc(obj, method, uid)
-			end
-		end
-	else
-		registry[self][method] = uid
-
-		if not secure then
-			_G[method] = uid
-			self.hooks[method] = orig
-		else
-			hooksecurefunc(method, uid)
-		end
-	end
-
-	actives[uid], handlers[uid], scripts[uid] = true, handler, script and true or nil
-end
-
---- Hook a function or a method on an object.
--- The hook created will be a "safe hook", that means that your handler will be called
--- before the hooked function ("Pre-Hook"), and you don't have to call the original function yourself,
--- however you cannot stop the execution of the function, or modify any of the arguments/return values.\\
--- This type of hook is typically used if you need to know if some function got called, and don't want to modify it.
--- @paramsig [object], method, [handler], [hookSecure]
--- @param object The object to hook a method from
--- @param method If object was specified, the name of the method, or the name of the function to hook.
--- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
--- @param hookSecure If true, AceHook will allow hooking of secure functions.
--- @usage
--- -- create an addon with AceHook embeded
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
---
--- function MyAddon:OnEnable()
---   -- Hook ActionButton_UpdateHotkeys, overwriting the secure status
---   self:Hook("ActionButton_UpdateHotkeys", true)
--- end
---
--- function MyAddon:ActionButton_UpdateHotkeys(button, type)
---   print(button:GetName() .. " is updating its HotKey")
--- end
-function AceHook:Hook(object, method, handler, hookSecure)
-	if type(object) == "string" then
-		method, handler, hookSecure, object = object, method, handler, nil
-	end
-
-	if handler == true then
-		handler, hookSecure = nil, true
-	end
-
-	hook(self, object, method, handler, false, false, false, hookSecure or false, "Usage: Hook([object], method, [handler], [hookSecure])")
-end
-
---- RawHook a function or a method on an object.
--- The hook created will be a "raw hook", that means that your handler will completly replace
--- the original function, and your handler has to call the original function (or not, depending on your intentions).\\
--- The original function will be stored in `self.hooks[object][method]` or `self.hooks[functionName]` respectively.\\
--- This type of hook can be used for all purposes, and is usually the most common case when you need to modify arguments
--- or want to control execution of the original function.
--- @paramsig [object], method, [handler], [hookSecure]
--- @param object The object to hook a method from
--- @param method If object was specified, the name of the method, or the name of the function to hook.
--- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
--- @param hookSecure If true, AceHook will allow hooking of secure functions.
--- @usage
--- -- create an addon with AceHook embeded
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
---
--- function MyAddon:OnEnable()
---   -- Hook ActionButton_UpdateHotkeys, overwriting the secure status
---   self:RawHook("ActionButton_UpdateHotkeys", true)
--- end
---
--- function MyAddon:ActionButton_UpdateHotkeys(button, type)
---   if button:GetName() == "MyButton" then
---     -- do stuff here
---   else
---     self.hooks.ActionButton_UpdateHotkeys(button, type)
---   end
--- end
-function AceHook:RawHook(object, method, handler, hookSecure)
-	if type(object) == "string" then
-		method, handler, hookSecure, object = object, method, handler, nil
-	end
-
-	if handler == true then
-		handler, hookSecure = nil, true
-	end
-
-	hook(self, object, method, handler, false, false, true, hookSecure or false,  "Usage: RawHook([object], method, [handler], [hookSecure])")
-end
-
---- SecureHook a function or a method on an object.
--- This function is a wrapper around the `hooksecurefunc` function in the WoW API. Using AceHook
--- extends the functionality of secure hooks, and adds the ability to unhook once the hook isn't
--- required anymore, or the addon is being disabled.\\
--- Secure Hooks should be used if the secure-status of the function is vital to its function,
--- and taint would block execution. Secure Hooks are always called after the original function was called
--- ("Post Hook"), and you cannot modify the arguments, return values or control the execution.
--- @paramsig [object], method, [handler]
--- @param object The object to hook a method from
--- @param method If object was specified, the name of the method, or the name of the function to hook.
--- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
-function AceHook:SecureHook(object, method, handler)
-	if type(object) == "string" then
-		method, handler, object = object, method, nil
-	end
-
-	hook(self, object, method, handler, false, true, false, false,  "Usage: SecureHook([object], method, [handler])")
-end
-
---- Hook a script handler on a frame.
--- The hook created will be a "safe hook", that means that your handler will be called
--- before the hooked script ("Pre-Hook"), and you don't have to call the original function yourself,
--- however you cannot stop the execution of the function, or modify any of the arguments/return values.\\
--- This is the frame script equivalent of the :Hook safe-hook. It would typically be used to be notified
--- when a certain event happens to a frame.
--- @paramsig frame, script, [handler]
--- @param frame The Frame to hook the script on
--- @param script The script to hook
--- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
--- @usage
--- -- create an addon with AceHook embeded
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
---
--- function MyAddon:OnEnable()
---   -- Hook the OnShow of FriendsFrame
---   self:HookScript(FriendsFrame, "OnShow", "FriendsFrameOnShow")
--- end
---
--- function MyAddon:FriendsFrameOnShow(frame)
---   print("The FriendsFrame was shown!")
--- end
-function AceHook:HookScript(frame, script, handler)
-	hook(self, frame, script, handler, true, false, false, false,  "Usage: HookScript(object, method, [handler])")
-end
-
---- RawHook a script handler on a frame.
--- The hook created will be a "raw hook", that means that your handler will completly replace
--- the original script, and your handler has to call the original script (or not, depending on your intentions).\\
--- The original script will be stored in `self.hooks[frame][script]`.\\
--- This type of hook can be used for all purposes, and is usually the most common case when you need to modify arguments
--- or want to control execution of the original script.
--- @paramsig frame, script, [handler]
--- @param frame The Frame to hook the script on
--- @param script The script to hook
--- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
--- @usage
--- -- create an addon with AceHook embeded
--- MyAddon = LibStub("AceAddon-3.0"):NewAddon("HookDemo", "AceHook-3.0")
---
--- function MyAddon:OnEnable()
---   -- Hook the OnShow of FriendsFrame
---   self:RawHookScript(FriendsFrame, "OnShow", "FriendsFrameOnShow")
--- end
---
--- function MyAddon:FriendsFrameOnShow(frame)
---   -- Call the original function
---   self.hooks[frame].OnShow(frame)
---   -- Do our processing
---   -- .. stuff
--- end
-function AceHook:RawHookScript(frame, script, handler)
-	hook(self, frame, script, handler, true, false, true, false, "Usage: RawHookScript(object, method, [handler])")
-end
-
---- SecureHook a script handler on a frame.
--- This function is a wrapper around the `frame:HookScript` function in the WoW API. Using AceHook
--- extends the functionality of secure hooks, and adds the ability to unhook once the hook isn't
--- required anymore, or the addon is being disabled.\\
--- Secure Hooks should be used if the secure-status of the function is vital to its function,
--- and taint would block execution. Secure Hooks are always called after the original function was called
--- ("Post Hook"), and you cannot modify the arguments, return values or control the execution.
--- @paramsig frame, script, [handler]
--- @param frame The Frame to hook the script on
--- @param script The script to hook
--- @param handler The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
-function AceHook:SecureHookScript(frame, script, handler)
-	hook(self, frame, script, handler, true, true, false, false, "Usage: SecureHookScript(object, method, [handler])")
-end
-
---- Unhook from the specified function, method or script.
--- @paramsig [obj], method
--- @param obj The object or frame to unhook from
--- @param method The name of the method, function or script to unhook from.
-function AceHook:Unhook(obj, method)
-	local usage = "Usage: Unhook([obj], method)"
-	if type(obj) == "string" then
-		method, obj = obj, nil
-	end
-
-	if obj and type(obj) ~= "table" then
-		error(format("%s: 'obj' - expecting nil or table got %s", usage, type(obj)), 2)
-	end
-	if type(method) ~= "string" then
-		error(format("%s: 'method' - expeting string got %s", usage, type(method)), 2)
-	end
-
-	local uid
-	if obj then
-		uid = registry[self][obj] and registry[self][obj][method]
-	else
-		uid = registry[self][method]
-	end
-
-	if not uid or not actives[uid] then
-		-- Declining to error on an unneeded unhook since the end effect is the same and this would just be annoying.
-		return false
-	end
-
-	actives[uid], handlers[uid] = nil, nil
-
-	if obj then
-		registry[self][obj][method] = nil
-		registry[self][obj] = next(registry[self][obj]) and registry[self][obj] or nil
-
-		-- if the hook reference doesnt exist, then its a secure hook, just bail out and dont do any unhooking
-		if not self.hooks[obj] or not self.hooks[obj][method] then return true end
-
-		if scripts[uid] and obj:GetScript(method) == uid then  -- unhooks scripts
-			obj:SetScript(method, self.hooks[obj][method] ~= donothing and self.hooks[obj][method] or nil)
-			scripts[uid] = nil
-		elseif obj and self.hooks[obj] and self.hooks[obj][method] and obj[method] == uid then -- unhooks methods
-			obj[method] = self.hooks[obj][method]
-		end
-
-		self.hooks[obj][method] = nil
-		self.hooks[obj] = next(self.hooks[obj]) and self.hooks[obj] or nil
-	else
-		registry[self][method] = nil
-
-		-- if self.hooks[method] doesn't exist, then this is a SecureHook, just bail out
-		if not self.hooks[method] then return true end
-
-		if self.hooks[method] and _G[method] == uid then -- unhooks functions
-			_G[method] = self.hooks[method]
-		end
-
-		self.hooks[method] = nil
-	end
-	return true
-end
-
---- Unhook all existing hooks for this addon.
-function AceHook:UnhookAll()
-	for key, value in pairs(registry[self]) do
-		if type(key) == "table" then
-			for method in pairs(value) do
-				self:Unhook(key, method)
-			end
-		else
-			self:Unhook(key)
-		end
-	end
-end
-
---- Check if the specific function, method or script is already hooked.
--- @paramsig [obj], method
--- @param obj The object or frame to unhook from
--- @param method The name of the method, function or script to unhook from.
-function AceHook:IsHooked(obj, method)
-	-- we don't check if registry[self] exists, this is done by evil magicks in the metatable
-	if type(obj) == "string" then
-		if registry[self][obj] and actives[registry[self][obj]] then
-			return true, handlers[registry[self][obj]]
-		end
-	else
-		if registry[self][obj] and registry[self][obj][method] and actives[registry[self][obj][method]] then
-			return true, handlers[registry[self][obj][method]]
-		end
-	end
-
-	return false, nil
-end
-
---- Upgrade our old embeded
-for target, v in pairs( AceHook.embeded ) do
-	AceHook:Embed( target )
-end
diff --git a/Libs/AceHook-3.0/AceHook-3.0.xml b/Libs/AceHook-3.0/AceHook-3.0.xml
deleted file mode 100644
index fe51336..0000000
--- a/Libs/AceHook-3.0/AceHook-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceHook-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceLocale-3.0/AceLocale-3.0.lua b/Libs/AceLocale-3.0/AceLocale-3.0.lua
deleted file mode 100644
index e133781..0000000
--- a/Libs/AceLocale-3.0/AceLocale-3.0.lua
+++ /dev/null
@@ -1,137 +0,0 @@
---- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings.
--- @class file
--- @name AceLocale-3.0
--- @release $Id: AceLocale-3.0.lua 1035 2011-07-09 03:20:13Z kaelten $
-local MAJOR,MINOR = "AceLocale-3.0", 6
-
-local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceLocale then return end -- no upgrade needed
-
--- Lua APIs
-local assert, tostring, error = assert, tostring, error
-local getmetatable, setmetatable, rawset, rawget = getmetatable, setmetatable, rawset, rawget
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GAME_LOCALE, geterrorhandler
-
-local gameLocale = GetLocale()
-if gameLocale == "enGB" then
-	gameLocale = "enUS"
-end
-
-AceLocale.apps = AceLocale.apps or {}          -- array of ["AppName"]=localetableref
-AceLocale.appnames = AceLocale.appnames or {}  -- array of [localetableref]="AppName"
-
--- This metatable is used on all tables returned from GetLocale
-local readmeta = {
-	__index = function(self, key) -- requesting totally unknown entries: fire off a nonbreaking error and return key
-		rawset(self, key, key)      -- only need to see the warning once, really
-		geterrorhandler()(MAJOR..": "..tostring(AceLocale.appnames[self])..": Missing entry for '"..tostring(key).."'")
-		return key
-	end
-}
-
--- This metatable is used on all tables returned from GetLocale if the silent flag is true, it does not issue a warning on unknown keys
-local readmetasilent = {
-	__index = function(self, key) -- requesting totally unknown entries: return key
-		rawset(self, key, key)      -- only need to invoke this function once
-		return key
-	end
-}
-
--- Remember the locale table being registered right now (it gets set by :NewLocale())
--- NOTE: Do never try to register 2 locale tables at once and mix their definition.
-local registering
-
--- local assert false function
-local assertfalse = function() assert(false) end
-
--- This metatable proxy is used when registering nondefault locales
-local writeproxy = setmetatable({}, {
-	__newindex = function(self, key, value)
-		rawset(registering, key, value == true and key or value) -- assigning values: replace 'true' with key string
-	end,
-	__index = assertfalse
-})
-
--- This metatable proxy is used when registering the default locale.
--- It refuses to overwrite existing values
--- Reason 1: Allows loading locales in any order
--- Reason 2: If 2 modules have the same string, but only the first one to be
---           loaded has a translation for the current locale, the translation
---           doesn't get overwritten.
---
-local writedefaultproxy = setmetatable({}, {
-	__newindex = function(self, key, value)
-		if not rawget(registering, key) then
-			rawset(registering, key, value == true and key or value)
-		end
-	end,
-	__index = assertfalse
-})
-
---- Register a new locale (or extend an existing one) for the specified application.
--- :NewLocale will return a table you can fill your locale into, or nil if the locale isn't needed for the players
--- game locale.
--- @paramsig application, locale[, isDefault[, silent]]
--- @param application Unique name of addon / module
--- @param locale Name of the locale to register, e.g. "enUS", "deDE", etc.
--- @param isDefault If this is the default locale being registered (your addon is written in this language, generally enUS)
--- @param silent If true, the locale will not issue warnings for missing keys. Must be set on the first locale registered. If set to "raw", nils will be returned for unknown keys (no metatable used).
--- @usage
--- -- enUS.lua
--- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "enUS", true)
--- L["string1"] = true
---
--- -- deDE.lua
--- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "deDE")
--- if not L then return end
--- L["string1"] = "Zeichenkette1"
--- @return Locale Table to add localizations to, or nil if the current locale is not required.
-function AceLocale:NewLocale(application, locale, isDefault, silent)
-
-	-- GAME_LOCALE allows translators to test translations of addons without having that wow client installed
-	local gameLocale = GAME_LOCALE or gameLocale
-
-	local app = AceLocale.apps[application]
-
-	if silent and app and getmetatable(app) ~= readmetasilent then
-		geterrorhandler()("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' must be specified for the first locale registered")
-	end
-
-	if not app then
-		if silent=="raw" then
-			app = {}
-		else
-			app = setmetatable({}, silent and readmetasilent or readmeta)
-		end
-		AceLocale.apps[application] = app
-		AceLocale.appnames[app] = application
-	end
-
-	if locale ~= gameLocale and not isDefault then
-		return -- nop, we don't need these translations
-	end
-
-	registering = app -- remember globally for writeproxy and writedefaultproxy
-
-	if isDefault then
-		return writedefaultproxy
-	end
-
-	return writeproxy
-end
-
---- Returns localizations for the current locale (or default locale if translations are missing).
--- Errors if nothing is registered (spank developer, not just a missing translation)
--- @param application Unique name of addon / module
--- @param silent If true, the locale is optional, silently return nil if it's not found (defaults to false, optional)
--- @return The locale table for the current language.
-function AceLocale:GetLocale(application, silent)
-	if not silent and not AceLocale.apps[application] then
-		error("Usage: GetLocale(application[, silent]): 'application' - No locales registered for '"..tostring(application).."'", 2)
-	end
-	return AceLocale.apps[application]
-end
diff --git a/Libs/AceLocale-3.0/AceLocale-3.0.xml b/Libs/AceLocale-3.0/AceLocale-3.0.xml
deleted file mode 100644
index bf023f0..0000000
--- a/Libs/AceLocale-3.0/AceLocale-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceLocale-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceSerializer-3.0/AceSerializer-3.0.lua b/Libs/AceSerializer-3.0/AceSerializer-3.0.lua
deleted file mode 100644
index 0b19e08..0000000
--- a/Libs/AceSerializer-3.0/AceSerializer-3.0.lua
+++ /dev/null
@@ -1,287 +0,0 @@
---- **AceSerializer-3.0** can serialize any variable (except functions or userdata) into a string format,
--- that can be send over the addon comm channel. AceSerializer was designed to keep all data intact, especially
--- very large numbers or floating point numbers, and table structures. The only caveat currently is, that multiple
--- references to the same table will be send individually.
---
--- **AceSerializer-3.0** can be embeded into your addon, either explicitly by calling AceSerializer:Embed(MyAddon) or by
--- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
--- and can be accessed directly, without having to explicitly call AceSerializer itself.\\
--- It is recommended to embed AceSerializer, otherwise you'll have to specify a custom `self` on all calls you
--- make into AceSerializer.
--- @class file
--- @name AceSerializer-3.0
--- @release $Id: AceSerializer-3.0.lua 1135 2015-09-19 20:39:16Z nevcairiel $
-local MAJOR,MINOR = "AceSerializer-3.0", 5
-local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceSerializer then return end
-
--- Lua APIs
-local strbyte, strchar, gsub, gmatch, format = string.byte, string.char, string.gsub, string.gmatch, string.format
-local assert, error, pcall = assert, error, pcall
-local type, tostring, tonumber = type, tostring, tonumber
-local pairs, select, frexp = pairs, select, math.frexp
-local tconcat = table.concat
-
--- quick copies of string representations of wonky numbers
-local inf = math.huge
-
-local serNaN  -- can't do this in 4.3, see ace3 ticket 268
-local serInf, serInfMac = "1.#INF", "inf"
-local serNegInf, serNegInfMac = "-1.#INF", "-inf"
-
-
--- Serialization functions
-
-local function SerializeStringHelper(ch)	-- Used by SerializeValue for strings
-	-- We use \126 ("~") as an escape character for all nonprints plus a few more
-	local n = strbyte(ch)
-	if n==30 then           -- v3 / ticket 115: catch a nonprint that ends up being "~^" when encoded... DOH
-		return "\126\122"
-	elseif n<=32 then 			-- nonprint + space
-		return "\126"..strchar(n+64)
-	elseif n==94 then		-- value separator
-		return "\126\125"
-	elseif n==126 then		-- our own escape character
-		return "\126\124"
-	elseif n==127 then		-- nonprint (DEL)
-		return "\126\123"
-	else
-		assert(false)	-- can't be reached if caller uses a sane regex
-	end
-end
-
-local function SerializeValue(v, res, nres)
-	-- We use "^" as a value separator, followed by one byte for type indicator
-	local t=type(v)
-
-	if t=="string" then		-- ^S = string (escaped to remove nonprints, "^"s, etc)
-		res[nres+1] = "^S"
-		res[nres+2] = gsub(v,"[%c \94\126\127]", SerializeStringHelper)
-		nres=nres+2
-
-	elseif t=="number" then	-- ^N = number (just tostring()ed) or ^F (float components)
-		local str = tostring(v)
-		if tonumber(str)==v  --[[not in 4.3 or str==serNaN]] then
-			-- translates just fine, transmit as-is
-			res[nres+1] = "^N"
-			res[nres+2] = str
-			nres=nres+2
-		elseif v == inf or v == -inf then
-			res[nres+1] = "^N"
-			res[nres+2] = v == inf and serInf or serNegInf
-			nres=nres+2
-		else
-			local m,e = frexp(v)
-			res[nres+1] = "^F"
-			res[nres+2] = format("%.0f",m*2^53)	-- force mantissa to become integer (it's originally 0.5--0.9999)
-			res[nres+3] = "^f"
-			res[nres+4] = tostring(e-53)	-- adjust exponent to counteract mantissa manipulation
-			nres=nres+4
-		end
-
-	elseif t=="table" then	-- ^T...^t = table (list of key,value pairs)
-		nres=nres+1
-		res[nres] = "^T"
-		for k,v in pairs(v) do
-			nres = SerializeValue(k, res, nres)
-			nres = SerializeValue(v, res, nres)
-		end
-		nres=nres+1
-		res[nres] = "^t"
-
-	elseif t=="boolean" then	-- ^B = true, ^b = false
-		nres=nres+1
-		if v then
-			res[nres] = "^B"	-- true
-		else
-			res[nres] = "^b"	-- false
-		end
-
-	elseif t=="nil" then		-- ^Z = nil (zero, "N" was taken :P)
-		nres=nres+1
-		res[nres] = "^Z"
-
-	else
-		error(MAJOR..": Cannot serialize a value of type '"..t.."'")	-- can't produce error on right level, this is wildly recursive
-	end
-
-	return nres
-end
-
-
-
-local serializeTbl = { "^1" }	-- "^1" = Hi, I'm data serialized by AceSerializer protocol rev 1
-
---- Serialize the data passed into the function.
--- Takes a list of values (strings, numbers, booleans, nils, tables)
--- and returns it in serialized form (a string).\\
--- May throw errors on invalid data types.
--- @param ... List of values to serialize
--- @return The data in its serialized form (string)
-function AceSerializer:Serialize(...)
-	local nres = 1
-
-	for i=1,select("#", ...) do
-		local v = select(i, ...)
-		nres = SerializeValue(v, serializeTbl, nres)
-	end
-
-	serializeTbl[nres+1] = "^^"	-- "^^" = End of serialized data
-
-	return tconcat(serializeTbl, "", 1, nres+1)
-end
-
--- Deserialization functions
-local function DeserializeStringHelper(escape)
-	if escape<"~\122" then
-		return strchar(strbyte(escape,2,2)-64)
-	elseif escape=="~\122" then	-- v3 / ticket 115: special case encode since 30+64=94 ("^") - OOPS.
-		return "\030"
-	elseif escape=="~\123" then
-		return "\127"
-	elseif escape=="~\124" then
-		return "\126"
-	elseif escape=="~\125" then
-		return "\94"
-	end
-	error("DeserializeStringHelper got called for '"..escape.."'?!?")  -- can't be reached unless regex is screwed up
-end
-
-local function DeserializeNumberHelper(number)
-	--[[ not in 4.3 if number == serNaN then
-		return 0/0
-	else]]if number == serNegInf or number == serNegInfMac then
-		return -inf
-	elseif number == serInf or number == serInfMac then
-		return inf
-	else
-		return tonumber(number)
-	end
-end
-
--- DeserializeValue: worker function for :Deserialize()
--- It works in two modes:
---   Main (top-level) mode: Deserialize a list of values and return them all
---   Recursive (table) mode: Deserialize only a single value (_may_ of course be another table with lots of subvalues in it)
---
--- The function _always_ works recursively due to having to build a list of values to return
---
--- Callers are expected to pcall(DeserializeValue) to trap errors
-
-local function DeserializeValue(iter,single,ctl,data)
-
-	if not single then
-		ctl,data = iter()
-	end
-
-	if not ctl then
-		error("Supplied data misses AceSerializer terminator ('^^')")
-	end
-
-	if ctl=="^^" then
-		-- ignore extraneous data
-		return
-	end
-
-	local res
-
-	if ctl=="^S" then
-		res = gsub(data, "~.", DeserializeStringHelper)
-	elseif ctl=="^N" then
-		res = DeserializeNumberHelper(data)
-		if not res then
-			error("Invalid serialized number: '"..tostring(data).."'")
-		end
-	elseif ctl=="^F" then     -- ^F<mantissa>^f<exponent>
-		local ctl2,e = iter()
-		if ctl2~="^f" then
-			error("Invalid serialized floating-point number, expected '^f', not '"..tostring(ctl2).."'")
-		end
-		local m=tonumber(data)
-		e=tonumber(e)
-		if not (m and e) then
-			error("Invalid serialized floating-point number, expected mantissa and exponent, got '"..tostring(m).."' and '"..tostring(e).."'")
-		end
-		res = m*(2^e)
-	elseif ctl=="^B" then	-- yeah yeah ignore data portion
-		res = true
-	elseif ctl=="^b" then   -- yeah yeah ignore data portion
-		res = false
-	elseif ctl=="^Z" then	-- yeah yeah ignore data portion
-		res = nil
-	elseif ctl=="^T" then
-		-- ignore ^T's data, future extensibility?
-		res = {}
-		local k,v
-		while true do
-			ctl,data = iter()
-			if ctl=="^t" then break end	-- ignore ^t's data
-			k = DeserializeValue(iter,true,ctl,data)
-			if k==nil then
-				error("Invalid AceSerializer table format (no table end marker)")
-			end
-			ctl,data = iter()
-			v = DeserializeValue(iter,true,ctl,data)
-			if v==nil then
-				error("Invalid AceSerializer table format (no table end marker)")
-			end
-			res[k]=v
-		end
-	else
-		error("Invalid AceSerializer control code '"..ctl.."'")
-	end
-
-	if not single then
-		return res,DeserializeValue(iter)
-	else
-		return res
-	end
-end
-
---- Deserializes the data into its original values.
--- Accepts serialized data, ignoring all control characters and whitespace.
--- @param str The serialized data (from :Serialize)
--- @return true followed by a list of values, OR false followed by an error message
-function AceSerializer:Deserialize(str)
-	str = gsub(str, "[%c ]", "")	-- ignore all control characters; nice for embedding in email and stuff
-
-	local iter = gmatch(str, "(^.)([^^]*)")	-- Any ^x followed by string of non-^
-	local ctl,data = iter()
-	if not ctl or ctl~="^1" then
-		-- we purposefully ignore the data portion of the start code, it can be used as an extension mechanism
-		return false, "Supplied data is not AceSerializer data (rev 1)"
-	end
-
-	return pcall(DeserializeValue, iter)
-end
-
-
-----------------------------------------
--- Base library stuff
-----------------------------------------
-
-AceSerializer.internals = {	-- for test scripts
-	SerializeValue = SerializeValue,
-	SerializeStringHelper = SerializeStringHelper,
-}
-
-local mixins = {
-	"Serialize",
-	"Deserialize",
-}
-
-AceSerializer.embeds = AceSerializer.embeds or {}
-
-function AceSerializer:Embed(target)
-	for k, v in pairs(mixins) do
-		target[v] = self[v]
-	end
-	self.embeds[target] = true
-	return target
-end
-
--- Update embeds
-for target, v in pairs(AceSerializer.embeds) do
-	AceSerializer:Embed(target)
-end
diff --git a/Libs/AceSerializer-3.0/AceSerializer-3.0.xml b/Libs/AceSerializer-3.0/AceSerializer-3.0.xml
deleted file mode 100644
index 677d08e..0000000
--- a/Libs/AceSerializer-3.0/AceSerializer-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceSerializer-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceTab-3.0/AceTab-3.0.lua b/Libs/AceTab-3.0/AceTab-3.0.lua
deleted file mode 100644
index b7c64db..0000000
--- a/Libs/AceTab-3.0/AceTab-3.0.lua
+++ /dev/null
@@ -1,446 +0,0 @@
---- AceTab-3.0 provides support for tab-completion.
--- Note: This library is not yet finalized.
--- @class file
--- @name AceTab-3.0
--- @release $Id: AceTab-3.0.lua 1148 2016-07-18 09:13:02Z nevcairiel $
-
-local ACETAB_MAJOR, ACETAB_MINOR = 'AceTab-3.0', 9
-local AceTab, oldminor = LibStub:NewLibrary(ACETAB_MAJOR, ACETAB_MINOR)
-
-if not AceTab then return end -- No upgrade needed
-
-AceTab.registry = AceTab.registry or {}
-
--- local upvalues
-local _G = _G
-local pairs = pairs
-local ipairs = ipairs
-local type = type
-local registry = AceTab.registry
-
-local strfind = string.find
-local strsub = string.sub
-local strlower = string.lower
-local strformat = string.format
-local strmatch = string.match
-
-local function printf(...)
-	DEFAULT_CHAT_FRAME:AddMessage(strformat(...))
-end
-
-local function getTextBeforeCursor(this, start)
-	return strsub(this:GetText(), start or 1, this:GetCursorPosition())
-end
-
--- Hook OnTabPressed and OnTextChanged for the frame, give it an empty matches table, and set its curMatch to 0, if we haven't done so already.
-local function hookFrame(f)
-	if f.hookedByAceTab3 then return end
-	f.hookedByAceTab3 = true
-	if f == ChatEdit_GetActiveWindow() then
-		local origCTP = ChatEdit_CustomTabPressed
-		function ChatEdit_CustomTabPressed(...)
-			if AceTab:OnTabPressed(f) then
-				return origCTP(...)
-			else
-				return true
-			end
-		end
-	else
-		local origOTP = f:GetScript('OnTabPressed')
-		if type(origOTP) ~= 'function' then
-			origOTP = function() end
-		end
-		f:SetScript('OnTabPressed', function(...)
-			if AceTab:OnTabPressed(f) then
-				return origOTP(...)
-			end
-		end)
-	end
-	f.at3curMatch = 0
-	f.at3matches = {}
-end
-
-local firstPMLength
-
-local fallbacks, notfallbacks = {}, {}  -- classifies completions into those which have preconditions and those which do not.  Those without preconditions are only considered if no other completions have matches.
-local pmolengths = {}  -- holds the number of characters to overwrite according to pmoverwrite and the current prematch
--- ------------------------------------------------------------------------------
--- RegisterTabCompletion( descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite )
--- See http://www.wowace.com/wiki/AceTab-2.0 for detailed API documentation
---
--- descriptor	string					Unique identifier for this tab completion set
---
--- prematches	string|table|nil		String match(es) AFTER which this tab completion will apply.
---										AceTab will ignore tabs NOT preceded by the string(s).
---										If no value is passed, will check all tabs pressed in the specified editframe(s) UNLESS a more-specific tab complete applies.
---
--- wordlist		function|table			Function that will be passed a table into which it will insert strings corresponding to all possible completions, or an equivalent table.
---										The text in the editbox, the position of the start of the word to be completed, and the uncompleted partial word
---										are passed as second, third, and fourth arguments, to facilitate pre-filtering or conditional formatting, if desired.
---
--- usagefunc	function|boolean|nil	Usage statement function.  Defaults to the wordlist, one per line.  A boolean true squelches usage output.
---
--- listenframes	string|table|nil		EditFrames to monitor.  Defaults to ChatFrameEditBox.
---
--- postfunc		function|nil			Post-processing function.  If supplied, matches will be passed through this function after they've been identified as a match.
---
--- pmoverwrite	boolean|number|nil		Offset the beginning of the completion string in the editbox when making a completion.  Passing a boolean true indicates that we want to overwrite
---										the entire prematch string, and passing a number will overwrite that many characters prior to the cursor.
---										This is useful when you want to use the prematch as an indicator character, but ultimately do not want it as part of the text, itself.
---
--- no return
--- ------------------------------------------------------------------------------
-function AceTab:RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite)
-	-- Arg checks
-	if type(descriptor) ~= 'string' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'descriptor' - string expected.", 3) end
-	if prematches and type(prematches) ~= 'string' and type(prematches) ~= 'table' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'prematches' - string, table, or nil expected.", 3) end
-	if type(wordlist) ~= 'function' and type(wordlist) ~= 'table' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'wordlist' - function or table expected.", 3) end
-	if usagefunc and type(usagefunc) ~= 'function' and type(usagefunc) ~= 'boolean' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'usagefunc' - function or boolean expected.", 3) end
-	if listenframes and type(listenframes) ~= 'string' and type(listenframes) ~= 'table' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'listenframes' - string or table expected.", 3) end
-	if postfunc and type(postfunc) ~= 'function' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'postfunc' - function expected.", 3) end
-	if pmoverwrite and type(pmoverwrite) ~= 'boolean' and type(pmoverwrite) ~= 'number' then error("Usage: RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite): 'pmoverwrite' - boolean or number expected.", 3) end
-
-	local pmtable
-
-	if type(prematches) == 'table' then
-		pmtable = prematches
-		notfallbacks[descriptor] = true
-	else
-		pmtable = {}
-		-- Mark this group as a fallback group if no value was passed.
-		if not prematches then
-			pmtable[1] = ""
-			fallbacks[descriptor] = true
-		-- Make prematches into a one-element table if it was passed as a string.
-		elseif type(prematches) == 'string' then
-			pmtable[1] = prematches
-			if prematches == "" then
-				fallbacks[descriptor] = true
-			else
-				notfallbacks[descriptor] = true
-			end
-		end
-	end
-
-	-- Make listenframes into a one-element table if it was not passed a table of frames.
-	if not listenframes then  -- default
-		listenframes = {}
-		for i = 1, NUM_CHAT_WINDOWS do
-			listenframes[i] = _G["ChatFrame"..i.."EditBox"]
-		end
-	elseif type(listenframes) ~= 'table' or type(listenframes[0]) == 'userdata' and type(listenframes.IsObjectType) == 'function' then  -- single frame or framename
-		listenframes = { listenframes }
-	end
-
-	-- Hook each registered listenframe and give it a matches table.
-	for _, f in pairs(listenframes) do
-		if type(f) == 'string' then
-			f = _G[f]
-		end
-		if type(f) ~= 'table' or type(f[0]) ~= 'userdata' or type(f.IsObjectType) ~= 'function' then
-			error(format(ACETAB_MAJOR..": Cannot register frame %q; it does not exist", f:GetName()))
-		end
-		if f then
-			if f:GetObjectType() ~= 'EditBox' then
-				error(format(ACETAB_MAJOR..": Cannot register frame %q; it is not an EditBox", f:GetName()))
-			else
-				hookFrame(f)
-			end
-		end
-	end
-
-	-- Everything checks out; register this completion.
-	if not registry[descriptor] then
-		registry[descriptor] = { prematches = pmtable, wordlist = wordlist, usagefunc = usagefunc, listenframes = listenframes, postfunc = postfunc, pmoverwrite = pmoverwrite }
-	end
-end
-
-function AceTab:IsTabCompletionRegistered(descriptor)
-	return registry and registry[descriptor]
-end
-
-function AceTab:UnregisterTabCompletion(descriptor)
-	registry[descriptor] = nil
-	pmolengths[descriptor] = nil
-	fallbacks[descriptor] = nil
-	notfallbacks[descriptor] = nil
-end
-
--- ------------------------------------------------------------------------------
--- gcbs( s1, s2 )
---
--- s1		string		First string to be compared
---
--- s2		string		Second string to be compared
---
--- returns the greatest common substring beginning s1 and s2
--- ------------------------------------------------------------------------------
-local function gcbs(s1, s2)
-	if not s1 and not s2 then return end
-	if not s1 then s1 = s2 end
-	if not s2 then s2 = s1 end
-	if #s2 < #s1 then
-		s1, s2 = s2, s1
-	end
-	if strfind(strlower(s2), "^"..strlower(s1)) then
-		return s1
-	else
-		return gcbs(strsub(s1, 1, -2), s2)
-	end
-end
-
-local cursor  -- Holds cursor position.  Set in :OnTabPressed().
--- ------------------------------------------------------------------------------
--- cycleTab()
--- For when a tab press has multiple possible completions, we need to allow the user to press tab repeatedly to cycle through them.
--- If we have multiple possible completions, all tab presses after the first will call this function to cycle through and insert the different possible matches.
--- This function will stop being called after OnTextChanged() is triggered by something other than AceTab (i.e. the user inputs a character).
--- ------------------------------------------------------------------------------
-local previousLength, cMatch, matched, postmatch
-local function cycleTab(this)
-	cMatch = 0  -- Counter across all sets.  The pseudo-index relevant to this value and corresponding to the current match is held in this.at3curMatch
-	matched = false
-
-	-- Check each completion group registered to this frame.
-	for desc, compgrp in pairs(this.at3matches) do
-
-		-- Loop through the valid completions for this set.
-		for m, pm in pairs(compgrp) do
-			cMatch = cMatch + 1
-			if cMatch == this.at3curMatch then  -- we're back to where we left off last time through the combined list
-				this.at3lastMatch = m
-				this.at3lastWord = pm
-				this.at3curMatch = cMatch + 1 -- save the new cMatch index
-				matched = true
-				break
-			end
-		end
-		if matched then break end
-	end
-
-	-- If our index is beyond the end of the list, reset the original uncompleted substring and let the cycle start over next time tab is pressed.
-	if not matched then
-		this.at3lastMatch = this.at3origMatch
-		this.at3lastWord = this.at3origWord
-		this.at3curMatch = 1
-	end
-
-	-- Insert the completion.
-	this:HighlightText(this.at3matchStart-1, cursor)
-	this:Insert(this.at3lastWord or '')
-	this.at3_last_precursor = getTextBeforeCursor(this) or ''
-end
-
-local IsSecureCmd = IsSecureCmd
-
-local cands, candUsage = {}, {}
-local numMatches = 0
-local firstMatch, hasNonFallback, allGCBS, setGCBS, usage
-local text_precursor, text_all, text_pmendToCursor
-local matches, usagefunc  -- convenience locals
-
--- Fill the this.at3matches[descriptor] tables with matching completion pairs for each entry, based on
--- the partial string preceding the cursor position and using the corresponding registered wordlist.
---
--- The entries of the matches tables are of the format raw_match = formatted_match, where raw_match is the plaintext completion and
--- formatted_match is the match after being formatted/altered/processed by the registered postfunc.
--- If no postfunc exists, then the formatted and raw matches are the same.
-local pms, pme, pmt, prematchStart, prematchEnd, text_prematch, entry
-local function fillMatches(this, desc, fallback)
-	entry = registry[desc]
-	-- See what frames are registered for this completion group.  If the frame in which we pressed tab is one of them, then we start building matches.
-	for _, f in ipairs(entry.listenframes) do
-		if f == this then
-
-			-- Try each precondition string registered for this completion group.
-			for _, prematch in ipairs(entry.prematches) do
-
-				-- Test if our prematch string is satisfied.
-				-- If it is, then we find its last occurence prior to the cursor, calculate and store its pmoverwrite value (if applicable), and start considering completions.
-				if fallback then prematch = "%s" end
-
-				-- Find the last occurence of the prematch before the cursor.
-				pms, pme, pmt = nil, 1, ''
-				text_prematch, prematchEnd, prematchStart = nil, nil, nil
-				while true do
-					pms, pme, pmt = strfind(text_precursor, "("..prematch..")", pme)
-					if pms then
-						prematchStart, prematchEnd, text_prematch = pms, pme, pmt
-						pme = pme + 1
-					else
-						break
-					end
-				end
-
-				if not prematchStart and fallback then
-					prematchStart, prematchEnd, text_prematch = 0, 0, ''
-				end
-				if prematchStart then
-					-- text_pmendToCursor should be the sub-word/phrase to be completed.
-					text_pmendToCursor = strsub(text_precursor, prematchEnd + 1)
-
-					-- How many characters should we eliminate before the completion before writing it in.
-					pmolengths[desc] = entry.pmoverwrite == true and #text_prematch or entry.pmoverwrite or 0
-
-					-- This is where we will insert completions, taking the prematch overwrite into account.
-					this.at3matchStart = prematchEnd + 1 - (pmolengths[desc] or 0)
-
-					-- We're either a non-fallback set or all completions thus far have been fallback sets, and the precondition matches.
-					-- Create cands from the registered wordlist, filling it with all potential (unfiltered) completion strings.
-					local wordlist = entry.wordlist
-					local cands = type(wordlist) == 'table' and wordlist or {}
-					if type(wordlist) == 'function' then
-						wordlist(cands, text_all, prematchEnd + 1, text_pmendToCursor)
-					end
-					if cands ~= false then
-						matches = this.at3matches[desc] or {}
-						for i in pairs(matches) do matches[i] = nil end
-
-						-- Check each of the entries in cands to see if it completes the word before the cursor.
-						-- Finally, increment our match count and set firstMatch, if appropriate.
-						for _, m in ipairs(cands) do
-							if strfind(strlower(m), strlower(text_pmendToCursor), 1, 1) == 1 then  -- we have a matching completion!
-								hasNonFallback = hasNonFallback or (not fallback)
-								matches[m] = entry.postfunc and entry.postfunc(m, prematchEnd + 1, text_all) or m
-								numMatches = numMatches + 1
-								if numMatches == 1 then
-									firstMatch = matches[m]
-									firstPMLength = pmolengths[desc] or 0
-								end
-							end
-						end
-						this.at3matches[desc] = numMatches > 0 and matches or nil
-					end
-				end
-			end
-		end
-	end
-end
-
-function AceTab:OnTabPressed(this)
-	if this:GetText() == '' then return true end
-
-	-- allow Blizzard to handle slash commands, themselves
-	if this == ChatEdit_GetActiveWindow() then
-		local command = this:GetText()
-		if strfind(command, "^/[%a%d_]+$") then
-			return true
-		end
-		local cmd = strmatch(command, "^/[%a%d_]+")
-		if cmd and IsSecureCmd(cmd) then
-			return true
-		end
-	end
-
-	cursor = this:GetCursorPosition()
-
-	text_all = this:GetText()
-	text_precursor = getTextBeforeCursor(this) or ''
-
-	-- If we've already found some matches and haven't done anything since the last tab press, then (continue) cycling matches.
-	-- Otherwise, reset this frame's matches and proceed to creating our list of possible completions.
-	this.at3lastMatch = this.at3curMatch > 0 and (this.at3lastMatch or this.at3origWord)
-	-- Detects if we've made any edits since the last tab press.  If not, continue cycling completions.
-	if text_precursor == this.at3_last_precursor then
-		return cycleTab(this)
-	else
-		for i in pairs(this.at3matches) do this.at3matches[i] = nil end
-		this.at3curMatch = 0
-		this.at3origWord = nil
-		this.at3origMatch = nil
-		this.at3lastWord = nil
-		this.at3lastMatch = nil
-		this.at3_last_precursor = text_precursor
-	end
-
-	numMatches = 0
-	firstMatch = nil
-	firstPMLength = 0
-	hasNonFallback = false
-	for i in pairs(pmolengths) do pmolengths[i] = nil end
-
-	for desc in pairs(notfallbacks) do
-		fillMatches(this, desc)
-	end
-	if not hasNonFallback then
-		for desc in pairs(fallbacks) do
-			fillMatches(this, desc, true)
-		end
-	end
-
-	if not firstMatch then
-		this.at3_last_precursor = "\0"
-		return true
-	end
-
-	-- We want to replace the entire word with our completion, so highlight it up to the cursor.
-	-- If only one match exists, then stick it in there and append a space.
-	if numMatches == 1 then
-		-- HighlightText takes the value AFTER which the highlighting starts, so we have to subtract 1 to have it start before the first character.
-		this:HighlightText(this.at3matchStart-1, cursor)
-
-		this:Insert(firstMatch)
-		this:Insert(" ")
-	else
-		-- Otherwise, we want to begin cycling through the valid completions.
-		-- Beginning a cycle also causes the usage statement to be printed, if one exists.
-
-		-- Print usage statements for each possible completion (and gather up the GCBS of all matches while we're walking the tables).
-		allGCBS = nil
-		for desc, matches in pairs(this.at3matches) do
-			-- Don't print usage statements for fallback completion groups if we have 'real' completion groups with matches.
-			if hasNonFallback and fallbacks[desc] then break end
-
-			-- Use the group's description as a heading for its usage statements.
-			DEFAULT_CHAT_FRAME:AddMessage(desc..":")
-
-			usagefunc = registry[desc].usagefunc
-			if not usagefunc then
-				-- No special usage processing; just print a list of the (formatted) matches.
-				for m, fm in pairs(matches) do
-					DEFAULT_CHAT_FRAME:AddMessage(fm)
-					allGCBS = gcbs(allGCBS, m)
-				end
-			else
-				-- Print a usage statement based on the corresponding registered usagefunc.
-				-- candUsage is the table passed to usagefunc to be filled with candidate = usage_statement pairs.
-				if type(usagefunc) == 'function' then
-					for i in pairs(candUsage) do candUsage[i] = nil end
-
-					-- usagefunc takes the greatest common substring of valid matches as one of its args, so let's find that now.
-					-- TODO: Make the GCBS function accept a vararg or table, after which we can just pass in the list of matches.
-					setGCBS = nil
-					for m in pairs(matches) do
-						setGCBS = gcbs(setGCBS, m)
-					end
-					allGCBS = gcbs(allGCBS, setGCBS)
-					usage = usagefunc(candUsage, matches, setGCBS, strsub(text_precursor, 1, prematchEnd))
-
-					-- If the usagefunc returns a string, then the entire usage statement has been taken care of by usagefunc, and we need only to print it...
-					if type(usage) == 'string' then
-						DEFAULT_CHAT_FRAME:AddMessage(usage)
-
-					-- ...otherwise, it should have filled candUsage with candidate-usage statement pairs, and we need to print the matching ones.
-					elseif next(candUsage) and numMatches > 0 then
-						for m, fm in pairs(matches) do
-							if candUsage[m] then DEFAULT_CHAT_FRAME:AddMessage(strformat("%s - %s", fm, candUsage[m])) end
-						end
-					end
-				end
-			end
-
-			if next(matches) then
-				-- Replace the original string with the greatest common substring of all valid completions.
-				this.at3curMatch = 1
-				this.at3origWord = strsub(text_precursor, this.at3matchStart, this.at3matchStart + pmolengths[desc] - 1) .. allGCBS or ""
-				this.at3origMatch = allGCBS or ""
-				this.at3lastWord = this.at3origWord
-				this.at3lastMatch = this.at3origMatch
-
-				this:HighlightText(this.at3matchStart-1, cursor)
-				this:Insert(this.at3origWord)
-				this.at3_last_precursor = getTextBeforeCursor(this) or ''
-			end
-		end
-	end
-end
diff --git a/Libs/AceTab-3.0/AceTab-3.0.xml b/Libs/AceTab-3.0/AceTab-3.0.xml
deleted file mode 100644
index 2e50904..0000000
--- a/Libs/AceTab-3.0/AceTab-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceTab-3.0.lua"/>
-</Ui>
diff --git a/Libs/AceTimer-3.0/AceTimer-3.0.lua b/Libs/AceTimer-3.0/AceTimer-3.0.lua
deleted file mode 100644
index 336864b..0000000
--- a/Libs/AceTimer-3.0/AceTimer-3.0.lua
+++ /dev/null
@@ -1,278 +0,0 @@
---- **AceTimer-3.0** provides a central facility for registering timers.
--- AceTimer supports one-shot timers and repeating timers. All timers are stored in an efficient
--- data structure that allows easy dispatching and fast rescheduling. Timers can be registered
--- or canceled at any time, even from within a running timer, without conflict or large overhead.\\
--- AceTimer is currently limited to firing timers at a frequency of 0.01s as this is what the WoW timer API
--- restricts us to.
---
--- All `:Schedule` functions will return a handle to the current timer, which you will need to store if you
--- need to cancel the timer you just registered.
---
--- **AceTimer-3.0** can be embeded into your addon, either explicitly by calling AceTimer:Embed(MyAddon) or by
--- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
--- and can be accessed directly, without having to explicitly call AceTimer itself.\\
--- It is recommended to embed AceTimer, otherwise you'll have to specify a custom `self` on all calls you
--- make into AceTimer.
--- @class file
--- @name AceTimer-3.0
--- @release $Id: AceTimer-3.0.lua 1170 2018-03-29 17:38:58Z funkydude $
-
-local MAJOR, MINOR = "AceTimer-3.0", 17 -- Bump minor on changes
-local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not AceTimer then return end -- No upgrade needed
-AceTimer.activeTimers = AceTimer.activeTimers or {} -- Active timer list
-local activeTimers = AceTimer.activeTimers -- Upvalue our private data
-
--- Lua APIs
-local type, unpack, next, error, select = type, unpack, next, error, select
--- WoW APIs
-local GetTime, C_TimerAfter = GetTime, C_Timer.After
-
-local function new(self, loop, func, delay, ...)
-	if delay < 0.01 then
-		delay = 0.01 -- Restrict to the lowest time that the C_Timer API allows us
-	end
-
-	local timer = {
-		object = self,
-		func = func,
-		looping = loop,
-		argsCount = select("#", ...),
-		delay = delay,
-		ends = GetTime() + delay,
-		...
-	}
-
-	activeTimers[timer] = timer
-
-	-- Create new timer closure to wrap the "timer" object
-	timer.callback = function()
-		if not timer.cancelled then
-			if type(timer.func) == "string" then
-				-- We manually set the unpack count to prevent issues with an arg set that contains nil and ends with nil
-				-- e.g. local t = {1, 2, nil, 3, nil} print(#t) will result in 2, instead of 5. This fixes said issue.
-				timer.object[timer.func](timer.object, unpack(timer, 1, timer.argsCount))
-			else
-				timer.func(unpack(timer, 1, timer.argsCount))
-			end
-
-			if timer.looping and not timer.cancelled then
-				-- Compensate delay to get a perfect average delay, even if individual times don't match up perfectly
-				-- due to fps differences
-				local time = GetTime()
-				local delay = timer.delay - (time - timer.ends)
-				-- Ensure the delay doesn't go below the threshold
-				if delay < 0.01 then delay = 0.01 end
-				C_TimerAfter(delay, timer.callback)
-				timer.ends = time + delay
-			else
-				activeTimers[timer.handle or timer] = nil
-			end
-		end
-	end
-
-	C_TimerAfter(delay, timer.callback)
-	return timer
-end
-
---- Schedule a new one-shot timer.
--- The timer will fire once in `delay` seconds, unless canceled before.
--- @param callback Callback function for the timer pulse (funcref or method name).
--- @param delay Delay for the timer, in seconds.
--- @param ... An optional, unlimited amount of arguments to pass to the callback function.
--- @usage
--- MyAddOn = LibStub("AceAddon-3.0"):NewAddon("MyAddOn", "AceTimer-3.0")
---
--- function MyAddOn:OnEnable()
---   self:ScheduleTimer("TimerFeedback", 5)
--- end
---
--- function MyAddOn:TimerFeedback()
---   print("5 seconds passed")
--- end
-function AceTimer:ScheduleTimer(func, delay, ...)
-	if not func or not delay then
-		error(MAJOR..": ScheduleTimer(callback, delay, args...): 'callback' and 'delay' must have set values.", 2)
-	end
-	if type(func) == "string" then
-		if type(self) ~= "table" then
-			error(MAJOR..": ScheduleTimer(callback, delay, args...): 'self' - must be a table.", 2)
-		elseif not self[func] then
-			error(MAJOR..": ScheduleTimer(callback, delay, args...): Tried to register '"..func.."' as the callback, but it doesn't exist in the module.", 2)
-		end
-	end
-	return new(self, nil, func, delay, ...)
-end
-
---- Schedule a repeating timer.
--- The timer will fire every `delay` seconds, until canceled.
--- @param callback Callback function for the timer pulse (funcref or method name).
--- @param delay Delay for the timer, in seconds.
--- @param ... An optional, unlimited amount of arguments to pass to the callback function.
--- @usage
--- MyAddOn = LibStub("AceAddon-3.0"):NewAddon("MyAddOn", "AceTimer-3.0")
---
--- function MyAddOn:OnEnable()
---   self.timerCount = 0
---   self.testTimer = self:ScheduleRepeatingTimer("TimerFeedback", 5)
--- end
---
--- function MyAddOn:TimerFeedback()
---   self.timerCount = self.timerCount + 1
---   print(("%d seconds passed"):format(5 * self.timerCount))
---   -- run 30 seconds in total
---   if self.timerCount == 6 then
---     self:CancelTimer(self.testTimer)
---   end
--- end
-function AceTimer:ScheduleRepeatingTimer(func, delay, ...)
-	if not func or not delay then
-		error(MAJOR..": ScheduleRepeatingTimer(callback, delay, args...): 'callback' and 'delay' must have set values.", 2)
-	end
-	if type(func) == "string" then
-		if type(self) ~= "table" then
-			error(MAJOR..": ScheduleRepeatingTimer(callback, delay, args...): 'self' - must be a table.", 2)
-		elseif not self[func] then
-			error(MAJOR..": ScheduleRepeatingTimer(callback, delay, args...): Tried to register '"..func.."' as the callback, but it doesn't exist in the module.", 2)
-		end
-	end
-	return new(self, true, func, delay, ...)
-end
-
---- Cancels a timer with the given id, registered by the same addon object as used for `:ScheduleTimer`
--- Both one-shot and repeating timers can be canceled with this function, as long as the `id` is valid
--- and the timer has not fired yet or was canceled before.
--- @param id The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
-function AceTimer:CancelTimer(id)
-	local timer = activeTimers[id]
-
-	if not timer then
-		return false
-	else
-		timer.cancelled = true
-		activeTimers[id] = nil
-		return true
-	end
-end
-
---- Cancels all timers registered to the current addon object ('self')
-function AceTimer:CancelAllTimers()
-	for k,v in next, activeTimers do
-		if v.object == self then
-			AceTimer.CancelTimer(self, k)
-		end
-	end
-end
-
---- Returns the time left for a timer with the given id, registered by the current addon object ('self').
--- This function will return 0 when the id is invalid.
--- @param id The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
--- @return The time left on the timer.
-function AceTimer:TimeLeft(id)
-	local timer = activeTimers[id]
-	if not timer then
-		return 0
-	else
-		return timer.ends - GetTime()
-	end
-end
-
-
--- ---------------------------------------------------------------------
--- Upgrading
-
--- Upgrade from old hash-bucket based timers to C_Timer.After timers.
-if oldminor and oldminor < 10 then
-	-- disable old timer logic
-	AceTimer.frame:SetScript("OnUpdate", nil)
-	AceTimer.frame:SetScript("OnEvent", nil)
-	AceTimer.frame:UnregisterAllEvents()
-	-- convert timers
-	for object,timers in next, AceTimer.selfs do
-		for handle,timer in next, timers do
-			if type(timer) == "table" and timer.callback then
-				local newTimer
-				if timer.delay then
-					newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.callback, timer.delay, timer.arg)
-				else
-					newTimer = AceTimer.ScheduleTimer(timer.object, timer.callback, timer.when - GetTime(), timer.arg)
-				end
-				-- Use the old handle for old timers
-				activeTimers[newTimer] = nil
-				activeTimers[handle] = newTimer
-				newTimer.handle = handle
-			end
-		end
-	end
-	AceTimer.selfs = nil
-	AceTimer.hash = nil
-	AceTimer.debug = nil
-elseif oldminor and oldminor < 17 then
-	-- Upgrade from old animation based timers to C_Timer.After timers.
-	AceTimer.inactiveTimers = nil
-	AceTimer.frame = nil
-	local oldTimers = AceTimer.activeTimers
-	-- Clear old timer table and update upvalue
-	AceTimer.activeTimers = {}
-	activeTimers = AceTimer.activeTimers
-	for handle, timer in next, oldTimers do
-		local newTimer
-		-- Stop the old timer animation
-		local duration, elapsed = timer:GetDuration(), timer:GetElapsed()
-		timer:GetParent():Stop()
-		if timer.looping then
-			newTimer = AceTimer.ScheduleRepeatingTimer(timer.object, timer.func, duration, unpack(timer.args, 1, timer.argsCount))
-		else
-			newTimer = AceTimer.ScheduleTimer(timer.object, timer.func, duration - elapsed, unpack(timer.args, 1, timer.argsCount))
-		end
-		-- Use the old handle for old timers
-		activeTimers[newTimer] = nil
-		activeTimers[handle] = newTimer
-		newTimer.handle = handle
-	end
-
-	-- Migrate transitional handles
-	if oldminor < 13 and AceTimer.hashCompatTable then
-		for handle, id in next, AceTimer.hashCompatTable do
-			local t = activeTimers[id]
-			if t then
-				activeTimers[id] = nil
-				activeTimers[handle] = t
-				t.handle = handle
-			end
-		end
-		AceTimer.hashCompatTable = nil
-	end
-end
-
--- ---------------------------------------------------------------------
--- Embed handling
-
-AceTimer.embeds = AceTimer.embeds or {}
-
-local mixins = {
-	"ScheduleTimer", "ScheduleRepeatingTimer",
-	"CancelTimer", "CancelAllTimers",
-	"TimeLeft"
-}
-
-function AceTimer:Embed(target)
-	AceTimer.embeds[target] = true
-	for _,v in next, mixins do
-		target[v] = AceTimer[v]
-	end
-	return target
-end
-
--- AceTimer:OnEmbedDisable(target)
--- target (object) - target object that AceTimer is embedded in.
---
--- cancel all timers registered for the object
-function AceTimer:OnEmbedDisable(target)
-	target:CancelAllTimers()
-end
-
-for addon in next, AceTimer.embeds do
-	AceTimer:Embed(addon)
-end
diff --git a/Libs/AceTimer-3.0/AceTimer-3.0.xml b/Libs/AceTimer-3.0/AceTimer-3.0.xml
deleted file mode 100644
index d5aee81..0000000
--- a/Libs/AceTimer-3.0/AceTimer-3.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="AceTimer-3.0.lua"/>
-</Ui>
diff --git a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
deleted file mode 100644
index 675d7b0..0000000
--- a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
+++ /dev/null
@@ -1,238 +0,0 @@
---[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]]
-local MAJOR, MINOR = "CallbackHandler-1.0", 6
-local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not CallbackHandler then return end -- No upgrade needed
-
-local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
-
--- Lua APIs
-local tconcat = table.concat
-local assert, error, loadstring = assert, error, loadstring
-local setmetatable, rawset, rawget = setmetatable, rawset, rawget
-local next, select, pairs, type, tostring = next, select, pairs, type, tostring
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: geterrorhandler
-
-local xpcall = xpcall
-
-local function errorhandler(err)
-	return geterrorhandler()(err)
-end
-
-local function CreateDispatcher(argCount)
-	local code = [[
-	local next, xpcall, eh = ...
-
-	local method, ARGS
-	local function call() method(ARGS) end
-
-	local function dispatch(handlers, ...)
-		local index
-		index, method = next(handlers)
-		if not method then return end
-		local OLD_ARGS = ARGS
-		ARGS = ...
-		repeat
-			xpcall(call, eh)
-			index, method = next(handlers, index)
-		until not method
-		ARGS = OLD_ARGS
-	end
-
-	return dispatch
-	]]
-
-	local ARGS, OLD_ARGS = {}, {}
-	for i = 1, argCount do ARGS[i], OLD_ARGS[i] = "arg"..i, "old_arg"..i end
-	code = code:gsub("OLD_ARGS", tconcat(OLD_ARGS, ", ")):gsub("ARGS", tconcat(ARGS, ", "))
-	return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(next, xpcall, errorhandler)
-end
-
-local Dispatchers = setmetatable({}, {__index=function(self, argCount)
-	local dispatcher = CreateDispatcher(argCount)
-	rawset(self, argCount, dispatcher)
-	return dispatcher
-end})
-
---------------------------------------------------------------------------
--- CallbackHandler:New
---
---   target            - target object to embed public APIs in
---   RegisterName      - name of the callback registration API, default "RegisterCallback"
---   UnregisterName    - name of the callback unregistration API, default "UnregisterCallback"
---   UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
-
-function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName)
-
-	RegisterName = RegisterName or "RegisterCallback"
-	UnregisterName = UnregisterName or "UnregisterCallback"
-	if UnregisterAllName==nil then	-- false is used to indicate "don't want this method"
-		UnregisterAllName = "UnregisterAllCallbacks"
-	end
-
-	-- we declare all objects and exported APIs inside this closure to quickly gain access
-	-- to e.g. function names, the "target" parameter, etc
-
-
-	-- Create the registry object
-	local events = setmetatable({}, meta)
-	local registry = { recurse=0, events=events }
-
-	-- registry:Fire() - fires the given event/message into the registry
-	function registry:Fire(eventname, ...)
-		if not rawget(events, eventname) or not next(events[eventname]) then return end
-		local oldrecurse = registry.recurse
-		registry.recurse = oldrecurse + 1
-
-		Dispatchers[select('#', ...) + 1](events[eventname], eventname, ...)
-
-		registry.recurse = oldrecurse
-
-		if registry.insertQueue and oldrecurse==0 then
-			-- Something in one of our callbacks wanted to register more callbacks; they got queued
-			for eventname,callbacks in pairs(registry.insertQueue) do
-				local first = not rawget(events, eventname) or not next(events[eventname])	-- test for empty before. not test for one member after. that one member may have been overwritten.
-				for self,func in pairs(callbacks) do
-					events[eventname][self] = func
-					-- fire OnUsed callback?
-					if first and registry.OnUsed then
-						registry.OnUsed(registry, target, eventname)
-						first = nil
-					end
-				end
-			end
-			registry.insertQueue = nil
-		end
-	end
-
-	-- Registration of a callback, handles:
-	--   self["method"], leads to self["method"](self, ...)
-	--   self with function ref, leads to functionref(...)
-	--   "addonId" (instead of self) with function ref, leads to functionref(...)
-	-- all with an optional arg, which, if present, gets passed as first argument (after self if present)
-	target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]])
-		if type(eventname) ~= "string" then
-			error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2)
-		end
-
-		method = method or eventname
-
-		local first = not rawget(events, eventname) or not next(events[eventname])	-- test for empty before. not test for one member after. that one member may have been overwritten.
-
-		if type(method) ~= "string" and type(method) ~= "function" then
-			error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2)
-		end
-
-		local regfunc
-
-		if type(method) == "string" then
-			-- self["method"] calling style
-			if type(self) ~= "table" then
-				error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2)
-			elseif self==target then
-				error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2)
-			elseif type(self[method]) ~= "function" then
-				error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2)
-			end
-
-			if select("#",...)>=1 then	-- this is not the same as testing for arg==nil!
-				local arg=select(1,...)
-				regfunc = function(...) self[method](self,arg,...) end
-			else
-				regfunc = function(...) self[method](self,...) end
-			end
-		else
-			-- function ref with self=object or self="addonId" or self=thread
-			if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
-				error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
-			end
-
-			if select("#",...)>=1 then	-- this is not the same as testing for arg==nil!
-				local arg=select(1,...)
-				regfunc = function(...) method(arg,...) end
-			else
-				regfunc = method
-			end
-		end
-
-
-		if events[eventname][self] or registry.recurse<1 then
-		-- if registry.recurse<1 then
-			-- we're overwriting an existing entry, or not currently recursing. just set it.
-			events[eventname][self] = regfunc
-			-- fire OnUsed callback?
-			if registry.OnUsed and first then
-				registry.OnUsed(registry, target, eventname)
-			end
-		else
-			-- we're currently processing a callback in this registry, so delay the registration of this new entry!
-			-- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency
-			registry.insertQueue = registry.insertQueue or setmetatable({},meta)
-			registry.insertQueue[eventname][self] = regfunc
-		end
-	end
-
-	-- Unregister a callback
-	target[UnregisterName] = function(self, eventname)
-		if not self or self==target then
-			error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2)
-		end
-		if type(eventname) ~= "string" then
-			error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2)
-		end
-		if rawget(events, eventname) and events[eventname][self] then
-			events[eventname][self] = nil
-			-- Fire OnUnused callback?
-			if registry.OnUnused and not next(events[eventname]) then
-				registry.OnUnused(registry, target, eventname)
-			end
-		end
-		if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then
-			registry.insertQueue[eventname][self] = nil
-		end
-	end
-
-	-- OPTIONAL: Unregister all callbacks for given selfs/addonIds
-	if UnregisterAllName then
-		target[UnregisterAllName] = function(...)
-			if select("#",...)<1 then
-				error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2)
-			end
-			if select("#",...)==1 and ...==target then
-				error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2)
-			end
-
-
-			for i=1,select("#",...) do
-				local self = select(i,...)
-				if registry.insertQueue then
-					for eventname, callbacks in pairs(registry.insertQueue) do
-						if callbacks[self] then
-							callbacks[self] = nil
-						end
-					end
-				end
-				for eventname, callbacks in pairs(events) do
-					if callbacks[self] then
-						callbacks[self] = nil
-						-- Fire OnUnused callback?
-						if registry.OnUnused and not next(callbacks) then
-							registry.OnUnused(registry, target, eventname)
-						end
-					end
-				end
-			end
-		end
-	end
-
-	return registry
-end
-
-
--- CallbackHandler purposefully does NOT do explicit embedding. Nor does it
--- try to upgrade old implicit embeds since the system is selfcontained and
--- relies on closures to work.
-
diff --git a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
deleted file mode 100644
index c107f88..0000000
--- a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="CallbackHandler-1.0.lua"/>
-</Ui>
diff --git a/Libs/Changelog-Ace3-Release-r1151.txt b/Libs/Changelog-Ace3-Release-r1151.txt
deleted file mode 100644
index c78dc9d..0000000
--- a/Libs/Changelog-Ace3-Release-r1151.txt
+++ /dev/null
@@ -1,92 +0,0 @@
-------------------------------------------------------------------------
-r1151 | nevcairiel | 2016-07-18 17:03:29 +0000 (Mon, 18 Jul 2016) | 1 line
-Changed paths:
-   A /tags/Release-r1151 (from /trunk:1150)
-
-Tag as Release-r1151
-------------------------------------------------------------------------
-r1150 | nevcairiel | 2016-07-18 17:02:20 +0000 (Mon, 18 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/changelog.txt
-
-Update changelog
-------------------------------------------------------------------------
-r1149 | nevcairiel | 2016-07-18 17:02:10 +0000 (Mon, 18 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/Ace3.toc
-
-Update TOC for 7.0
-------------------------------------------------------------------------
-r1148 | nevcairiel | 2016-07-18 09:13:02 +0000 (Mon, 18 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
-   M /trunk/AceTab-3.0/AceTab-3.0.lua
-
-Remove remaining compat code for ancient WoW versions
-------------------------------------------------------------------------
-r1147 | nevcairiel | 2016-07-18 09:10:10 +0000 (Mon, 18 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
-   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
-   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
-
-Remove pre-MoP compat code from AceGUI widgets
-------------------------------------------------------------------------
-r1146 | nevcairiel | 2016-07-18 09:07:16 +0000 (Mon, 18 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
-
-Fix global leak
-------------------------------------------------------------------------
-r1145 | nevcairiel | 2016-07-18 08:32:42 +0000 (Mon, 18 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
-
-AceGUI-3.0: Keybinding: Support mousewheel up/down bindings (Ticket #372)
-------------------------------------------------------------------------
-r1144 | nevcairiel | 2016-07-11 09:04:48 +0000 (Mon, 11 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/changelog.txt
-
-Re-format changelog to be consistent with older entries
-------------------------------------------------------------------------
-r1143 | nevcairiel | 2016-07-11 08:52:03 +0000 (Mon, 11 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/AceConsole-3.0/AceConsole-3.0.lua
-
-AceConsole-3.0: Fix a typo in the LuaDoc function signature
-------------------------------------------------------------------------
-r1142 | nevcairiel | 2016-07-11 08:36:19 +0000 (Mon, 11 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/AceDB-3.0/AceDB-3.0.lua
-
-AceDB-3.0: Add the "locale" profile key to the LuaDoc (Ticket #344)
-------------------------------------------------------------------------
-r1141 | nevcairiel | 2016-07-11 08:32:23 +0000 (Mon, 11 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
-   M /trunk/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
-
-AceGUI-3.0: Expose the HighlightText API for EditBox and MultiLineEditBox Widgets (Ticket #378)
-------------------------------------------------------------------------
-r1140 | nevcairiel | 2016-07-03 07:53:29 +0000 (Sun, 03 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/AceDBOptions-3.0/AceDBOptions-3.0.lua
-
-AceDBOptions-3.0: Update localization from the WoWAce Localization system
-------------------------------------------------------------------------
-r1139 | nevcairiel | 2016-07-03 07:43:51 +0000 (Sun, 03 Jul 2016) | 1 line
-Changed paths:
-   M /trunk/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
-   M /trunk/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
-
-AceConfig-3.0: Allow specifying images using the numeric fileID (Ticket #389)
-------------------------------------------------------------------------
-r1138 | nevcairiel | 2016-06-01 10:17:04 +0000 (Wed, 01 Jun 2016) | 3 lines
-Changed paths:
-   M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
-
-AceGUI-3.0: TreeGroup: Refresh the tree in an OnUpdate once after Acquire, not only after creation
-
-The widget creation and acquire can be on different code paths, this ensures the tree height is always known and the tree populated properly.
-------------------------------------------------------------------------
diff --git a/Libs/Changelog-Ace3-r1130.txt b/Libs/Changelog-Ace3-r1130.txt
deleted file mode 100644
index b2c12d6..0000000
--- a/Libs/Changelog-Ace3-r1130.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-------------------------------------------------------------------------
-r1130 | funkydude | 2015-03-11 14:02:46 +0000 (Wed, 11 Mar 2015) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
-
-AceGUIContainer-TreeGroup: Use :SetHeight for preventing word wrap. Same fix different method.
-------------------------------------------------------------------------
-r1129 | nevcairiel | 2015-03-11 10:36:23 +0000 (Wed, 11 Mar 2015) | 1 line
-Changed paths:
-   M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
-
-AceGUI-3.0: TreeGroup: Prevent word wrap in the tree elements
-------------------------------------------------------------------------
-r1127 | nevcairiel | 2015-02-24 14:26:09 +0000 (Tue, 24 Feb 2015) | 1 line
-Changed paths:
-   M /trunk/Ace3.toc
-   M /trunk/changelog.txt
-
-Update changelog, bump TOC
-------------------------------------------------------------------------
-r1126 | nevcairiel | 2014-11-10 06:38:01 +0000 (Mon, 10 Nov 2014) | 1 line
-Changed paths:
-   M /trunk/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
-   M /trunk/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
-
-Use true/false in GameTooltip:SetText/AddLine instead of 1/0
-------------------------------------------------------------------------
diff --git a/Libs/EMALibActionButton-1.0.lua b/Libs/EMALibActionButton-1.0.lua
deleted file mode 100644
index e687cf7..0000000
--- a/Libs/EMALibActionButton-1.0.lua
+++ /dev/null
@@ -1,1635 +0,0 @@
---[[
-Copyright (c) 2010-2018, Hendrik "nevcairiel" Leppkes <h.leppkes@gmail.com>
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of the developer nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-the file was edit for Ema by Jennifer cally 2016-2018
-
-]]
-local MAJOR_VERSION = "EMALibActionButton-1.0"
-local MINOR_VERSION = 74
-
-if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
-local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
-if not lib then return end
-
--- Lua functions
-local _G = _G
-local type, error, tostring, tonumber, assert, select = type, error, tostring, tonumber, assert, select
-local setmetatable, wipe, unpack, pairs, next = setmetatable, wipe, unpack, pairs, next
-local str_match, format, tinsert, tremove = string.match, format, tinsert, tremove
-
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- Note: No WoW API function get upvalued to allow proper interaction with any addons that try to hook them.
--- GLOBALS: LibStub, CreateFrame, InCombatLockdown, ClearCursor, GetCursorInfo, GameTooltip, GameTooltip_SetDefaultAnchor
--- GLOBALS: GetBindingKey, GetBindingText, SetBinding, SetBindingClick, GetCVar, GetMacroInfo
--- GLOBALS: PickupAction, PickupItem, PickupMacro, PickupPetAction, PickupSpell, PickupCompanion, PickupEquipmentSet
--- GLOBALS: CooldownFrame_SetTimer, UIParent, IsSpellOverlayed, SpellFlyout, GetMouseFocus, SetClampedTextureRotation
--- GLOBALS: GetActionInfo, GetActionTexture, HasAction, GetActionText, GetActionCount, GetActionCooldown, IsAttackAction
--- GLOBALS: IsAutoRepeatAction, IsEquippedAction, IsCurrentAction, IsConsumableAction, IsUsableAction, IsStackableAction, IsActionInRange
--- GLOBALS: GetSpellLink, GetMacroSpell, GetSpellTexture, GetSpellCount, GetSpellCooldown, IsAttackSpell, IsCurrentSpell
--- GLOBALS: FindSpellBookSlotBySpellID, IsUsableSpell, IsConsumableSpell, IsSpellInRange, IsAutoRepeatSpell
--- GLOBALS: GetItemIcon, GetItemCount, GetItemCooldown, IsEquippedItem, IsCurrentItem, IsUsableItem, IsConsumableItem, IsItemInRange
--- GLOBALS: GetActionCharges, IsItemAction, GetSpellCharges
--- GLOBALS: RANGE_INDICATOR, ATTACK_BUTTON_FLASH_TIME, TOOLTIP_UPDATE_TIME
--- GLOBALS: ZoneAbilityFrame, HasZoneAbility, GetLastZoneAbilitySpellTexture
-
-local KeyBound = LibStub("LibKeyBound-1.0", true)
-local CBH = LibStub("CallbackHandler-1.0")
-local LBG = LibStub("LibButtonGlow-1.0", true)
-local Masque = LibStub("Masque", true)
-
-lib.eventFrame = lib.eventFrame or CreateFrame("Frame")
-lib.eventFrame:UnregisterAllEvents()
-
-lib.buttonRegistry = lib.buttonRegistry or {}
-lib.activeButtons = lib.activeButtons or {}
-lib.actionButtons = lib.actionButtons or {}
-lib.nonActionButtons = lib.nonActionButtons or {}
-
-lib.ChargeCooldowns = lib.ChargeCooldowns or {}
-lib.NumChargeCooldowns = lib.NumChargeCooldowns or 0
-
-lib.ACTION_HIGHLIGHT_MARKS = lib.ACTION_HIGHLIGHT_MARKS or setmetatable({}, { __index = ACTION_HIGHLIGHT_MARKS })
-
-lib.callbacks = lib.callbacks or CBH:New(lib)
-
-local Generic = CreateFrame("CheckButton")
-local Generic_MT = {__index = Generic}
-
-local Action = setmetatable({}, {__index = Generic})
-local Action_MT = {__index = Action}
-
-local PetAction = setmetatable({}, {__index = Generic})
-local PetAction_MT = {__index = PetAction}
-
-local Spell = setmetatable({}, {__index = Generic})
-local Spell_MT = {__index = Spell}
-
-local Item = setmetatable({}, {__index = Generic})
-local Item_MT = {__index = Item}
-
-local Macro = setmetatable({}, {__index = Generic})
-local Macro_MT = {__index = Macro}
-
-local Custom = setmetatable({}, {__index = Generic})
-local Custom_MT = {__index = Custom}
-
-local type_meta_map = {
-	empty  = Generic_MT,
-	action = Action_MT,
-	--pet    = PetAction_MT,
-	spell  = Spell_MT,
-	item   = Item_MT,
-	macro  = Macro_MT,
-	custom = Custom_MT
-}
-
-local ButtonRegistry, ActiveButtons, ActionButtons, NonActionButtons = lib.buttonRegistry, lib.activeButtons, lib.actionButtons, lib.nonActionButtons
-
-local Update, UpdateButtonState, UpdateUsable, UpdateCount, UpdateCooldown, UpdateTooltip, UpdateNewAction, ClearNewActionHighlight
-local StartFlash, StopFlash, UpdateFlash, UpdateHotkeys, UpdateRangeTimer, UpdateOverlayGlow
-local UpdateFlyout, ShowGrid, HideGrid, UpdateGrid, SetupSecureSnippets, WrapOnClick
-local ShowOverlayGlow, HideOverlayGlow
-local EndChargeCooldown
-
-local InitializeEventHandler, OnEvent, ForAllButtons, OnUpdate
-
-local function GameTooltip_GetOwnerForbidden()
-	if GameTooltip:IsForbidden() then
-		return nil
-	end
-	return GameTooltip:GetOwner()
-end
-
-local DefaultConfig = {
-	outOfRangeColoring = "button",
-	tooltip = "enabled",
-	showGrid = false,
-	colors = {
-		range = { 0.8, 0.1, 0.1 },
-		mana = { 0.5, 0.5, 1.0 }
-	},
-	hideElements = {
-		macro = false,
-		hotkey = false,
-		equipped = false,
-	},
-	keyBoundTarget = false,
-	clickOnDown = false,
-	flyoutDirection = "UP",
-}
-
---- Create a new action button.
--- @param id Internal id of the button (not used by LibActionButton-1.0, only for tracking inside the calling addon)
--- @param name Name of the button frame to be created (not used by LibActionButton-1.0 aside from naming the frame)
--- @param header Header that drives these action buttons (if any)
-function lib:CreateButton(id, name, header, config)
-	if type(name) ~= "string" then
-		error("Usage: CreateButton(id, name. header): Buttons must have a valid name!", 2)
-	end
-	if not header then
-		error("Usage: CreateButton(id, name, header): Buttons without a secure header are not yet supported!", 2)
-	end
-
-	if not KeyBound then
-		KeyBound = LibStub("LibKeyBound-1.0", true)
-	end
-
-	local button = setmetatable(CreateFrame("CheckButton", name, header, "SecureActionButtonTemplate, ActionButtonTemplate"), Generic_MT)
-	button:RegisterForDrag("LeftButton", "RightButton")
-	button:RegisterForClicks("AnyUp")
-
-	-- Frame Scripts
-	button:SetScript("OnEnter", Generic.OnEnter)
-	button:SetScript("OnLeave", Generic.OnLeave)
-	button:SetScript("PreClick", Generic.PreClick)
-	button:SetScript("PostClick", Generic.PostClick)
-
-	button.id = id
-	button.header = header
-	-- Mapping of state -> action
-	button.state_types = {}
-	button.state_actions = {}
-
-	-- Store the LAB Version that created this button for debugging
-	button.__LAB_Version = MINOR_VERSION
-
-	-- just in case we're not run by a header, default to state 0
-	button:SetAttribute("state", 0)
-
-	SetupSecureSnippets(button)
-	WrapOnClick(button)
-
-	-- adjust hotkey style for better readability
-	button.HotKey:SetFont(button.HotKey:GetFont(), 13, "OUTLINE")
-	button.HotKey:SetVertexColor(0.75, 0.75, 0.75)
-
-	-- adjust count/stack size
-	button.Count:SetFont(button.Count:GetFont(), 14, "OUTLINE")
-
-	-- Store the button in the registry, needed for event and OnUpdate handling
-	if not next(ButtonRegistry) then
-		InitializeEventHandler()
-	end
-	ButtonRegistry[button] = true
-
-	button:UpdateConfig(config)
-
-	-- run an initial update
-	button:UpdateAction()
-	UpdateHotkeys(button)
-
-	-- somewhat of a hack for the Flyout buttons to not error.
-	button.action = 0
-
-	lib.callbacks:Fire("OnButtonCreated", button)
-
-	return button
-end
-
-function SetupSecureSnippets(button)
-	button:SetAttribute("_custom", Custom.RunCustom)
-	-- secure UpdateState(self, state)
-	-- update the type and action of the button based on the state
-	button:SetAttribute("UpdateState", [[
-		local state = ...
-		self:SetAttribute("state", state)
-		local type, action = (self:GetAttribute(format("labtype-%s", state)) or "empty"), self:GetAttribute(format("labaction-%s", state))
-
-		self:SetAttribute("type", type)
-		if type ~= "empty" and type ~= "custom" then
-			local action_field = (type == "pet") and "action" or type
-			self:SetAttribute(action_field, action)
-			self:SetAttribute("action_field", action_field)
-		end
-		local onStateChanged = self:GetAttribute("OnStateChanged")
-		if onStateChanged then
-			self:Run(onStateChanged, state, type, action)
-		end
-	]])
-
-	-- this function is invoked by the header when the state changes
-	button:SetAttribute("_childupdate-state", [[
-		self:RunAttribute("UpdateState", message)
-		self:CallMethod("UpdateAction")
-	]])
-
-	-- secure PickupButton(self, kind, value, ...)
-	-- utility function to place a object on the cursor
-	button:SetAttribute("PickupButton", [[
-		local kind, value = ...
-		if kind == "empty" then
-			return "clear"
-		elseif kind == "action" or kind == "pet" then
-			local actionType = (kind == "pet") and "petaction" or kind
-			return actionType, value
-		elseif kind == "spell" or kind == "item" or kind == "macro" then
-			return "clear", kind, value
-		else
-			print("LibActionButton-1.0: Unknown type: " .. tostring(kind))
-			return false
-		end
-	]])
-
-	button:SetAttribute("OnDragStart", [[
-		if (self:GetAttribute("buttonlock") and not IsModifiedClick("PICKUPACTION")) or self:GetAttribute("LABdisableDragNDrop") then return false end
-		local state = self:GetAttribute("state")
-		local type = self:GetAttribute("type")
-		-- if the button is empty, we can't drag anything off it
-		if type == "empty" or type == "custom" then
-			return false
-		end
-		-- Get the value for the action attribute
-		local action_field = self:GetAttribute("action_field")
-		local action = self:GetAttribute(action_field)
-
-		-- non-action fields need to change their type to empty
-		if type ~= "action" and type ~= "pet" then
-			self:SetAttribute(format("labtype-%s", state), "empty")
-			self:SetAttribute(format("labaction-%s", state), nil)
-			-- update internal state
-			self:RunAttribute("UpdateState", state)
-			-- send a notification to the insecure code
-			self:CallMethod("ButtonContentsChanged", state, "empty", nil)
-		end
-		-- return the button contents for pickup
-		return self:RunAttribute("PickupButton", type, action)
-	]])
-
-	button:SetAttribute("OnReceiveDrag", [[
-		if self:GetAttribute("LABdisableDragNDrop") then return false end
-		local kind, value, subtype, extra = ...
-		if not kind or not value then return false end
-		local state = self:GetAttribute("state")
-		local buttonType, buttonAction = self:GetAttribute("type"), nil
-		if buttonType == "custom" then return false end
-		-- action buttons can do their magic themself
-		-- for all other buttons, we'll need to update the content now
-		if buttonType ~= "action" and buttonType ~= "pet" then
-			-- with "spell" types, the 4th value contains the actual spell id
-			if kind == "spell" then
-				if extra then
-					value = extra
-				else
-					print("no spell id?", ...)
-				end
-			elseif kind == "item" and value then
-				value = format("item:%d", value)
-			end
-
-			-- Get the action that was on the button before
-			if buttonType ~= "empty" then
-				buttonAction = self:GetAttribute(self:GetAttribute("action_field"))
-			end
-
-			-- TODO: validate what kind of action is being fed in here
-			-- We can only use a handful of the possible things on the cursor
-			-- return false for all those we can't put on buttons
-
-			self:SetAttribute(format("labtype-%s", state), kind)
-			self:SetAttribute(format("labaction-%s", state), value)
-			-- update internal state
-			self:RunAttribute("UpdateState", state)
-			-- send a notification to the insecure code
-			self:CallMethod("ButtonContentsChanged", state, kind, value)
-		else
-			-- get the action for (pet-)action buttons
-			buttonAction = self:GetAttribute("action")
-		end
-		return self:RunAttribute("PickupButton", buttonType, buttonAction)
-	]])
-
-	button:SetScript("OnDragStart", nil)
-	-- Wrapped OnDragStart(self, button, kind, value, ...)
-	button.header:WrapScript(button, "OnDragStart", [[
-		return self:RunAttribute("OnDragStart")
-	]])
-	-- Wrap twice, because the post-script is not run when the pre-script causes a pickup (doh)
-	-- we also need some phony message, or it won't work =/
-	button.header:WrapScript(button, "OnDragStart", [[
-		return "message", "update"
-	]], [[
-		self:RunAttribute("UpdateState", self:GetAttribute("state"))
-	]])
-
-	button:SetScript("OnReceiveDrag", nil)
-	-- Wrapped OnReceiveDrag(self, button, kind, value, ...)
-	button.header:WrapScript(button, "OnReceiveDrag", [[
-		return self:RunAttribute("OnReceiveDrag", kind, value, ...)
-	]])
-	-- Wrap twice, because the post-script is not run when the pre-script causes a pickup (doh)
-	-- we also need some phony message, or it won't work =/
-	button.header:WrapScript(button, "OnReceiveDrag", [[
-		return "message", "update"
-	]], [[
-		self:RunAttribute("UpdateState", self:GetAttribute("state"))
-	]])
-end
-
-function WrapOnClick(button)
-	-- Wrap OnClick, to catch changes to actions that are applied with a click on the button.
-	button.header:WrapScript(button, "OnClick", [[
-		if self:GetAttribute("type") == "action" then
-			local type, action = GetActionInfo(self:GetAttribute("action"))
-			return nil, format("%s|%s", tostring(type), tostring(action))
-		end
-	]], [[
-		local type, action = GetActionInfo(self:GetAttribute("action"))
-		if message ~= format("%s|%s", tostring(type), tostring(action)) then
-			self:RunAttribute("UpdateState", self:GetAttribute("state"))
-		end
-	]])
-end
-
------------------------------------------------------------
---- utility
-
-function lib:GetAllButtons()
-	local buttons = {}
-	for button in next, ButtonRegistry do
-		buttons[button] = true
-	end
-	return buttons
-end
-
-function Generic:ClearSetPoint(...)
-	self:ClearAllPoints()
-	self:SetPoint(...)
-end
-
-function Generic:NewHeader(header)
-	self.header = header
-	self:SetParent(header)
-	SetupSecureSnippets(self)
-	WrapOnClick(self)
-end
-
-
------------------------------------------------------------
---- state management
-
-function Generic:ClearStates()
-	for state in pairs(self.state_types) do
-		self:SetAttribute(format("labtype-%s", state), nil)
-		self:SetAttribute(format("labaction-%s", state), nil)
-	end
-	wipe(self.state_types)
-	wipe(self.state_actions)
-end
-
-function Generic:SetState(state, kind, action)
-	if not state then state = self:GetAttribute("state") end
-	state = tostring(state)
-	-- we allow a nil kind for setting a empty state
-	if not kind then kind = "empty" end
-	if not type_meta_map[kind] then
-		error("SetStateAction: unknown action type: " .. tostring(kind), 2)
-	end
-	if kind ~= "empty" and action == nil then
-		error("SetStateAction: an action is required for non-empty states", 2)
-	end
-	if kind ~= "custom" and action ~= nil and type(action) ~= "number" and type(action) ~= "string" or (kind == "custom" and type(action) ~= "table") then
-		error("SetStateAction: invalid action data type, only strings and numbers allowed", 2)
-	end
-
-	if kind == "item" then
-		if tonumber(action) then
-			action = format("item:%s", action)
-		else
-			local itemString = str_match(action, "^|c%x+|H(item[%d:]+)|h%[")
-			if itemString then
-				action = itemString
-			end
-		end
-	end
-
-	self.state_types[state] = kind
-	self.state_actions[state] = action
-	self:UpdateState(state)
-end
-
-function Generic:UpdateState(state)
-	if not state then state = self:GetAttribute("state") end
-	state = tostring(state)
-	self:SetAttribute(format("labtype-%s", state), self.state_types[state])
-	self:SetAttribute(format("labaction-%s", state), self.state_actions[state])
-	if state ~= tostring(self:GetAttribute("state")) then return end
-	if self.header then
-		self.header:SetFrameRef("updateButton", self)
-		self.header:Execute([[
-			local frame = self:GetFrameRef("updateButton")
-			control:RunFor(frame, frame:GetAttribute("UpdateState"), frame:GetAttribute("state"))
-		]])
-	else
-	-- TODO
-	end
-	self:UpdateAction()
-end
-
-function Generic:GetAction(state)
-	if not state then state = self:GetAttribute("state") end
-	state = tostring(state)
-	return self.state_types[state] or "empty", self.state_actions[state]
-end
-
-function Generic:UpdateAllStates()
-	for state in pairs(self.state_types) do
-		self:UpdateState(state)
-	end
-end
-
-function Generic:ButtonContentsChanged(state, kind, value)
-	state = tostring(state)
-	self.state_types[state] = kind or "empty"
-	self.state_actions[state] = value
-	lib.callbacks:Fire("OnButtonContentsChanged", self, state, self.state_types[state], self.state_actions[state])
-	self:UpdateAction(self)
-end
-
-function Generic:DisableDragNDrop(flag)
-	if InCombatLockdown() then
-		error("LibActionButton-1.0: You can only toggle DragNDrop out of combat!", 2)
-	end
-	if flag then
-		self:SetAttribute("LABdisableDragNDrop", true)
-	else
-		self:SetAttribute("LABdisableDragNDrop", nil)
-	end
-end
-
-function Generic:AddToButtonFacade(group)
-	if type(group) ~= "table" or type(group.AddButton) ~= "function" then
-		error("LibActionButton-1.0:AddToButtonFacade: You need to supply a proper group to use!", 2)
-	end
-	group:AddButton(self)
-	self.LBFSkinned = true
-end
-
-function Generic:AddToMasque(group)
-	if type(group) ~= "table" or type(group.AddButton) ~= "function" then
-		error("LibActionButton-1.0:AddToMasque: You need to supply a proper group to use!", 2)
-	end
-	group:AddButton(self)
-	self.MasqueSkinned = true
-end
-
-function Generic:UpdateAlpha()
-	UpdateCooldown(self)
-end
-
------------------------------------------------------------
---- frame scripts
-
--- copied (and adjusted) from SecureHandlers.lua
-local function PickupAny(kind, target, detail, ...)
-	if kind == "clear" then
-		ClearCursor()
-		kind, target, detail = target, detail, ...
-	end
-	if kind == 'action' then
-		PickupAction(target)
-	elseif kind == 'item' then
-		PickupItem(target)
-	elseif kind == 'macro' then
-		PickupMacro(target)
-	elseif kind == 'petaction' then
-		PickupPetAction(target)
-	elseif kind == 'spell' then
-		PickupSpell(target)
-	elseif kind == 'companion' then
-		PickupCompanion(target, detail)
-	elseif kind == 'equipmentset' then
-		PickupEquipmentSet(target)
-	end
-end
-
-function Generic:OnEnter()
-	if self.config.tooltip ~= "disabled" and (self.config.tooltip ~= "nocombat" or not InCombatLockdown()) then
-		UpdateTooltip(self)
-	end
-	if KeyBound then
-		KeyBound:Set(self)
-	end
-
-	if self._state_type == "action" and self.NewActionTexture then
-		ClearNewActionHighlight(self._state_action, false, false)
-		UpdateNewAction(self)
-	end
-end
-
-function Generic:OnLeave()
-	if GameTooltip:IsForbidden() then return end
-	GameTooltip:Hide()
-end
-
--- Insecure drag handler to allow clicking on the button with an action on the cursor
--- to place it on the button. Like action buttons work.
-function Generic:PreClick()
-	if self._state_type == "action" or self._state_type == "pet"
-	   or InCombatLockdown() or self:GetAttribute("LABdisableDragNDrop")
-	then
-		return
-	end
-	-- check if there is actually something on the cursor
-	local kind, value, subtype = GetCursorInfo()
-	if not (kind and value) then return end
-	self._old_type = self._state_type
-	if self._state_type and self._state_type ~= "empty" then
-		self._old_type = self._state_type
-		self:SetAttribute("type", "empty")
-		--self:SetState(nil, "empty", nil)
-	end
-	self._receiving_drag = true
-end
-
-local function formatHelper(input)
-	if type(input) == "string" then
-		return format("%q", input)
-	else
-		return tostring(input)
-	end
-end
-
-function Generic:PostClick()
-	UpdateButtonState(self)
-	if self._receiving_drag and not InCombatLockdown() then
-		if self._old_type then
-			self:SetAttribute("type", self._old_type)
-			self._old_type = nil
-		end
-		local oldType, oldAction = self._state_type, self._state_action
-		local kind, data, subtype, extra = GetCursorInfo()
-		self.header:SetFrameRef("updateButton", self)
-		self.header:Execute(format([[
-			local frame = self:GetFrameRef("updateButton")
-			control:RunFor(frame, frame:GetAttribute("OnReceiveDrag"), %s, %s, %s, %s)
-			control:RunFor(frame, frame:GetAttribute("UpdateState"), %s)
-		]], formatHelper(kind), formatHelper(data), formatHelper(subtype), formatHelper(extra), formatHelper(self:GetAttribute("state"))))
-		PickupAny("clear", oldType, oldAction)
-	end
-	self._receiving_drag = nil
-
-	if self._state_type == "action" and lib.ACTION_HIGHLIGHT_MARKS[self._state_action] then
-		ClearNewActionHighlight(self._state_action, false, false)
-	end
-end
-
------------------------------------------------------------
---- configuration
-
-local function merge(target, source, default)
-	for k,v in pairs(default) do
-		if type(v) ~= "table" then
-			if source and source[k] ~= nil then
-				target[k] = source[k]
-			else
-				target[k] = v
-			end
-		else
-			if type(target[k]) ~= "table" then target[k] = {} else wipe(target[k]) end
-			merge(target[k], type(source) == "table" and source[k], v)
-		end
-	end
-	return target
-end
-
-function Generic:UpdateConfig(config)
-	if config and type(config) ~= "table" then
-		error("LibActionButton-1.0: UpdateConfig requires a valid configuration!", 2)
-	end
-	local oldconfig = self.config
-	if not self.config then self.config = {} end
-	-- merge the two configs
-	merge(self.config, config, DefaultConfig)
-
-	if self.config.outOfRangeColoring == "button" or (oldconfig and oldconfig.outOfRangeColoring == "button") then
-		UpdateUsable(self)
-	end
-	if self.config.outOfRangeColoring == "hotkey" then
-		self.outOfRange = nil
-	elseif oldconfig and oldconfig.outOfRangeColoring == "hotkey" then
-		self.HotKey:SetVertexColor(0.75, 0.75, 0.75)
-	end
-
-	if self.config.hideElements.macro then
-		self.Name:Hide()
-	else
-		self.Name:Show()
-	end
-
-	self:SetAttribute("flyoutDirection", self.config.flyoutDirection)
-
-	UpdateHotkeys(self)
-	UpdateGrid(self)
-	Update(self)
-	self:RegisterForClicks(self.config.clickOnDown and "AnyDown" or "AnyUp")
-end
-
------------------------------------------------------------
---- event handler
-
-function ForAllButtons(method, onlyWithAction)
-	assert(type(method) == "function")
-	for button in next, (onlyWithAction and ActiveButtons or ButtonRegistry) do
-		method(button)
-	end
-end
-
-function InitializeEventHandler()
-	lib.eventFrame:SetScript("OnEvent", OnEvent)
-	lib.eventFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
-	lib.eventFrame:RegisterEvent("ACTIONBAR_SHOWGRID")
-	lib.eventFrame:RegisterEvent("ACTIONBAR_HIDEGRID")
-	--lib.eventFrame:RegisterEvent("ACTIONBAR_PAGE_CHANGED")
-	--lib.eventFrame:RegisterEvent("UPDATE_BONUS_ACTIONBAR")
-	lib.eventFrame:RegisterEvent("ACTIONBAR_SLOT_CHANGED")
-	lib.eventFrame:RegisterEvent("UPDATE_BINDINGS")
-	lib.eventFrame:RegisterEvent("UPDATE_SHAPESHIFT_FORM")
-	lib.eventFrame:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR")
-	lib.eventFrame:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED")
-
-	lib.eventFrame:RegisterEvent("ACTIONBAR_UPDATE_STATE")
-	lib.eventFrame:RegisterEvent("ACTIONBAR_UPDATE_USABLE")
-	lib.eventFrame:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN")
-	lib.eventFrame:RegisterEvent("PLAYER_TARGET_CHANGED")
-	lib.eventFrame:RegisterEvent("TRADE_SKILL_SHOW")
-	lib.eventFrame:RegisterEvent("TRADE_SKILL_CLOSE")
-	lib.eventFrame:RegisterEvent("ARCHAEOLOGY_CLOSED")
-	lib.eventFrame:RegisterEvent("PLAYER_ENTER_COMBAT")
-	lib.eventFrame:RegisterEvent("PLAYER_LEAVE_COMBAT")
-	lib.eventFrame:RegisterEvent("START_AUTOREPEAT_SPELL")
-	lib.eventFrame:RegisterEvent("STOP_AUTOREPEAT_SPELL")
-	lib.eventFrame:RegisterEvent("UNIT_ENTERED_VEHICLE")
-	lib.eventFrame:RegisterEvent("UNIT_EXITED_VEHICLE")
-	lib.eventFrame:RegisterEvent("COMPANION_UPDATE")
-	lib.eventFrame:RegisterEvent("UNIT_INVENTORY_CHANGED")
-	lib.eventFrame:RegisterEvent("LEARNED_SPELL_IN_TAB")
-	lib.eventFrame:RegisterEvent("PET_STABLE_UPDATE")
-	lib.eventFrame:RegisterEvent("PET_STABLE_SHOW")
-	lib.eventFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW")
-	lib.eventFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE")
-	lib.eventFrame:RegisterEvent("SPELL_UPDATE_CHARGES")
-	lib.eventFrame:RegisterEvent("UPDATE_SUMMONPETS_ACTION")
-	lib.eventFrame:RegisterEvent("SPELL_UPDATE_ICON")
-
-	-- With those two, do we still need the ACTIONBAR equivalents of them?
-	lib.eventFrame:RegisterEvent("SPELL_UPDATE_COOLDOWN")
-	lib.eventFrame:RegisterEvent("SPELL_UPDATE_USABLE")
-	lib.eventFrame:RegisterEvent("PLAYER_EQUIPMENT_CHANGED")
-	lib.eventFrame:RegisterEvent("BAG_UPDATE_DELAYED")
-
-	lib.eventFrame:RegisterEvent("LOSS_OF_CONTROL_ADDED")
-	lib.eventFrame:RegisterEvent("LOSS_OF_CONTROL_UPDATE")
-
-	lib.eventFrame:Show()
-	lib.eventFrame:SetScript("OnUpdate", OnUpdate)
-end
-
-function OnEvent(frame, event, arg1, ...)
-	if (event == "UNIT_INVENTORY_CHANGED" and arg1 == "player") or event == "LEARNED_SPELL_IN_TAB" then
-		local tooltipOwner = GameTooltip_GetOwnerForbidden()
-		if tooltipOwner and ButtonRegistry[tooltipOwner] then
-			tooltipOwner:SetTooltip()
-		end
-	elseif event == "ACTIONBAR_SLOT_CHANGED" then
-		for button in next, ButtonRegistry do
-			if button._state_type == "action" and (arg1 == 0 or arg1 == tonumber(button._state_action)) then
-				ClearNewActionHighlight(button._state_action, true, false)
-				Update(button)
-			end
-		end
-	elseif event == "PLAYER_ENTERING_WORLD" or event == "UPDATE_SHAPESHIFT_FORM" or event == "UPDATE_VEHICLE_ACTIONBAR" then
-		ForAllButtons(Update)
-	elseif event == "ACTIONBAR_PAGE_CHANGED" or event == "UPDATE_BONUS_ACTIONBAR" then
-		-- TODO: Are these even needed?
-	elseif event == "ACTIONBAR_SHOWGRID" then
-		ShowGrid()
-	elseif event == "ACTIONBAR_HIDEGRID" then
-		HideGrid()
-	elseif event == "UPDATE_BINDINGS" then
-		ForAllButtons(UpdateHotkeys)
-	elseif event == "PLAYER_TARGET_CHANGED" then
-		UpdateRangeTimer()
-	elseif (event == "ACTIONBAR_UPDATE_STATE") or
-		((event == "UNIT_ENTERED_VEHICLE" or event == "UNIT_EXITED_VEHICLE") and (arg1 == "player")) or
-		((event == "COMPANION_UPDATE") and (arg1 == "MOUNT")) then
-		ForAllButtons(UpdateButtonState, true)
-	elseif event == "ACTIONBAR_UPDATE_USABLE" then
-		for button in next, ActionButtons do
-			UpdateUsable(button)
-		end
-	elseif event == "SPELL_UPDATE_USABLE" then
-		for button in next, NonActionButtons do
-			UpdateUsable(button)
-		end
-	elseif event == "PLAYER_MOUNT_DISPLAY_CHANGED" then
-		for button in next, ActiveButtons do
-			UpdateUsable(button)
-		end
-	elseif event == "ACTIONBAR_UPDATE_COOLDOWN" then
-		for button in next, ActionButtons do
-			UpdateCooldown(button)
-			if GameTooltip:GetOwner() == button then
-				UpdateTooltip(button)
-			end
-		end
-	elseif event == "SPELL_UPDATE_COOLDOWN" then
-		for button in next, NonActionButtons do
-			UpdateCooldown(button)
-			if GameTooltip_GetOwnerForbidden() == button then
-				UpdateTooltip(button)
-			end
-		end
-	elseif event == "LOSS_OF_CONTROL_ADDED" then
-		for button in next, ActiveButtons do
-			UpdateCooldown(button)
-			if GameTooltip_GetOwnerForbidden() == button then
-				UpdateTooltip(button)
-			end
-		end
-	elseif event == "LOSS_OF_CONTROL_UPDATE" then
-		for button in next, ActiveButtons do
-			UpdateCooldown(button)
-		end
-	elseif event == "TRADE_SKILL_SHOW" or event == "TRADE_SKILL_CLOSE"  or event == "ARCHAEOLOGY_CLOSED" then
-		ForAllButtons(UpdateButtonState, true)
-	elseif event == "PLAYER_ENTER_COMBAT" then
-		for button in next, ActiveButtons do
-			if button:IsAttack() then
-				StartFlash(button)
-			end
-		end
-	elseif event == "PLAYER_LEAVE_COMBAT" then
-		for button in next, ActiveButtons do
-			if button:IsAttack() then
-				StopFlash(button)
-			end
-		end
-	elseif event == "START_AUTOREPEAT_SPELL" then
-		for button in next, ActiveButtons do
-			if button:IsAutoRepeat() then
-				StartFlash(button)
-			end
-		end
-	elseif event == "STOP_AUTOREPEAT_SPELL" then
-		for button in next, ActiveButtons do
-			if button.flashing == 1 and not button:IsAttack() then
-				StopFlash(button)
-			end
-		end
-	elseif event == "PET_STABLE_UPDATE" or event == "PET_STABLE_SHOW" then
-		ForAllButtons(Update)
-	elseif event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW" then
-		for button in next, ActiveButtons do
-			local spellId = button:GetSpellId()
-			if spellId and spellId == arg1 then
-				ShowOverlayGlow(button)
-			else
-				if button._state_type == "action" then
-					local actionType, id = GetActionInfo(button._state_action)
-					if actionType == "flyout" and FlyoutHasSpell(id, arg1) then
-						ShowOverlayGlow(button)
-					end
-				end
-			end
-		end
-	elseif event == "SPELL_ACTIVATION_OVERLAY_GLOW_HIDE" then
-		for button in next, ActiveButtons do
-			local spellId = button:GetSpellId()
-			if spellId and spellId == arg1 then
-				HideOverlayGlow(button)
-			else
-				if button._state_type == "action" then
-					local actionType, id = GetActionInfo(button._state_action)
-					if actionType == "flyout" and FlyoutHasSpell(id, arg1) then
-						HideOverlayGlow(button)
-					end
-				end
-			end
-		end
-	elseif event == "PLAYER_EQUIPMENT_CHANGED" then
-		for button in next, ActiveButtons do
-			if button._state_type == "item" then
-				Update(button)
-			end
-		end
-	elseif  event == "BAG_UPDATE_DELAYED" then
-		for button in next, ActiveButtons do
-			if button._state_type == "item" then
-				Update(button)
-			end
-		end
-	elseif event == "SPELL_UPDATE_CHARGES" then
-		ForAllButtons(UpdateCount, true)
-	elseif event == "UPDATE_SUMMONPETS_ACTION" then
-		for button in next, ActiveButtons do
-			if button._state_type == "action" then
-				local actionType, id = GetActionInfo(button._state_action)
-				if actionType == "summonpet" then
-					local texture = GetActionTexture(button._state_action)
-					if texture then
-						button.icon:SetTexture(texture)
-					end
-				end
-			end
-		end
-	elseif event == "SPELL_UPDATE_ICON" then
-		ForAllButtons(Update, true)
-	end
-end
-
-local flashTime = 0
-local rangeTimer = -1
-function OnUpdate(_, elapsed)
-	flashTime = flashTime - elapsed
-	rangeTimer = rangeTimer - elapsed
-	-- Run the loop only when there is something to update
-	if rangeTimer <= 0 or flashTime <= 0 then
-		for button in next, ActiveButtons do
-			-- Flashing
-			if button.flashing == 1 and flashTime <= 0 then
-				if button.Flash:IsShown() then
-					button.Flash:Hide()
-				else
-					button.Flash:Show()
-				end
-			end
-
-			-- Range
-			if rangeTimer <= 0 then
-				local inRange = button:IsInRange()
-				local oldRange = button.outOfRange
-				button.outOfRange = (inRange == false)
-				if oldRange ~= button.outOfRange then
-					if button.config.outOfRangeColoring == "button" then
-						UpdateUsable(button)
-					elseif button.config.outOfRangeColoring == "hotkey" then
-						local hotkey = button.HotKey
-						if hotkey:GetText() == RANGE_INDICATOR then
-							if inRange == false then
-								hotkey:Show()
-							else
-								hotkey:Hide()
-							end
-						end
-						if inRange == false then
-							hotkey:SetVertexColor(unpack(button.config.colors.range))
-						else
-							hotkey:SetVertexColor(0.75, 0.75, 0.75)
-						end
-					end
-				end
-			end
-		end
-
-		-- Update values
-		if flashTime <= 0 then
-			flashTime = flashTime + ATTACK_BUTTON_FLASH_TIME
-		end
-		if rangeTimer <= 0 then
-			rangeTimer = TOOLTIP_UPDATE_TIME
-		end
-	end
-end
-
-local gridCounter = 0
-function ShowGrid()
-	gridCounter = gridCounter + 1
-	if gridCounter >= 1 then
-		for button in next, ButtonRegistry do
-			if button:IsShown() then
-				button:SetAlpha(1.0)
-			end
-		end
-	end
-end
-
-function HideGrid()
-	if gridCounter > 0 then
-		gridCounter = gridCounter - 1
-	end
-	if gridCounter == 0 then
-		for button in next, ButtonRegistry do
-			if button:IsShown() and not button:HasAction() and not button.config.showGrid then
-				button:SetAlpha(0.0)
-			end
-		end
-	end
-end
-
-function UpdateGrid(self)
-	if self.config.showGrid then
-		self:SetAlpha(1.0)
-	elseif gridCounter == 0 and self:IsShown() and not self:HasAction() then
-		self:SetAlpha(0.0)
-	end
-end
-
------------------------------------------------------------
---- KeyBound integration
-
-function Generic:GetBindingAction()
-	return self.config.keyBoundTarget or "CLICK "..self:GetName()..":LeftButton"
-end
-
-function Generic:GetHotkey()
-	local name = "CLICK "..self:GetName()..":LeftButton"
-	local key = GetBindingKey(self.config.keyBoundTarget or name)
-	if not key and self.config.keyBoundTarget then
-		key = GetBindingKey(name)
-	end
-	if key then
-		return KeyBound and KeyBound:ToShortKey(key) or key
-	end
-end
-
-local function getKeys(binding, keys)
-	keys = keys or ""
-	for i = 1, select("#", GetBindingKey(binding)) do
-		local hotKey = select(i, GetBindingKey(binding))
-		if keys ~= "" then
-			keys = keys .. ", "
-		end
-		keys = keys .. GetBindingText(hotKey)
-	end
-	return keys
-end
-
-function Generic:GetBindings()
-	local keys
-
-	if self.config.keyBoundTarget then
-		keys = getKeys(self.config.keyBoundTarget)
-	end
-
-	keys = getKeys("CLICK "..self:GetName()..":LeftButton", keys)
-
-	return keys
-end
-
-function Generic:SetKey(key)
-	if self.config.keyBoundTarget then
-		SetBinding(key, self.config.keyBoundTarget)
-	else
-		SetBindingClick(key, self:GetName(), "LeftButton")
-	end
-	lib.callbacks:Fire("OnKeybindingChanged", self, key)
-end
-
-local function clearBindings(binding)
-	while GetBindingKey(binding) do
-		SetBinding(GetBindingKey(binding), nil)
-	end
-end
-
-function Generic:ClearBindings()
-	if self.config.keyBoundTarget then
-		clearBindings(self.config.keyBoundTarget)
-	end
-	clearBindings("CLICK "..self:GetName()..":LeftButton")
-	lib.callbacks:Fire("OnKeybindingChanged", self, nil)
-end
-
------------------------------------------------------------
---- button management
-
-function Generic:UpdateAction(force)
-	local type, action = self:GetAction()
-	if force or type ~= self._state_type or action ~= self._state_action then
-		-- type changed, update the metatable
-		if force or self._state_type ~= type then
-			local meta = type_meta_map[type] or type_meta_map.empty
-			setmetatable(self, meta)
-			self._state_type = type
-		end
-		self._state_action = action
-		Update(self)
-	end
-end
-
-function lib:UpdateAllButtons()
-	for button in next, ActiveButtons do
-		if button._state_type == "item" then
-			Update(button)
-		end
-	end
-end
-
-function Update(self)
-	if self:HasAction() then
-		ActiveButtons[self] = true
-		if self._state_type == "action" then
-			ActionButtons[self] = true
-			NonActionButtons[self] = nil
-		else
-			ActionButtons[self] = nil
-			NonActionButtons[self] = true
-		end
-		self:SetAlpha(1.0)
-		UpdateButtonState(self)
-		UpdateUsable(self)
-		UpdateCooldown(self)
-		UpdateFlash(self)
-	else
-		ActiveButtons[self] = nil
-		ActionButtons[self] = nil
-		NonActionButtons[self] = nil
-		if gridCounter == 0 and not self.config.showGrid then
-			self:SetAlpha(0.0)
-		end
-		self.cooldown:Hide()
-		self:SetChecked(false)
-
-		if self.chargeCooldown then
-			EndChargeCooldown(self.chargeCooldown)
-		end
-	end
-
-	-- Add a green border if button is an equipped item
-	if self:IsEquipped() and not self.config.hideElements.equipped then
-		self.Border:SetVertexColor(0, 1.0, 0, 0.35)
-		self.Border:Show()
-	else
-		self.Border:Hide()
-	end
-
-	-- Update Action Text
-	if not self:IsConsumableOrStackable() then
-		self.Name:SetText(self:GetActionText())
-	else
-		self.Name:SetText("")
-	end
-
-	-- Update icon and hotkey
-	local texture = self:GetTexture()
-
-	-- Zone ability button handling
-	self.zoneAbilityDisabled = false
-	self.icon:SetDesaturated(false)
-	if self._state_type == "action" then
-		local action_type, id = GetActionInfo(self._state_action)
-		if ((action_type == "spell" or action_type == "companion") and ZoneAbilityFrame and ZoneAbilityFrame.baseName and not HasZoneAbility()) then
-			local name = GetSpellInfo(ZoneAbilityFrame.baseName)
-			local abilityName = GetSpellInfo(id)
-			if name == abilityName then
-				texture = GetLastZoneAbilitySpellTexture()
-				self.zoneAbilityDisabled = true
-				self.icon:SetDesaturated(true)
-			end
-		end
-	end
-
-	if texture then
-		self.icon:SetTexture(texture)
-		self.icon:Show()
-		self.rangeTimer = - 1
-		self:SetNormalTexture("Interface\\Buttons\\UI-Quickslot2")
-		if not self.LBFSkinned and not self.MasqueSkinned then
-			self.NormalTexture:SetTexCoord(0, 0, 0, 0)
-		end
-	else
-		self.icon:Hide()
-		self.cooldown:Hide()
-		self.rangeTimer = nil
-		self:SetNormalTexture("Interface\\Buttons\\UI-Quickslot")
-		if self.HotKey:GetText() == RANGE_INDICATOR then
-			self.HotKey:Hide()
-		else
-			self.HotKey:SetVertexColor(0.75, 0.75, 0.75)
-		end
-		if not self.LBFSkinned and not self.MasqueSkinned then
-			self.NormalTexture:SetTexCoord(-0.15, 1.15, -0.15, 1.17)
-		end
-	end
-
-	self:UpdateLocal()
-
-	UpdateCount(self)
-
-	UpdateFlyout(self)
-
-	UpdateOverlayGlow(self)
-
-	UpdateNewAction(self)
-
-	if GameTooltip_GetOwnerForbidden() == self then
-		UpdateTooltip(self)
-	end
-
-	-- this could've been a spec change, need to call OnStateChanged for action buttons, if present
-	if not InCombatLockdown() and self._state_type == "action" then
-		local onStateChanged = self:GetAttribute("OnStateChanged")
-		if onStateChanged then
-			self.header:SetFrameRef("updateButton", self)
-			self.header:Execute(([[
-				local frame = self:GetFrameRef("updateButton")
-				control:RunFor(frame, frame:GetAttribute("OnStateChanged"), %s, %s, %s)
-			]]):format(formatHelper(self:GetAttribute("state")), formatHelper(self._state_type), formatHelper(self._state_action)))
-		end
-	end
-	lib.callbacks:Fire("OnButtonUpdate", self)
-end
-
-function Generic:UpdateLocal()
--- dummy function the other button types can override for special updating
-end
-
-function UpdateButtonState(self)
-	if self:IsCurrentlyActive() or self:IsAutoRepeat() then
-		self:SetChecked(true)
-	else
-		self:SetChecked(false)
-	end
-	lib.callbacks:Fire("OnButtonState", self)
-end
-
-function UpdateUsable(self)
-	-- TODO: make the colors configurable
-	-- TODO: allow disabling of the whole recoloring
-	if self.config.outOfRangeColoring == "button" and self.outOfRange then
-		self.icon:SetVertexColor(unpack(self.config.colors.range))
-	else
-		local isUsable, notEnoughMana = self:IsUsable()
-		if isUsable then
-			self.icon:SetVertexColor(1.0, 1.0, 1.0)
-			--self.NormalTexture:SetVertexColor(1.0, 1.0, 1.0)
-		elseif notEnoughMana then
-			self.icon:SetVertexColor(unpack(self.config.colors.mana))
-			--self.NormalTexture:SetVertexColor(0.5, 0.5, 1.0)
-		else
-			self.icon:SetVertexColor(0.4, 0.4, 0.4)
-			--self.NormalTexture:SetVertexColor(1.0, 1.0, 1.0)
-		end
-	end
-	lib.callbacks:Fire("OnButtonUsable", self)
-end
-
-function UpdateCount(self)
-	--print("libtest", self:GetCount() )
-	if not self:HasAction() then
-		self.Count:SetText("")
-		return
-	end
-	if self:IsConsumableOrStackable() then
-		local count = self:GetCount()
-		if count ~= 0 then
-			if count > (self.maxDisplayCount or 999) then
-				--TODO: Relly this should show digits then * if over 999
-				self.Count:SetText("*")
-			else
-				self.Count:SetText(count)
-			end
-		else
-			self.Count:SetText("")
-		end
-	else
-		local charges, maxCharges, chargeStart, chargeDuration = self:GetCharges()
-		if charges and maxCharges and maxCharges > 1 then
-			self.Count:SetText(charges)
-		else
-			self.Count:SetText("")
-		end
-	end
-end
-
-function EndChargeCooldown(self)
-	self:Hide()
-	self:SetParent(UIParent)
-	self.parent.chargeCooldown = nil
-	self.parent = nil
-	tinsert(lib.ChargeCooldowns, self)
-end
-
-local function StartChargeCooldown(parent, chargeStart, chargeDuration, chargeModRate)
-	if not parent.chargeCooldown then
-		local cooldown = tremove(lib.ChargeCooldowns)
-		if not cooldown then
-			lib.NumChargeCooldowns = lib.NumChargeCooldowns + 1
-			cooldown = CreateFrame("Cooldown", "LAB10ChargeCooldown"..lib.NumChargeCooldowns, parent, "CooldownFrameTemplate");
-			cooldown:SetScript("OnCooldownDone", EndChargeCooldown)
-			cooldown:SetHideCountdownNumbers(true)
-			cooldown:SetDrawSwipe(false)
-		end
-		cooldown:SetParent(parent)
-		cooldown:SetAllPoints(parent)
-		cooldown:SetFrameStrata("TOOLTIP")
-		cooldown:Show()
-		parent.chargeCooldown = cooldown
-		cooldown.parent = parent
-	end
-	-- set cooldown
-	parent.chargeCooldown:SetDrawBling(parent.chargeCooldown:GetEffectiveAlpha() > 0.5)
-	CooldownFrame_Set(parent.chargeCooldown, chargeStart, chargeDuration, true, true, chargeModRate)
-
-	-- update charge cooldown skin when masque is used
-	if Masque and Masque.UpdateCharge then
-		Masque:UpdateCharge(parent)
-	end
-
-	if not chargeStart or chargeStart == 0 then
-		EndChargeCooldown(parent.chargeCooldown)
-	end
-end
-
-local function OnCooldownDone(self)
-	self:SetScript("OnCooldownDone", nil)
-	UpdateCooldown(self:GetParent())
-end
-
-function UpdateCooldown(self)
-	local locStart, locDuration = self:GetLossOfControlCooldown()
-	local start, duration, enable, modRate = self:GetCooldown()
-	local charges, maxCharges, chargeStart, chargeDuration, chargeModRate = self:GetCharges()
-
-	self.cooldown:SetDrawBling(self.cooldown:GetEffectiveAlpha() > 0.5)
-
-	if (locStart + locDuration) > (start + duration) then
-		if self.cooldown.currentCooldownType ~= COOLDOWN_TYPE_LOSS_OF_CONTROL then
-			self.cooldown:SetEdgeTexture("Interface\\Cooldown\\edge-LoC")
-			self.cooldown:SetSwipeColor(0.17, 0, 0)
-			self.cooldown:SetHideCountdownNumbers(true)
-			self.cooldown.currentCooldownType = COOLDOWN_TYPE_LOSS_OF_CONTROL
-		end
-		CooldownFrame_Set(self.cooldown, locStart, locDuration, true, true, modRate)
-	else
-		if self.cooldown.currentCooldownType ~= COOLDOWN_TYPE_NORMAL then
-			self.cooldown:SetEdgeTexture("Interface\\Cooldown\\edge")
-			self.cooldown:SetSwipeColor(0, 0, 0)
-			self.cooldown:SetHideCountdownNumbers(false)
-			self.cooldown.currentCooldownType = COOLDOWN_TYPE_NORMAL
-		end
-		if locStart > 0 then
-			self.cooldown:SetScript("OnCooldownDone", OnCooldownDone)
-		end
-
-		if charges and maxCharges and charges > 0 and charges < maxCharges then
-			StartChargeCooldown(self, chargeStart, chargeDuration, chargeModRate)
-		elseif self.chargeCooldown then
-			EndChargeCooldown(self.chargeCooldown)
-		end
-		CooldownFrame_Set(self.cooldown, start, duration, enable, false, modRate)
-	end
-end
-
-function StartFlash(self)
-	self.flashing = 1
-	flashTime = 0
-	UpdateButtonState(self)
-end
-
-function StopFlash(self)
-	self.flashing = 0
-	self.Flash:Hide()
-	UpdateButtonState(self)
-end
-
-function UpdateFlash(self)
-	if (self:IsAttack() and self:IsCurrentlyActive()) or self:IsAutoRepeat() then
-		StartFlash(self)
-	else
-		StopFlash(self)
-	end
-end
-
-function UpdateTooltip(self)
-	if GameTooltip:IsForbidden() then return end
-	if (GetCVar("UberTooltips") == "1") then
-		--for i,n in pairs(GameTooltip) do print(i,n) end
-		--print("lib", GameTooltip, self)
-		GameTooltip_SetDefaultAnchor(GameTooltip, self);
-	else
-		GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
-	end
-	if self:SetTooltip() then
-		self.UpdateTooltip = UpdateTooltip
-	else
-		self.UpdateTooltip = nil
-	end
-end
-
-function UpdateHotkeys(self)
-	local key = self:GetHotkey()
-	if not key or key == "" or self.config.hideElements.hotkey then
-		self.HotKey:SetText(RANGE_INDICATOR)
-		self.HotKey:SetPoint("TOPLEFT", self, "TOPLEFT", 1, - 2)
-		self.HotKey:Hide()
-	else
-		self.HotKey:SetText(key)
-		self.HotKey:SetPoint("TOPLEFT", self, "TOPLEFT", - 2, - 2)
-		self.HotKey:Show()
-	end
-end
-
-function ShowOverlayGlow(self)
-	if LBG then
-		LBG.ShowOverlayGlow(self)
-	end
-end
-
-function HideOverlayGlow(self)
-	if LBG then
-		LBG.HideOverlayGlow(self)
-	end
-end
-
-function UpdateOverlayGlow(self)
-	local spellId = self:GetSpellId()
-	if spellId and IsSpellOverlayed(spellId) then
-		ShowOverlayGlow(self)
-	else
-		HideOverlayGlow(self)
-	end
-end
-
-function ClearNewActionHighlight(action, preventIdenticalActionsFromClearing, value)
-	lib.ACTION_HIGHLIGHT_MARKS[action] = value
-
-	for button in next, ButtonRegistry do
-		if button._state_type == "action" and action == tonumber(button._state_action) then
-			UpdateNewAction(button)
-		end
-	end
-
-	if preventIdenticalActionsFromClearing then
-		return
-	end
-
-	-- iterate through actions and unmark all that are the same type
-	local unmarkedType, unmarkedID = GetActionInfo(action)
-	for actionKey, markValue in pairs(lib.ACTION_HIGHLIGHT_MARKS) do
-		if markValue then
-			local actionType, actionID = GetActionInfo(actionKey)
-			if actionType == unmarkedType and actionID == unmarkedID then
-				ClearNewActionHighlight(actionKey, true, value)
-			end
-		end
-	end
-end
-
-hooksecurefunc("MarkNewActionHighlight", function(action)
-	lib.ACTION_HIGHLIGHT_MARKS[action] = true
-	for button in next, ButtonRegistry do
-		if button._state_type == "action" and action == tonumber(button._state_action) then
-			UpdateNewAction(button)
-		end
-	end
-end)
-
-hooksecurefunc("ClearNewActionHighlight", function(action, preventIdenticalActionsFromClearing)
-	ClearNewActionHighlight(action, preventIdenticalActionsFromClearing, nil)
-end)
-
-function UpdateNewAction(self)
-	-- special handling for "New Action" markers
-	if self.NewActionTexture then
-		if self._state_type == "action" and lib.ACTION_HIGHLIGHT_MARKS[self._state_action] then
-			self.NewActionTexture:Show()
-		else
-			self.NewActionTexture:Hide()
-		end
-	end
-end
-
--- Hook UpdateFlyout so we can use the blizzy templates
-hooksecurefunc("ActionButton_UpdateFlyout", function(self, ...)
-	if ButtonRegistry[self] then
-		UpdateFlyout(self)
-	end
-end)
-
-function UpdateFlyout(self)
-	-- disabled FlyoutBorder/BorderShadow, those are not handled by LBF and look terrible
-	self.FlyoutBorder:Hide()
-	self.FlyoutBorderShadow:Hide()
-	if self._state_type == "action" then
-		-- based on ActionButton_UpdateFlyout in ActionButton.lua
-		local actionType = GetActionInfo(self._state_action)
-		if actionType == "flyout" then
-			-- Update border and determine arrow position
-			local arrowDistance
-			if (SpellFlyout and SpellFlyout:IsShown() and SpellFlyout:GetParent() == self) or GetMouseFocus() == self then
-				arrowDistance = 5
-			else
-				arrowDistance = 2
-			end
-
-			-- Update arrow
-			self.FlyoutArrow:Show()
-			self.FlyoutArrow:ClearAllPoints()
-			local direction = self:GetAttribute("flyoutDirection");
-			if direction == "LEFT" then
-				self.FlyoutArrow:SetPoint("LEFT", self, "LEFT", -arrowDistance, 0)
-				SetClampedTextureRotation(self.FlyoutArrow, 270)
-			elseif direction == "RIGHT" then
-				self.FlyoutArrow:SetPoint("RIGHT", self, "RIGHT", arrowDistance, 0)
-				SetClampedTextureRotation(self.FlyoutArrow, 90)
-			elseif direction == "DOWN" then
-				self.FlyoutArrow:SetPoint("BOTTOM", self, "BOTTOM", 0, -arrowDistance)
-				SetClampedTextureRotation(self.FlyoutArrow, 180)
-			else
-				self.FlyoutArrow:SetPoint("TOP", self, "TOP", 0, arrowDistance)
-				SetClampedTextureRotation(self.FlyoutArrow, 0)
-			end
-
-			-- return here, otherwise flyout is hidden
-			return
-		end
-	end
-	self.FlyoutArrow:Hide()
-end
-
-function UpdateRangeTimer()
-	rangeTimer = -1
-end
-
------------------------------------------------------------
---- WoW API mapping
---- Generic Button
-Generic.HasAction               = function(self) return nil end
-Generic.GetActionText           = function(self) return "" end
-Generic.GetTexture              = function(self) return nil end
-Generic.GetCharges              = function(self) return nil end
-Generic.GetCount                = function(self) return 0 end
-Generic.GetCooldown             = function(self) return 0, 0, 0 end
-Generic.IsAttack                = function(self) return nil end
-Generic.IsEquipped              = function(self) return nil end
-Generic.IsCurrentlyActive       = function(self) return nil end
-Generic.IsAutoRepeat            = function(self) return nil end
-Generic.IsUsable                = function(self) return nil end
-Generic.IsConsumableOrStackable = function(self) return nil end
-Generic.IsUnitInRange           = function(self, unit) return nil end
-Generic.IsInRange               = function(self)
-	local unit = self:GetAttribute("unit")
-	if unit == "player" then
-		unit = nil
-	end
-	local val = self:IsUnitInRange(unit)
-	-- map 1/0 to true false, since the return values are inconsistent between actions and spells
-	if val == 1 then val = true elseif val == 0 then val = false end
-	return val
-end
-Generic.SetTooltip              = function(self) return nil end
-Generic.GetSpellId              = function(self) return nil end
-Generic.GetLossOfControlCooldown = function(self) return 0, 0 end
-
------------------------------------------------------------
---- Action Button
-Action.HasAction               = function(self) return HasAction(self._state_action) end
-Action.GetActionText           = function(self) return GetActionText(self._state_action) end
-Action.GetTexture              = function(self) return GetActionTexture(self._state_action) end
-Action.GetCharges              = function(self) return GetActionCharges(self._state_action) end
-Action.GetCount                = function(self) return GetActionCount(self._state_action) end
-Action.GetCooldown             = function(self) return GetActionCooldown(self._state_action) end
-Action.IsAttack                = function(self) return IsAttackAction(self._state_action) end
-Action.IsEquipped              = function(self) return IsEquippedAction(self._state_action) end
-Action.IsCurrentlyActive       = function(self) return IsCurrentAction(self._state_action) end
-Action.IsAutoRepeat            = function(self) return IsAutoRepeatAction(self._state_action) end
-Action.IsUsable                = function(self) return IsUsableAction(self._state_action) end
-Action.IsConsumableOrStackable = function(self) return IsConsumableAction(self._state_action) or IsStackableAction(self._state_action) or (not IsItemAction(self._state_action) and GetActionCount(self._state_action) > 0) end
-Action.IsUnitInRange           = function(self, unit) return IsActionInRange(self._state_action, unit) end
-Action.SetTooltip              = function(self) return GameTooltip:SetAction(self._state_action) end
-Action.GetSpellId              = function(self)
-	local actionType, id, subType = GetActionInfo(self._state_action)
-	if actionType == "spell" then
-		return id
-	elseif actionType == "macro" then
-		return (GetMacroSpell(id))
-	  --[[
-		local _, _, spellId = GetMacroSpell(id)
-		return spellId
-   ]]
-	end
-end
-Action.GetLossOfControlCooldown = function(self) return GetActionLossOfControlCooldown(self._state_action) end
-
------------------------------------------------------------
---- Spell Button
-Spell.HasAction               = function(self) return true end
-Spell.GetActionText           = function(self) return "" end
-Spell.GetTexture              = function(self) return GetSpellTexture(self._state_action) end
-Spell.GetCharges              = function(self) return GetSpellCharges(self._state_action) end
-Spell.GetCount                = function(self) return GetSpellCount(self._state_action) end
-Spell.GetCooldown             = function(self) return GetSpellCooldown(self._state_action) end
-Spell.IsAttack                = function(self) return IsAttackSpell(FindSpellBookSlotBySpellID(self._state_action), "spell") end -- needs spell book id as of 4.0.1.13066
-Spell.IsEquipped              = function(self) return nil end
-Spell.IsCurrentlyActive       = function(self) return IsCurrentSpell(self._state_action) end
-Spell.IsAutoRepeat            = function(self) return IsAutoRepeatSpell(FindSpellBookSlotBySpellID(self._state_action), "spell") end -- needs spell book id as of 4.0.1.13066
-Spell.IsUsable                = function(self) return IsUsableSpell(self._state_action) end
-Spell.IsConsumableOrStackable = function(self) return IsConsumableSpell(self._state_action) end
-Spell.IsUnitInRange           = function(self, unit) return IsSpellInRange(FindSpellBookSlotBySpellID(self._state_action), "spell", unit) end -- needs spell book id as of 4.0.1.13066
-Spell.SetTooltip              = function(self) return GameTooltip:SetSpellByID(self._state_action) end
-Spell.GetSpellId              = function(self) return self._state_action end
-
------------------------------------------------------------
---- Item Button
-local function getItemId(input)
-	return input:match("^item:(%d+)")
-end
-
-Item.HasAction               = function(self) return true end
---Item.HasAction               = function(self) return false end
-Item.GetActionText           = function(self) return "" end
-Item.GetTexture              = function(self) return GetItemIcon(self._state_action) end
-Item.GetCharges              = function(self) return nil end
---Item.GetCount                = function(self) return GetItemCount(self._state_action, nil, true) end
--- Ebony changes for Ema-EE to count the stacks all chars and display in the bar!
-Item.GetCount                = function(self) return EMAApi.GetMaxItemCountFromItemID( self._state_action ) end
-Item.GetCooldown             = function(self) return GetItemCooldown(getItemId(self._state_action)) end
-Item.IsAttack                = function(self) return nil end
-Item.IsEquipped              = function(self) return IsEquippedItem(self._state_action) end
-Item.IsCurrentlyActive       = function(self) return IsCurrentItem(self._state_action) end
-Item.IsAutoRepeat            = function(self) return nil end
-Item.IsUsable                = function(self) return IsUsableItem(self._state_action) end
--- Ebony this seems to always return false! and will not show the stacks on the bar!
--- i always want to show even if there is just want item so return true.
---Item.IsConsumableOrStackable = function(self) return IsConsumableItem(self._state_action) end
-Item.IsConsumableOrStackable = function(self) return true end
-Item.IsUnitInRange           = function(self, unit) return IsItemInRange(self._state_action, unit) end
-Item.SetTooltip              = function(self) return GameTooltip:SetHyperlink(self._state_action)  end
-Item.GetSpellId              = function(self) return nil end
-
------------------------------------------------------------
---- Macro Button
--- TODO: map results of GetMacroSpell/GetMacroItem to proper results
-Macro.HasAction               = function(self) return true end
-Macro.GetActionText           = function(self) return (GetMacroInfo(self._state_action)) end
-Macro.GetTexture              = function(self) return (select(2, GetMacroInfo(self._state_action))) end
-Macro.GetCharges              = function(self) return nil end
-Macro.GetCount                = function(self) return 0 end
-Macro.GetCooldown             = function(self) return 0, 0, 0 end
-Macro.IsAttack                = function(self) return nil end
-Macro.IsEquipped              = function(self) return nil end
-Macro.IsCurrentlyActive       = function(self) return nil end
-Macro.IsAutoRepeat            = function(self) return nil end
-Macro.IsUsable                = function(self) return nil end
-Macro.IsConsumableOrStackable = function(self) return nil end
-Macro.IsUnitInRange           = function(self, unit) return nil end
-Macro.SetTooltip              = function(self) return nil end
-Macro.GetSpellId              = function(self) return nil end
-
------------------------------------------------------------
---- Custom Button
-Custom.HasAction               = function(self) return true end
-Custom.GetActionText           = function(self) return "" end
-Custom.GetTexture              = function(self) return self._state_action.texture end
-Custom.GetCharges              = function(self) return nil end
-Custom.GetCount                = function(self) return 0 end
-Custom.GetCooldown             = function(self) return 0, 0, 0 end
-Custom.IsAttack                = function(self) return nil end
-Custom.IsEquipped              = function(self) return nil end
-Custom.IsCurrentlyActive       = function(self) return nil end
-Custom.IsAutoRepeat            = function(self) return nil end
-Custom.IsUsable                = function(self) return true end
-Custom.IsConsumableOrStackable = function(self) return nil end
-Custom.IsUnitInRange           = function(self, unit) return nil end
-Custom.SetTooltip              = function(self) return GameTooltip:SetText(self._state_action.tooltip) end
-Custom.GetSpellId              = function(self) return nil end
-Custom.RunCustom               = function(self, unit, button) return self._state_action.func(self, unit, button) end
-
------------------------------------------------------------
---- Update old Buttons
-if oldversion and next(lib.buttonRegistry) then
-	InitializeEventHandler()
-	for button in next, lib.buttonRegistry do
-		-- this refreshes the metatable on the button
-		Generic.UpdateAction(button, true)
-		SetupSecureSnippets(button)
-		if oldversion < 12 then
-			WrapOnClick(button)
-		end
-		if oldversion < 23 then
-			if button.overlay then
-				button.overlay:Hide()
-				ActionButton_HideOverlayGlow(button)
-				button.overlay = nil
-				UpdateOverlayGlow(button)
-			end
-		end
-	end
-end
diff --git a/Libs/LICENSE.txt b/Libs/LICENSE.txt
deleted file mode 100644
index 866fc34..0000000
--- a/Libs/LICENSE.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-Copyright (c) 2007, Ace3 Development Team
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Redistribution of a stand alone version is strictly prohibited without
-      prior written authorization from the Lead of the Ace3 Development Team.
-    * Neither the name of the Ace3 Development Team nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/Libs/LibAuras/CHANGES.txt b/Libs/LibAuras/CHANGES.txt
deleted file mode 100644
index 5095c93..0000000
--- a/Libs/LibAuras/CHANGES.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-commit f0d8147915161ab9973ed4f38b3015c220326712
-Author: John Camp <jjcamp@gmail.com>
-Date:   Thu Apr 26 21:45:16 2018 -0500
-
-    Initial commit
-
diff --git a/Libs/LibAuras/LibAuras.lua b/Libs/LibAuras/LibAuras.lua
deleted file mode 100644
index 384a25f..0000000
--- a/Libs/LibAuras/LibAuras.lua
+++ /dev/null
@@ -1,195 +0,0 @@
-local lib = LibStub:NewLibrary("LibAuras", 1)
-
-if not lib then return end
-
-if not lib.frame then
-    lib.frame = CreateFrame("Frame")
-end
-
-lib.AURAS = lib.AURAS or {}
-
-local FILTERS, getGuidAndCheckAuras, getBuff, getDebuff, getAura, nameToSpellId, getAurasForUnit, addBuff, addDebuff, addAura
-
-
-lib.frame:RegisterEvent("UNIT_AURA")
-lib.frame:SetScript("OnEvent", function(self, event)
-    if event == "UNIT_AURA" then lib.AURAS = {} end
-end)
-
-function lib:UnitBuff(unitId, spellIdOrName, filter)
-    local guid = getGuidAndCheckAuras(unitId)
-    if not guid then return end
-
-    return getBuff(guid, spellIdOrName, filter or "")
-end
-
-function lib:UnitDebuff(unitId, spellIdOrName, filter)
-    local guid = getGuidAndCheckAuras(unitId)
-    if not guid then return end
-
-    return getDebuff(guid, spellIdOrName, filter or "")
-end
-
-function lib:UnitAura(unitId, spellIdOrName, filter)
-    local guid = getGuidAndCheckAuras(unitId)
-    if not guid then return end
-
-    local result = getBuff(guid, spellIdOrName, filter or "")
-    if not result then
-        return getDebuff(guid, spellIdOrName, filter or "")
-    end
-    return result
-end
-
-local FILTERS = {
-    HELPFUL = false,
-    HARMFUL = false,
-    PLAYER = false,
-    RAID = false,
-    CANCELABLE = false,
-    NOTCANCELABLE = false
-}
-
-getGuidAndCheckAuras = function(unitId)
-    local guid = UnitGUID(unitId)
-    if not guid then return nil end
-    if not lib.AURAS[guid] then
-        getAurasForUnit(unitId, guid)
-    end
-    return guid
-end
-
-getBuff = function(guid, spellIdOrName, filter)
-    return getAura(guid, spellIdOrName, "HELPFUL " .. filter)
-end
-
-getDebuff = function(guid, spellIdOrName, filter)
-    return getAura(guid, spellIdOrName, "HARMFUL " .. filter)
-end
-
-getAura = function(guid, spellIdOrName, filter)
-    local filters = {}
-    for k in pairs(FILTERS) do filters[k] = FILTERS[k] end
-    for s in filter:gmatch("%a+") do
-        if filters[s:upper()] ~= nil then
-            filters[s:upper()] = true
-        end
-    end
-
-    local auraType = "BUFF"
-    if not filters["HELPFUL"] and not filters["HARMFUL"] then
-        error("filter must contain either \"HELPFUL\" or \"HARMFUL\"")
-    elseif filters["HELPFUL"] and filters["HARMFUL"] then
-        return
-    elseif filters["HARMFUL"] then
-        auraType = "DEBUFF"
-    end
-
-    local spellId = nameToSpellId(spellIdOrName, guid, auraType)
-    local aura = lib.AURAS[guid][auraType][spellId]
-    if not aura then return
-    elseif filters["PLAYER"] and aura.unitCaster ~= "player" then return
-    end
-    return aura.name, aura.icon, aura.count, aura.debuffType, aura.duration, aura.expirationTime, aura.unitCaster, aura.canStealOrPurge, aura.nameplateShowPersonal, spellId, aura.canApplyAura, aura.isBossDebuff, aura.isCastByPlayer, aura.nameplateShowAll, aura.timeMod, aura.value1, aura.value2, aura.value3
-end
-
-nameToSpellId = function(spellIdOrName, guid, auraType)
-    if type(spellIdOrName) == "number" then
-        return spellIdOrName
-    elseif type(spellIdOrName) == "string" then
-        local spellId = lib.AURAS[guid][auraType].NAMES[spellIdOrName]
-        if not spellId then return nil end
-        return spellId
-    end
-    return nil
-end
-
-getAurasForUnit = function(unitId, guid)
-    lib.AURAS[guid] = {}
-    lib.AURAS[guid]["BUFF"] = {}
-    lib.AURAS[guid]["BUFF"].NAMES = {}
-    lib.AURAS[guid]["DEBUFF"] = {}
-    lib.AURAS[guid]["DEBUFF"].NAMES = {}
-    for i = 1, 40 do
-        if not addBuff(unitId, guid, i) then break end
-    end
-    for i = 1, 40 do
-        if not addDebuff(unitId, guid, i) then break end
-    end
-end
-
-addBuff = function(unitId, guid, index)
-    return addAura(unitId, guid, index, "BUFF")
-end
-
-addDebuff = function(unitId, guid, index)
-    return addAura(unitId, guid, index, "DEBUFF")
-end
-
-addAura = function(unitId, guid, index, type)
-    local filter = nil
-    if type == "BUFF" then filter = "HELPFUL" end
-    if type == "DEBUFF" then filter = "HARMFUL" end
-    if not filter then return end
-    local name, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll, timeMod, value1, value2, value3 = UnitAura(unitId, index, filter)
-    if not name then
-        return false
-    end
-    lib.AURAS[guid][type][spellId] = {}
-    lib.AURAS[guid][type][spellId].name = name
-    lib.AURAS[guid][type][spellId].icon = icon
-    lib.AURAS[guid][type][spellId].count = count
-    lib.AURAS[guid][type][spellId].debuffType = debuffType
-    lib.AURAS[guid][type][spellId].duration = duration
-    lib.AURAS[guid][type][spellId].expirationTime = expirationTime
-    lib.AURAS[guid][type][spellId].unitCaster = unitCaster
-    lib.AURAS[guid][type][spellId].canStealOrPurge = canStealOrPurge
-    lib.AURAS[guid][type][spellId].nameplateShowPersonal = nameplateShowPersonal
-    lib.AURAS[guid][type][spellId].canApplyAura = canApplyAura
-    lib.AURAS[guid][type][spellId].isBossDebuff = isBossDebuff
-    lib.AURAS[guid][type][spellId].isCastByPlayer = isCastByPlayer
-    lib.AURAS[guid][type][spellId].nameplateShowAll = nameplateShowAll
-    lib.AURAS[guid][type][spellId].timeMod = timeMod
-    lib.AURAS[guid][type][spellId].value1 = value1
-    lib.AURAS[guid][type][spellId].value2 = value2
-    lib.AURAS[guid][type][spellId].value3 = value3
-    if not lib.AURAS[guid][type].NAMES[name] then
-        lib.AURAS[guid][type].NAMES[name] = spellId
-    end
-    return true
-end
-
--- DEBUG stuff
---[[
-function libAurasTest()
-    print("Starting Tests")
-    LA = LibStub:GetLibrary("LibAuras")
-    print(":UnitAura(\"player\", 186406) (Sign of the Critter)")
-    print(LA:UnitAura("player", 186406))
-    print(":UnitBuff(\"pet\", \"Dire Frenzy\"")
-    print(LA:UnitBuff("pet", "Dire Frenzy"))
-    print(":UnitDeuff(\"target\", \"Growl\"")
-    print(LA:UnitDebuff("target", "Growl"))
-    LA:printAurasTable()
-end
-
-function lib:printAurasTable()
-    print(".AURAS")
-    for k in pairs(self.AURAS) do
-        print(k)
-        lib:printTable(self.AURAS[k], "  ")
-    end
-end
-
-function lib:printTable(table, prefix)
-    if not table then return end
-    for k in pairs(table) do
-        if type(table[k]) ~= "table" then
-            print(prefix .. k .. " = " .. tostring(table[k]))
-        else
-            print(prefix .. tostring(k))
-            lib:printTable(table[k], prefix .. "  ")
-        end
-    end
-end
-]]
diff --git a/Libs/LibAuras/LibAuras.toc b/Libs/LibAuras/LibAuras.toc
deleted file mode 100644
index c457a4e..0000000
--- a/Libs/LibAuras/LibAuras.toc
+++ /dev/null
@@ -1,9 +0,0 @@
-## Interface: 80000
-## Title: LibAuras
-## Notes: Buff/Debuff Library
-## Author: Kibster
-#@no-lib-strip@
-Libs\libs.xml
-#@end-no-lib-strip@
-
-LibAuras.lua
diff --git a/Libs/LibAuras/Libs/LibStub/LibStub.lua b/Libs/LibAuras/Libs/LibStub/LibStub.lua
deleted file mode 100644
index 7e9b5cd..0000000
--- a/Libs/LibAuras/Libs/LibStub/LibStub.lua
+++ /dev/null
@@ -1,51 +0,0 @@
--- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $
--- LibStub is a simple versioning stub meant for use in Libraries.  http://www.wowace.com/addons/libstub/ for more info
--- LibStub is hereby placed in the Public Domain
--- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
-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]
-
--- Check to see is this version of the stub is obsolete
-if not LibStub or LibStub.minor < LIBSTUB_MINOR then
-	LibStub = LibStub or {libs = {}, minors = {} }
-	_G[LIBSTUB_MAJOR] = LibStub
-	LibStub.minor = LIBSTUB_MINOR
-
-	-- LibStub:NewLibrary(major, minor)
-	-- major (string) - the major version of the library
-	-- minor (string or number ) - the minor version of the library
-	--
-	-- returns nil if a newer or same version of the lib is already present
-	-- returns empty library object or old library object if upgrade is needed
-	function LibStub:NewLibrary(major, minor)
-		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
-		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
-
-		local oldminor = self.minors[major]
-		if oldminor and oldminor >= minor then return nil end
-		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
-		return self.libs[major], oldminor
-	end
-
-	-- LibStub:GetLibrary(major, [silent])
-	-- major (string) - the major version of the library
-	-- silent (boolean) - if true, library is optional, silently return nil if its not found
-	--
-	-- throws an error if the library can not be found (except silent is set)
-	-- returns the library object if found
-	function LibStub:GetLibrary(major, silent)
-		if not self.libs[major] and not silent then
-			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
-		end
-		return self.libs[major], self.minors[major]
-	end
-
-	-- LibStub:IterateLibraries()
-	--
-	-- Returns an iterator for the currently registered libraries
-	function LibStub:IterateLibraries()
-		return pairs(self.libs)
-	end
-
-	setmetatable(LibStub, { __call = LibStub.GetLibrary })
-end
diff --git a/Libs/LibAuras/Libs/LibStub/LibStub.toc b/Libs/LibAuras/Libs/LibStub/LibStub.toc
deleted file mode 100644
index 0b7ade3..0000000
--- a/Libs/LibAuras/Libs/LibStub/LibStub.toc
+++ /dev/null
@@ -1,9 +0,0 @@
-## Interface: 70200
-## Title: Lib: LibStub
-## Notes: Universal Library Stub
-## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
-## X-Website: http://www.wowace.com/addons/libstub/
-## X-Category: Library
-## X-License: Public Domain
-
-LibStub.lua
diff --git a/Libs/LibAuras/Libs/LibStub/tests/test.lua b/Libs/LibAuras/Libs/LibStub/tests/test.lua
deleted file mode 100644
index 338bcf4..0000000
--- a/Libs/LibAuras/Libs/LibStub/tests/test.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-debugstack = debug.traceback
-strmatch = string.match
-
-loadfile("../LibStub.lua")()
-
-local lib, oldMinor = LibStub:NewLibrary("Pants", 1) -- make a new thingy
-assert(lib) -- should return the library table
-assert(not oldMinor) -- should not return the old minor, since it didn't exist
-
--- the following is to create data and then be able to check if the same data exists after the fact
-function lib:MyMethod()
-end
-local MyMethod = lib.MyMethod
-lib.MyTable = {}
-local MyTable = lib.MyTable
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", 1) -- try to register a library with the same version, should silently fail
-assert(not newLib) -- should not return since out of date
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", 0) -- try to register a library with a previous, should silently fail
-assert(not newLib) -- should not return since out of date
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", 2) -- register a new version
-assert(newLib) -- library table
-assert(rawequal(newLib, lib)) -- should be the same reference as the previous
-assert(newOldMinor == 1) -- should return the minor version of the previous version
-
-assert(rawequal(lib.MyMethod, MyMethod)) -- verify that values were saved
-assert(rawequal(lib.MyTable, MyTable)) -- verify that values were saved
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 3 Blah") -- register a new version with a string minor version (instead of a number)
-assert(newLib) -- library table
-assert(newOldMinor == 2) -- previous version was 2
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 4 and please ignore 15 Blah") -- register a new version with a string minor version (instead of a number)
-assert(newLib)
-assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string)
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
-assert(newLib)
-assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
diff --git a/Libs/LibAuras/Libs/LibStub/tests/test2.lua b/Libs/LibAuras/Libs/LibStub/tests/test2.lua
deleted file mode 100644
index eae7172..0000000
--- a/Libs/LibAuras/Libs/LibStub/tests/test2.lua
+++ /dev/null
@@ -1,27 +0,0 @@
-debugstack = debug.traceback
-strmatch = string.match
-
-loadfile("../LibStub.lua")()
-
-for major, library in LibStub:IterateLibraries() do
-	-- check that MyLib doesn't exist yet, by iterating through all the libraries
-	assert(major ~= "MyLib")
-end
-
-assert(not LibStub:GetLibrary("MyLib", true)) -- check that MyLib doesn't exist yet by direct checking
-assert(not pcall(LibStub.GetLibrary, LibStub, "MyLib")) -- don't silently fail, thus it should raise an error.
-local lib = LibStub:NewLibrary("MyLib", 1) -- create the lib
-assert(lib) -- check it exists
-assert(rawequal(LibStub:GetLibrary("MyLib"), lib)) -- verify that :GetLibrary("MyLib") properly equals the lib reference
-
-assert(LibStub:NewLibrary("MyLib", 2))	-- create a new version
-
-local count=0
-for major, library in LibStub:IterateLibraries() do
-	-- check that MyLib exists somewhere in the libraries, by iterating through all the libraries
-	if major == "MyLib" then -- we found it!
-		count = count +1
-		assert(rawequal(library, lib)) -- verify that the references are equal
-	end
-end
-assert(count == 1) -- verify that we actually found it, and only once
diff --git a/Libs/LibAuras/Libs/LibStub/tests/test3.lua b/Libs/LibAuras/Libs/LibStub/tests/test3.lua
deleted file mode 100644
index 21bda2b..0000000
--- a/Libs/LibAuras/Libs/LibStub/tests/test3.lua
+++ /dev/null
@@ -1,14 +0,0 @@
-debugstack = debug.traceback
-strmatch = string.match
-
-loadfile("../LibStub.lua")()
-
-local proxy = newproxy() -- non-string
-
-assert(not pcall(LibStub.NewLibrary, LibStub, proxy, 1)) -- should error, proxy is not a string, it's userdata
-local success, ret = pcall(LibStub.GetLibrary, proxy, true)
-assert(not success or not ret) -- either error because proxy is not a string or because it's not actually registered.
-
-assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
-
-assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
diff --git a/Libs/LibAuras/Libs/LibStub/tests/test4.lua b/Libs/LibAuras/Libs/LibStub/tests/test4.lua
deleted file mode 100644
index 4735246..0000000
--- a/Libs/LibAuras/Libs/LibStub/tests/test4.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-debugstack = debug.traceback
-strmatch = string.match
-
-loadfile("../LibStub.lua")()
-
-
--- Pretend like loaded libstub is old and doesn't have :IterateLibraries
-assert(LibStub.minor)
-LibStub.minor = LibStub.minor - 0.0001
-LibStub.IterateLibraries = nil
-
-loadfile("../LibStub.lua")()
-
-assert(type(LibStub.IterateLibraries)=="function")
-
-
--- Now pretend that we're the same version -- :IterateLibraries should NOT be re-created
-LibStub.IterateLibraries = 123
-
-loadfile("../LibStub.lua")()
-
-assert(LibStub.IterateLibraries == 123)
-
-
--- Now pretend that a newer version is loaded -- :IterateLibraries should NOT be re-created
-LibStub.minor = LibStub.minor + 0.0001
-
-loadfile("../LibStub.lua")()
-
-assert(LibStub.IterateLibraries == 123)
-
-
--- Again with a huge number
-LibStub.minor = LibStub.minor + 1234567890
-
-loadfile("../LibStub.lua")()
-
-assert(LibStub.IterateLibraries == 123)
-
-
-print("OK")
diff --git a/Libs/LibAuras/Libs/libs.xml b/Libs/LibAuras/Libs/libs.xml
deleted file mode 100644
index 2d8db5b..0000000
--- a/Libs/LibAuras/Libs/libs.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
-	<Script file="LibStub\LibStub.lua"/>
-</Ui>
diff --git a/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua b/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua
deleted file mode 100644
index 55aa35f..0000000
--- a/Libs/LibBagUtils-1.0/LibBagUtils-1.0.lua
+++ /dev/null
@@ -1,599 +0,0 @@
-local MAJOR,MINOR = "LibBagUtils-1.0", tonumber(("$Revision: 35 $"):match("%d+"))
-local lib = LibStub:NewLibrary(MAJOR,MINOR)
-
---
--- LibBagUtils
---
--- Several useful bag related APIs that you wish were built into the WoW API:
---   :PutItem()
---   :Iterate()
---   :LinkIsItem() - which amongst other things handles the 3.2 wotlk randomstat item madness (changing while in AH/mail/gbank)
---   :GetNumFreeSlots()
---   .. and more!
---
--- Pains have been taken to make sure to use as much FrameXML data and constants as possible,
--- which should let the library (and dependant addons) keep functioning if Blizzard desides
--- to add more bags, or reorder them.
---
--- Read the well-commented "API" function headers for each function below for usage and descriptions.
---
-
-
-
-if not lib then return end -- no upgrade needed
-
-local strmatch=string.match
-local gsub=string.gsub
-local floor=math.floor
-local tconcat = table.concat
-local band=bit.band
-local pairs,select,type,next,tonumber,tostring=pairs,select,type,next,tonumber,tostring
-local GetTime=GetTime
-local GetContainerNumSlots, GetContainerNumFreeSlots = GetContainerNumSlots, GetContainerNumFreeSlots
-local GetContainerItemLink,GetContainerItemInfo = GetContainerItemLink,GetContainerItemInfo
-local GetItemInfo, GetItemFamily = GetItemInfo, GetItemFamily
--- GLOBALS: error, geterrorhandler, PickupContainerItem
--- GLOBALS: CursorHasItem, ClearCursor, GetCursorInfo
--- GLOBALS: DEFAULT_CHAT_FRAME, SELECTED_CHAT_FRAME
-
-local BANK_CONTAINER = BANK_CONTAINER
--- local KEYRING_CONTAINER = KEYRING_CONTAINER
-local NUM_BANKBAGSLOTS = NUM_BANKBAGSLOTS
-local NUM_BAG_SLOTS = NUM_BAG_SLOTS
-local REAGENTBANK_CONTAINER = REAGENTBANK_CONTAINER
-
--- no longer used: lib.frame = lib.frame or CreateFrame("frame", string.gsub(MAJOR,"[^%w]", "_").."_Frame")
-if lib.frame then
-	lib.frame:Hide()
-	lib.frame:UnregisterAllEvents()
-end
-
------------------------------------------------------------------------
--- General-purpose utilities:
-
-local t = {}
-local function print(...)
-   local msg
-   if select("#",...)>1 then
-      for k=1,select("#",...) do
-         t[k]=tostring(select(k,...))
-      end
-      msg = tconcat(t, " ", 1, select("#",...))
-   else
-      msg = ...
-   end
-	msg = gsub(msg, "\124", "\\124");
-	(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(MAJOR..": "..msg)
-end
-
-local function escapePatterns(str)
-	return ( gsub(str, "([-+.?*%%%[%]%(%)])", "%%%1") )
-end
-
-
-
------------------------------------------------------------------------
--- makeLinkComparator()
--- Take an itemnumber, name, itemstring, or full link, and return a (funcref,arg2,arg3) tuple that can be used to test against several itemlinks
-
-local floor=math.floor
-local function compareFuzzySuffix(link, pattern, uniq16)
-	local uniq = strmatch(link, pattern)
-	if not uniq then	-- first 8 params didn't match
-		return false
-	end
-	return floor(tonumber(uniq)/65536)==uniq16
-end
-
-local function makeLinkComparator(lookingfor)
-	if type(lookingfor)=="number" then
-		-- "item:-12345" -> "item:%-12345[:|]"
-		return strmatch, "|Hitem:"..escapePatterns(lookingfor).."[:|]",nil
-
-	elseif type(lookingfor)=="string" then
-
-		if strmatch(lookingfor, "^item:") or strmatch(lookingfor, "|H") then
-			-- (convert to itemstring) and ensure there's no level info in it (9th param)
-			local str = strmatch(lookingfor, "(item:.-:.-:.-:.-:.-:.-:.-:.-)[:|]")
-			if not str then
-				str = strmatch(lookingfor, "(item:[-0-9:]+)")
-			else
-				-- hokay, we have an itemstring. now we need to check for wobbly suffix factors thanks to 3.2 madness
-				-- see http://www.wowwiki.com/ItemString#3.2_wotlk_randomstat_items_changing_their_suffix_factors
-				local firsteight,uniq = strmatch(str, "(item:.-:.-:.-:.-:.-:.-:%-.-:)([-0-9]+)")
-
-				if uniq then
-					-- suffix was negative, so suffix factors can wobble (really only with wotlk items, not BC ones, but meh)
-					return compareFuzzySuffix,
-						"|H"..escapePatterns(firsteight).."([-0-9]+)[:|]",
-						floor(tonumber(uniq)/65536)
-				else
-					-- unwobbly item, we're done, fall through
-				end
-			end
-			if not str then
-				error(MAJOR..": MakeLinkComparator(): '"..tostring(lookingfor).."' does not appear to be a valid itemstring / itemlink", 3)
-			end
-			return strmatch, "|H" .. escapePatterns(str) .. "[:|]",nil
-
-		else	-- put "|h[" and "]|h" around a name
-			return strmatch, "|h%["..escapePatterns(lookingfor).."%]|h",nil
-		end
-	end
-
-	error(MAJOR..": MakeLinkComparator(): Expected number or string", 3)
-end
-
-
-
-
-
-
------------------------------------------------------------------------
--- Internal slot locking utilities - unfortunately slots where we just dropped an item arent considered locked by the API until the server processes it and returns a bag update event, so we consider them locked for 2 seconds ourselves
-
-lib.slotLocks = {}
-
-local GetTime = GetTime
-
-local function lockSlot(bag,slot)
-	local slots = lib.slotLocks[bag] or {}
-	if not lib.slotLocks[bag] then
-		lib.slotLocks[bag] = slots
-	end
-	slots[slot] = GetTime()
-end
-
-local function isLocked(bag,slot)
-	local slots = lib.slotLocks[bag]
-	if not slots then return false end
-	return GetTime() - (slots[slot] or 0) < 2
-end
-
-
-
------------------------------------------------------------------------
--- Own family/freeslots handling
--- Pre 4.2: This was to handle the goddamn keyring that doesn't behave like anything else,
--- but i'm keeping these functions in in case blizzard adds something new that behaves badly (tabard rack anyone?)
-
-local function GetContainerFamily(bag)
---[[ pre 4.2
-	if bag==KEYRING_CONTAINER then
-		return 256
-	end
-]]
-	local free,fam = GetContainerNumFreeSlots(bag)
-	return fam
-end
-
-function lib:GetContainerFamily(bag)
-	return GetContainerFamily(bag)
-end
-
-
-local function myGetContainerNumFreeSlots(bag)
---[[ pre 4.2
-	if bag==KEYRING_CONTAINER then
-		local free=0
-		for slot=1,GetContainerNumSlots(bag) do
-			if not GetContainerItemLink(bag,slot) then
-				free=free+1
-			end
-		end
-		return free,256
-	end
-]]
-	return GetContainerNumFreeSlots(bag)
-end
-
-function lib:GetContainerNumFreeSlots(bag)
-	return myGetContainerNumFreeSlots(bag)
-end
-
-
-
-
-
------------------------------------------------------------------------
--- API :MakeLinkComparator("itemstring" or "itemLink" or "itemName" or itemId)
---
--- Returns a comparator function and two arguments, that can be used to
--- rapidly compare several itemlinks to a set search pattern.
---
--- This comparator will
---   1) Ignore the 9th "level" parameter introduced in 3.0
---   2) Correctly match items with changing stats in inventory vs AH/Mail/GBank
---      see http://www.wowwiki.com/ItemString#3.2_wotlk_randomstat_items_changing_their_suffix_factors--
---   3) Pick the smartest way to compare available
---
--- local comparator,arg1,arg2 = LBU:MakeLinkComparator(myItemString)
--- for _,itemLink in pairs(myItems) do
---   if comparator(itemLink, arg1,arg2) then
---     print(itemLink, "matches", myItemString)
---
-
-function lib:MakeLinkComparator(lookingfor)
-	return makeLinkComparator(lookingfor)
-end
-
-
-
------------------------------------------------------------------------
--- API :IterateBags("which", itemFamily)
---
--- which       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
--- itemFamily  - number: bitmasked itemFamily; will accept combinations
---                       0: will only iterate regular bags
---               nil: will iterate all bags (including possible future special bags!)
---
--- Returns an iterator that can be used in a for loop, e.g.:
---   for bag in LBU:IterateBags("BAGS") do  -- loop all carried bags (including backpack & possible future special bags)
-
-local bags = {
-	BAGS = {},
-	BANK = {},
-	BAGSBANK = {},
-	REAGENTBANK = {},
-}
-
--- Carried bags
-for i=1,NUM_BAG_SLOTS do
-	bags.BAGS[i]=i
-end
-bags.BAGS[BACKPACK_CONTAINER]=BACKPACK_CONTAINER
--- bags.BAGS[KEYRING_CONTAINER]=KEYRING_CONTAINER
-
--- Bank bags
-for i=NUM_BAG_SLOTS+1,NUM_BAG_SLOTS+NUM_BANKBAGSLOTS do
-	bags.BANK[i]=i
-end
-bags.BANK[BANK_CONTAINER]=BANK_CONTAINER
-
--- Both
-for k,v in pairs(bags.BAGS) do
-	bags.BAGSBANK[k]=v
-end
-for k,v in pairs(bags.BANK) do
-	bags.BAGSBANK[k]=v
-end
-
--- Reagent Bank
-bags.REAGENTBANK[REAGENTBANK_CONTAINER] = REAGENTBANK_CONTAINER
-
-local function iterbags(tab, cur)
-	cur = next(tab, cur)
-	while cur do
-		if GetContainerFamily(cur) then
-			return cur
-		end
-		cur = next(tab, cur)
-	end
-end
-
-local function iterbagsfam0(tab, cur)
-	cur = next(tab, cur)
-	while cur do
-		local free,fam = GetContainerNumFreeSlots(cur)
-		if fam==0 then
-			return cur
-		end
-		cur = next(tab, cur)
-	end
-end
-
-function lib:IterateBags(which, itemFamily)
-
-	local baglist=bags[which]
-	if not baglist then
-		error([[Usage: LibBagUtils:IterateBags("which"[, itemFamily])]], 2)
-	end
-
-	if which == "REAGENTBANK" and not IsReagentBankUnlocked() then return function() end, baglist end
-
-	if not itemFamily then
-		return iterbags, baglist
-	elseif itemFamily==0 then
-		return iterbagsfam0, baglist
-	else
-		return function(tab, cur)
-			cur = next(tab, cur)
-			while cur do
-				local fam = GetContainerFamily(cur)
-				if fam and band(itemFamily,fam)~=0 then
-					return cur
-				end
-				cur = next(tab, cur)
-			end
-		end, baglist
-	end
-end
-
-
------------------------------------------------------------------------
--- API: CountSlots(which, itemFamily)
---
--- which       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
--- itemFamily  - bitmasked itemFamily; see :IterateBags
---
--- Returns: numFreeSlots, numTotalSlots
---          BANK is considered to have 0 slots if bank window is not open
-
-function lib:CountSlots(which, itemFamily)
-	local baglist=bags[which]
-	if not baglist then
-		error([[Usage: LibBagUtils:IterateBags("which"[, itemFamily])]], 2)
-	end
-
-	local free,tot=0,0
-	if which == "REAGENTBANK" and not IsReagentBankUnlocked() then return free,tot end
-
-	if not itemFamily then
-		for bag in pairs(baglist) do
-			free = free + myGetContainerNumFreeSlots(bag)
-			tot = tot + GetContainerNumSlots(bag)
-		end
-	elseif itemFamily==0 then
-		for bag in pairs(baglist) do
-			local f,bagFamily = GetContainerNumFreeSlots(bag)
-			if bagFamily==0 then
-				free = free + f
-				tot = tot + GetContainerNumSlots(bag)
-			end
-		end
-	else
-		for bag in pairs(baglist) do
-			local f,bagFamily = myGetContainerNumFreeSlots(bag)
-			if bagFamily and band(itemFamily,bagFamily)~=0 then
-				free = free + f
-				tot = tot + GetContainerNumSlots(bag)
-			end
-		end
-	end
-	return free,tot
-end
-
-
------------------------------------------------------------------------
--- API :IsBank(bag)
---
--- bag        - number: bag number
---
--- Returns true if the given bag is a bank bag
-
-function lib:IsBank(bag, incReagentBank)
-	return bag==BANK_CONTAINER or
-		(bag>=NUM_BAG_SLOTS+1 and bag<=NUM_BAG_SLOTS+NUM_BANKBAGSLOTS) or (incReagentBank and lib:IsReagentBank(bag))
-end
-
------------------------------------------------------------------------
--- API :IsReagentBank(bag)
---
--- bag        - number: bag number
---
--- Returns true if the given bag is the reagent bank "bag"
-
-function lib:IsReagentBank(bag)
-	return IsReagentBankUnlocked() and (bag==REAGENTBANK_CONTAINER and true or nil) or nil
-end
-
------------------------------------------------------------------------
--- API :Iterate("which"[, "lookingfor"])
---
--- which       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
--- lookingfor  - OPTIONAL: itemLink, itemName, itemString or itemId(number)
---
--- Returns an iterator that can be used in a for loop, e.g.:
---   for bag,slot,link in LBU:Iterate("BAGS") do   -- loop all slots in carried bags (including backpack & keyring)
---   for bag,slot,link in LBU:Iterate("BAGSBANK", 29434) do  -- find all badges of justice
-
-function lib:Iterate(which, lookingfor)
-	if which == "REAGENTBANK" and not IsReagentBankUnlocked() then return function() end end
-
-	local baglist=bags[which]
-	if not baglist then
-		error([[Usage: LibBagUtils:Iterate(which [, item])]], 2)
-	end
-
-	local bag,slot,curbagsize=nil,0,0
-	local function iterator()
-		while slot>=curbagsize do
-			bag = iterbags(baglist, bag)
-			if not bag then return nil end
-			curbagsize=GetContainerNumSlots(bag) or 0
-			slot=0
-		end
-
-		slot=slot+1
-		return bag,slot,GetContainerItemLink(bag,slot)
-	end
-
-	if lookingfor==nil then
-		return iterator
-	else
-		local comparator,arg1,arg2 = makeLinkComparator(lookingfor)
-		return function()
-			for bag,slot,link in iterator do
-				if link and comparator(link, arg1,arg2) then
-					return bag,slot,link
-				end
-			end
-		end
-	end
-
-end
-
-
------------------------------------------------------------------------
--- API :Find("where", "lookingfor", findLocked])
---
--- where       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
--- lookingfor  - itemLink, itemName, itemString or itemId(number)
--- findLocked   - OPTIONAL: if true, will also return locked slots
---
--- Returns:  bag,slot,link    or nil on failure
-
-function lib:Find(where,lookingfor,findLocked)
-	if where == "REAGENTBANK" and not IsReagentBankUnlocked() then return nil end
-
-	for bag,slot,link in lib:Iterate(where,lookingfor) do
-		local _, itemCount, locked, _, _ = GetContainerItemInfo(bag,slot)
-		if findLocked or not locked then
-			return bag,slot,link
-		end
-	end
-end
-
-
------------------------------------------------------------------------
--- API :FindSmallestStack("where", "lookingfor"[, findLocked])
---
--- where       - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
--- lookingfor  - itemLink, itemName, itemString or itemId(number)
--- findLocked   - OPTIONAL: if true, will also return locked slots
---
--- Returns:  bag,slot,size    or nil on failure
-
-function lib:FindSmallestStack(where,lookingfor,findLocked)
-	if where == "REAGENTBANK" and not IsReagentBankUnlocked() then return nil end
-
-	local smallest=9e9
-	local smbag,smslot
-	for bag,slot in lib:Iterate(where,lookingfor) do
-		local _, itemCount, locked, _, _ = GetContainerItemInfo(bag,slot)
-		if itemCount and itemCount<smallest and (findLocked or not locked) then
-			smbag=bag
-			smslot=slot
-			smallest=itemCount
-		end
-	end
-	if smbag then
-		return smbag,smslot,smallest
-	end
-end
-
-
------------------------------------------------------------------------
--- API :PutItem("where"[, dontClearOnFail[, count]])
---
--- Put the item currently held by the cursor in the most suitable bag
--- (considering specialty bags, already-existing stacks..)
---
--- where           - string: "BAGS", "BANK", "BAGSBANK", "REAGENTBANK"
--- count           - OPTIONAL: number: if given, PutItem() will attempt to stack the item on top of another suitable stack. This is not possible without knowing the count.
--- dontClearOnFail - OPTIONAL: boolean: If the put operation fails due to no room, do NOT clear the cursor. (Note that some other wow client errors WILL clear the cursor)
---
--- Returns:  bag,slot    or false for out-of-room
---           0,0 will be returned if the function is called without an item in the cursor
---           nil         when which is REAGENTBANK and the ReagentBank has not been unlocked
-
-local function putinbag(destbag)
-	if where == "REAGENTBANK" and not IsReagentBankUnlocked() then return nil end
-
-	for slot=1,GetContainerNumSlots(destbag) do
-		if (not GetContainerItemInfo(destbag,slot)) and (not isLocked(destbag,slot)) then	-- empty!
-			PickupContainerItem(destbag,slot)
-			if not CursorHasItem() then -- success!
-				lockSlot(destbag,slot)
-				return slot
-			end
-			-- If we get here, something is probably severely broken. But we keep looping hoping for the best.
-		end
-	end
-end
-
-function lib:PutItem(where, count, dontClearOnFail)
-	if where == "REAGENTBANK" and not IsReagentBankUnlocked() then return nil end
-
-	local cursorType,itemId,itemLink = GetCursorInfo()
-	if cursorType~="item" then
-		geterrorhandler()(MAJOR..": PutItem(): There was no item in the cursor.")
-		return 0,0	-- we consider nothing-at-all successfully disposed of (0,0 contains nil)
-	end
-
-	local baglist=bags[where]
-	if not baglist then
-		error("Usage: LibBagUtils:PutItem(where[, count[, dontClearOnFail]])", 2)
-	end
-
-	-- FIRST: if we have a known count, and the item is stackable, we try putting it on top of something else (look for the BIGGEST stack to put it on top of for max packing!)
-	if count and count>=1 then
-		local _, _, _, _, _, _, _, itemStackCount = GetItemInfo(itemLink)
-		if itemStackCount>1 and count<itemStackCount then
-			local bestsize,bestbag,bestslot=0
-			for bag,slot in lib:Iterate(where, itemId) do -- Only look for itemId, not the full string; we assume everything of the same itemId is stackable. Looking at the full itemstring is futile since everything has unique IDs these days.
-				local _, ciCount, ciLocked, _, _ = GetContainerItemInfo(bag,slot)
-				if ciLocked then
-					-- nope!
-				elseif isLocked(bag,slot) then
-					-- nope!
-				elseif ciCount+count<=itemStackCount and ciCount>bestsize then
-					bestsize=ciCount
-					bestbag=bag
-					bestslot=slot
-				end
-			end
-			if bestbag then	-- Place it!
-				PickupContainerItem(bestbag,bestslot)
-				if not CursorHasItem() then	-- success!
-
-					lockSlot(bestbag,bestslot)
-					local _, ciCount, ciLocked, _, _ = GetContainerItemInfo(bestbag,bestslot)
-					return bestbag,bestslot
-				end
-				-- if we got here, the item couldn't be placed on top of the other for some reason, possibly because our assumption about equal itemids being wrong
-				-- either way, we fall down and continue looking for somewhere to put it
-			end
-			-- Fall down and look for empty slots instead
-		end
-	end
-
-	-- Put the item in the first empty slot that it CAN be put in!
-	local itemFam = GetItemFamily(itemLink)
-	if itemFam~=0 and select(9,GetItemInfo(itemLink))=="INVTYPE_BAG" then
-		itemFam = 0	-- Ouch, it was a bag. Bags are always family 0 for purposes of trying to PUT them somewhere.
-	end
-
-	-- If this is a specialty item, we try specialty bags first
-	if itemFam~=0 then
-		for bag in iterbags, baglist do
-			local bagFree, bagFam = myGetContainerNumFreeSlots(bag)
-			if bagFam~=0 and band(itemFam,bagFam)~=0 then
-				local slot = putinbag(bag)
-				if slot then
-					return bag,slot
-				end
-			end
-		end
-	end
-
-	-- If we couldn't put it in a special bag, try normal bags
-	for bag in iterbagsfam0, baglist do
-		if GetContainerNumFreeSlots(bag)>0 then
-			local slot = putinbag(bag)
-			if slot then
-				return bag,slot
-			end
-		end
-	end
-
-
-	-- Set sail on the failboat!
-	if not dontClearOnFail then
-		ClearCursor()
-	end
-	return false	-- no room for it!
-end
-
-
-
------------------------------------------------------------------------
--- API :LinkIsItem(fullLink, lookingfor)
---
--- See if "lookingfor" equals the full link given. "lookingfor" can be any kind of item identifier.
--- Level information is always ignored. Wobbly 3.2 randomstats are compensated for.
-
-function lib:LinkIsItem(fullLink, lookingfor)
-	local comparator,arg1,arg2 = makeLinkComparator(lookingfor)
-	return comparator(fullLink, arg1,arg2)
-end
diff --git a/Libs/LibBagUtils-1.0/LibBagUtils-1.0.xml b/Libs/LibBagUtils-1.0/LibBagUtils-1.0.xml
deleted file mode 100644
index 493de1c..0000000
--- a/Libs/LibBagUtils-1.0/LibBagUtils-1.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="LibBagUtils-1.0.lua"/>
-</Ui>
\ No newline at end of file
diff --git a/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua b/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua
deleted file mode 100644
index 2d7dcef..0000000
--- a/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.lua
+++ /dev/null
@@ -1,244 +0,0 @@
---[[
-Copyright (c) 2015-2017, Hendrik "nevcairiel" Leppkes <h.leppkes@gmail.com>
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of the developer nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-]]
-local MAJOR_VERSION = "LibButtonGlow-1.0"
-local MINOR_VERSION = 6
-
-if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
-local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
-if not lib then return end
-
-local Masque = LibStub("Masque", true)
-
-lib.unusedOverlays = lib.unusedOverlays or {}
-lib.numOverlays = lib.numOverlays or 0
-
-local tinsert, tremove, tostring = table.insert, table.remove, tostring
-
-local function OverlayGlowAnimOutFinished(animGroup)
-	local overlay = animGroup:GetParent()
-	local frame = overlay:GetParent()
-	overlay:Hide()
-	tinsert(lib.unusedOverlays, overlay)
-	frame.__LBGoverlay = nil
-end
-
-local function OverlayGlow_OnHide(self)
-	if self.animOut:IsPlaying() then
-		self.animOut:Stop()
-		OverlayGlowAnimOutFinished(self.animOut)
-	end
-end
-
-local function CreateScaleAnim(group, target, order, duration, x, y, delay)
-	local scale = group:CreateAnimation("Scale")
-	scale:SetTarget(target:GetName())
-	scale:SetOrder(order)
-	scale:SetDuration(duration)
-	scale:SetScale(x, y)
-
-	if delay then
-		scale:SetStartDelay(delay)
-	end
-end
-
-local function CreateAlphaAnim(group, target, order, duration, fromAlpha, toAlpha, delay)
-	local alpha = group:CreateAnimation("Alpha")
-	alpha:SetTarget(target:GetName())
-	alpha:SetOrder(order)
-	alpha:SetDuration(duration)
-	alpha:SetFromAlpha(fromAlpha)
-	alpha:SetToAlpha(toAlpha)
-
-	if delay then
-		alpha:SetStartDelay(delay)
-	end
-end
-
-local function AnimIn_OnPlay(group)
-	local frame = group:GetParent()
-	local frameWidth, frameHeight = frame:GetSize()
-	frame.spark:SetSize(frameWidth, frameHeight)
-	frame.spark:SetAlpha(0.3)
-	frame.innerGlow:SetSize(frameWidth / 2, frameHeight / 2)
-	frame.innerGlow:SetAlpha(1.0)
-	frame.innerGlowOver:SetAlpha(1.0)
-	frame.outerGlow:SetSize(frameWidth * 2, frameHeight * 2)
-	frame.outerGlow:SetAlpha(1.0)
-	frame.outerGlowOver:SetAlpha(1.0)
-	frame.ants:SetSize(frameWidth * 0.85, frameHeight * 0.85)
-	frame.ants:SetAlpha(0)
-	frame:Show()
-end
-
-local function AnimIn_OnFinished(group)
-	local frame = group:GetParent()
-	local frameWidth, frameHeight = frame:GetSize()
-	frame.spark:SetAlpha(0)
-	frame.innerGlow:SetAlpha(0)
-	frame.innerGlow:SetSize(frameWidth, frameHeight)
-	frame.innerGlowOver:SetAlpha(0.0)
-	frame.outerGlow:SetSize(frameWidth, frameHeight)
-	frame.outerGlowOver:SetAlpha(0.0)
-	frame.outerGlowOver:SetSize(frameWidth, frameHeight)
-	frame.ants:SetAlpha(1.0)
-end
-
-local function CreateOverlayGlow()
-	lib.numOverlays = lib.numOverlays + 1
-
-	-- create frame and textures
-	local name = "ButtonGlowOverlay" .. tostring(lib.numOverlays)
-	local overlay = CreateFrame("Frame", name, UIParent)
-
-	-- spark
-	overlay.spark = overlay:CreateTexture(name .. "Spark", "BACKGROUND")
-	overlay.spark:SetPoint("CENTER")
-	overlay.spark:SetAlpha(0)
-	overlay.spark:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
-	overlay.spark:SetTexCoord(0.00781250, 0.61718750, 0.00390625, 0.26953125)
-
-	-- inner glow
-	overlay.innerGlow = overlay:CreateTexture(name .. "InnerGlow", "ARTWORK")
-	overlay.innerGlow:SetPoint("CENTER")
-	overlay.innerGlow:SetAlpha(0)
-	overlay.innerGlow:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
-	overlay.innerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375)
-
-	-- inner glow over
-	overlay.innerGlowOver = overlay:CreateTexture(name .. "InnerGlowOver", "ARTWORK")
-	overlay.innerGlowOver:SetPoint("TOPLEFT", overlay.innerGlow, "TOPLEFT")
-	overlay.innerGlowOver:SetPoint("BOTTOMRIGHT", overlay.innerGlow, "BOTTOMRIGHT")
-	overlay.innerGlowOver:SetAlpha(0)
-	overlay.innerGlowOver:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
-	overlay.innerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625)
-
-	-- outer glow
-	overlay.outerGlow = overlay:CreateTexture(name .. "OuterGlow", "ARTWORK")
-	overlay.outerGlow:SetPoint("CENTER")
-	overlay.outerGlow:SetAlpha(0)
-	overlay.outerGlow:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
-	overlay.outerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375)
-
-	-- outer glow over
-	overlay.outerGlowOver = overlay:CreateTexture(name .. "OuterGlowOver", "ARTWORK")
-	overlay.outerGlowOver:SetPoint("TOPLEFT", overlay.outerGlow, "TOPLEFT")
-	overlay.outerGlowOver:SetPoint("BOTTOMRIGHT", overlay.outerGlow, "BOTTOMRIGHT")
-	overlay.outerGlowOver:SetAlpha(0)
-	overlay.outerGlowOver:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
-	overlay.outerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625)
-
-	-- ants
-	overlay.ants = overlay:CreateTexture(name .. "Ants", "OVERLAY")
-	overlay.ants:SetPoint("CENTER")
-	overlay.ants:SetAlpha(0)
-	overlay.ants:SetTexture([[Interface\SpellActivationOverlay\IconAlertAnts]])
-
-	-- setup antimations
-	overlay.animIn = overlay:CreateAnimationGroup()
-	CreateScaleAnim(overlay.animIn, overlay.spark,          1, 0.2, 1.5, 1.5)
-	CreateAlphaAnim(overlay.animIn, overlay.spark,          1, 0.2, 0, 1)
-	CreateScaleAnim(overlay.animIn, overlay.innerGlow,      1, 0.3, 2, 2)
-	CreateScaleAnim(overlay.animIn, overlay.innerGlowOver,  1, 0.3, 2, 2)
-	CreateAlphaAnim(overlay.animIn, overlay.innerGlowOver,  1, 0.3, 1, 0)
-	CreateScaleAnim(overlay.animIn, overlay.outerGlow,      1, 0.3, 0.5, 0.5)
-	CreateScaleAnim(overlay.animIn, overlay.outerGlowOver,  1, 0.3, 0.5, 0.5)
-	CreateAlphaAnim(overlay.animIn, overlay.outerGlowOver,  1, 0.3, 1, 0)
-	CreateScaleAnim(overlay.animIn, overlay.spark,          1, 0.2, 2/3, 2/3, 0.2)
-	CreateAlphaAnim(overlay.animIn, overlay.spark,          1, 0.2, 1, 0, 0.2)
-	CreateAlphaAnim(overlay.animIn, overlay.innerGlow,      1, 0.2, 1, 0, 0.3)
-	CreateAlphaAnim(overlay.animIn, overlay.ants,           1, 0.2, 0, 1, 0.3)
-	overlay.animIn:SetScript("OnPlay", AnimIn_OnPlay)
-	overlay.animIn:SetScript("OnFinished", AnimIn_OnFinished)
-
-	overlay.animOut = overlay:CreateAnimationGroup()
-	CreateAlphaAnim(overlay.animOut, overlay.outerGlowOver, 1, 0.2, 0, 1)
-	CreateAlphaAnim(overlay.animOut, overlay.ants,          1, 0.2, 1, 0)
-	CreateAlphaAnim(overlay.animOut, overlay.outerGlowOver, 2, 0.2, 1, 0)
-	CreateAlphaAnim(overlay.animOut, overlay.outerGlow,     2, 0.2, 1, 0)
-	overlay.animOut:SetScript("OnFinished", OverlayGlowAnimOutFinished)
-
-	-- scripts
-	overlay:SetScript("OnUpdate", ActionButton_OverlayGlowOnUpdate)
-	overlay:SetScript("OnHide", OverlayGlow_OnHide)
-
-	overlay.__LBGVersion = MINOR_VERSION
-
-	return overlay
-end
-
-local function GetOverlayGlow()
-	local overlay = tremove(lib.unusedOverlays)
-	if not overlay then
-		overlay = CreateOverlayGlow()
-	end
-	return overlay
-end
-
-function lib.ShowOverlayGlow(frame)
-	if frame.__LBGoverlay then
-		if frame.__LBGoverlay.animOut:IsPlaying() then
-			frame.__LBGoverlay.animOut:Stop()
-			frame.__LBGoverlay.animIn:Play()
-		end
-	else
-		local overlay = GetOverlayGlow()
-		local frameWidth, frameHeight = frame:GetSize()
-		overlay:SetParent(frame)
-		overlay:SetFrameLevel(frame:GetFrameLevel() + 5)
-		overlay:ClearAllPoints()
-		--Make the height/width available before the next frame:
-		overlay:SetSize(frameWidth * 1.4, frameHeight * 1.4)
-		overlay:SetPoint("TOPLEFT", frame, "TOPLEFT", -frameWidth * 0.2, frameHeight * 0.2)
-		overlay:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", frameWidth * 0.2, -frameHeight * 0.2)
-		overlay.animIn:Play()
-		frame.__LBGoverlay = overlay
-
-		if Masque and Masque.UpdateSpellAlert and (not frame.overlay or not issecurevariable(frame, "overlay")) then
-			local old_overlay = frame.overlay
-			frame.overlay = overlay
-			Masque:UpdateSpellAlert(frame)
-
-			frame.overlay = old_overlay
-		end
-	end
-end
-
-function lib.HideOverlayGlow(frame)
-	if frame.__LBGoverlay then
-		if frame.__LBGoverlay.animIn:IsPlaying() then
-			frame.__LBGoverlay.animIn:Stop()
-		end
-		if frame:IsVisible() then
-			frame.__LBGoverlay.animOut:Play()
-		else
-			OverlayGlowAnimOutFinished(frame.__LBGoverlay.animOut)
-		end
-	end
-end
diff --git a/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc b/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc
deleted file mode 100644
index 9a80be3..0000000
--- a/Libs/LibButtonGlow-1.0/LibButtonGlow-1.0.toc
+++ /dev/null
@@ -1,14 +0,0 @@
-## Interface: 70300
-## Title: Lib: ButtonGlow-1.0
-## Notes: Replacement for ActionButton_Show/HideOverlayGlow APIs
-## Author: Nevcairiel
-## X-eMail: h.leppkes@gmail.com
-## X-Category: Library
-## X-License: BSD
-## X-Website: http://www.wowace.com/addons/libbuttonglow-1-0/
-## Version: @project-version@
-## OptionalDeps: Masque
-
-LibStub\LibStub.lua
-
-LibButtonGlow-1.0.lua
diff --git a/Libs/LibButtonGlow-1.0/LibStub/LibStub.lua b/Libs/LibButtonGlow-1.0/LibStub/LibStub.lua
deleted file mode 100644
index 0a41ac0..0000000
--- a/Libs/LibButtonGlow-1.0/LibStub/LibStub.lua
+++ /dev/null
@@ -1,30 +0,0 @@
--- 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 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]
-
-if not LibStub or LibStub.minor < LIBSTUB_MINOR then
-	LibStub = LibStub or {libs = {}, minors = {} }
-	_G[LIBSTUB_MAJOR] = LibStub
-	LibStub.minor = LIBSTUB_MINOR
-
-	function LibStub:NewLibrary(major, minor)
-		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
-		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
-
-		local oldminor = self.minors[major]
-		if oldminor and oldminor >= minor then return nil end
-		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
-		return self.libs[major], oldminor
-	end
-
-	function LibStub:GetLibrary(major, silent)
-		if not self.libs[major] and not silent then
-			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
-		end
-		return self.libs[major], self.minors[major]
-	end
-
-	function LibStub:IterateLibraries() return pairs(self.libs) end
-	setmetatable(LibStub, { __call = LibStub.GetLibrary })
-end
diff --git a/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc b/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc
deleted file mode 100644
index 4d9130c..0000000
--- a/Libs/LibButtonGlow-1.0/LibStub/LibStub.toc
+++ /dev/null
@@ -1,9 +0,0 @@
-## Interface: 20400
-## Title: Lib: LibStub
-## Notes: Universal Library Stub
-## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
-## X-Website: http://jira.wowace.com/browse/LS
-## X-Category: Library
-## X-License: Public Domain
-
-LibStub.lua
diff --git a/Libs/LibDeformat-3.0/Changelog-LibDeformat-3.0-v1.txt b/Libs/LibDeformat-3.0/Changelog-LibDeformat-3.0-v1.txt
deleted file mode 100644
index 694ebb2..0000000
--- a/Libs/LibDeformat-3.0/Changelog-LibDeformat-3.0-v1.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-tag v1
-0cb38e41ea596a557a070cd7b8157e81d3ef2d0b
-Cameron Knight <ckknight@Cameron-Knights-MacBook-Pro.local>
-2010-01-04 14:45:16 -0600
-
-Tagging as v1
-
-
---------------------
-
-Cameron Knight:
-	- Fix folder name in .pkgmeta
-	- Add tests to main LibDeformat-3.0.lua, accessible only in debug mode and LibDeformat.Test() must be called to run the tests. Remove other tests, as they're not really useful anymore.
-	- Add some comments and move some code around.
-	- change @example to @usage
-	- Initial commit
diff --git a/Libs/LibDeformat-3.0/LibDeformat-3.0.lua b/Libs/LibDeformat-3.0/LibDeformat-3.0.lua
deleted file mode 100644
index 6580517..0000000
--- a/Libs/LibDeformat-3.0/LibDeformat-3.0.lua
+++ /dev/null
@@ -1,272 +0,0 @@
---[[
-Name: LibDeformat-3.0
-Author(s): ckknight (ckknight@gmail.com)
-Website: http://www.wowace.com/projects/libdeformat-3-0/
-Description: A library to convert a post-formatted string back to its original arguments given its format string.
-License: MIT
-]]
-
-local LibDeformat = LibStub:NewLibrary("LibDeformat-3.0", 1)
-
-if not LibDeformat then
-    return
-end
-
--- this function does nothing and returns nothing
-local function do_nothing()
-end
-
--- a dictionary of format to match entity
-local FORMAT_SEQUENCES = {
-    ["s"] = ".+",
-    ["c"] = ".",
-    ["%d*d"] = "%%-?%%d+",
-    ["[fg]"] = "%%-?%%d+%%.?%%d*",
-    ["%%%.%d[fg]"] = "%%-?%%d+%%.?%%d*",
-}
-
--- a set of format sequences that are string-based, i.e. not numbers.
-local STRING_BASED_SEQUENCES = {
-    ["s"] = true,
-    ["c"] = true,
-}
-
-local cache = setmetatable({}, {__mode='k'})
--- generate the deformat function for the pattern, or fetch from the cache.
-local function get_deformat_function(pattern)
-    local func = cache[pattern]
-    if func then
-        return func
-    end
-
-    -- escape the pattern, so that string.match can use it properly
-    local unpattern = '^' .. pattern:gsub("([%(%)%.%*%+%-%[%]%?%^%$%%])", "%%%1") .. '$'
-
-    -- a dictionary of index-to-boolean representing whether the index is a number rather than a string.
-    local number_indexes = {}
-
-    -- (if the pattern is a numbered format,) a dictionary of index-to-real index.
-    local index_translation = nil
-
-    -- the highest found index, also the number of indexes found.
-	local highest_index
-    if not pattern:find("%%1%$") then
-        -- not a numbered format
-
-        local i = 0
-        while true do
-            i = i + 1
-            local first_index
-            local first_sequence
-            for sequence in pairs(FORMAT_SEQUENCES) do
-                local index = unpattern:find("%%%%" .. sequence)
-                if index and (not first_index or index < first_index) then
-                    first_index = index
-                    first_sequence = sequence
-                end
-            end
-            if not first_index then
-                break
-            end
-            unpattern = unpattern:gsub("%%%%" .. first_sequence, "(" .. FORMAT_SEQUENCES[first_sequence] .. ")", 1)
-            number_indexes[i] = not STRING_BASED_SEQUENCES[first_sequence]
-        end
-
-        highest_index = i - 1
-    else
-        -- a numbered format
-
-        local i = 0
-		while true do
-		    i = i + 1
-			local found_sequence
-            for sequence in pairs(FORMAT_SEQUENCES) do
-				if unpattern:find("%%%%" .. i .. "%%%$" .. sequence) then
-					found_sequence = sequence
-					break
-				end
-			end
-			if not found_sequence then
-				break
-			end
-			unpattern = unpattern:gsub("%%%%" .. i .. "%%%$" .. found_sequence, "(" .. FORMAT_SEQUENCES[found_sequence] .. ")", 1)
-			number_indexes[i] = not STRING_BASED_SEQUENCES[found_sequence]
-		end
-        highest_index = i - 1
-
-		i = 0
-		index_translation = {}
-		pattern:gsub("%%(%d)%$", function(w)
-		    i = i + 1
-		    index_translation[i] = tonumber(w)
-		end)
-    end
-
-    if highest_index == 0 then
-        cache[pattern] = do_nothing
-    else
-        --[=[
-            -- resultant function looks something like this:
-            local unpattern = ...
-            return function(text)
-                local a1, a2 = text:match(unpattern)
-                if not a1 then
-                    return nil, nil
-                end
-                return a1+0, a2
-            end
-
-            -- or if it were a numbered pattern,
-            local unpattern = ...
-            return function(text)
-                local a2, a1 = text:match(unpattern)
-                if not a1 then
-                    return nil, nil
-                end
-                return a1+0, a2
-            end
-        ]=]
-
-        local t = {}
-        t[#t+1] = [=[
-            return function(text)
-                local ]=]
-
-        for i = 1, highest_index do
-            if i ~= 1 then
-                t[#t+1] = ", "
-            end
-            t[#t+1] = "a"
-            if not index_translation then
-                t[#t+1] = i
-            else
-                t[#t+1] = index_translation[i]
-            end
-        end
-
-        t[#t+1] = [=[ = text:match(]=]
-        t[#t+1] = ("%q"):format(unpattern)
-        t[#t+1] = [=[)
-                if not a1 then
-                    return ]=]
-
-        for i = 1, highest_index do
-            if i ~= 1 then
-                t[#t+1] = ", "
-            end
-            t[#t+1] = "nil"
-        end
-
-        t[#t+1] = "\n"
-        t[#t+1] = [=[
-                end
-                ]=]
-
-        t[#t+1] = "return "
-        for i = 1, highest_index do
-            if i ~= 1 then
-                t[#t+1] = ", "
-            end
-            t[#t+1] = "a"
-            t[#t+1] = i
-            if number_indexes[i] then
-                t[#t+1] = "+0"
-            end
-        end
-        t[#t+1] = "\n"
-        t[#t+1] = [=[
-            end
-        ]=]
-
-        t = table.concat(t, "")
-
-        -- print(t)
-
-        cache[pattern] = assert(loadstring(t))()
-    end
-
-    return cache[pattern]
-end
-
---- Return the arguments of the given format string as found in the text.
--- @param text The resultant formatted text.
--- @param pattern The pattern used to create said text.
--- @return a tuple of values, either strings or numbers, based on the pattern.
--- @usage LibDeformat.Deformat("Hello, friend", "Hello, %s") == "friend"
--- @usage LibDeformat.Deformat("Hello, friend", "Hello, %1$s") == "friend"
--- @usage LibDeformat.Deformat("Cost: $100", "Cost: $%d") == 100
--- @usage LibDeformat.Deformat("Cost: $100", "Cost: $%1$d") == 100
--- @usage LibDeformat.Deformat("Alpha, Bravo", "%s, %s") => "Alpha", "Bravo"
--- @usage LibDeformat.Deformat("Alpha, Bravo", "%1$s, %2$s") => "Alpha", "Bravo"
--- @usage LibDeformat.Deformat("Alpha, Bravo", "%2$s, %1$s") => "Bravo", "Alpha"
--- @usage LibDeformat.Deformat("Hello, friend", "Cost: $%d") == nil
--- @usage LibDeformat("Hello, friend", "Hello, %s") == "friend"
-function LibDeformat.Deformat(text, pattern)
-    if type(text) ~= "string" then
-        error(("Argument #1 to `Deformat' must be a string, got %s (%s)."):format(type(text), text), 2)
-    elseif type(pattern) ~= "string" then
-        error(("Argument #2 to `Deformat' must be a string, got %s (%s)."):format(type(pattern), pattern), 2)
-    end
-
-    return get_deformat_function(pattern)(text)
-end
-
---[===[@debug@
-function LibDeformat.Test()
-    local function tuple(success, ...)
-        if success then
-            return true, { n = select('#', ...), ... }
-        else
-            return false, ...
-        end
-    end
-
-    local function check(text, pattern, ...)
-        local success, results = tuple(pcall(LibDeformat.Deformat, text, pattern))
-        if not success then
-            return false, results
-        end
-
-        if select('#', ...) ~= results.n then
-            return false, ("Differing number of return values. Expected: %d. Actual: %d."):format(select('#', ...), results.n)
-        end
-
-        for i = 1, results.n do
-            local expected = select(i, ...)
-            local actual = results[i]
-            if type(expected) ~= type(actual) then
-                return false, ("Return #%d differs by type. Expected: %s (%s). Actual: %s (%s)"):format(type(expected), expected, type(actual), actual)
-            elseif expected ~= actual then
-                return false, ("Return #%d differs. Expected: %s. Actual: %s"):format(expected, actual)
-            end
-        end
-
-        return true
-    end
-
-    local function test(text, pattern, ...)
-        local success, problem = check(text, pattern, ...)
-        if not success then
-            print(("Problem with (%q, %q): %s"):format(text, pattern, problem or ""))
-        end
-    end
-
-    test("Hello, friend", "Hello, %s", "friend")
-    test("Hello, friend", "Hello, %1$s", "friend")
-    test("Cost: $100", "Cost: $%d", 100)
-    test("Cost: $100", "Cost: $%1$d", 100)
-    test("Alpha, Bravo", "%s, %s", "Alpha", "Bravo")
-    test("Alpha, Bravo", "%1$s, %2$s", "Alpha", "Bravo")
-    test("Alpha, Bravo", "%2$s, %1$s", "Bravo", "Alpha")
-    test("Alpha, Bravo, Charlie, Delta, Echo", "%s, %s, %s, %s, %s", "Alpha", "Bravo", "Charlie", "Delta", "Echo")
-    test("Alpha, Bravo, Charlie, Delta, Echo", "%1$s, %2$s, %3$s, %4$s, %5$s", "Alpha", "Bravo", "Charlie", "Delta", "Echo")
-    test("Alpha, Bravo, Charlie, Delta, Echo", "%5$s, %4$s, %3$s, %2$s, %1$s", "Echo", "Delta", "Charlie", "Bravo", "Alpha")
-    test("Alpha, Bravo, Charlie, Delta, Echo", "%2$s, %3$s, %4$s, %5$s, %1$s", "Echo", "Alpha", "Bravo", "Charlie", "Delta")
-    test("Alpha, Bravo, Charlie, Delta, Echo", "%3$s, %4$s, %5$s, %1$s, %2$s", "Delta", "Echo", "Alpha", "Bravo", "Charlie")
-    test("Alpha, Bravo, Charlie, Delta", "%s, %s, %s, %s, %s", nil, nil, nil, nil, nil)
-    test("Hello, friend", "Cost: $%d", nil)
-    print("LibDeformat-3.0: Tests completed.")
-end
---@end-debug@]===]
-
-setmetatable(LibDeformat, { __call = function(self, ...) return self.Deformat(...) end })
\ No newline at end of file
diff --git a/Libs/LibDeformat-3.0/LibDeformat-3.0.toc b/Libs/LibDeformat-3.0/LibDeformat-3.0.toc
deleted file mode 100644
index 08d34c6..0000000
--- a/Libs/LibDeformat-3.0/LibDeformat-3.0.toc
+++ /dev/null
@@ -1,15 +0,0 @@
-## Interface: 30300
-## Title: Lib: Deformat-3.0
-## Notes: A library to convert a post-formatted string back to its original arguments given its format string.
-## Author: ckknight
-## X-eMail: ckknight@gmail.com
-## X-Category: Library
-## X-License: MIT
-## LoadOnDemand: 1
-## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6
-## X-Curse-Project-Name: Jamba
-## X-Curse-Project-ID: jamba
-## X-Curse-Repository-ID: wow/jamba/mainline
-
-LibStub\LibStub.lua
-lib.xml
diff --git a/Libs/LibDeformat-3.0/LibStub/LibStub.lua b/Libs/LibDeformat-3.0/LibStub/LibStub.lua
deleted file mode 100644
index 0a41ac0..0000000
--- a/Libs/LibDeformat-3.0/LibStub/LibStub.lua
+++ /dev/null
@@ -1,30 +0,0 @@
--- 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 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]
-
-if not LibStub or LibStub.minor < LIBSTUB_MINOR then
-	LibStub = LibStub or {libs = {}, minors = {} }
-	_G[LIBSTUB_MAJOR] = LibStub
-	LibStub.minor = LIBSTUB_MINOR
-
-	function LibStub:NewLibrary(major, minor)
-		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
-		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
-
-		local oldminor = self.minors[major]
-		if oldminor and oldminor >= minor then return nil end
-		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
-		return self.libs[major], oldminor
-	end
-
-	function LibStub:GetLibrary(major, silent)
-		if not self.libs[major] and not silent then
-			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
-		end
-		return self.libs[major], self.minors[major]
-	end
-
-	function LibStub:IterateLibraries() return pairs(self.libs) end
-	setmetatable(LibStub, { __call = LibStub.GetLibrary })
-end
diff --git a/Libs/LibDeformat-3.0/lib.xml b/Libs/LibDeformat-3.0/lib.xml
deleted file mode 100644
index cf6abae..0000000
--- a/Libs/LibDeformat-3.0/lib.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="LibDeformat-3.0.lua" />
-</Ui>
\ No newline at end of file
diff --git a/Libs/LibItemUpgradeInfo-1.0/CHANGES.txt b/Libs/LibItemUpgradeInfo-1.0/CHANGES.txt
deleted file mode 100644
index 340f8e4..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/CHANGES.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-tag 5876ed6c59ef3d2568d88b9bba9ec77682e6074e Release-70200-28
-Author:	Alar of Runetotem <alar@aspide.it>
-Date:	Tue Mar 28 12:21:53 2017 +0200
-
-Toc updated to 70200
-
-commit 7c5485ab35700b2e38a008feb84e4af34b7396f0
-Author: Alar of Runetotem <alar@aspide.it>
-Date:   Tue Mar 28 12:07:53 2017 +0200
-
-    Updated TOC to 70200
-
-commit c4ed50190aad123c1297705da7f38c86f7ab1d10
-Author: Alar of Runetotem <alar@aspide.it>
-Date:   Tue Mar 28 11:30:56 2017 +0200
-
-    toc update
-
diff --git a/Libs/LibItemUpgradeInfo-1.0/Core.lua b/Libs/LibItemUpgradeInfo-1.0/Core.lua
deleted file mode 100644
index 422fc3e..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/Core.lua
+++ /dev/null
@@ -1,654 +0,0 @@
-local MAJOR, MINOR = "LibItemUpgradeInfo-1.0", 28
-local type,tonumber,select,strsplit,GetItemInfoFromHyperlink=type,tonumber,select,strsplit,GetItemInfoFromHyperlink
-local library,previous = _G.LibStub:NewLibrary(MAJOR, MINOR)
-local lib=library --#lib Needed to keep Eclipse LDT happy
-if not lib then return end
-local pp=print
---[===[@debug@
-LoadAddOn("Blizzard_DebugTools")
-LoadAddOn("LibDebug")
-if LibDebug then LibDebug() end
---@end-debug@]===]
---@non-debug@
-local print=function() end
---@end-non-debug@
---[[
-Caching system
-1	itemName	String	The name of the item.
-2	itemLink	String	The item link of the item.
-3	itemRarity	Number	The quality of the item. The value is 0 to 7, which represents Poor to Heirloom. This appears to include gains from upgrades/bonuses.
-4	itemLevel	Number	The item level of this item, not including item levels gained from upgrades. There is currently no API to get the item level including upgrades/bonuses.
-5	itemMinLevel	Number	The minimum level required to use the item, 0 meaning no level requirement.
-6	itemType	String	The type of the item: Armor, Weapon, Quest, Key, etc. (localized)
-7	itemSubType	String	The sub-type of the item: Enchanting, Cloth, Sword, etc. See itemType. (localized)
-8	itemStackCount	Number	How many of the item per stack: 20 for Runecloth, 1 for weapon, 100 for Alterac Ram Hide, etc.
-9	itemEquipLoc	String	The type of inventory equipment location in which the item may be equipped, or "" if it can't be equippable. The string returned is also the name of a global string variable e.g. if "INVTYPE_WEAPONMAINHAND" is returned, _G["INVTYPE_WEAPONMAINHAND"] will be the localized, displayable name of the location.
-10	iconFileDataID	Number	The FileDataID for the icon texture for the item.
-11	itemSellPrice	Number	The price, in copper, a vendor is willing to pay for this item, 0 for items that cannot be sold.
-12	itemClassID	Number	This is the numerical value that determines the string to display for 'itemType'.
-13	itemSubClassID	Number	This is the numerical value that determines the string to display for 'itemSubType'
-14 ? number
-15 expansionId
-16 ? ?
-17 ? boolean
---]]
--- ItemLink Constants
-local i_Name=1
-local i_Link=2
-local i_Rarity=3
-local i_Quality=3
-local i_Level=4
-local i_MinLevel =5
-local i_ClassName=6
-local i_SubClassName=7
-local i_StackCount=8
-local i_EquipLoc=9
-local i_TextureId=10
-local i_SellPrice=11
-local i_ClassID=12
-local i_SubClass_ID=13
-local i_unk1=14
-local i_unk2=15
-local i_unk3=16
-local i_unk4=17
-
-
-do
-local oGetItemInfo=GetItemInfo
-lib.itemcache=lib.itemcache or
-	setmetatable({miss=0,tot=0},{
-		__index=function(table,key)
-			if (not key) then return "" end
-			if (key=="miss") then return 0 end
-			if (key=="tot") then return 0 end
-			local cached={oGetItemInfo(key)}
-			if #cached==0 then return nil end
-			local itemLink=cached[2]
-			if not itemLink then return nil end
-			local itemID=lib:GetItemID(itemLink)
-			local quality=cached[3]
-			local cacheIt=true
-			if quality==LE_ITEM_QUALITY_ARTIFACT then
-				local relic1, relic2, relic3 = select(4,strsplit(':', itemLink))
-				if relic1 and relic1 ~= '' and not oGetItemInfo(relic1) then cacheIt = false end
-				if relic2 and relic2 ~= '' and not oGetItemInfo(relic2) then cacheIt = false end
-				if relic3 and relic3 ~= '' and not oGetItemInfo(relic3) then cacheIt = false end
-			end
-			cached.englishClass=GetItemClassInfo(cached[12])
-			cached.englishSubClass=GetItemSubClassInfo(cached[12],cached[13])
-			if cacheIt then
-				rawset(table,key,cached)
-			end
-			table.miss=table.miss+1
-			return cached
-		end
-
-	})
-end
-local cache,select,unpack=lib.itemcache,select,unpack
-local	function CachedGetItemInfo(key,index)
-	if not key then return nil end
-	index=index or 1
-	cache.tot=cache.tot+1
-	local cached=cache[key]
-	if cached and type(cached)=='table' then
-		return select(index,unpack(cached))
-	else
-		rawset(cache,key,nil) -- voiding broken cache entry
-	end
-end
-
-local upgradeTable = {
-	[  1] = { upgrade = 1, max = 1, ilevel = 8 },
-	[373] = { upgrade = 1, max = 3, ilevel = 4 },
-	[374] = { upgrade = 2, max = 3, ilevel = 8 },
-	[375] = { upgrade = 1, max = 3, ilevel = 4 },
-	[376] = { upgrade = 2, max = 3, ilevel = 4 },
-	[377] = { upgrade = 3, max = 3, ilevel = 4 },
-	[378] = {                       ilevel = 7 },
-	[379] = { upgrade = 1, max = 2, ilevel = 4 },
-	[380] = { upgrade = 2, max = 2, ilevel = 4 },
-	[445] = { upgrade = 0, max = 2, ilevel = 0 },
-	[446] = { upgrade = 1, max = 2, ilevel = 4 },
-	[447] = { upgrade = 2, max = 2, ilevel = 8 },
-	[451] = { upgrade = 0, max = 1, ilevel = 0 },
-	[452] = { upgrade = 1, max = 1, ilevel = 8 },
-	[453] = { upgrade = 0, max = 2, ilevel = 0 },
-	[454] = { upgrade = 1, max = 2, ilevel = 4 },
-	[455] = { upgrade = 2, max = 2, ilevel = 8 },
-	[456] = { upgrade = 0, max = 1, ilevel = 0 },
-	[457] = { upgrade = 1, max = 1, ilevel = 8 },
-	[458] = { upgrade = 0, max = 4, ilevel = 0 },
-	[459] = { upgrade = 1, max = 4, ilevel = 4 },
-	[460] = { upgrade = 2, max = 4, ilevel = 8 },
-	[461] = { upgrade = 3, max = 4, ilevel = 12 },
-	[462] = { upgrade = 4, max = 4, ilevel = 16 },
-	[465] = { upgrade = 0, max = 2, ilevel = 0 },
-	[466] = { upgrade = 1, max = 2, ilevel = 4 },
-	[467] = { upgrade = 2, max = 2, ilevel = 8 },
-	[468] = { upgrade = 0, max = 4, ilevel = 0 },
-	[469] = { upgrade = 1, max = 4, ilevel = 4 },
-	[470] = { upgrade = 2, max = 4, ilevel = 8 },
-	[471] = { upgrade = 3, max = 4, ilevel = 12 },
-	[472] = { upgrade = 4, max = 4, ilevel = 16 },
-	[491] = { upgrade = 0, max = 4, ilevel = 0 },
-	[492] = { upgrade = 1, max = 4, ilevel = 4 },
-	[493] = { upgrade = 2, max = 4, ilevel = 8 },
-	[494] = { upgrade = 0, max = 6, ilevel = 0 },
-	[495] = { upgrade = 1, max = 6, ilevel = 4 },
-	[496] = { upgrade = 2, max = 6, ilevel = 8 },
-	[497] = { upgrade = 3, max = 6, ilevel = 12 },
-	[498] = { upgrade = 4, max = 6, ilevel = 16 },
-	[503] = { upgrade = 3, max = 3, ilevel = 1 },
-	[504] = { upgrade = 3, max = 4, ilevel = 12 },
-	[505] = { upgrade = 4, max = 4, ilevel = 16 },
-	[506] = { upgrade = 5, max = 6, ilevel = 20 },
-	[507] = { upgrade = 6, max = 6, ilevel = 24 },
-	[529] = { upgrade = 0, max = 2, ilevel = 0 },
-	[530] = { upgrade = 1, max = 2, ilevel = 5 },
-	[531] = { upgrade = 2, max = 2, ilevel = 10 },
-	[535] = { upgrade = 1, max = 3, ilevel = 15 },
-	[536] = { upgrade = 2, max = 3, ilevel = 30 },
-	[537] = { upgrade = 3, max = 3, ilevel = 45 },
-	[538] = { upgrade = 0, max = 3, ilevel = 0 },
-
-}
-do
-	local stub = { ilevel = 0 }
-	setmetatable(upgradeTable, { __index = function(t, key)
-		return stub
-	end})
-end
--- Tooltip Scanning stuff
-local itemLevelPattern = _G.ITEM_LEVEL:gsub("%%d", "(%%d+)")
-local soulboundPattern = _G.ITEM_SOULBOUND
-local boePattern=_G.ITEM_BIND_ON_EQUIP
-local bopPattern=_G.ITEM_BIND_ON_PICKUP
-local boaPattern1=_G.ITEM_BIND_TO_BNETACCOUNT
-local boaPattern2=_G.ITEM_BNETACCOUNTBOUND
-
-local scanningTooltip
-local anchor
-local tipCache = lib.tipCache or setmetatable({},{__index=function(table,key) return {} end})
-local emptytable={}
-
-local function ScanTip(itemLink,itemLevel,show)
-	if type(itemLink)=="number" then
-		itemLink=CachedGetItemInfo(itemLink,2)
-		if not itemLink then return emptytable end
-	end
-	if type(tipCache[itemLink].ilevel)=="nil"then -- or not tipCache[itemLink].cached then
-		local cacheIt=true
-		if not scanningTooltip then
-			anchor=CreateFrame("Frame")
-			anchor:Hide()
-			scanningTooltip = _G.CreateFrame("GameTooltip", "LibItemUpgradeInfoTooltip", nil, "GameTooltipTemplate")
-		end
-		--scanningTooltip:ClearLines()
-		GameTooltip_SetDefaultAnchor(scanningTooltip,anchor)
-		local itemString=itemLink:match("|H(.-)|h")
-		local rc,message=pcall(scanningTooltip.SetHyperlink,scanningTooltip,itemString)
-		if (not rc) then
-			return emptytable
-		end
-		scanningTooltip:Show()
-		local quality,_,_,class,subclass,_,_,_,_,classIndex,subclassIndex=CachedGetItemInfo(itemLink,3)
-
-		-- line 1 is the item name
-		-- line 2 may be the item level, or it may be a modifier like "Heroic"
-		-- check up to line 6 just in case
-		local ilevel,soulbound,bop,boe,boa,heirloom
-		if quality==LE_ITEM_QUALITY_ARTIFACT and itemLevel then
-			local relic1, relic2, relic3 = select(4,strsplit(':', itemLink))
-			if relic1 and relic1 ~= '' and not CachedGetItemInfo(relic1) then cacheIt = false end
-			if relic2 and relic2 ~= '' and not CachedGetItemInfo(relic2) then cacheIt = false end
-			if relic3 and relic3 ~= '' and not CachedGetItemInfo(relic3) then cacheIt = false end
-			ilevel=itemLevel
-		end
-		if show then
-			for i=1,12 do
-				local l, ltext = _G["LibItemUpgradeInfoTooltipTextLeft"..i], nil
-				local r, rtext  = _G["LibItemUpgradeInfoTooltipTextRight"..i], nil
-				ltext=l:GetText()
-				rtext=r:GetText()
-				pp(i,ltext,' - ',rtext)
-			end
-		end
-		for i = 2, 6 do
-			local label, text = _G["LibItemUpgradeInfoTooltipTextLeft"..i], nil
-			if label then text=label:GetText() end
-			if text then
-				if ilevel==nil then ilevel = tonumber(text:match(itemLevelPattern)) end
-				if soulbound==nil then soulbound = text:find(soulboundPattern) end
-				if bop==nil then bop = text:find(bopPattern) end
-				if boe==nil then boe = text:find(boePattern) end
-				if boa==nil then boa = text:find(boaPattern1) end
-				if boa==nil then boa = text:find(boaPattern2) end
-			end
-		end
-		tipCache[itemLink]={
-			ilevel=ilevel or itemLevel,
-			soulbound=soulbound,
-			bop=bop,
-			boe=boe,
-			cached=cacheIt
-		}
-		scanningTooltip:Hide()
-	end
-	return tipCache[itemLink]
-end
-
-
--- GetUpgradeID(itemString)
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns:
---   Number - The upgrade ID (possibly 0), or nil if the input is invalid or
---            does not contain upgrade info
-function lib:GetUpgradeID(itemString)
-	if type(itemString)~="string" then return end
-	local itemString = itemString:match("item[%-?%d:]+") or ""-- Standardize itemlink to itemstring
-	local instaid, _, numBonuses, affixes = select(12, strsplit(":", itemString, 15))
-	instaid=tonumber(instaid) or 7
-	numBonuses=tonumber(numBonuses) or 0
-	if instaid >0 and (instaid-4)%8==0 then
-		return tonumber((select(numBonuses + 1, strsplit(":", affixes))))
-	end
-end
-
--- GetCurrentUpgrade(id)
---
--- Returns the current upgrade level of the item, e.g. 1 for a 1/2 item.
---
--- Arguments:
---   id - Number - The upgrade ID of the item (obtained via GetUpgradeID())
---
--- Returns:
---   Number - The current upgrade level of the item. Returns nil if the item
---            cannot be upgraded
-function lib:GetCurrentUpgrade(id)
-	return upgradeTable[id].upgrade
-end
-
--- GetMaximumUpgrade(id)
---
--- Returns the maximum upgrade level of the item, e.g. 2 for a 1/2 item.
---
--- Arguments:
---   id - Number - The upgrade ID of the item (obtained via GetUpgradeID())
---
--- Returns:
---   Number - The maximum upgrade level of the item. Returns nil if the item
---            cannot be upgraded
-function lib:GetMaximumUpgrade(id)
-	return upgradeTable[id].max
-end
-
--- GetItemLevelUpgrade(id)
---
--- Returns the item level increase that this upgrade is worth, e.g. 4 for a
--- 1/2 item or 8 for a 2/2 item.
---
--- Arguments:
---   id - Number - The upgrade ID of the item (obtained via GetUpgradeID())
---
--- Returns:
---   Number - The item level increase of the item. Returns 0 if the item
---            cannot be or has not been upgraded
-function lib:GetItemLevelUpgrade(id)
-	return upgradeTable[id].ilevel
-end
-
--- GetItemUpgradeInfo(itemString)
---
--- Returns the current upgrade level, maximum upgrade level, and item level
--- increase for an item.
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns if the item can be upgraded:
---   Number - The current upgrade level of the item
---   Number - The maximum upgrade level of the item
---   Number - The item level increase of the item
--- or if the item cannot be upgraded:
---   nil
---   nil
---   0
--- or if the item is invalid or does not contain upgrade info:
---   nil
-function lib:GetItemUpgradeInfo(itemString)
-	local id = self:GetUpgradeID(itemString)
-	if id then
-		local cur = self:GetCurrentUpgrade(id)
-		local max = self:GetMaximumUpgrade(id)
-		local delta = self:GetItemLevelUpgrade(id)
-		return cur, max, delta
-	end
-	return nil
-end
-
--- GetHeirloomTrueLevel(itemString)
---
--- Returns the true item level for an heirloom (actually, returns the true level for any adapting item)
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns:
---   Number, Boolean - The true item level of the item. If the item is not
---                     an heirloom, or an error occurs when trying to scan the
---                     item tooltip, the second return value is false. Otherwise
---                     the second return value is true. If the input is invalid,
---                     (nil, false) is returned.
--- Convert the ITEM_LEVEL constant into a pattern for our use
-function lib:GetHeirloomTrueLevel(itemString)
-	if type(itemString) ~= "string" then return nil,false end
-	local _, itemLink, rarity, itemLevel = CachedGetItemInfo(itemString)
-	if (not itemLink) then
-		return nil,false
-	end
-	local rc=ScanTip(itemLink,itemLevel)
-	if rc.ilevel then
-		return rc.ilevel,true
-	end
-	return itemLevel, false
-end
-
--- GetUpgradedItemLevel(itemString)
---
--- Returns the true item level of the item, including upgrades and heirlooms.
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns:
---   Number - The true item level of the item, or nil if the input is invalid
-function lib:GetUpgradedItemLevel(itemString)
-	-- check for heirlooms first
-	local ilvl, isTrue = self:GetHeirloomTrueLevel(itemString)
-	if isTrue then
-		return ilvl
-	end
-	-- not an heirloom? fall back to the regular item logic
-	local id = self:GetUpgradeID(itemString)
-	if ilvl and id then
-		ilvl = ilvl + self:GetItemLevelUpgrade(id)
-	end
-	return ilvl
-end
-
--- IsBop(itemString)
---
--- Check an item for  Bind On Pickup.
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns:
---   Boolean - True if Bind On Pickup
-
-function lib:IsBop(itemString)
-	local rc=ScanTip(itemString)
-	return rc.bop
-end
--- IsBoe(itemString)
---
--- Check an item for  Bind On Equip.
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns:
---   Boolean - True if Bind On Equip
-
-function lib:IsBoe(itemString)
-	local rc=ScanTip(itemString)
-	return rc.boe
-end
--- IsBoa(itemString)
---
--- Check an item for  Bind On Aaccount
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns:
---   Boolean - True if Bind On Equip
-
-function lib:IsBoa(itemString)
-	local rc=ScanTip(itemString)
-	return rc.boa
-end
-
--- IsArtifact(itemString)
---
--- Check an item for  Heirloom
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns:
---   Boolean - True if Artifact
-
-function lib:IsArtifact(itemString)
-	return CachedGetItemInfo(itemString,i_Quality)==LE_ITEM_QUALITY_ARTIFACT
-end
-
--- GetClassInfoIsHeirloom(itemString)
---
--- Retrieve class and subclass
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns:
---   class,subclass
-
-
-function lib:GetClassInfo(itemString)
-	local rc=ScantTip(itemString)
-	return rc.class,rc.subclass
-end
-
-
--- IsHeirloom(itemString)
---
--- Check an item for  Heirloom
---
--- Arguments:
---   itemString - String - An itemLink or itemString denoting the item
---
--- Returns:
---   Boolean - True if Heirloom
-
-function lib:IsHeirloom(itemString)
-	return CachedGetItemInfo(itemString,i_Quality) ==LE_ITEM_QUALITY_HEIRLOOM
-end
----
--- Parses an itemlink and returns itemId without calling API again
--- @param #lib self
--- @param #string itemlink
--- @return #number itemId or 0
-function lib:GetItemID(itemlink)
-	if (type(itemlink)=="string") then
-			local itemid,context=GetItemInfoFromHyperlink(itemlink)
-			return tonumber(itemid) or 0
-			--return tonumber(itemlink:match("Hitem:(%d+):")) or 0
-	else
-			return 0
-	end
-end
-
----
---
--- Returns a caching version of GetItemInfo. Can be used to override the original one.
--- Adds a second parameter to directly retrieving a specific value
--- (Note: internally uses select so it's actually like calling select(n,GetItemInfo(itemID))
---
--- Arguments:
---   self #lib self
---
--- Returns:
---   #function The new function
-
---@do-not-package--
-function lib:ScanTip(itemLink)
-	local GameTooltip=LibItemUpgradeInfoTooltip
-	if GameTooltip then
-		GameTooltip_SetDefaultAnchor(GameTooltip, UIParent)
-		GameTooltip:SetHyperlink(itemLink)
-		GameTooltip:Show()
-	end
-	return ScanTip(itemLink,100,true)
-end
-function lib:GetCachingGetItemInfo()
-	return CachedGetItemInfo
-end
-function lib:GetCacheStats()
-	local c=lib.itemcache
-	local h=c.tot-c.miss
-	local perc=( h>0) and h/c.tot*100 or 0
-	return c.miss,h,perc
-end
-function lib:GetCache()
-	return lib.itemcache
-end
-function lib:CleanCache()
-	return wipe(lib.itemcache)
-end
-
---[===========[ ]===========]
---[===[ Debug utilities ]===]
---[===========[ ]===========]
-
-local function compareTables(t1, t2)
-	local seen = {}
-	for k, v1 in pairs(t1) do
-		seen[k] = true
-		local v2 = rawget(t2, k)
-		if not v2 then return false end
-		if type(v1) ~= type(v2) then return false end
-		if type(v1) == "table" then
-			if not compareTables(v1, v2) then return false end
-		elseif v1 ~= v2 then return false end
-	end
-	for k in pairs(t2) do
-		if not seen[k] then return false end
-	end
-	return true
-end
-
--- prints the table rows in red and green
--- omits the lead { and the trailing }
-local function printDiffTable(t1, t2)
-	local keys, seen = {}, {}
-	for k in pairs(t1) do
-		keys[#keys+1] = k
-		seen[k] = true
-	end
-	for k in pairs(t2) do
-		if not seen[k] then
-			keys[#keys+1] = k
-		end
-	end
-	table.sort(keys)
-	local function formatTable(t)
-		local comps = {}
-		for k, v in pairs(t) do
-			comps[#comps+1] = ("%s = %d"):format(k, v)
-		end
-		return "{ " .. table.concat(comps, ", ") .. " }"
-	end
-	for _, k in ipairs(keys) do
-		local v1, v2 = rawget(t1, k), rawget(t2, k)
-		local equal
-		if type(v1) == "table" and type(v2) == "table" then equal = compareTables(v1, v2)
-		else equal = v1 == v2 end
-		if not equal then
-			if v1 then
-				pp(("|cffff0000    [%d] = %s,|r"):format(k, formatTable(v1)))
-			end
-			if v2 then
-				pp(("|cff00ff00    [%d] = %s,|r"):format(k, formatTable(v2)))
-			end
-		end
-	end
-end
-
--- Scans the first 10000 upgrade IDs
--- Run this with /run LibStub:GetLibrary("LibItemUpgradeInfo-1.0"):_CheckUpgradeTable()
--- If you don't have Aspirant's Staff of Harmony cached it may error out, just try again.
-do
-	local debugFrame
-	local worker
-	local newTable
-	local debugTooltip
-	function lib:_CheckUpgradeTable(itemLink)
-		if worker then
-			pp("|cffff0000LibItemUpgradeInfo-1.0: upgrade check already in progress")
-			return
-		end
-		if not debugFrame then
-			debugFrame = _G.CreateFrame("frame")
-			debugFrame:Hide()
-			debugFrame:SetScript("OnUpdate", function()
-				local ok, result, count, max = pcall(worker)
-				if not ok or result then
-					debugFrame:Hide()
-					worker = nil
-				end
-				if not ok then
-					pp("|cffff0000LibItemUpgradeInfo-1.0 error: " .. result .. "|r")
-				elseif result then
-					pp("LibItemUpgradeInfo-1.0: scan complete")
-					if compareTables(upgradeTable, newTable) then
-						pp("LibItemUpgradeInfo-1.0: |cff00ff00No changes|r")
-					else
-						pp("LibItemUpgradeInfo-1.0: |cffff0000New table:|r {")
-						printDiffTable(upgradeTable, newTable)
-						pp("}")
-					end
-				else
-					pp("LibItemUpgradeInfo-1.0: scanning " .. count .. "/" .. max)
-				end
-			end)
-		end
-		if not debugTooltip then
-			debugTooltip = _G.CreateFrame("GameTooltip", "LibItemUpgradeInfoDebugTooltip", nil, "GameTooltipTemplate")
-			debugTooltip:SetOwner(_G.WorldFrame, "ANCHOR_NONE")
-		end
-		newTable = {}
-		--local itemLink = "|cff0070dd|Hitem:89551:0:0:0:0:0:0:0:90:253:0:0:1:0|h[Aspirant's Staff of Harmony]|h|r"
-		local itemLink = itemLink or "|cff0070dd|Hitem:89551:0:0:0:0:0:0:0:100:253:4:0:0:0|h[Aspirant's Staff of Harmony]|h|r"
--- Livello è il 9,upgradeid il 14. Al decimo posto, un valore che deve essere 4 o 4+n *8) per far scattare l'uso dell'upgradeid
-		local itemLevel = select(4, _G.GetItemInfo(itemLink))
-		assert(itemLevel, "Can't find item level for itemLink")
-		local count, max, batchsize = 0, 10000, 200
-		worker = function()
-			for i = count, math.min(max, count+batchsize) do
-				local link = itemLink:gsub("%d+|h", i.."|h")
-				debugTooltip:ClearLines()
-				debugTooltip:SetHyperlink(link)
-				local upgrade, max
-				local curLevel, maxLevel = _G.LibItemUpgradeInfoDebugTooltipTextLeft3:GetText():match("^Upgrade Level: (%d+)/(%d+)")
-				local ilvl = tonumber(_G.LibItemUpgradeInfoDebugTooltipTextLeft2:GetText():match("Item Level (%d+)"))
-				if not ilvl then
-					ilvl = tonumber(_G.LibItemUpgradeInfoDebugTooltipTextLeft3:GetText():match("Item Level (%d+)"))
-				end
-				assert(ilvl ~= nil, "Can't find ItemLevel in tooltip: " .. _G.LibItemUpgradeInfoDebugTooltipTextLeft2:GetText())
-				if curLevel or maxLevel or ilvl ~= itemLevel then
-					newTable[i] = { upgrade = tonumber(curLevel), max = tonumber(maxLevel), ilevel = ilvl - itemLevel }
-				end
-			end
-			count = count + batchsize
-			return (count > max), count, max
-		end
-		debugFrame:Show()
-	end
-end
---@end-do-not-package--
-
--- vim: set noet sw=4 ts=4:
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc b/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc
deleted file mode 100644
index c8552d8..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc
+++ /dev/null
@@ -1,9 +0,0 @@
-## Interface: 70200
-## Title: Lib: ItemUpgradeInfo-1.0
-## Notes: Database of item upgrade IDs
-## Author: eridius
-## Version: Release-70200-28 70200
-## X-Revision: 7c5485a
-## X-Category: Library
-
-LibItemUpgradeInfo-1.0.xml
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.xml b/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.xml
deleted file mode 100644
index 49934ad..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
-	<Script file="LibStub\LibStub.lua"/>
-	<Script file="Core.lua"/>
-</Ui>
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.lua b/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.lua
deleted file mode 100644
index ae1900e..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.lua
+++ /dev/null
@@ -1,51 +0,0 @@
--- $Id: LibStub.lua 76 2007-09-03 01:50:17Z mikk $
--- 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 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]
-
--- Check to see is this version of the stub is obsolete
-if not LibStub or LibStub.minor < LIBSTUB_MINOR then
-	LibStub = LibStub or {libs = {}, minors = {} }
-	_G[LIBSTUB_MAJOR] = LibStub
-	LibStub.minor = LIBSTUB_MINOR
-
-	-- LibStub:NewLibrary(major, minor)
-	-- major (string) - the major version of the library
-	-- minor (string or number ) - the minor version of the library
-	--
-	-- returns nil if a newer or same version of the lib is already present
-	-- returns empty library object or old library object if upgrade is needed
-	function LibStub:NewLibrary(major, minor)
-		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
-		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
-
-		local oldminor = self.minors[major]
-		if oldminor and oldminor >= minor then return nil end
-		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
-		return self.libs[major], oldminor
-	end
-
-	-- LibStub:GetLibrary(major, [silent])
-	-- major (string) - the major version of the library
-	-- silent (boolean) - if true, library is optional, silently return nil if its not found
-	--
-	-- throws an error if the library can not be found (except silent is set)
-	-- returns the library object if found
-	function LibStub:GetLibrary(major, silent)
-		if not self.libs[major] and not silent then
-			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
-		end
-		return self.libs[major], self.minors[major]
-	end
-
-	-- LibStub:IterateLibraries()
-	--
-	-- Returns an iterator for the currently registered libraries
-	function LibStub:IterateLibraries()
-		return pairs(self.libs)
-	end
-
-	setmetatable(LibStub, { __call = LibStub.GetLibrary })
-end
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc b/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc
deleted file mode 100644
index ef0b412..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc
+++ /dev/null
@@ -1,9 +0,0 @@
-## Interface: 70200
-## Title: Lib: LibStub
-## Notes: Universal Library Stub
-## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
-## X-Website: http://www.wowace.com/addons/libstub/
-## X-Category: Library
-## X-License: Public Domain
-
-LibStub.lua
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua
deleted file mode 100644
index 338bcf4..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-debugstack = debug.traceback
-strmatch = string.match
-
-loadfile("../LibStub.lua")()
-
-local lib, oldMinor = LibStub:NewLibrary("Pants", 1) -- make a new thingy
-assert(lib) -- should return the library table
-assert(not oldMinor) -- should not return the old minor, since it didn't exist
-
--- the following is to create data and then be able to check if the same data exists after the fact
-function lib:MyMethod()
-end
-local MyMethod = lib.MyMethod
-lib.MyTable = {}
-local MyTable = lib.MyTable
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", 1) -- try to register a library with the same version, should silently fail
-assert(not newLib) -- should not return since out of date
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", 0) -- try to register a library with a previous, should silently fail
-assert(not newLib) -- should not return since out of date
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", 2) -- register a new version
-assert(newLib) -- library table
-assert(rawequal(newLib, lib)) -- should be the same reference as the previous
-assert(newOldMinor == 1) -- should return the minor version of the previous version
-
-assert(rawequal(lib.MyMethod, MyMethod)) -- verify that values were saved
-assert(rawequal(lib.MyTable, MyTable)) -- verify that values were saved
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 3 Blah") -- register a new version with a string minor version (instead of a number)
-assert(newLib) -- library table
-assert(newOldMinor == 2) -- previous version was 2
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", "Blah 4 and please ignore 15 Blah") -- register a new version with a string minor version (instead of a number)
-assert(newLib)
-assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string)
-
-local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
-assert(newLib)
-assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test2.lua b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test2.lua
deleted file mode 100644
index eae7172..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test2.lua
+++ /dev/null
@@ -1,27 +0,0 @@
-debugstack = debug.traceback
-strmatch = string.match
-
-loadfile("../LibStub.lua")()
-
-for major, library in LibStub:IterateLibraries() do
-	-- check that MyLib doesn't exist yet, by iterating through all the libraries
-	assert(major ~= "MyLib")
-end
-
-assert(not LibStub:GetLibrary("MyLib", true)) -- check that MyLib doesn't exist yet by direct checking
-assert(not pcall(LibStub.GetLibrary, LibStub, "MyLib")) -- don't silently fail, thus it should raise an error.
-local lib = LibStub:NewLibrary("MyLib", 1) -- create the lib
-assert(lib) -- check it exists
-assert(rawequal(LibStub:GetLibrary("MyLib"), lib)) -- verify that :GetLibrary("MyLib") properly equals the lib reference
-
-assert(LibStub:NewLibrary("MyLib", 2))	-- create a new version
-
-local count=0
-for major, library in LibStub:IterateLibraries() do
-	-- check that MyLib exists somewhere in the libraries, by iterating through all the libraries
-	if major == "MyLib" then -- we found it!
-		count = count +1
-		assert(rawequal(library, lib)) -- verify that the references are equal
-	end
-end
-assert(count == 1) -- verify that we actually found it, and only once
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua
deleted file mode 100644
index 21bda2b..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua
+++ /dev/null
@@ -1,14 +0,0 @@
-debugstack = debug.traceback
-strmatch = string.match
-
-loadfile("../LibStub.lua")()
-
-local proxy = newproxy() -- non-string
-
-assert(not pcall(LibStub.NewLibrary, LibStub, proxy, 1)) -- should error, proxy is not a string, it's userdata
-local success, ret = pcall(LibStub.GetLibrary, proxy, true)
-assert(not success or not ret) -- either error because proxy is not a string or because it's not actually registered.
-
-assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
-
-assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua
deleted file mode 100644
index 4735246..0000000
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-debugstack = debug.traceback
-strmatch = string.match
-
-loadfile("../LibStub.lua")()
-
-
--- Pretend like loaded libstub is old and doesn't have :IterateLibraries
-assert(LibStub.minor)
-LibStub.minor = LibStub.minor - 0.0001
-LibStub.IterateLibraries = nil
-
-loadfile("../LibStub.lua")()
-
-assert(type(LibStub.IterateLibraries)=="function")
-
-
--- Now pretend that we're the same version -- :IterateLibraries should NOT be re-created
-LibStub.IterateLibraries = 123
-
-loadfile("../LibStub.lua")()
-
-assert(LibStub.IterateLibraries == 123)
-
-
--- Now pretend that a newer version is loaded -- :IterateLibraries should NOT be re-created
-LibStub.minor = LibStub.minor + 0.0001
-
-loadfile("../LibStub.lua")()
-
-assert(LibStub.IterateLibraries == 123)
-
-
--- Again with a huge number
-LibStub.minor = LibStub.minor + 1234567890
-
-loadfile("../LibStub.lua")()
-
-assert(LibStub.IterateLibraries == 123)
-
-
-print("OK")
diff --git a/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua b/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
deleted file mode 100644
index 949db48..0000000
--- a/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
+++ /dev/null
@@ -1,274 +0,0 @@
---[[
-Name: LibSharedMedia-3.0
-Revision: $Revision: 74 $
-Author: Elkano (elkano@gmx.de)
-Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
-Website: http://www.wowace.com/projects/libsharedmedia-3-0/
-Description: Shared handling of media data (fonts, sounds, textures, ...) between addons.
-Dependencies: LibStub, CallbackHandler-1.0
-License: LGPL v2.1
-]]
-
-local MAJOR, MINOR = "LibSharedMedia-3.0", 5000402 -- 5.0.4 v2 / increase manually on changes
-local lib = LibStub:NewLibrary(MAJOR, MINOR)
-
-if not lib then return end
-
-local _G = getfenv(0)
-
-local pairs		= _G.pairs
-local type		= _G.type
-
-local band			= _G.bit.band
-
-local table_insert	= _G.table.insert
-local table_sort	= _G.table.sort
-
-local locale = GetLocale()
-local locale_is_western
-local LOCALE_MASK = 0
-lib.LOCALE_BIT_koKR		= 1
-lib.LOCALE_BIT_ruRU		= 2
-lib.LOCALE_BIT_zhCN		= 4
-lib.LOCALE_BIT_zhTW		= 8
-lib.LOCALE_BIT_western	= 128
-
-local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
-
-lib.callbacks		= lib.callbacks			or CallbackHandler:New(lib)
-
-lib.DefaultMedia	= lib.DefaultMedia		or {}
-lib.MediaList		= lib.MediaList			or {}
-lib.MediaTable		= lib.MediaTable		or {}
-lib.MediaType		= lib.MediaType			or {}
-lib.OverrideMedia	= lib.OverrideMedia		or {}
-
-local defaultMedia = lib.DefaultMedia
-local mediaList = lib.MediaList
-local mediaTable = lib.MediaTable
-local overrideMedia = lib.OverrideMedia
-
-
--- create mediatype constants
-lib.MediaType.BACKGROUND	= "background"			-- background textures
-lib.MediaType.BORDER		= "border"				-- border textures
-lib.MediaType.FONT			= "font"				-- fonts
-lib.MediaType.STATUSBAR		= "statusbar"			-- statusbar textures
-lib.MediaType.SOUND			= "sound"				-- sound files
-
--- populate lib with default Blizzard data
--- BACKGROUND
-if not lib.MediaTable.background then lib.MediaTable.background = {} end
-lib.MediaTable.background["None"]									= [[]]
-lib.MediaTable.background["Blizzard Dialog Background"]				= [[Interface\DialogFrame\UI-DialogBox-Background]]
-lib.MediaTable.background["Blizzard Dialog Background Dark"]		= [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
-lib.MediaTable.background["Blizzard Dialog Background Gold"]		= [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
-lib.MediaTable.background["Blizzard Low Health"]					= [[Interface\FullScreenTextures\LowHealth]]
-lib.MediaTable.background["Blizzard Marble"]						= [[Interface\FrameGeneral\UI-Background-Marble]]
-lib.MediaTable.background["Blizzard Out of Control"]				= [[Interface\FullScreenTextures\OutOfControl]]
-lib.MediaTable.background["Blizzard Parchment"]						= [[Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal]]
-lib.MediaTable.background["Blizzard Parchment 2"]					= [[Interface\AchievementFrame\UI-GuildAchievement-Parchment-Horizontal]]
-lib.MediaTable.background["Blizzard Rock"]							= [[Interface\FrameGeneral\UI-Background-Rock]]
-lib.MediaTable.background["Blizzard Tabard Background"]				= [[Interface\TabardFrame\TabardFrameBackground]]
-lib.MediaTable.background["Blizzard Tooltip"]						= [[Interface\Tooltips\UI-Tooltip-Background]]
-lib.MediaTable.background["Solid"]									= [[Interface\Buttons\WHITE8X8]]
-lib.DefaultMedia.background = "None"
-
--- BORDER
-if not lib.MediaTable.border then lib.MediaTable.border = {} end
-lib.MediaTable.border["None"]								= [[]]
-lib.MediaTable.border["Blizzard Achievement Wood"]			= [[Interface\AchievementFrame\UI-Achievement-WoodBorder]]
-lib.MediaTable.border["Blizzard Chat Bubble"]				= [[Interface\Tooltips\ChatBubble-Backdrop]]
-lib.MediaTable.border["Blizzard Dialog"]					= [[Interface\DialogFrame\UI-DialogBox-Border]]
-lib.MediaTable.border["Blizzard Dialog Gold"]				= [[Interface\DialogFrame\UI-DialogBox-Gold-Border]]
-lib.MediaTable.border["Blizzard Party"]						= [[Interface\CHARACTERFRAME\UI-Party-Border]]
-lib.MediaTable.border["Blizzard Tooltip"]					= [[Interface\Tooltips\UI-Tooltip-Border]]
-lib.DefaultMedia.border = "None"
-
--- FONT
-if not lib.MediaTable.font then lib.MediaTable.font = {} end
-local SML_MT_font = lib.MediaTable.font
---[[
-file				name							latin	koKR	ruRU	zhCN	zhTW
-2002.ttf			2002							X		X		X		-		-
-2002B.ttf			2002 Bold						X		X		X		-		-
-ARHei.ttf			AR CrystalzcuheiGBK Demibold	X		-		X		X		X
-ARIALN.TTF			Arial Narrow					X		-		X		-		-
-ARKai_C.ttf			AR ZhongkaiGBK Medium (Combat)	X		-		X		X		X
-ARKai_T.ttf			AR ZhongkaiGBK Medium			X		-		X		X		X
-bHEI00M.ttf			AR Heiti2 Medium B5				-		-		-		-		X
-bHEI01B.ttf			AR Heiti2 Bold B5				-		-		-		-		X
-bKAI00M.ttf			AR Kaiti Medium B5				-		-		-		-		X
-bLEI00D.ttf			AR Leisu Demi B5				-		-		-		-		X
-FRIZQT__.TTF		Friz Quadrata TT				X		-		-		-		-
-FRIZQT___CYR.TTF	FrizQuadrataCTT					-		-		X		-		-
-K_Damage.TTF		YDIWingsM						-		X		X		-		-
-K_Pagetext.TTF		MoK								X		X		X		-		-
-MORPHEUS.TTF		Morpheus						X		-		-		-		-
-MORPHEUS_CYR.TTF	Morpheus						X		-		X		-		-
-NIM_____.ttf		Nimrod MT						X		-		X		-		-
-SKURRI.TTF			Skurri							X		-		-		-		-
-SKURRI_CYR.TTF		Skurri							X		-		X		-		-
-]]
-
-if locale == "koKR" then
-	LOCALE_MASK = lib.LOCALE_BIT_koKR
---
-	SML_MT_font["굵은 글꼴"]		= [[Fonts\2002B.TTF]]
-	SML_MT_font["기본 글꼴"]		= [[Fonts\2002.TTF]]
-	SML_MT_font["데미지 글꼴"]		= [[Fonts\K_Damage.TTF]]
-	SML_MT_font["퀘스트 글꼴"]		= [[Fonts\K_Pagetext.TTF]]
---
-	lib.DefaultMedia["font"] = "기본 글꼴" -- someone from koKR please adjust if needed
---
-elseif locale == "zhCN" then
-	LOCALE_MASK = lib.LOCALE_BIT_zhCN
---
-	SML_MT_font["伤害数字"]		= [[Fonts\ARKai_C.ttf]]
-	SML_MT_font["默认"]			= [[Fonts\ARKai_T.ttf]]
-	SML_MT_font["聊天"]			= [[Fonts\ARHei.ttf]]
---
-	lib.DefaultMedia["font"] = "默认" -- someone from zhCN please adjust if needed
---
-elseif locale == "zhTW" then
-	LOCALE_MASK = lib.LOCALE_BIT_zhTW
---
-	SML_MT_font["提示訊息"]		= [[Fonts\bHEI00M.ttf]]
-	SML_MT_font["聊天"]			= [[Fonts\bHEI01B.ttf]]
-	SML_MT_font["傷害數字"]		= [[Fonts\bKAI00M.ttf]]
-	SML_MT_font["預設"]			= [[Fonts\bLEI00D.ttf]]
---
-	lib.DefaultMedia["font"] = "預設" -- someone from zhTW please adjust if needed
-
-elseif locale == "ruRU" then
-	LOCALE_MASK = lib.LOCALE_BIT_ruRU
---
-	SML_MT_font["2002"]								= [[Fonts\2002.TTF]]
-	SML_MT_font["2002 Bold"]						= [[Fonts\2002B.TTF]]
-	SML_MT_font["AR CrystalzcuheiGBK Demibold"]		= [[Fonts\ARHei.TTF]]
-	SML_MT_font["AR ZhongkaiGBK Medium (Combat)"]	= [[Fonts\ARKai_C.TTF]]
-	SML_MT_font["AR ZhongkaiGBK Medium"]			= [[Fonts\ARKai_T.TTF]]
-	SML_MT_font["Arial Narrow"]						= [[Fonts\ARIALN.TTF]]
-	SML_MT_font["Friz Quadrata TT"]					= [[Fonts\FRIZQT___CYR.TTF]]
-	SML_MT_font["MoK"]								= [[Fonts\K_Pagetext.TTF]]
-	SML_MT_font["Morpheus"]							= [[Fonts\MORPHEUS_CYR.TTF]]
-	SML_MT_font["Nimrod MT"]						= [[Fonts\NIM_____.ttf]]
-	SML_MT_font["Skurri"]							= [[Fonts\SKURRI_CYR.TTF]]
---
-	lib.DefaultMedia.font = "Friz Quadrata TT"
---
-else
-	LOCALE_MASK = lib.LOCALE_BIT_western
-	locale_is_western = true
---
-	SML_MT_font["2002"]								= [[Fonts\2002.TTF]]
-	SML_MT_font["2002 Bold"]						= [[Fonts\2002B.TTF]]
-	SML_MT_font["AR CrystalzcuheiGBK Demibold"]		= [[Fonts\ARHei.TTF]]
-	SML_MT_font["AR ZhongkaiGBK Medium (Combat)"]	= [[Fonts\ARKai_C.TTF]]
-	SML_MT_font["AR ZhongkaiGBK Medium"]			= [[Fonts\ARKai_T.TTF]]
-	SML_MT_font["Arial Narrow"]						= [[Fonts\ARIALN.TTF]]
-	SML_MT_font["Friz Quadrata TT"]					= [[Fonts\FRIZQT__.TTF]]
-	SML_MT_font["MoK"]								= [[Fonts\K_Pagetext.TTF]]
-	SML_MT_font["Morpheus"]							= [[Fonts\MORPHEUS_CYR.TTF]]
-	SML_MT_font["Nimrod MT"]						= [[Fonts\NIM_____.ttf]]
-	SML_MT_font["Skurri"]							= [[Fonts\SKURRI_CYR.TTF]]
---
-	lib.DefaultMedia.font = "Friz Quadrata TT"
---
-end
-
--- STATUSBAR
-if not lib.MediaTable.statusbar then lib.MediaTable.statusbar = {} end
-lib.MediaTable.statusbar["Blizzard"]						= [[Interface\TargetingFrame\UI-StatusBar]]
-lib.MediaTable.statusbar["Blizzard Character Skills Bar"]	= [[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]]
-lib.MediaTable.statusbar["Blizzard Raid Bar"]				= [[Interface\RaidFrame\Raid-Bar-Hp-Fill]]
-lib.DefaultMedia.statusbar = "Blizzard"
-
--- SOUND
-if not lib.MediaTable.sound then lib.MediaTable.sound = {} end
-lib.MediaTable.sound["None"]								= [[Interface\Quiet.ogg]]	-- Relies on the fact that PlaySound[File] doesn't error on non-existing input.
-lib.DefaultMedia.sound = "None"
-
-local function rebuildMediaList(mediatype)
-	local mtable = mediaTable[mediatype]
-	if not mtable then return end
-	if not mediaList[mediatype] then mediaList[mediatype] = {} end
-	local mlist = mediaList[mediatype]
-	-- list can only get larger, so simply overwrite it
-	local i = 0
-	for k in pairs(mtable) do
-		i = i + 1
-		mlist[i] = k
-	end
-	table_sort(mlist)
-end
-
-function lib:Register(mediatype, key, data, langmask)
-	if type(mediatype) ~= "string" then
-		error(MAJOR..":Register(mediatype, key, data, langmask) - mediatype must be string, got "..type(mediatype))
-	end
-	if type(key) ~= "string" then
-		error(MAJOR..":Register(mediatype, key, data, langmask) - key must be string, got "..type(key))
-	end
-	mediatype = mediatype:lower()
-	if mediatype == lib.MediaType.FONT  and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then return false end
-	if not mediaTable[mediatype] then mediaTable[mediatype] = {} end
-	local mtable = mediaTable[mediatype]
-	if mtable[key] then return false end
-
-	mtable[key] = data
-	rebuildMediaList(mediatype)
-	self.callbacks:Fire("LibSharedMedia_Registered", mediatype, key)
-	return true
-end
-
-function lib:Fetch(mediatype, key, noDefault)
-	local mtt = mediaTable[mediatype]
-	local overridekey = overrideMedia[mediatype]
-	local result = mtt and ((overridekey and mtt[overridekey] or mtt[key]) or (not noDefault and defaultMedia[mediatype] and mtt[defaultMedia[mediatype]])) or nil
-	return result ~= "" and result or nil
-end
-
-function lib:IsValid(mediatype, key)
-	return mediaTable[mediatype] and (not key or mediaTable[mediatype][key]) and true or false
-end
-
-function lib:HashTable(mediatype)
-	return mediaTable[mediatype]
-end
-
-function lib:List(mediatype)
-	if not mediaTable[mediatype] then
-		return nil
-	end
-	if not mediaList[mediatype] then
-		rebuildMediaList(mediatype)
-	end
-	return mediaList[mediatype]
-end
-
-function lib:GetGlobal(mediatype)
-	return overrideMedia[mediatype]
-end
-
-function lib:SetGlobal(mediatype, key)
-	if not mediaTable[mediatype] then
-		return false
-	end
-	overrideMedia[mediatype] = (key and mediaTable[mediatype][key]) and key or nil
-	self.callbacks:Fire("LibSharedMedia_SetGlobal", mediatype, overrideMedia[mediatype])
-	return true
-end
-
-function lib:GetDefault(mediatype)
-	return defaultMedia[mediatype]
-end
-
-function lib:SetDefault(mediatype, key)
-	if mediaTable[mediatype] and mediaTable[mediatype][key] and not defaultMedia[mediatype] then
-		defaultMedia[mediatype] = key
-		return true
-	else
-		return false
-	end
-end
diff --git a/Libs/LibSharedMedia-3.0/lib.xml b/Libs/LibSharedMedia-3.0/lib.xml
deleted file mode 100644
index 34aa874..0000000
--- a/Libs/LibSharedMedia-3.0/lib.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
-..\FrameXML\UI.xsd">
-	<Script file="LibSharedMedia-3.0.lua" />
-</Ui>
\ No newline at end of file
diff --git a/Libs/LibStub/LibStub.lua b/Libs/LibStub/LibStub.lua
deleted file mode 100644
index 0a41ac0..0000000
--- a/Libs/LibStub/LibStub.lua
+++ /dev/null
@@ -1,30 +0,0 @@
--- 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 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]
-
-if not LibStub or LibStub.minor < LIBSTUB_MINOR then
-	LibStub = LibStub or {libs = {}, minors = {} }
-	_G[LIBSTUB_MAJOR] = LibStub
-	LibStub.minor = LIBSTUB_MINOR
-
-	function LibStub:NewLibrary(major, minor)
-		assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
-		minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
-
-		local oldminor = self.minors[major]
-		if oldminor and oldminor >= minor then return nil end
-		self.minors[major], self.libs[major] = minor, self.libs[major] or {}
-		return self.libs[major], oldminor
-	end
-
-	function LibStub:GetLibrary(major, silent)
-		if not self.libs[major] and not silent then
-			error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
-		end
-		return self.libs[major], self.minors[major]
-	end
-
-	function LibStub:IterateLibraries() return pairs(self.libs) end
-	setmetatable(LibStub, { __call = LibStub.GetLibrary })
-end
diff --git a/Libs/LibStub/LibStub.toc b/Libs/LibStub/LibStub.toc
deleted file mode 100644
index 4d9130c..0000000
--- a/Libs/LibStub/LibStub.toc
+++ /dev/null
@@ -1,9 +0,0 @@
-## Interface: 20400
-## Title: Lib: LibStub
-## Notes: Universal Library Stub
-## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
-## X-Website: http://jira.wowace.com/browse/LS
-## X-Category: Library
-## X-License: Public Domain
-
-LibStub.lua
diff --git a/Libs/UTF8/Changelog-UTF8-v1.1.txt b/Libs/UTF8/Changelog-UTF8-v1.1.txt
deleted file mode 100644
index da84888..0000000
--- a/Libs/UTF8/Changelog-UTF8-v1.1.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-------------------------------------------------------------------------
-r6 | phanx | 2014-10-28 02:27:07 +0000 (Tue, 28 Oct 2014) | 1 line
-Changed paths:
-   A /tags/v1.1 (from /trunk:5)
-
-Tagging as v1.1
-------------------------------------------------------------------------
-r5 | Phanx | 2014-10-28 02:26:44 +0000 (Tue, 28 Oct 2014) | 1 line
-Changed paths:
-   M /trunk/UTF8.toc
-
-- Update TOC for a new release
-------------------------------------------------------------------------
-r4 | Phanx | 2012-09-07 10:25:33 +0000 (Fri, 07 Sep 2012) | 1 line
-Changed paths:
-   M /trunk/utf8.lua
-
-- Switched from slower x:sub notation to faster upvalued strsub(x)
-------------------------------------------------------------------------
diff --git a/Libs/UTF8/UTF8.toc b/Libs/UTF8/UTF8.toc
deleted file mode 100644
index e971b12..0000000
--- a/Libs/UTF8/UTF8.toc
+++ /dev/null
@@ -1,15 +0,0 @@
-## Interface: 60000
-## Version: v1.1
-## X-Curse-Packaged-Version: Beta-4.3i-1-g3e0e1d6
-## X-Curse-Project-Name: Jamba
-## X-Curse-Project-ID: jamba
-## X-Curse-Repository-ID: wow/jamba/mainline
-
-## Title: Lib: UTF8
-## Notes: A library for manipulating UTF-8 strings
-## Author: Pastamancer
-## X-License: BSD License
-## X-Website: http://www.wowace.com/addons/utf8/
-
-utf8data.lua
-utf8.lua
\ No newline at end of file
diff --git a/Libs/UTF8/utf8.lua b/Libs/UTF8/utf8.lua
deleted file mode 100644
index 485582c..0000000
--- a/Libs/UTF8/utf8.lua
+++ /dev/null
@@ -1,317 +0,0 @@
--- $Id: utf8.lua 179 2009-04-03 18:10:03Z pasta $
---
--- Provides UTF-8 aware string functions implemented in pure lua:
--- * string.utf8len(s)
--- * string.utf8sub(s, i, j)
--- * string.utf8reverse(s)
---
--- If utf8data.lua (containing the lower<->upper case mappings) is loaded, these
--- additional functions are available:
--- * string.utf8upper(s)
--- * string.utf8lower(s)
---
--- All functions behave as their non UTF-8 aware counterparts with the exception
--- that UTF-8 characters are used instead of bytes for all units.
-
---[[
-Copyright (c) 2006-2007, Kyle Smith
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-    * Neither the name of the author nor the names of its contributors may be
-      used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---]]
-
--- ABNF from RFC 3629
---
--- UTF8-octets = *( UTF8-char )
--- UTF8-char   = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
--- UTF8-1      = %x00-7F
--- UTF8-2      = %xC2-DF UTF8-tail
--- UTF8-3      = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
---               %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
--- UTF8-4      = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
---               %xF4 %x80-8F 2( UTF8-tail )
--- UTF8-tail   = %x80-BF
---
-
-local strbyte, strlen, strsub, type = string.byte, string.len, string.sub, type
-
--- returns the number of bytes used by the UTF-8 character at byte i in s
--- also doubles as a UTF-8 character validator
-local function utf8charbytes(s, i)
-	-- argument defaults
-	i = i or 1
-
-	-- argument checking
-	if type(s) ~= "string" then
-		error("bad argument #1 to 'utf8charbytes' (string expected, got ".. type(s).. ")")
-	end
-	if type(i) ~= "number" then
-		error("bad argument #2 to 'utf8charbytes' (number expected, got ".. type(i).. ")")
-	end
-
-	local c = strbyte(s, i)
-
-	-- determine bytes needed for character, based on RFC 3629
-	-- validate byte 1
-	if c > 0 and c <= 127 then
-		-- UTF8-1
-		return 1
-
-	elseif c >= 194 and c <= 223 then
-		-- UTF8-2
-		local c2 = strbyte(s, i + 1)
-
-		if not c2 then
-			error("UTF-8 string terminated early")
-		end
-
-		-- validate byte 2
-		if c2 < 128 or c2 > 191 then
-			error("Invalid UTF-8 character")
-		end
-
-		return 2
-
-	elseif c >= 224 and c <= 239 then
-		-- UTF8-3
-		local c2 = strbyte(s, i + 1)
-		local c3 = strbyte(s, i + 2)
-
-		if not c2 or not c3 then
-			error("UTF-8 string terminated early")
-		end
-
-		-- validate byte 2
-		if c == 224 and (c2 < 160 or c2 > 191) then
-			error("Invalid UTF-8 character")
-		elseif c == 237 and (c2 < 128 or c2 > 159) then
-			error("Invalid UTF-8 character")
-		elseif c2 < 128 or c2 > 191 then
-			error("Invalid UTF-8 character")
-		end
-
-		-- validate byte 3
-		if c3 < 128 or c3 > 191 then
-			error("Invalid UTF-8 character")
-		end
-
-		return 3
-
-	elseif c >= 240 and c <= 244 then
-		-- UTF8-4
-		local c2 = strbyte(s, i + 1)
-		local c3 = strbyte(s, i + 2)
-		local c4 = strbyte(s, i + 3)
-
-		if not c2 or not c3 or not c4 then
-			error("UTF-8 string terminated early")
-		end
-
-		-- validate byte 2
-		if c == 240 and (c2 < 144 or c2 > 191) then
-			error("Invalid UTF-8 character")
-		elseif c == 244 and (c2 < 128 or c2 > 143) then
-			error("Invalid UTF-8 character")
-		elseif c2 < 128 or c2 > 191 then
-			error("Invalid UTF-8 character")
-		end
-
-		-- validate byte 3
-		if c3 < 128 or c3 > 191 then
-			error("Invalid UTF-8 character")
-		end
-
-		-- validate byte 4
-		if c4 < 128 or c4 > 191 then
-			error("Invalid UTF-8 character")
-		end
-
-		return 4
-
-	else
-		error("Invalid UTF-8 character")
-	end
-end
-
--- returns the number of characters in a UTF-8 string
-local function utf8len(s)
-	-- argument checking
-	if type(s) ~= "string" then
-		error("bad argument #1 to 'utf8len' (string expected, got ".. type(s).. ")")
-	end
-
-	local pos = 1
-	local bytes = strlen(s)
-	local len = 0
-
-	while pos <= bytes do
-		len = len + 1
-		pos = pos + utf8charbytes(s, pos)
-	end
-
-	return len
-end
-
--- install in the string library
-if not string.utf8len then
-	string.utf8len = utf8len
-end
-
--- functions identically to string.sub except that i and j are UTF-8 characters
--- instead of bytes
-local function utf8sub(s, i, j)
-	-- argument defaults
-	j = j or -1
-
-	-- argument checking
-	if type(s) ~= "string" then
-		error("bad argument #1 to 'utf8sub' (string expected, got ".. type(s).. ")")
-	end
-	if type(i) ~= "number" then
-		error("bad argument #2 to 'utf8sub' (number expected, got ".. type(i).. ")")
-	end
-	if type(j) ~= "number" then
-		error("bad argument #3 to 'utf8sub' (number expected, got ".. type(j).. ")")
-	end
-
-	local pos = 1
-	local bytes = strlen(s)
-	local len = 0
-
-	-- only set l if i or j is negative
-	local l = (i >= 0 and j >= 0) or utf8len(s)
-	local startChar = (i >= 0) and i or l + i + 1
-	local endChar   = (j >= 0) and j or l + j + 1
-
-	-- can't have start before end!
-	if startChar > endChar then
-		return ""
-	end
-
-	-- byte offsets to pass to string.sub
-	local startByte, endByte = 1, bytes
-
-	while pos <= bytes do
-		len = len + 1
-
-		if len == startChar then
-			startByte = pos
-		end
-
-		pos = pos + utf8charbytes(s, pos)
-
-		if len == endChar then
-			endByte = pos - 1
-			break
-		end
-	end
-
-	return strsub(s, startByte, endByte)
-end
-
--- install in the string library
-if not string.utf8sub then
-	string.utf8sub = utf8sub
-end
-
--- replace UTF-8 characters based on a mapping table
-local function utf8replace(s, mapping)
-	-- argument checking
-	if type(s) ~= "string" then
-		error("bad argument #1 to 'utf8replace' (string expected, got ".. type(s).. ")")
-	end
-	if type(mapping) ~= "table" then
-		error("bad argument #2 to 'utf8replace' (table expected, got ".. type(mapping).. ")")
-	end
-
-	local pos = 1
-	local bytes = strlen(s)
-	local charbytes
-	local newstr = ""
-
-	while pos <= bytes do
-		charbytes = utf8charbytes(s, pos)
-		local c = strsub(s, pos, pos + charbytes - 1)
-
-		newstr = newstr .. (mapping[c] or c)
-
-		pos = pos + charbytes
-	end
-
-	return newstr
-end
-
--- identical to string.upper except it knows about unicode simple case conversions
-local function utf8upper(s)
-	return utf8replace(s, utf8_lc_uc)
-end
-
--- install in the string library
-if not string.utf8upper and utf8_lc_uc then
-	string.utf8upper = utf8upper
-end
-
--- identical to string.lower except it knows about unicode simple case conversions
-local function utf8lower(s)
-	return utf8replace(s, utf8_uc_lc)
-end
-
--- install in the string library
-if not string.utf8lower and utf8_uc_lc then
-	string.utf8lower = utf8lower
-end
-
--- identical to string.reverse except that it supports UTF-8
-local function utf8reverse(s)
-	-- argument checking
-	if type(s) ~= "string" then
-		error("bad argument #1 to 'utf8reverse' (string expected, got ".. type(s).. ")")
-	end
-
-	local bytes = strlen(s)
-	local pos = bytes
-	local charbytes
-	local newstr = ""
-
-	while pos > 0 do
-		c = strbyte(s, pos)
-		while c >= 128 and c <= 191 do
-			pos = pos - 1
-			c = strbyte(pos)
-		end
-
-		charbytes = utf8charbytes(s, pos)
-
-		newstr = newstr .. strsub(s, pos, pos + charbytes - 1)
-
-		pos = pos - 1
-	end
-
-	return newstr
-end
-
--- install in the string library
-if not string.utf8reverse then
-	string.utf8reverse = utf8reverse
-end
\ No newline at end of file
diff --git a/Libs/UTF8/utf8data.lua b/Libs/UTF8/utf8data.lua
deleted file mode 100644
index 655f719..0000000
--- a/Libs/UTF8/utf8data.lua
+++ /dev/null
@@ -1,1860 +0,0 @@
-utf8_lc_uc = {
-	["a"] = "A",
-	["b"] = "B",
-	["c"] = "C",
-	["d"] = "D",
-	["e"] = "E",
-	["f"] = "F",
-	["g"] = "G",
-	["h"] = "H",
-	["i"] = "I",
-	["j"] = "J",
-	["k"] = "K",
-	["l"] = "L",
-	["m"] = "M",
-	["n"] = "N",
-	["o"] = "O",
-	["p"] = "P",
-	["q"] = "Q",
-	["r"] = "R",
-	["s"] = "S",
-	["t"] = "T",
-	["u"] = "U",
-	["v"] = "V",
-	["w"] = "W",
-	["x"] = "X",
-	["y"] = "Y",
-	["z"] = "Z",
-	["µ"] = "Μ",
-	["à"] = "À",
-	["á"] = "Á",
-	["â"] = "Â",
-	["ã"] = "Ã",
-	["ä"] = "Ä",
-	["å"] = "Å",
-	["æ"] = "Æ",
-	["ç"] = "Ç",
-	["è"] = "È",
-	["é"] = "É",
-	["ê"] = "Ê",
-	["ë"] = "Ë",
-	["ì"] = "Ì",
-	["í"] = "Í",
-	["î"] = "Î",
-	["ï"] = "Ï",
-	["ð"] = "Ð",
-	["ñ"] = "Ñ",
-	["ò"] = "Ò",
-	["ó"] = "Ó",
-	["ô"] = "Ô",
-	["õ"] = "Õ",
-	["ö"] = "Ö",
-	["ø"] = "Ø",
-	["ù"] = "Ù",
-	["ú"] = "Ú",
-	["û"] = "Û",
-	["ü"] = "Ü",
-	["ý"] = "Ý",
-	["þ"] = "Þ",
-	["ÿ"] = "Ÿ",
-	["ā"] = "Ā",
-	["ă"] = "Ă",
-	["ą"] = "Ą",
-	["ć"] = "Ć",
-	["ĉ"] = "Ĉ",
-	["ċ"] = "Ċ",
-	["č"] = "Č",
-	["ď"] = "Ď",
-	["đ"] = "Đ",
-	["ē"] = "Ē",
-	["ĕ"] = "Ĕ",
-	["ė"] = "Ė",
-	["ę"] = "Ę",
-	["ě"] = "Ě",
-	["ĝ"] = "Ĝ",
-	["ğ"] = "Ğ",
-	["ġ"] = "Ġ",
-	["ģ"] = "Ģ",
-	["ĥ"] = "Ĥ",
-	["ħ"] = "Ħ",
-	["ĩ"] = "Ĩ",
-	["ī"] = "Ī",
-	["ĭ"] = "Ĭ",
-	["į"] = "Į",
-	["ı"] = "I",
-	["ij"] = "IJ",
-	["ĵ"] = "Ĵ",
-	["ķ"] = "Ķ",
-	["ĺ"] = "Ĺ",
-	["ļ"] = "Ļ",
-	["ľ"] = "Ľ",
-	["ŀ"] = "Ŀ",
-	["ł"] = "Ł",
-	["ń"] = "Ń",
-	["ņ"] = "Ņ",
-	["ň"] = "Ň",
-	["ŋ"] = "Ŋ",
-	["ō"] = "Ō",
-	["ŏ"] = "Ŏ",
-	["ő"] = "Ő",
-	["œ"] = "Œ",
-	["ŕ"] = "Ŕ",
-	["ŗ"] = "Ŗ",
-	["ř"] = "Ř",
-	["ś"] = "Ś",
-	["ŝ"] = "Ŝ",
-	["ş"] = "Ş",
-	["š"] = "Š",
-	["ţ"] = "Ţ",
-	["ť"] = "Ť",
-	["ŧ"] = "Ŧ",
-	["ũ"] = "Ũ",
-	["ū"] = "Ū",
-	["ŭ"] = "Ŭ",
-	["ů"] = "Ů",
-	["ű"] = "Ű",
-	["ų"] = "Ų",
-	["ŵ"] = "Ŵ",
-	["ŷ"] = "Ŷ",
-	["ź"] = "Ź",
-	["ż"] = "Ż",
-	["ž"] = "Ž",
-	["ſ"] = "S",
-	["ƀ"] = "Ƀ",
-	["ƃ"] = "Ƃ",
-	["ƅ"] = "Ƅ",
-	["ƈ"] = "Ƈ",
-	["ƌ"] = "Ƌ",
-	["ƒ"] = "Ƒ",
-	["ƕ"] = "Ƕ",
-	["ƙ"] = "Ƙ",
-	["ƚ"] = "Ƚ",
-	["ƞ"] = "Ƞ",
-	["ơ"] = "Ơ",
-	["ƣ"] = "Ƣ",
-	["ƥ"] = "Ƥ",
-	["ƨ"] = "Ƨ",
-	["ƭ"] = "Ƭ",
-	["ư"] = "Ư",
-	["ƴ"] = "Ƴ",
-	["ƶ"] = "Ƶ",
-	["ƹ"] = "Ƹ",
-	["ƽ"] = "Ƽ",
-	["ƿ"] = "Ƿ",
-	["Dž"] = "DŽ",
-	["dž"] = "DŽ",
-	["Lj"] = "LJ",
-	["lj"] = "LJ",
-	["Nj"] = "NJ",
-	["nj"] = "NJ",
-	["ǎ"] = "Ǎ",
-	["ǐ"] = "Ǐ",
-	["ǒ"] = "Ǒ",
-	["ǔ"] = "Ǔ",
-	["ǖ"] = "Ǖ",
-	["ǘ"] = "Ǘ",
-	["ǚ"] = "Ǚ",
-	["ǜ"] = "Ǜ",
-	["ǝ"] = "Ǝ",
-	["ǟ"] = "Ǟ",
-	["ǡ"] = "Ǡ",
-	["ǣ"] = "Ǣ",
-	["ǥ"] = "Ǥ",
-	["ǧ"] = "Ǧ",
-	["ǩ"] = "Ǩ",
-	["ǫ"] = "Ǫ",
-	["ǭ"] = "Ǭ",
-	["ǯ"] = "Ǯ",
-	["Dz"] = "DZ",
-	["dz"] = "DZ",
-	["ǵ"] = "Ǵ",
-	["ǹ"] = "Ǹ",
-	["ǻ"] = "Ǻ",
-	["ǽ"] = "Ǽ",
-	["ǿ"] = "Ǿ",
-	["ȁ"] = "Ȁ",
-	["ȃ"] = "Ȃ",
-	["ȅ"] = "Ȅ",
-	["ȇ"] = "Ȇ",
-	["ȉ"] = "Ȉ",
-	["ȋ"] = "Ȋ",
-	["ȍ"] = "Ȍ",
-	["ȏ"] = "Ȏ",
-	["ȑ"] = "Ȑ",
-	["ȓ"] = "Ȓ",
-	["ȕ"] = "Ȕ",
-	["ȗ"] = "Ȗ",
-	["ș"] = "Ș",
-	["ț"] = "Ț",
-	["ȝ"] = "Ȝ",
-	["ȟ"] = "Ȟ",
-	["ȣ"] = "Ȣ",
-	["ȥ"] = "Ȥ",
-	["ȧ"] = "Ȧ",
-	["ȩ"] = "Ȩ",
-	["ȫ"] = "Ȫ",
-	["ȭ"] = "Ȭ",
-	["ȯ"] = "Ȯ",
-	["ȱ"] = "Ȱ",
-	["ȳ"] = "Ȳ",
-	["ȼ"] = "Ȼ",
-	["ɂ"] = "Ɂ",
-	["ɇ"] = "Ɇ",
-	["ɉ"] = "Ɉ",
-	["ɋ"] = "Ɋ",
-	["ɍ"] = "Ɍ",
-	["ɏ"] = "Ɏ",
-	["ɓ"] = "Ɓ",
-	["ɔ"] = "Ɔ",
-	["ɖ"] = "Ɖ",
-	["ɗ"] = "Ɗ",
-	["ə"] = "Ə",
-	["ɛ"] = "Ɛ",
-	["ɠ"] = "Ɠ",
-	["ɣ"] = "Ɣ",
-	["ɨ"] = "Ɨ",
-	["ɩ"] = "Ɩ",
-	["ɫ"] = "Ɫ",
-	["ɯ"] = "Ɯ",
-	["ɲ"] = "Ɲ",
-	["ɵ"] = "Ɵ",
-	["ɽ"] = "Ɽ",
-	["ʀ"] = "Ʀ",
-	["ʃ"] = "Ʃ",
-	["ʈ"] = "Ʈ",
-	["ʉ"] = "Ʉ",
-	["ʊ"] = "Ʊ",
-	["ʋ"] = "Ʋ",
-	["ʌ"] = "Ʌ",
-	["ʒ"] = "Ʒ",
-	["ͅ"] = "Ι",
-	["ͻ"] = "Ͻ",
-	["ͼ"] = "Ͼ",
-	["ͽ"] = "Ͽ",
-	["ά"] = "Ά",
-	["έ"] = "Έ",
-	["ή"] = "Ή",
-	["ί"] = "Ί",
-	["α"] = "Α",
-	["β"] = "Β",
-	["γ"] = "Γ",
-	["δ"] = "Δ",
-	["ε"] = "Ε",
-	["ζ"] = "Ζ",
-	["η"] = "Η",
-	["θ"] = "Θ",
-	["ι"] = "Ι",
-	["κ"] = "Κ",
-	["λ"] = "Λ",
-	["μ"] = "Μ",
-	["ν"] = "Ν",
-	["ξ"] = "Ξ",
-	["ο"] = "Ο",
-	["π"] = "Π",
-	["ρ"] = "Ρ",
-	["ς"] = "Σ",
-	["σ"] = "Σ",
-	["τ"] = "Τ",
-	["υ"] = "Υ",
-	["φ"] = "Φ",
-	["χ"] = "Χ",
-	["ψ"] = "Ψ",
-	["ω"] = "Ω",
-	["ϊ"] = "Ϊ",
-	["ϋ"] = "Ϋ",
-	["ό"] = "Ό",
-	["ύ"] = "Ύ",
-	["ώ"] = "Ώ",
-	["ϐ"] = "Β",
-	["ϑ"] = "Θ",
-	["ϕ"] = "Φ",
-	["ϖ"] = "Π",
-	["ϙ"] = "Ϙ",
-	["ϛ"] = "Ϛ",
-	["ϝ"] = "Ϝ",
-	["ϟ"] = "Ϟ",
-	["ϡ"] = "Ϡ",
-	["ϣ"] = "Ϣ",
-	["ϥ"] = "Ϥ",
-	["ϧ"] = "Ϧ",
-	["ϩ"] = "Ϩ",
-	["ϫ"] = "Ϫ",
-	["ϭ"] = "Ϭ",
-	["ϯ"] = "Ϯ",
-	["ϰ"] = "Κ",
-	["ϱ"] = "Ρ",
-	["ϲ"] = "Ϲ",
-	["ϵ"] = "Ε",
-	["ϸ"] = "Ϸ",
-	["ϻ"] = "Ϻ",
-	["а"] = "А",
-	["б"] = "Б",
-	["в"] = "В",
-	["г"] = "Г",
-	["д"] = "Д",
-	["е"] = "Е",
-	["ж"] = "Ж",
-	["з"] = "З",
-	["и"] = "И",
-	["й"] = "Й",
-	["к"] = "К",
-	["л"] = "Л",
-	["м"] = "М",
-	["н"] = "Н",
-	["о"] = "О",
-	["п"] = "П",
-	["р"] = "Р",
-	["с"] = "С",
-	["т"] = "Т",
-	["у"] = "У",
-	["ф"] = "Ф",
-	["х"] = "Х",
-	["ц"] = "Ц",
-	["ч"] = "Ч",
-	["ш"] = "Ш",
-	["щ"] = "Щ",
-	["ъ"] = "Ъ",
-	["ы"] = "Ы",
-	["ь"] = "Ь",
-	["э"] = "Э",
-	["ю"] = "Ю",
-	["я"] = "Я",
-	["ѐ"] = "Ѐ",
-	["ё"] = "Ё",
-	["ђ"] = "Ђ",
-	["ѓ"] = "Ѓ",
-	["є"] = "Є",
-	["ѕ"] = "Ѕ",
-	["і"] = "І",
-	["ї"] = "Ї",
-	["ј"] = "Ј",
-	["љ"] = "Љ",
-	["њ"] = "Њ",
-	["ћ"] = "Ћ",
-	["ќ"] = "Ќ",
-	["ѝ"] = "Ѝ",
-	["ў"] = "Ў",
-	["џ"] = "Џ",
-	["ѡ"] = "Ѡ",
-	["ѣ"] = "Ѣ",
-	["ѥ"] = "Ѥ",
-	["ѧ"] = "Ѧ",
-	["ѩ"] = "Ѩ",
-	["ѫ"] = "Ѫ",
-	["ѭ"] = "Ѭ",
-	["ѯ"] = "Ѯ",
-	["ѱ"] = "Ѱ",
-	["ѳ"] = "Ѳ",
-	["ѵ"] = "Ѵ",
-	["ѷ"] = "Ѷ",
-	["ѹ"] = "Ѹ",
-	["ѻ"] = "Ѻ",
-	["ѽ"] = "Ѽ",
-	["ѿ"] = "Ѿ",
-	["ҁ"] = "Ҁ",
-	["ҋ"] = "Ҋ",
-	["ҍ"] = "Ҍ",
-	["ҏ"] = "Ҏ",
-	["ґ"] = "Ґ",
-	["ғ"] = "Ғ",
-	["ҕ"] = "Ҕ",
-	["җ"] = "Җ",
-	["ҙ"] = "Ҙ",
-	["қ"] = "Қ",
-	["ҝ"] = "Ҝ",
-	["ҟ"] = "Ҟ",
-	["ҡ"] = "Ҡ",
-	["ң"] = "Ң",
-	["ҥ"] = "Ҥ",
-	["ҧ"] = "Ҧ",
-	["ҩ"] = "Ҩ",
-	["ҫ"] = "Ҫ",
-	["ҭ"] = "Ҭ",
-	["ү"] = "Ү",
-	["ұ"] = "Ұ",
-	["ҳ"] = "Ҳ",
-	["ҵ"] = "Ҵ",
-	["ҷ"] = "Ҷ",
-	["ҹ"] = "Ҹ",
-	["һ"] = "Һ",
-	["ҽ"] = "Ҽ",
-	["ҿ"] = "Ҿ",
-	["ӂ"] = "Ӂ",
-	["ӄ"] = "Ӄ",
-	["ӆ"] = "Ӆ",
-	["ӈ"] = "Ӈ",
-	["ӊ"] = "Ӊ",
-	["ӌ"] = "Ӌ",
-	["ӎ"] = "Ӎ",
-	["ӏ"] = "Ӏ",
-	["ӑ"] = "Ӑ",
-	["ӓ"] = "Ӓ",
-	["ӕ"] = "Ӕ",
-	["ӗ"] = "Ӗ",
-	["ә"] = "Ә",
-	["ӛ"] = "Ӛ",
-	["ӝ"] = "Ӝ",
-	["ӟ"] = "Ӟ",
-	["ӡ"] = "Ӡ",
-	["ӣ"] = "Ӣ",
-	["ӥ"] = "Ӥ",
-	["ӧ"] = "Ӧ",
-	["ө"] = "Ө",
-	["ӫ"] = "Ӫ",
-	["ӭ"] = "Ӭ",
-	["ӯ"] = "Ӯ",
-	["ӱ"] = "Ӱ",
-	["ӳ"] = "Ӳ",
-	["ӵ"] = "Ӵ",
-	["ӷ"] = "Ӷ",
-	["ӹ"] = "Ӹ",
-	["ӻ"] = "Ӻ",
-	["ӽ"] = "Ӽ",
-	["ӿ"] = "Ӿ",
-	["ԁ"] = "Ԁ",
-	["ԃ"] = "Ԃ",
-	["ԅ"] = "Ԅ",
-	["ԇ"] = "Ԇ",
-	["ԉ"] = "Ԉ",
-	["ԋ"] = "Ԋ",
-	["ԍ"] = "Ԍ",
-	["ԏ"] = "Ԏ",
-	["ԑ"] = "Ԑ",
-	["ԓ"] = "Ԓ",
-	["ա"] = "Ա",
-	["բ"] = "Բ",
-	["գ"] = "Գ",
-	["դ"] = "Դ",
-	["ե"] = "Ե",
-	["զ"] = "Զ",
-	["է"] = "Է",
-	["ը"] = "Ը",
-	["թ"] = "Թ",
-	["ժ"] = "Ժ",
-	["ի"] = "Ի",
-	["լ"] = "Լ",
-	["խ"] = "Խ",
-	["ծ"] = "Ծ",
-	["կ"] = "Կ",
-	["հ"] = "Հ",
-	["ձ"] = "Ձ",
-	["ղ"] = "Ղ",
-	["ճ"] = "Ճ",
-	["մ"] = "Մ",
-	["յ"] = "Յ",
-	["ն"] = "Ն",
-	["շ"] = "Շ",
-	["ո"] = "Ո",
-	["չ"] = "Չ",
-	["պ"] = "Պ",
-	["ջ"] = "Ջ",
-	["ռ"] = "Ռ",
-	["ս"] = "Ս",
-	["վ"] = "Վ",
-	["տ"] = "Տ",
-	["ր"] = "Ր",
-	["ց"] = "Ց",
-	["ւ"] = "Ւ",
-	["փ"] = "Փ",
-	["ք"] = "Ք",
-	["օ"] = "Օ",
-	["ֆ"] = "Ֆ",
-	["ᵽ"] = "Ᵽ",
-	["ḁ"] = "Ḁ",
-	["ḃ"] = "Ḃ",
-	["ḅ"] = "Ḅ",
-	["ḇ"] = "Ḇ",
-	["ḉ"] = "Ḉ",
-	["ḋ"] = "Ḋ",
-	["ḍ"] = "Ḍ",
-	["ḏ"] = "Ḏ",
-	["ḑ"] = "Ḑ",
-	["ḓ"] = "Ḓ",
-	["ḕ"] = "Ḕ",
-	["ḗ"] = "Ḗ",
-	["ḙ"] = "Ḙ",
-	["ḛ"] = "Ḛ",
-	["ḝ"] = "Ḝ",
-	["ḟ"] = "Ḟ",
-	["ḡ"] = "Ḡ",
-	["ḣ"] = "Ḣ",
-	["ḥ"] = "Ḥ",
-	["ḧ"] = "Ḧ",
-	["ḩ"] = "Ḩ",
-	["ḫ"] = "Ḫ",
-	["ḭ"] = "Ḭ",
-	["ḯ"] = "Ḯ",
-	["ḱ"] = "Ḱ",
-	["ḳ"] = "Ḳ",
-	["ḵ"] = "Ḵ",
-	["ḷ"] = "Ḷ",
-	["ḹ"] = "Ḹ",
-	["ḻ"] = "Ḻ",
-	["ḽ"] = "Ḽ",
-	["ḿ"] = "Ḿ",
-	["ṁ"] = "Ṁ",
-	["ṃ"] = "Ṃ",
-	["ṅ"] = "Ṅ",
-	["ṇ"] = "Ṇ",
-	["ṉ"] = "Ṉ",
-	["ṋ"] = "Ṋ",
-	["ṍ"] = "Ṍ",
-	["ṏ"] = "Ṏ",
-	["ṑ"] = "Ṑ",
-	["ṓ"] = "Ṓ",
-	["ṕ"] = "Ṕ",
-	["ṗ"] = "Ṗ",
-	["ṙ"] = "Ṙ",
-	["ṛ"] = "Ṛ",
-	["ṝ"] = "Ṝ",
-	["ṟ"] = "Ṟ",
-	["ṡ"] = "Ṡ",
-	["ṣ"] = "Ṣ",
-	["ṥ"] = "Ṥ",
-	["ṧ"] = "Ṧ",
-	["ṩ"] = "Ṩ",
-	["ṫ"] = "Ṫ",
-	["ṭ"] = "Ṭ",
-	["ṯ"] = "Ṯ",
-	["ṱ"] = "Ṱ",
-	["ṳ"] = "Ṳ",
-	["ṵ"] = "Ṵ",
-	["ṷ"] = "Ṷ",
-	["ṹ"] = "Ṹ",
-	["ṻ"] = "Ṻ",
-	["ṽ"] = "Ṽ",
-	["ṿ"] = "Ṿ",
-	["ẁ"] = "Ẁ",
-	["ẃ"] = "Ẃ",
-	["ẅ"] = "Ẅ",
-	["ẇ"] = "Ẇ",
-	["ẉ"] = "Ẉ",
-	["ẋ"] = "Ẋ",
-	["ẍ"] = "Ẍ",
-	["ẏ"] = "Ẏ",
-	["ẑ"] = "Ẑ",
-	["ẓ"] = "Ẓ",
-	["ẕ"] = "Ẕ",
-	["ẛ"] = "Ṡ",
-	["ạ"] = "Ạ",
-	["ả"] = "Ả",
-	["ấ"] = "Ấ",
-	["ầ"] = "Ầ",
-	["ẩ"] = "Ẩ",
-	["ẫ"] = "Ẫ",
-	["ậ"] = "Ậ",
-	["ắ"] = "Ắ",
-	["ằ"] = "Ằ",
-	["ẳ"] = "Ẳ",
-	["ẵ"] = "Ẵ",
-	["ặ"] = "Ặ",
-	["ẹ"] = "Ẹ",
-	["ẻ"] = "Ẻ",
-	["ẽ"] = "Ẽ",
-	["ế"] = "Ế",
-	["ề"] = "Ề",
-	["ể"] = "Ể",
-	["ễ"] = "Ễ",
-	["ệ"] = "Ệ",
-	["ỉ"] = "Ỉ",
-	["ị"] = "Ị",
-	["ọ"] = "Ọ",
-	["ỏ"] = "Ỏ",
-	["ố"] = "Ố",
-	["ồ"] = "Ồ",
-	["ổ"] = "Ổ",
-	["ỗ"] = "Ỗ",
-	["ộ"] = "Ộ",
-	["ớ"] = "Ớ",
-	["ờ"] = "Ờ",
-	["ở"] = "Ở",
-	["ỡ"] = "Ỡ",
-	["ợ"] = "Ợ",
-	["ụ"] = "Ụ",
-	["ủ"] = "Ủ",
-	["ứ"] = "Ứ",
-	["ừ"] = "Ừ",
-	["ử"] = "Ử",
-	["ữ"] = "Ữ",
-	["ự"] = "Ự",
-	["ỳ"] = "Ỳ",
-	["ỵ"] = "Ỵ",
-	["ỷ"] = "Ỷ",
-	["ỹ"] = "Ỹ",
-	["ἀ"] = "Ἀ",
-	["ἁ"] = "Ἁ",
-	["ἂ"] = "Ἂ",
-	["ἃ"] = "Ἃ",
-	["ἄ"] = "Ἄ",
-	["ἅ"] = "Ἅ",
-	["ἆ"] = "Ἆ",
-	["ἇ"] = "Ἇ",
-	["ἐ"] = "Ἐ",
-	["ἑ"] = "Ἑ",
-	["ἒ"] = "Ἒ",
-	["ἓ"] = "Ἓ",
-	["ἔ"] = "Ἔ",
-	["ἕ"] = "Ἕ",
-	["ἠ"] = "Ἠ",
-	["ἡ"] = "Ἡ",
-	["ἢ"] = "Ἢ",
-	["ἣ"] = "Ἣ",
-	["ἤ"] = "Ἤ",
-	["ἥ"] = "Ἥ",
-	["ἦ"] = "Ἦ",
-	["ἧ"] = "Ἧ",
-	["ἰ"] = "Ἰ",
-	["ἱ"] = "Ἱ",
-	["ἲ"] = "Ἲ",
-	["ἳ"] = "Ἳ",
-	["ἴ"] = "Ἴ",
-	["ἵ"] = "Ἵ",
-	["ἶ"] = "Ἶ",
-	["ἷ"] = "Ἷ",
-	["ὀ"] = "Ὀ",
-	["ὁ"] = "Ὁ",
-	["ὂ"] = "Ὂ",
-	["ὃ"] = "Ὃ",
-	["ὄ"] = "Ὄ",
-	["ὅ"] = "Ὅ",
-	["ὑ"] = "Ὑ",
-	["ὓ"] = "Ὓ",
-	["ὕ"] = "Ὕ",
-	["ὗ"] = "Ὗ",
-	["ὠ"] = "Ὠ",
-	["ὡ"] = "Ὡ",
-	["ὢ"] = "Ὢ",
-	["ὣ"] = "Ὣ",
-	["ὤ"] = "Ὤ",
-	["ὥ"] = "Ὥ",
-	["ὦ"] = "Ὦ",
-	["ὧ"] = "Ὧ",
-	["ὰ"] = "Ὰ",
-	["ά"] = "Ά",
-	["ὲ"] = "Ὲ",
-	["έ"] = "Έ",
-	["ὴ"] = "Ὴ",
-	["ή"] = "Ή",
-	["ὶ"] = "Ὶ",
-	["ί"] = "Ί",
-	["ὸ"] = "Ὸ",
-	["ό"] = "Ό",
-	["ὺ"] = "Ὺ",
-	["ύ"] = "Ύ",
-	["ὼ"] = "Ὼ",
-	["ώ"] = "Ώ",
-	["ᾀ"] = "ᾈ",
-	["ᾁ"] = "ᾉ",
-	["ᾂ"] = "ᾊ",
-	["ᾃ"] = "ᾋ",
-	["ᾄ"] = "ᾌ",
-	["ᾅ"] = "ᾍ",
-	["ᾆ"] = "ᾎ",
-	["ᾇ"] = "ᾏ",
-	["ᾐ"] = "ᾘ",
-	["ᾑ"] = "ᾙ",
-	["ᾒ"] = "ᾚ",
-	["ᾓ"] = "ᾛ",
-	["ᾔ"] = "ᾜ",
-	["ᾕ"] = "ᾝ",
-	["ᾖ"] = "ᾞ",
-	["ᾗ"] = "ᾟ",
-	["ᾠ"] = "ᾨ",
-	["ᾡ"] = "ᾩ",
-	["ᾢ"] = "ᾪ",
-	["ᾣ"] = "ᾫ",
-	["ᾤ"] = "ᾬ",
-	["ᾥ"] = "ᾭ",
-	["ᾦ"] = "ᾮ",
-	["ᾧ"] = "ᾯ",
-	["ᾰ"] = "Ᾰ",
-	["ᾱ"] = "Ᾱ",
-	["ᾳ"] = "ᾼ",
-	["ι"] = "Ι",
-	["ῃ"] = "ῌ",
-	["ῐ"] = "Ῐ",
-	["ῑ"] = "Ῑ",
-	["ῠ"] = "Ῠ",
-	["ῡ"] = "Ῡ",
-	["ῥ"] = "Ῥ",
-	["ῳ"] = "ῼ",
-	["ⅎ"] = "Ⅎ",
-	["ⅰ"] = "Ⅰ",
-	["ⅱ"] = "Ⅱ",
-	["ⅲ"] = "Ⅲ",
-	["ⅳ"] = "Ⅳ",
-	["ⅴ"] = "Ⅴ",
-	["ⅵ"] = "Ⅵ",
-	["ⅶ"] = "Ⅶ",
-	["ⅷ"] = "Ⅷ",
-	["ⅸ"] = "Ⅸ",
-	["ⅹ"] = "Ⅹ",
-	["ⅺ"] = "Ⅺ",
-	["ⅻ"] = "Ⅻ",
-	["ⅼ"] = "Ⅼ",
-	["ⅽ"] = "Ⅽ",
-	["ⅾ"] = "Ⅾ",
-	["ⅿ"] = "Ⅿ",
-	["ↄ"] = "Ↄ",
-	["ⓐ"] = "Ⓐ",
-	["ⓑ"] = "Ⓑ",
-	["ⓒ"] = "Ⓒ",
-	["ⓓ"] = "Ⓓ",
-	["ⓔ"] = "Ⓔ",
-	["ⓕ"] = "Ⓕ",
-	["ⓖ"] = "Ⓖ",
-	["ⓗ"] = "Ⓗ",
-	["ⓘ"] = "Ⓘ",
-	["ⓙ"] = "Ⓙ",
-	["ⓚ"] = "Ⓚ",
-	["ⓛ"] = "Ⓛ",
-	["ⓜ"] = "Ⓜ",
-	["ⓝ"] = "Ⓝ",
-	["ⓞ"] = "Ⓞ",
-	["ⓟ"] = "Ⓟ",
-	["ⓠ"] = "Ⓠ",
-	["ⓡ"] = "Ⓡ",
-	["ⓢ"] = "Ⓢ",
-	["ⓣ"] = "Ⓣ",
-	["ⓤ"] = "Ⓤ",
-	["ⓥ"] = "Ⓥ",
-	["ⓦ"] = "Ⓦ",
-	["ⓧ"] = "Ⓧ",
-	["ⓨ"] = "Ⓨ",
-	["ⓩ"] = "Ⓩ",
-	["ⰰ"] = "Ⰰ",
-	["ⰱ"] = "Ⰱ",
-	["ⰲ"] = "Ⰲ",
-	["ⰳ"] = "Ⰳ",
-	["ⰴ"] = "Ⰴ",
-	["ⰵ"] = "Ⰵ",
-	["ⰶ"] = "Ⰶ",
-	["ⰷ"] = "Ⰷ",
-	["ⰸ"] = "Ⰸ",
-	["ⰹ"] = "Ⰹ",
-	["ⰺ"] = "Ⰺ",
-	["ⰻ"] = "Ⰻ",
-	["ⰼ"] = "Ⰼ",
-	["ⰽ"] = "Ⰽ",
-	["ⰾ"] = "Ⰾ",
-	["ⰿ"] = "Ⰿ",
-	["ⱀ"] = "Ⱀ",
-	["ⱁ"] = "Ⱁ",
-	["ⱂ"] = "Ⱂ",
-	["ⱃ"] = "Ⱃ",
-	["ⱄ"] = "Ⱄ",
-	["ⱅ"] = "Ⱅ",
-	["ⱆ"] = "Ⱆ",
-	["ⱇ"] = "Ⱇ",
-	["ⱈ"] = "Ⱈ",
-	["ⱉ"] = "Ⱉ",
-	["ⱊ"] = "Ⱊ",
-	["ⱋ"] = "Ⱋ",
-	["ⱌ"] = "Ⱌ",
-	["ⱍ"] = "Ⱍ",
-	["ⱎ"] = "Ⱎ",
-	["ⱏ"] = "Ⱏ",
-	["ⱐ"] = "Ⱐ",
-	["ⱑ"] = "Ⱑ",
-	["ⱒ"] = "Ⱒ",
-	["ⱓ"] = "Ⱓ",
-	["ⱔ"] = "Ⱔ",
-	["ⱕ"] = "Ⱕ",
-	["ⱖ"] = "Ⱖ",
-	["ⱗ"] = "Ⱗ",
-	["ⱘ"] = "Ⱘ",
-	["ⱙ"] = "Ⱙ",
-	["ⱚ"] = "Ⱚ",
-	["ⱛ"] = "Ⱛ",
-	["ⱜ"] = "Ⱜ",
-	["ⱝ"] = "Ⱝ",
-	["ⱞ"] = "Ⱞ",
-	["ⱡ"] = "Ⱡ",
-	["ⱥ"] = "Ⱥ",
-	["ⱦ"] = "Ⱦ",
-	["ⱨ"] = "Ⱨ",
-	["ⱪ"] = "Ⱪ",
-	["ⱬ"] = "Ⱬ",
-	["ⱶ"] = "Ⱶ",
-	["ⲁ"] = "Ⲁ",
-	["ⲃ"] = "Ⲃ",
-	["ⲅ"] = "Ⲅ",
-	["ⲇ"] = "Ⲇ",
-	["ⲉ"] = "Ⲉ",
-	["ⲋ"] = "Ⲋ",
-	["ⲍ"] = "Ⲍ",
-	["ⲏ"] = "Ⲏ",
-	["ⲑ"] = "Ⲑ",
-	["ⲓ"] = "Ⲓ",
-	["ⲕ"] = "Ⲕ",
-	["ⲗ"] = "Ⲗ",
-	["ⲙ"] = "Ⲙ",
-	["ⲛ"] = "Ⲛ",
-	["ⲝ"] = "Ⲝ",
-	["ⲟ"] = "Ⲟ",
-	["ⲡ"] = "Ⲡ",
-	["ⲣ"] = "Ⲣ",
-	["ⲥ"] = "Ⲥ",
-	["ⲧ"] = "Ⲧ",
-	["ⲩ"] = "Ⲩ",
-	["ⲫ"] = "Ⲫ",
-	["ⲭ"] = "Ⲭ",
-	["ⲯ"] = "Ⲯ",
-	["ⲱ"] = "Ⲱ",
-	["ⲳ"] = "Ⲳ",
-	["ⲵ"] = "Ⲵ",
-	["ⲷ"] = "Ⲷ",
-	["ⲹ"] = "Ⲹ",
-	["ⲻ"] = "Ⲻ",
-	["ⲽ"] = "Ⲽ",
-	["ⲿ"] = "Ⲿ",
-	["ⳁ"] = "Ⳁ",
-	["ⳃ"] = "Ⳃ",
-	["ⳅ"] = "Ⳅ",
-	["ⳇ"] = "Ⳇ",
-	["ⳉ"] = "Ⳉ",
-	["ⳋ"] = "Ⳋ",
-	["ⳍ"] = "Ⳍ",
-	["ⳏ"] = "Ⳏ",
-	["ⳑ"] = "Ⳑ",
-	["ⳓ"] = "Ⳓ",
-	["ⳕ"] = "Ⳕ",
-	["ⳗ"] = "Ⳗ",
-	["ⳙ"] = "Ⳙ",
-	["ⳛ"] = "Ⳛ",
-	["ⳝ"] = "Ⳝ",
-	["ⳟ"] = "Ⳟ",
-	["ⳡ"] = "Ⳡ",
-	["ⳣ"] = "Ⳣ",
-	["ⴀ"] = "Ⴀ",
-	["ⴁ"] = "Ⴁ",
-	["ⴂ"] = "Ⴂ",
-	["ⴃ"] = "Ⴃ",
-	["ⴄ"] = "Ⴄ",
-	["ⴅ"] = "Ⴅ",
-	["ⴆ"] = "Ⴆ",
-	["ⴇ"] = "Ⴇ",
-	["ⴈ"] = "Ⴈ",
-	["ⴉ"] = "Ⴉ",
-	["ⴊ"] = "Ⴊ",
-	["ⴋ"] = "Ⴋ",
-	["ⴌ"] = "Ⴌ",
-	["ⴍ"] = "Ⴍ",
-	["ⴎ"] = "Ⴎ",
-	["ⴏ"] = "Ⴏ",
-	["ⴐ"] = "Ⴐ",
-	["ⴑ"] = "Ⴑ",
-	["ⴒ"] = "Ⴒ",
-	["ⴓ"] = "Ⴓ",
-	["ⴔ"] = "Ⴔ",
-	["ⴕ"] = "Ⴕ",
-	["ⴖ"] = "Ⴖ",
-	["ⴗ"] = "Ⴗ",
-	["ⴘ"] = "Ⴘ",
-	["ⴙ"] = "Ⴙ",
-	["ⴚ"] = "Ⴚ",
-	["ⴛ"] = "Ⴛ",
-	["ⴜ"] = "Ⴜ",
-	["ⴝ"] = "Ⴝ",
-	["ⴞ"] = "Ⴞ",
-	["ⴟ"] = "Ⴟ",
-	["ⴠ"] = "Ⴠ",
-	["ⴡ"] = "Ⴡ",
-	["ⴢ"] = "Ⴢ",
-	["ⴣ"] = "Ⴣ",
-	["ⴤ"] = "Ⴤ",
-	["ⴥ"] = "Ⴥ",
-	["a"] = "A",
-	["b"] = "B",
-	["c"] = "C",
-	["d"] = "D",
-	["e"] = "E",
-	["f"] = "F",
-	["g"] = "G",
-	["h"] = "H",
-	["i"] = "I",
-	["j"] = "J",
-	["k"] = "K",
-	["l"] = "L",
-	["m"] = "M",
-	["n"] = "N",
-	["o"] = "O",
-	["p"] = "P",
-	["q"] = "Q",
-	["r"] = "R",
-	["s"] = "S",
-	["t"] = "T",
-	["u"] = "U",
-	["v"] = "V",
-	["w"] = "W",
-	["x"] = "X",
-	["y"] = "Y",
-	["z"] = "Z",
-	["𐐨"] = "𐐀",
-	["𐐩"] = "𐐁",
-	["𐐪"] = "𐐂",
-	["𐐫"] = "𐐃",
-	["𐐬"] = "𐐄",
-	["𐐭"] = "𐐅",
-	["𐐮"] = "𐐆",
-	["𐐯"] = "𐐇",
-	["𐐰"] = "𐐈",
-	["𐐱"] = "𐐉",
-	["𐐲"] = "𐐊",
-	["𐐳"] = "𐐋",
-	["𐐴"] = "𐐌",
-	["𐐵"] = "𐐍",
-	["𐐶"] = "𐐎",
-	["𐐷"] = "𐐏",
-	["𐐸"] = "𐐐",
-	["𐐹"] = "𐐑",
-	["𐐺"] = "𐐒",
-	["𐐻"] = "𐐓",
-	["𐐼"] = "𐐔",
-	["𐐽"] = "𐐕",
-	["𐐾"] = "𐐖",
-	["𐐿"] = "𐐗",
-	["𐑀"] = "𐐘",
-	["𐑁"] = "𐐙",
-	["𐑂"] = "𐐚",
-	["𐑃"] = "𐐛",
-	["𐑄"] = "𐐜",
-	["𐑅"] = "𐐝",
-	["𐑆"] = "𐐞",
-	["𐑇"] = "𐐟",
-	["𐑈"] = "𐐠",
-	["𐑉"] = "𐐡",
-	["𐑊"] = "𐐢",
-	["𐑋"] = "𐐣",
-	["𐑌"] = "𐐤",
-	["𐑍"] = "𐐥",
-	["𐑎"] = "𐐦",
-	["𐑏"] = "𐐧",
-}
-
-
-utf8_uc_lc = {
-	["A"] = "a",
-	["B"] = "b",
-	["C"] = "c",
-	["D"] = "d",
-	["E"] = "e",
-	["F"] = "f",
-	["G"] = "g",
-	["H"] = "h",
-	["I"] = "i",
-	["J"] = "j",
-	["K"] = "k",
-	["L"] = "l",
-	["M"] = "m",
-	["N"] = "n",
-	["O"] = "o",
-	["P"] = "p",
-	["Q"] = "q",
-	["R"] = "r",
-	["S"] = "s",
-	["T"] = "t",
-	["U"] = "u",
-	["V"] = "v",
-	["W"] = "w",
-	["X"] = "x",
-	["Y"] = "y",
-	["Z"] = "z",
-	["À"] = "à",
-	["Á"] = "á",
-	["Â"] = "â",
-	["Ã"] = "ã",
-	["Ä"] = "ä",
-	["Å"] = "å",
-	["Æ"] = "æ",
-	["Ç"] = "ç",
-	["È"] = "è",
-	["É"] = "é",
-	["Ê"] = "ê",
-	["Ë"] = "ë",
-	["Ì"] = "ì",
-	["Í"] = "í",
-	["Î"] = "î",
-	["Ï"] = "ï",
-	["Ð"] = "ð",
-	["Ñ"] = "ñ",
-	["Ò"] = "ò",
-	["Ó"] = "ó",
-	["Ô"] = "ô",
-	["Õ"] = "õ",
-	["Ö"] = "ö",
-	["Ø"] = "ø",
-	["Ù"] = "ù",
-	["Ú"] = "ú",
-	["Û"] = "û",
-	["Ü"] = "ü",
-	["Ý"] = "ý",
-	["Þ"] = "þ",
-	["Ā"] = "ā",
-	["Ă"] = "ă",
-	["Ą"] = "ą",
-	["Ć"] = "ć",
-	["Ĉ"] = "ĉ",
-	["Ċ"] = "ċ",
-	["Č"] = "č",
-	["Ď"] = "ď",
-	["Đ"] = "đ",
-	["Ē"] = "ē",
-	["Ĕ"] = "ĕ",
-	["Ė"] = "ė",
-	["Ę"] = "ę",
-	["Ě"] = "ě",
-	["Ĝ"] = "ĝ",
-	["Ğ"] = "ğ",
-	["Ġ"] = "ġ",
-	["Ģ"] = "ģ",
-	["Ĥ"] = "ĥ",
-	["Ħ"] = "ħ",
-	["Ĩ"] = "ĩ",
-	["Ī"] = "ī",
-	["Ĭ"] = "ĭ",
-	["Į"] = "į",
-	["İ"] = "i",
-	["IJ"] = "ij",
-	["Ĵ"] = "ĵ",
-	["Ķ"] = "ķ",
-	["Ĺ"] = "ĺ",
-	["Ļ"] = "ļ",
-	["Ľ"] = "ľ",
-	["Ŀ"] = "ŀ",
-	["Ł"] = "ł",
-	["Ń"] = "ń",
-	["Ņ"] = "ņ",
-	["Ň"] = "ň",
-	["Ŋ"] = "ŋ",
-	["Ō"] = "ō",
-	["Ŏ"] = "ŏ",
-	["Ő"] = "ő",
-	["Œ"] = "œ",
-	["Ŕ"] = "ŕ",
-	["Ŗ"] = "ŗ",
-	["Ř"] = "ř",
-	["Ś"] = "ś",
-	["Ŝ"] = "ŝ",
-	["Ş"] = "ş",
-	["Š"] = "š",
-	["Ţ"] = "ţ",
-	["Ť"] = "ť",
-	["Ŧ"] = "ŧ",
-	["Ũ"] = "ũ",
-	["Ū"] = "ū",
-	["Ŭ"] = "ŭ",
-	["Ů"] = "ů",
-	["Ű"] = "ű",
-	["Ų"] = "ų",
-	["Ŵ"] = "ŵ",
-	["Ŷ"] = "ŷ",
-	["Ÿ"] = "ÿ",
-	["Ź"] = "ź",
-	["Ż"] = "ż",
-	["Ž"] = "ž",
-	["Ɓ"] = "ɓ",
-	["Ƃ"] = "ƃ",
-	["Ƅ"] = "ƅ",
-	["Ɔ"] = "ɔ",
-	["Ƈ"] = "ƈ",
-	["Ɖ"] = "ɖ",
-	["Ɗ"] = "ɗ",
-	["Ƌ"] = "ƌ",
-	["Ǝ"] = "ǝ",
-	["Ə"] = "ə",
-	["Ɛ"] = "ɛ",
-	["Ƒ"] = "ƒ",
-	["Ɠ"] = "ɠ",
-	["Ɣ"] = "ɣ",
-	["Ɩ"] = "ɩ",
-	["Ɨ"] = "ɨ",
-	["Ƙ"] = "ƙ",
-	["Ɯ"] = "ɯ",
-	["Ɲ"] = "ɲ",
-	["Ɵ"] = "ɵ",
-	["Ơ"] = "ơ",
-	["Ƣ"] = "ƣ",
-	["Ƥ"] = "ƥ",
-	["Ʀ"] = "ʀ",
-	["Ƨ"] = "ƨ",
-	["Ʃ"] = "ʃ",
-	["Ƭ"] = "ƭ",
-	["Ʈ"] = "ʈ",
-	["Ư"] = "ư",
-	["Ʊ"] = "ʊ",
-	["Ʋ"] = "ʋ",
-	["Ƴ"] = "ƴ",
-	["Ƶ"] = "ƶ",
-	["Ʒ"] = "ʒ",
-	["Ƹ"] = "ƹ",
-	["Ƽ"] = "ƽ",
-	["DŽ"] = "dž",
-	["Dž"] = "dž",
-	["LJ"] = "lj",
-	["Lj"] = "lj",
-	["NJ"] = "nj",
-	["Nj"] = "nj",
-	["Ǎ"] = "ǎ",
-	["Ǐ"] = "ǐ",
-	["Ǒ"] = "ǒ",
-	["Ǔ"] = "ǔ",
-	["Ǖ"] = "ǖ",
-	["Ǘ"] = "ǘ",
-	["Ǚ"] = "ǚ",
-	["Ǜ"] = "ǜ",
-	["Ǟ"] = "ǟ",
-	["Ǡ"] = "ǡ",
-	["Ǣ"] = "ǣ",
-	["Ǥ"] = "ǥ",
-	["Ǧ"] = "ǧ",
-	["Ǩ"] = "ǩ",
-	["Ǫ"] = "ǫ",
-	["Ǭ"] = "ǭ",
-	["Ǯ"] = "ǯ",
-	["DZ"] = "dz",
-	["Dz"] = "dz",
-	["Ǵ"] = "ǵ",
-	["Ƕ"] = "ƕ",
-	["Ƿ"] = "ƿ",
-	["Ǹ"] = "ǹ",
-	["Ǻ"] = "ǻ",
-	["Ǽ"] = "ǽ",
-	["Ǿ"] = "ǿ",
-	["Ȁ"] = "ȁ",
-	["Ȃ"] = "ȃ",
-	["Ȅ"] = "ȅ",
-	["Ȇ"] = "ȇ",
-	["Ȉ"] = "ȉ",
-	["Ȋ"] = "ȋ",
-	["Ȍ"] = "ȍ",
-	["Ȏ"] = "ȏ",
-	["Ȑ"] = "ȑ",
-	["Ȓ"] = "ȓ",
-	["Ȕ"] = "ȕ",
-	["Ȗ"] = "ȗ",
-	["Ș"] = "ș",
-	["Ț"] = "ț",
-	["Ȝ"] = "ȝ",
-	["Ȟ"] = "ȟ",
-	["Ƞ"] = "ƞ",
-	["Ȣ"] = "ȣ",
-	["Ȥ"] = "ȥ",
-	["Ȧ"] = "ȧ",
-	["Ȩ"] = "ȩ",
-	["Ȫ"] = "ȫ",
-	["Ȭ"] = "ȭ",
-	["Ȯ"] = "ȯ",
-	["Ȱ"] = "ȱ",
-	["Ȳ"] = "ȳ",
-	["Ⱥ"] = "ⱥ",
-	["Ȼ"] = "ȼ",
-	["Ƚ"] = "ƚ",
-	["Ⱦ"] = "ⱦ",
-	["Ɂ"] = "ɂ",
-	["Ƀ"] = "ƀ",
-	["Ʉ"] = "ʉ",
-	["Ʌ"] = "ʌ",
-	["Ɇ"] = "ɇ",
-	["Ɉ"] = "ɉ",
-	["Ɋ"] = "ɋ",
-	["Ɍ"] = "ɍ",
-	["Ɏ"] = "ɏ",
-	["Ά"] = "ά",
-	["Έ"] = "έ",
-	["Ή"] = "ή",
-	["Ί"] = "ί",
-	["Ό"] = "ό",
-	["Ύ"] = "ύ",
-	["Ώ"] = "ώ",
-	["Α"] = "α",
-	["Β"] = "β",
-	["Γ"] = "γ",
-	["Δ"] = "δ",
-	["Ε"] = "ε",
-	["Ζ"] = "ζ",
-	["Η"] = "η",
-	["Θ"] = "θ",
-	["Ι"] = "ι",
-	["Κ"] = "κ",
-	["Λ"] = "λ",
-	["Μ"] = "μ",
-	["Ν"] = "ν",
-	["Ξ"] = "ξ",
-	["Ο"] = "ο",
-	["Π"] = "π",
-	["Ρ"] = "ρ",
-	["Σ"] = "σ",
-	["Τ"] = "τ",
-	["Υ"] = "υ",
-	["Φ"] = "φ",
-	["Χ"] = "χ",
-	["Ψ"] = "ψ",
-	["Ω"] = "ω",
-	["Ϊ"] = "ϊ",
-	["Ϋ"] = "ϋ",
-	["Ϙ"] = "ϙ",
-	["Ϛ"] = "ϛ",
-	["Ϝ"] = "ϝ",
-	["Ϟ"] = "ϟ",
-	["Ϡ"] = "ϡ",
-	["Ϣ"] = "ϣ",
-	["Ϥ"] = "ϥ",
-	["Ϧ"] = "ϧ",
-	["Ϩ"] = "ϩ",
-	["Ϫ"] = "ϫ",
-	["Ϭ"] = "ϭ",
-	["Ϯ"] = "ϯ",
-	["ϴ"] = "θ",
-	["Ϸ"] = "ϸ",
-	["Ϲ"] = "ϲ",
-	["Ϻ"] = "ϻ",
-	["Ͻ"] = "ͻ",
-	["Ͼ"] = "ͼ",
-	["Ͽ"] = "ͽ",
-	["Ѐ"] = "ѐ",
-	["Ё"] = "ё",
-	["Ђ"] = "ђ",
-	["Ѓ"] = "ѓ",
-	["Є"] = "є",
-	["Ѕ"] = "ѕ",
-	["І"] = "і",
-	["Ї"] = "ї",
-	["Ј"] = "ј",
-	["Љ"] = "љ",
-	["Њ"] = "њ",
-	["Ћ"] = "ћ",
-	["Ќ"] = "ќ",
-	["Ѝ"] = "ѝ",
-	["Ў"] = "ў",
-	["Џ"] = "џ",
-	["А"] = "а",
-	["Б"] = "б",
-	["В"] = "в",
-	["Г"] = "г",
-	["Д"] = "д",
-	["Е"] = "е",
-	["Ж"] = "ж",
-	["З"] = "з",
-	["И"] = "и",
-	["Й"] = "й",
-	["К"] = "к",
-	["Л"] = "л",
-	["М"] = "м",
-	["Н"] = "н",
-	["О"] = "о",
-	["П"] = "п",
-	["Р"] = "р",
-	["С"] = "с",
-	["Т"] = "т",
-	["У"] = "у",
-	["Ф"] = "ф",
-	["Х"] = "х",
-	["Ц"] = "ц",
-	["Ч"] = "ч",
-	["Ш"] = "ш",
-	["Щ"] = "щ",
-	["Ъ"] = "ъ",
-	["Ы"] = "ы",
-	["Ь"] = "ь",
-	["Э"] = "э",
-	["Ю"] = "ю",
-	["Я"] = "я",
-	["Ѡ"] = "ѡ",
-	["Ѣ"] = "ѣ",
-	["Ѥ"] = "ѥ",
-	["Ѧ"] = "ѧ",
-	["Ѩ"] = "ѩ",
-	["Ѫ"] = "ѫ",
-	["Ѭ"] = "ѭ",
-	["Ѯ"] = "ѯ",
-	["Ѱ"] = "ѱ",
-	["Ѳ"] = "ѳ",
-	["Ѵ"] = "ѵ",
-	["Ѷ"] = "ѷ",
-	["Ѹ"] = "ѹ",
-	["Ѻ"] = "ѻ",
-	["Ѽ"] = "ѽ",
-	["Ѿ"] = "ѿ",
-	["Ҁ"] = "ҁ",
-	["Ҋ"] = "ҋ",
-	["Ҍ"] = "ҍ",
-	["Ҏ"] = "ҏ",
-	["Ґ"] = "ґ",
-	["Ғ"] = "ғ",
-	["Ҕ"] = "ҕ",
-	["Җ"] = "җ",
-	["Ҙ"] = "ҙ",
-	["Қ"] = "қ",
-	["Ҝ"] = "ҝ",
-	["Ҟ"] = "ҟ",
-	["Ҡ"] = "ҡ",
-	["Ң"] = "ң",
-	["Ҥ"] = "ҥ",
-	["Ҧ"] = "ҧ",
-	["Ҩ"] = "ҩ",
-	["Ҫ"] = "ҫ",
-	["Ҭ"] = "ҭ",
-	["Ү"] = "ү",
-	["Ұ"] = "ұ",
-	["Ҳ"] = "ҳ",
-	["Ҵ"] = "ҵ",
-	["Ҷ"] = "ҷ",
-	["Ҹ"] = "ҹ",
-	["Һ"] = "һ",
-	["Ҽ"] = "ҽ",
-	["Ҿ"] = "ҿ",
-	["Ӏ"] = "ӏ",
-	["Ӂ"] = "ӂ",
-	["Ӄ"] = "ӄ",
-	["Ӆ"] = "ӆ",
-	["Ӈ"] = "ӈ",
-	["Ӊ"] = "ӊ",
-	["Ӌ"] = "ӌ",
-	["Ӎ"] = "ӎ",
-	["Ӑ"] = "ӑ",
-	["Ӓ"] = "ӓ",
-	["Ӕ"] = "ӕ",
-	["Ӗ"] = "ӗ",
-	["Ә"] = "ә",
-	["Ӛ"] = "ӛ",
-	["Ӝ"] = "ӝ",
-	["Ӟ"] = "ӟ",
-	["Ӡ"] = "ӡ",
-	["Ӣ"] = "ӣ",
-	["Ӥ"] = "ӥ",
-	["Ӧ"] = "ӧ",
-	["Ө"] = "ө",
-	["Ӫ"] = "ӫ",
-	["Ӭ"] = "ӭ",
-	["Ӯ"] = "ӯ",
-	["Ӱ"] = "ӱ",
-	["Ӳ"] = "ӳ",
-	["Ӵ"] = "ӵ",
-	["Ӷ"] = "ӷ",
-	["Ӹ"] = "ӹ",
-	["Ӻ"] = "ӻ",
-	["Ӽ"] = "ӽ",
-	["Ӿ"] = "ӿ",
-	["Ԁ"] = "ԁ",
-	["Ԃ"] = "ԃ",
-	["Ԅ"] = "ԅ",
-	["Ԇ"] = "ԇ",
-	["Ԉ"] = "ԉ",
-	["Ԋ"] = "ԋ",
-	["Ԍ"] = "ԍ",
-	["Ԏ"] = "ԏ",
-	["Ԑ"] = "ԑ",
-	["Ԓ"] = "ԓ",
-	["Ա"] = "ա",
-	["Բ"] = "բ",
-	["Գ"] = "գ",
-	["Դ"] = "դ",
-	["Ե"] = "ե",
-	["Զ"] = "զ",
-	["Է"] = "է",
-	["Ը"] = "ը",
-	["Թ"] = "թ",
-	["Ժ"] = "ժ",
-	["Ի"] = "ի",
-	["Լ"] = "լ",
-	["Խ"] = "խ",
-	["Ծ"] = "ծ",
-	["Կ"] = "կ",
-	["Հ"] = "հ",
-	["Ձ"] = "ձ",
-	["Ղ"] = "ղ",
-	["Ճ"] = "ճ",
-	["Մ"] = "մ",
-	["Յ"] = "յ",
-	["Ն"] = "ն",
-	["Շ"] = "շ",
-	["Ո"] = "ո",
-	["Չ"] = "չ",
-	["Պ"] = "պ",
-	["Ջ"] = "ջ",
-	["Ռ"] = "ռ",
-	["Ս"] = "ս",
-	["Վ"] = "վ",
-	["Տ"] = "տ",
-	["Ր"] = "ր",
-	["Ց"] = "ց",
-	["Ւ"] = "ւ",
-	["Փ"] = "փ",
-	["Ք"] = "ք",
-	["Օ"] = "օ",
-	["Ֆ"] = "ֆ",
-	["Ⴀ"] = "ⴀ",
-	["Ⴁ"] = "ⴁ",
-	["Ⴂ"] = "ⴂ",
-	["Ⴃ"] = "ⴃ",
-	["Ⴄ"] = "ⴄ",
-	["Ⴅ"] = "ⴅ",
-	["Ⴆ"] = "ⴆ",
-	["Ⴇ"] = "ⴇ",
-	["Ⴈ"] = "ⴈ",
-	["Ⴉ"] = "ⴉ",
-	["Ⴊ"] = "ⴊ",
-	["Ⴋ"] = "ⴋ",
-	["Ⴌ"] = "ⴌ",
-	["Ⴍ"] = "ⴍ",
-	["Ⴎ"] = "ⴎ",
-	["Ⴏ"] = "ⴏ",
-	["Ⴐ"] = "ⴐ",
-	["Ⴑ"] = "ⴑ",
-	["Ⴒ"] = "ⴒ",
-	["Ⴓ"] = "ⴓ",
-	["Ⴔ"] = "ⴔ",
-	["Ⴕ"] = "ⴕ",
-	["Ⴖ"] = "ⴖ",
-	["Ⴗ"] = "ⴗ",
-	["Ⴘ"] = "ⴘ",
-	["Ⴙ"] = "ⴙ",
-	["Ⴚ"] = "ⴚ",
-	["Ⴛ"] = "ⴛ",
-	["Ⴜ"] = "ⴜ",
-	["Ⴝ"] = "ⴝ",
-	["Ⴞ"] = "ⴞ",
-	["Ⴟ"] = "ⴟ",
-	["Ⴠ"] = "ⴠ",
-	["Ⴡ"] = "ⴡ",
-	["Ⴢ"] = "ⴢ",
-	["Ⴣ"] = "ⴣ",
-	["Ⴤ"] = "ⴤ",
-	["Ⴥ"] = "ⴥ",
-	["Ḁ"] = "ḁ",
-	["Ḃ"] = "ḃ",
-	["Ḅ"] = "ḅ",
-	["Ḇ"] = "ḇ",
-	["Ḉ"] = "ḉ",
-	["Ḋ"] = "ḋ",
-	["Ḍ"] = "ḍ",
-	["Ḏ"] = "ḏ",
-	["Ḑ"] = "ḑ",
-	["Ḓ"] = "ḓ",
-	["Ḕ"] = "ḕ",
-	["Ḗ"] = "ḗ",
-	["Ḙ"] = "ḙ",
-	["Ḛ"] = "ḛ",
-	["Ḝ"] = "ḝ",
-	["Ḟ"] = "ḟ",
-	["Ḡ"] = "ḡ",
-	["Ḣ"] = "ḣ",
-	["Ḥ"] = "ḥ",
-	["Ḧ"] = "ḧ",
-	["Ḩ"] = "ḩ",
-	["Ḫ"] = "ḫ",
-	["Ḭ"] = "ḭ",
-	["Ḯ"] = "ḯ",
-	["Ḱ"] = "ḱ",
-	["Ḳ"] = "ḳ",
-	["Ḵ"] = "ḵ",
-	["Ḷ"] = "ḷ",
-	["Ḹ"] = "ḹ",
-	["Ḻ"] = "ḻ",
-	["Ḽ"] = "ḽ",
-	["Ḿ"] = "ḿ",
-	["Ṁ"] = "ṁ",
-	["Ṃ"] = "ṃ",
-	["Ṅ"] = "ṅ",
-	["Ṇ"] = "ṇ",
-	["Ṉ"] = "ṉ",
-	["Ṋ"] = "ṋ",
-	["Ṍ"] = "ṍ",
-	["Ṏ"] = "ṏ",
-	["Ṑ"] = "ṑ",
-	["Ṓ"] = "ṓ",
-	["Ṕ"] = "ṕ",
-	["Ṗ"] = "ṗ",
-	["Ṙ"] = "ṙ",
-	["Ṛ"] = "ṛ",
-	["Ṝ"] = "ṝ",
-	["Ṟ"] = "ṟ",
-	["Ṡ"] = "ṡ",
-	["Ṣ"] = "ṣ",
-	["Ṥ"] = "ṥ",
-	["Ṧ"] = "ṧ",
-	["Ṩ"] = "ṩ",
-	["Ṫ"] = "ṫ",
-	["Ṭ"] = "ṭ",
-	["Ṯ"] = "ṯ",
-	["Ṱ"] = "ṱ",
-	["Ṳ"] = "ṳ",
-	["Ṵ"] = "ṵ",
-	["Ṷ"] = "ṷ",
-	["Ṹ"] = "ṹ",
-	["Ṻ"] = "ṻ",
-	["Ṽ"] = "ṽ",
-	["Ṿ"] = "ṿ",
-	["Ẁ"] = "ẁ",
-	["Ẃ"] = "ẃ",
-	["Ẅ"] = "ẅ",
-	["Ẇ"] = "ẇ",
-	["Ẉ"] = "ẉ",
-	["Ẋ"] = "ẋ",
-	["Ẍ"] = "ẍ",
-	["Ẏ"] = "ẏ",
-	["Ẑ"] = "ẑ",
-	["Ẓ"] = "ẓ",
-	["Ẕ"] = "ẕ",
-	["Ạ"] = "ạ",
-	["Ả"] = "ả",
-	["Ấ"] = "ấ",
-	["Ầ"] = "ầ",
-	["Ẩ"] = "ẩ",
-	["Ẫ"] = "ẫ",
-	["Ậ"] = "ậ",
-	["Ắ"] = "ắ",
-	["Ằ"] = "ằ",
-	["Ẳ"] = "ẳ",
-	["Ẵ"] = "ẵ",
-	["Ặ"] = "ặ",
-	["Ẹ"] = "ẹ",
-	["Ẻ"] = "ẻ",
-	["Ẽ"] = "ẽ",
-	["Ế"] = "ế",
-	["Ề"] = "ề",
-	["Ể"] = "ể",
-	["Ễ"] = "ễ",
-	["Ệ"] = "ệ",
-	["Ỉ"] = "ỉ",
-	["Ị"] = "ị",
-	["Ọ"] = "ọ",
-	["Ỏ"] = "ỏ",
-	["Ố"] = "ố",
-	["Ồ"] = "ồ",
-	["Ổ"] = "ổ",
-	["Ỗ"] = "ỗ",
-	["Ộ"] = "ộ",
-	["Ớ"] = "ớ",
-	["Ờ"] = "ờ",
-	["Ở"] = "ở",
-	["Ỡ"] = "ỡ",
-	["Ợ"] = "ợ",
-	["Ụ"] = "ụ",
-	["Ủ"] = "ủ",
-	["Ứ"] = "ứ",
-	["Ừ"] = "ừ",
-	["Ử"] = "ử",
-	["Ữ"] = "ữ",
-	["Ự"] = "ự",
-	["Ỳ"] = "ỳ",
-	["Ỵ"] = "ỵ",
-	["Ỷ"] = "ỷ",
-	["Ỹ"] = "ỹ",
-	["Ἀ"] = "ἀ",
-	["Ἁ"] = "ἁ",
-	["Ἂ"] = "ἂ",
-	["Ἃ"] = "ἃ",
-	["Ἄ"] = "ἄ",
-	["Ἅ"] = "ἅ",
-	["Ἆ"] = "ἆ",
-	["Ἇ"] = "ἇ",
-	["Ἐ"] = "ἐ",
-	["Ἑ"] = "ἑ",
-	["Ἒ"] = "ἒ",
-	["Ἓ"] = "ἓ",
-	["Ἔ"] = "ἔ",
-	["Ἕ"] = "ἕ",
-	["Ἠ"] = "ἠ",
-	["Ἡ"] = "ἡ",
-	["Ἢ"] = "ἢ",
-	["Ἣ"] = "ἣ",
-	["Ἤ"] = "ἤ",
-	["Ἥ"] = "ἥ",
-	["Ἦ"] = "ἦ",
-	["Ἧ"] = "ἧ",
-	["Ἰ"] = "ἰ",
-	["Ἱ"] = "ἱ",
-	["Ἲ"] = "ἲ",
-	["Ἳ"] = "ἳ",
-	["Ἴ"] = "ἴ",
-	["Ἵ"] = "ἵ",
-	["Ἶ"] = "ἶ",
-	["Ἷ"] = "ἷ",
-	["Ὀ"] = "ὀ",
-	["Ὁ"] = "ὁ",
-	["Ὂ"] = "ὂ",
-	["Ὃ"] = "ὃ",
-	["Ὄ"] = "ὄ",
-	["Ὅ"] = "ὅ",
-	["Ὑ"] = "ὑ",
-	["Ὓ"] = "ὓ",
-	["Ὕ"] = "ὕ",
-	["Ὗ"] = "ὗ",
-	["Ὠ"] = "ὠ",
-	["Ὡ"] = "ὡ",
-	["Ὢ"] = "ὢ",
-	["Ὣ"] = "ὣ",
-	["Ὤ"] = "ὤ",
-	["Ὥ"] = "ὥ",
-	["Ὦ"] = "ὦ",
-	["Ὧ"] = "ὧ",
-	["ᾈ"] = "ᾀ",
-	["ᾉ"] = "ᾁ",
-	["ᾊ"] = "ᾂ",
-	["ᾋ"] = "ᾃ",
-	["ᾌ"] = "ᾄ",
-	["ᾍ"] = "ᾅ",
-	["ᾎ"] = "ᾆ",
-	["ᾏ"] = "ᾇ",
-	["ᾘ"] = "ᾐ",
-	["ᾙ"] = "ᾑ",
-	["ᾚ"] = "ᾒ",
-	["ᾛ"] = "ᾓ",
-	["ᾜ"] = "ᾔ",
-	["ᾝ"] = "ᾕ",
-	["ᾞ"] = "ᾖ",
-	["ᾟ"] = "ᾗ",
-	["ᾨ"] = "ᾠ",
-	["ᾩ"] = "ᾡ",
-	["ᾪ"] = "ᾢ",
-	["ᾫ"] = "ᾣ",
-	["ᾬ"] = "ᾤ",
-	["ᾭ"] = "ᾥ",
-	["ᾮ"] = "ᾦ",
-	["ᾯ"] = "ᾧ",
-	["Ᾰ"] = "ᾰ",
-	["Ᾱ"] = "ᾱ",
-	["Ὰ"] = "ὰ",
-	["Ά"] = "ά",
-	["ᾼ"] = "ᾳ",
-	["Ὲ"] = "ὲ",
-	["Έ"] = "έ",
-	["Ὴ"] = "ὴ",
-	["Ή"] = "ή",
-	["ῌ"] = "ῃ",
-	["Ῐ"] = "ῐ",
-	["Ῑ"] = "ῑ",
-	["Ὶ"] = "ὶ",
-	["Ί"] = "ί",
-	["Ῠ"] = "ῠ",
-	["Ῡ"] = "ῡ",
-	["Ὺ"] = "ὺ",
-	["Ύ"] = "ύ",
-	["Ῥ"] = "ῥ",
-	["Ὸ"] = "ὸ",
-	["Ό"] = "ό",
-	["Ὼ"] = "ὼ",
-	["Ώ"] = "ώ",
-	["ῼ"] = "ῳ",
-	["Ω"] = "ω",
-	["K"] = "k",
-	["Å"] = "å",
-	["Ⅎ"] = "ⅎ",
-	["Ⅰ"] = "ⅰ",
-	["Ⅱ"] = "ⅱ",
-	["Ⅲ"] = "ⅲ",
-	["Ⅳ"] = "ⅳ",
-	["Ⅴ"] = "ⅴ",
-	["Ⅵ"] = "ⅵ",
-	["Ⅶ"] = "ⅶ",
-	["Ⅷ"] = "ⅷ",
-	["Ⅸ"] = "ⅸ",
-	["Ⅹ"] = "ⅹ",
-	["Ⅺ"] = "ⅺ",
-	["Ⅻ"] = "ⅻ",
-	["Ⅼ"] = "ⅼ",
-	["Ⅽ"] = "ⅽ",
-	["Ⅾ"] = "ⅾ",
-	["Ⅿ"] = "ⅿ",
-	["Ↄ"] = "ↄ",
-	["Ⓐ"] = "ⓐ",
-	["Ⓑ"] = "ⓑ",
-	["Ⓒ"] = "ⓒ",
-	["Ⓓ"] = "ⓓ",
-	["Ⓔ"] = "ⓔ",
-	["Ⓕ"] = "ⓕ",
-	["Ⓖ"] = "ⓖ",
-	["Ⓗ"] = "ⓗ",
-	["Ⓘ"] = "ⓘ",
-	["Ⓙ"] = "ⓙ",
-	["Ⓚ"] = "ⓚ",
-	["Ⓛ"] = "ⓛ",
-	["Ⓜ"] = "ⓜ",
-	["Ⓝ"] = "ⓝ",
-	["Ⓞ"] = "ⓞ",
-	["Ⓟ"] = "ⓟ",
-	["Ⓠ"] = "ⓠ",
-	["Ⓡ"] = "ⓡ",
-	["Ⓢ"] = "ⓢ",
-	["Ⓣ"] = "ⓣ",
-	["Ⓤ"] = "ⓤ",
-	["Ⓥ"] = "ⓥ",
-	["Ⓦ"] = "ⓦ",
-	["Ⓧ"] = "ⓧ",
-	["Ⓨ"] = "ⓨ",
-	["Ⓩ"] = "ⓩ",
-	["Ⰰ"] = "ⰰ",
-	["Ⰱ"] = "ⰱ",
-	["Ⰲ"] = "ⰲ",
-	["Ⰳ"] = "ⰳ",
-	["Ⰴ"] = "ⰴ",
-	["Ⰵ"] = "ⰵ",
-	["Ⰶ"] = "ⰶ",
-	["Ⰷ"] = "ⰷ",
-	["Ⰸ"] = "ⰸ",
-	["Ⰹ"] = "ⰹ",
-	["Ⰺ"] = "ⰺ",
-	["Ⰻ"] = "ⰻ",
-	["Ⰼ"] = "ⰼ",
-	["Ⰽ"] = "ⰽ",
-	["Ⰾ"] = "ⰾ",
-	["Ⰿ"] = "ⰿ",
-	["Ⱀ"] = "ⱀ",
-	["Ⱁ"] = "ⱁ",
-	["Ⱂ"] = "ⱂ",
-	["Ⱃ"] = "ⱃ",
-	["Ⱄ"] = "ⱄ",
-	["Ⱅ"] = "ⱅ",
-	["Ⱆ"] = "ⱆ",
-	["Ⱇ"] = "ⱇ",
-	["Ⱈ"] = "ⱈ",
-	["Ⱉ"] = "ⱉ",
-	["Ⱊ"] = "ⱊ",
-	["Ⱋ"] = "ⱋ",
-	["Ⱌ"] = "ⱌ",
-	["Ⱍ"] = "ⱍ",
-	["Ⱎ"] = "ⱎ",
-	["Ⱏ"] = "ⱏ",
-	["Ⱐ"] = "ⱐ",
-	["Ⱑ"] = "ⱑ",
-	["Ⱒ"] = "ⱒ",
-	["Ⱓ"] = "ⱓ",
-	["Ⱔ"] = "ⱔ",
-	["Ⱕ"] = "ⱕ",
-	["Ⱖ"] = "ⱖ",
-	["Ⱗ"] = "ⱗ",
-	["Ⱘ"] = "ⱘ",
-	["Ⱙ"] = "ⱙ",
-	["Ⱚ"] = "ⱚ",
-	["Ⱛ"] = "ⱛ",
-	["Ⱜ"] = "ⱜ",
-	["Ⱝ"] = "ⱝ",
-	["Ⱞ"] = "ⱞ",
-	["Ⱡ"] = "ⱡ",
-	["Ɫ"] = "ɫ",
-	["Ᵽ"] = "ᵽ",
-	["Ɽ"] = "ɽ",
-	["Ⱨ"] = "ⱨ",
-	["Ⱪ"] = "ⱪ",
-	["Ⱬ"] = "ⱬ",
-	["Ⱶ"] = "ⱶ",
-	["Ⲁ"] = "ⲁ",
-	["Ⲃ"] = "ⲃ",
-	["Ⲅ"] = "ⲅ",
-	["Ⲇ"] = "ⲇ",
-	["Ⲉ"] = "ⲉ",
-	["Ⲋ"] = "ⲋ",
-	["Ⲍ"] = "ⲍ",
-	["Ⲏ"] = "ⲏ",
-	["Ⲑ"] = "ⲑ",
-	["Ⲓ"] = "ⲓ",
-	["Ⲕ"] = "ⲕ",
-	["Ⲗ"] = "ⲗ",
-	["Ⲙ"] = "ⲙ",
-	["Ⲛ"] = "ⲛ",
-	["Ⲝ"] = "ⲝ",
-	["Ⲟ"] = "ⲟ",
-	["Ⲡ"] = "ⲡ",
-	["Ⲣ"] = "ⲣ",
-	["Ⲥ"] = "ⲥ",
-	["Ⲧ"] = "ⲧ",
-	["Ⲩ"] = "ⲩ",
-	["Ⲫ"] = "ⲫ",
-	["Ⲭ"] = "ⲭ",
-	["Ⲯ"] = "ⲯ",
-	["Ⲱ"] = "ⲱ",
-	["Ⲳ"] = "ⲳ",
-	["Ⲵ"] = "ⲵ",
-	["Ⲷ"] = "ⲷ",
-	["Ⲹ"] = "ⲹ",
-	["Ⲻ"] = "ⲻ",
-	["Ⲽ"] = "ⲽ",
-	["Ⲿ"] = "ⲿ",
-	["Ⳁ"] = "ⳁ",
-	["Ⳃ"] = "ⳃ",
-	["Ⳅ"] = "ⳅ",
-	["Ⳇ"] = "ⳇ",
-	["Ⳉ"] = "ⳉ",
-	["Ⳋ"] = "ⳋ",
-	["Ⳍ"] = "ⳍ",
-	["Ⳏ"] = "ⳏ",
-	["Ⳑ"] = "ⳑ",
-	["Ⳓ"] = "ⳓ",
-	["Ⳕ"] = "ⳕ",
-	["Ⳗ"] = "ⳗ",
-	["Ⳙ"] = "ⳙ",
-	["Ⳛ"] = "ⳛ",
-	["Ⳝ"] = "ⳝ",
-	["Ⳟ"] = "ⳟ",
-	["Ⳡ"] = "ⳡ",
-	["Ⳣ"] = "ⳣ",
-	["A"] = "a",
-	["B"] = "b",
-	["C"] = "c",
-	["D"] = "d",
-	["E"] = "e",
-	["F"] = "f",
-	["G"] = "g",
-	["H"] = "h",
-	["I"] = "i",
-	["J"] = "j",
-	["K"] = "k",
-	["L"] = "l",
-	["M"] = "m",
-	["N"] = "n",
-	["O"] = "o",
-	["P"] = "p",
-	["Q"] = "q",
-	["R"] = "r",
-	["S"] = "s",
-	["T"] = "t",
-	["U"] = "u",
-	["V"] = "v",
-	["W"] = "w",
-	["X"] = "x",
-	["Y"] = "y",
-	["Z"] = "z",
-	["𐐀"] = "𐐨",
-	["𐐁"] = "𐐩",
-	["𐐂"] = "𐐪",
-	["𐐃"] = "𐐫",
-	["𐐄"] = "𐐬",
-	["𐐅"] = "𐐭",
-	["𐐆"] = "𐐮",
-	["𐐇"] = "𐐯",
-	["𐐈"] = "𐐰",
-	["𐐉"] = "𐐱",
-	["𐐊"] = "𐐲",
-	["𐐋"] = "𐐳",
-	["𐐌"] = "𐐴",
-	["𐐍"] = "𐐵",
-	["𐐎"] = "𐐶",
-	["𐐏"] = "𐐷",
-	["𐐐"] = "𐐸",
-	["𐐑"] = "𐐹",
-	["𐐒"] = "𐐺",
-	["𐐓"] = "𐐻",
-	["𐐔"] = "𐐼",
-	["𐐕"] = "𐐽",
-	["𐐖"] = "𐐾",
-	["𐐗"] = "𐐿",
-	["𐐘"] = "𐑀",
-	["𐐙"] = "𐑁",
-	["𐐚"] = "𐑂",
-	["𐐛"] = "𐑃",
-	["𐐜"] = "𐑄",
-	["𐐝"] = "𐑅",
-	["𐐞"] = "𐑆",
-	["𐐟"] = "𐑇",
-	["𐐠"] = "𐑈",
-	["𐐡"] = "𐑉",
-	["𐐢"] = "𐑊",
-	["𐐣"] = "𐑋",
-	["𐐤"] = "𐑌",
-	["𐐥"] = "𐑍",
-	["𐐦"] = "𐑎",
-	["𐐧"] = "𐑏",
-}
-
diff --git a/Libs/changelog-Ace3-r1173.txt b/Libs/changelog-Ace3-r1173.txt
deleted file mode 100644
index 9658f34..0000000
--- a/Libs/changelog-Ace3-r1173.txt
+++ /dev/null
@@ -1,391 +0,0 @@
-Ace3 Release - Revision r1166 (August 29th, 2017)
--------------------------------------------------
-- Updated any use of PlaySound to the new numeric constants (Fix for WoW 7.3)
-- AceConfigDialog-3.0: implement fallback validation feedback in a StaticPopup (Ticket #2)
-
-Ace3 Release - Revision r1158 (March 28th, 2017)
-------------------------------------------------
-- AceGUI-3.0: Fire OnShow events from Frame and Windows containers (Ticket #396)
-- AceGUI-3.0: Add SetJustifyV/H API to the Label/InteractiveLabel widgets (Ticket #397)
-
-Ace3 Release - Revision r1151 (July 18th, 2016)
------------------------------------------------
-- AceConfig-3.0: Allow specifying images using the numeric fileID (Ticket #389)
-- AceGUI-3.0: Use SetColorTexture in WoW 7.0
-- AceGUI-3.0: Expose the HighlightText API for EditBox and MultiLineEditBox Widgets (Ticket #378)
-- AceGUI-3.0: Keybinding: Support MouseWheel Up/Down bindings (Ticket #372)
-- AceGUI-3.0: TreeGroup: Refresh the tree in an OnUpdate once after Acquire, not only after creation (Fixes missing tree in WoW 7.0)
-- AceSerializer-3.0: Create consistent tokens for infinity, independent of the clients platform
-
-Ace3 Release - Revision r1134 (June 23rd, 2015)
------------------------------------------------
-- AceGUI-3.0: TreeGroup: Prevent Word Wrap in tree elements
-
-Ace3 Release - Revision r1128 (February 24th, 2015)
----------------------------------------------------
-- AceGUI-3.0: Fixed an error in GameTooltip handling causing wrong formatting in some cases
-
-Ace3 Release - Revision r1122 (October 14th, 2014)
---------------------------------------------------
-- AceDB-3.0: Now using the GetCurrentRegion() API to determine region-based profile keys (fix for WoW 6.0)
-- AceComm-3.0: Update ChatThrottleLib to v23
-- AceConfigDialog-3.0: Show a more meaningful title on Blizzard Options Groups (Ticket #353)
-- AceGUI-3.0: ColorPicker: Frame Level is automatically increased to ensure the color picker frame is above the option panel
-- AceGUI-3.0: DropDown: Properly disable all clickable areas when the dropdown is disabled (Ticket #360)
-- AceHook-3.0: Always use HookScript when hooking scripts in a secure fashion (Ticket #338)
-- AceTimer-3.0: New timer implementation based on C_Timer.After
-
-Ace3 Release - Revision r1109 (February 19th, 2014)
----------------------------------------------------
-- AceComm-3.0: Ambiguate addon comm messages to restore behavior to be identical to pre-5.4.7
-- AceConfigRegistry-3.0: Added an option to skip options table validation on registering
-
-Ace3 Release - Revision r1104 (October 31st, 2013)
---------------------------------------------------
-- AceGUI-3.0: Flow Layout: Added a safeguard to prevent an infinite loop in the layout engine
-- AceGUI-3.0: DropDown: Adjust its style slightly to closer resemble the Blizzard DropDown Widget
-- AceGUI-3.0: DropDown: API enhancements to specify the width of the pullout and be notified when its opened
-
-Ace3 Release - Revision r1098 (September 13th, 2013)
-----------------------------------------------------
-- AceDB-3.0: Switch characters to the default profile if their active profile is deleted (Ticket #324)
-- AceConfigDialog-3.0: Try to prevent static popup taint (Ticket #322)
-- AceGUI-3.0: Button: Add a new "Auto Width" option (Ticket #310)
-- AceGUI-3.0: DropDown: Make the entire DropDown widget clickable (Ticket #339)
-- AceGUI-3.0: EditBox: Allow dragging macros to the editbox (which will then contain the macros name) (Ticket #337)
-- AceGUI-3.0: Slider: Add a workaround for the broken slider steps in WoW 5.4 (Ticket #346)
-- AceGUI-3.0: TreeGroup: Fix an issue introduced by 5.4 broken scrollbars (Ticket #345)
-- AceHook-3.0: Allow hooking of AnimationGroup scripts (Ticket #314)
-
-Ace3 Release - Revision r1086 (May 21st, 2013)
-----------------------------------------------
-- AceAddon-3.0: Improved behavior when loading modules during game startup, ensures proper loading order
-
-Ace3 Release - Revision r1083 (March 4th, 2013)
------------------------------------------------
-- AceTimer-3.0: Fixed an issue that caused the parameter list passed to the callback to be cut off at nil values
-- AceGUI-3.0: InlineGroup: The title attribute is properly reset for recycled objects
-
-Ace3 Release - Revision r1078 (February 10th, 2013)
----------------------------------------------------
-- AceTimer-3.0: Re-write based on AnimationTimers
-- AceHook-3.0: Improved checks/error messages when trying to hook a script on a "nil" frame
-- AceDBOptions-3.0: Added Italian locale
-- AceGUI-3.0: BlizOptionsGroup: Fixed the "default" button callback
-- AceGUI-3.0: Colorpicker: The colorpicker is now clamped to the screen
-
-Ace3 Release - Revision r1061 (August 27th, 2012)
--------------------------------------------------
-- AceConfigDialog-3.0: Try to avoid potential taints in static popup dialogs
-- AceConfigDialog-3.0: Sort multiselects with "radio" style
-- AceGUI-3.0: Support for WoW 5.0
-- AceGUI-3.0: MultiLineEditBox: Support shift-click'ing items/spells/etc. into the editbox
-- AceGUI-3.0: Label: Fix text alignment (Ticket #301)
-- AceGUI-3.0: Checkbox: Description text on a disable checkbox should look disabled (Ticket #304)
-- AceGUI-3.0: Keybinding: Ensure the Keybinding popup is on the top level (Ticket #305)
-
-Ace3 Release - Revision r1041 (November 29th, 2011)
----------------------------------------------------
-- AceDB-3.0: Added locale and factionrealmregion profile keys
-- AceSerializer-3.0: Removed support for NaN, as WoW 4.3 does no longer allow it.
-- AceGUI-3.0: Frame: Add :EnableResize (Ticket #214)
-
-Ace3 Release - Revision r1032 (June 29th, 2011)
------------------------------------------------
-- AceTab-3.0: Improvements to Match handling (Ticket #255 and #256)
-- AceGUI-3.0: DropDown layout fix with hidden labels (Ticket #234)
-
-Ace3 Release - Revision r1025 (April 27th, 2011)
-------------------------------------------------
-- AceComm-3.0: Updated for 4.1 changes - now handles RegisterAddonMessagePrefix internally for you.
-- AceGUI-3.0: TabGroup: Fixed width of tabs in 4.1(Ticket #243)
-
-Ace3 Release - Revision r1009 (February 9th, 2011)
---------------------------------------------------
-- AceLocale-3.0: Fix erronous assumption that the default locale is always the first to be registered for the :NewLocale() "silent" flag. The flag must now be set on the FIRST locale to be registered.
-- AceLocale-3.0: The :NewLocale() "silent" flag may now be set to the string "raw", meaning nils are returned for unknown translations.
-- AceGUI-3.0: Fix the disabled state of Icon widgets
-- AceGUI-3.0: The header of the Frame widget now dynamically changes size to fit the text (Ticket #171)
-- AceGUI-3.0: Its now possible to define a custom order the elements in a dropdown widget
-- AceGUI-3.0: Improved widget focus behaviour across the board (Ticket #192, #193)
-- AceGUI-3.0: Fixed a bug that made it impossible to block the tree widget from being user resizable (Ticket #163)
-- AceGUI-3.0: Fixed a bug that caused TreeGroups to become unresponsive under certain conditions (Ticket #189, #202)
-- AceGUI-3.0: Enhanced the DropDown widget to allow it to be reused more easily.
-- AceConfigDialog-3.0: Select Groups now have the proper order in the dropdown (Ticket #184)
-- AceConfigDialog-3.0: Implemented "radio" style select boxes (Ticket #149)
-
-Ace3 Release - Revision r981 (October 27th, 2010)
--------------------------------------------------
-- AceAddon-3.0: Fixed a library upgrading issue
-- AceAddon-3.0: Modules are now enabled in loading order
-- AceGUI-3.0: Keybinding: The widget will no longer steal keybindings even when inactive (Ticket #169)
-- AceGUI-3.0: EditBox: Fixed spell drag'n'drop
-
-
-Ace3 Release - Revision r971 (October 12th, 2010)
--------------------------------------------------
-- Small fixes and adjustments for the 4.0 Content Patch.
-- AceGUI-3.0: ScrollFrame: Allow for a small margin of error when determining if the scroll bar should be shown.
-- AceGUI-3.0: Added new widget APIs: GetText for EditBox and DisableButton for MultiLineEditBox
-
-Ace3 Release - Revision r960 (July 20th, 2010)
-----------------------------------------------
-- AceGUI-3.0: Label: Reset Image Size and TexCoords on Acquire (Ticket #110)
-- AceGUI-3.0: CheckBox: Re-apply the disabled state after setting a value, so the visuals are correct in either case. (Ticket #107)
-- AceGUI-3.0: Icon: Fix the vertical size. It'll now properly scale with the image size, and not be fixed to about 110px. (Ticket #104)
-- AceGUI-3.0: External Containers (Frame, Window) should always start in a visible state. (Ticket #121)
-- AceGUI-3.0: Added Blizzard sounds to widgets (Ticket #120)
-- AceGUI-3.0: CheckBox: check for self.desc:GetText() being nil as well as "" to prevent setting the wrong height on the checkbox causing bouncing checkboxes.
-- AceGUI-3.0: Rewrite of the MultiLineEditBox (Ticket #68)
-- AceGUI-3.0: CheckBox: Fix alignment of the text in OnMouseDown when an image is set. (Ticket #142)
-- AceGUI-3.0: Add SetMaxLetters APIs to EB and MLEB (Ticket #135)
-- AceGUI-3.0: Frame: Add events for OnEnter/OnLeave of the statusbar (Ticket #139)
-- AceGUI-3.0: Major cleanups and refactoring in nearly all widgets and containers.
-- AceConfigDialog-3.0: Always obey the min/max values on range-type widgets (Ticket #114)
-- AceConfigDialog-3.0: Pass iconCoords set on groups in the options table to the tree widget (Ticket #111)
-- AceConfigDialog-3.0: Implement "softMin" and "softMax", allowing for a UI-specific minimum/maximum for range controls, while allowing manual input of values in the old min/max range. (Ticket #123)
-- AceConfigDialog-3.0: Don't close frames in CloseAll that are being opened after the CloseAll event was dispatched. (Ticket #132).
-- AceSerializer-3.0: Fix encoding & decoding of \030. (Ticket #115)
-- AceDB-3.0: Remove empty sections on logout, keeping the SV clean of more useless informations.
-- AceDBOptions-3.0.lua: Fix a string typo (Ticket #141)
-
-Ace3 Release - Revision r907 (December 16th, 2009)
----------------------------------------------------
-- AceGUI-3.0: Frame: Properly save the width in the status table.
-- AceConfigCmd-3.0: Properly handle help output of inline groups with a different handler. (Ticket #101)
-- AceConfigDialog-3.0: Don't bail out and error when a dialogControl was invalid, instead show the error and fallback to the default control for that type.
-- AceConfigDialog-3.0: Fix a hickup with the OnUpdate script not getting upgraded properly in some situations.
-
-Ace3 Release - Revision r900 (December 8th, 2009)
---------------------------------------------------
-- AceGUI-3.0: Alot of visual fixes regarding margins and general widget styles.
-- AceGUI-3.0: Ability to accept links for EditBox Widget (Ticket #21)
-- AceGUI-3.0: ScrollFrame: Hide the scrollbar when there is no overflowing content, and allow the Layout functions to use that space for widgets.
-- AceGUI-3.0: DropDown: Added a GetValue() API to the Widget (Ticket #69)
-- AceGUI-3.0: Button: Pass the arguments of the OnClick handler to the OnClick callback (Ticket #57)
-- AceGUI-3.0: add a Window container, basically a plain window with close button
-- AceGUI-3.0: Add support for inline descriptions to the checkbox widget.
-- AceGUI-3.0: Added an API to the Window container to disable the user-resizing of the same. (Ticket #80)
-- AceGUI-3.0: TreeGroup: Allow iconCoords to be passed for the tree elements. (Ticket #59)
-- AceGUI-3.0: Slider: Add a more visible backdrop/border around the manual input area (Ticket #98, #46)
-- AceGUI-3.0: Allow displaying a image in front of the checkbox label. (Ticket #82)
-- AceConfig-3.0: Added an experimental "descStyle" member to all option table nodes that allows you to control the way the description is presented.
-                 Supported values are "tooltip" for the old behaviour, and "inline" for a inline display of the description, pending support in AceGUI-3.0 widgets.
-- AceConfigCmd-3.0: Properly parse functions and methods supplied for the "hidden" option table member. (Ticket #96)
-- AceConfigDialog-3.0: Fix the unpacking of the basepath arguments when internally calling :Open (Ticket #90)
-- AceConfigDialog-3.0: Properly refresh BlizOptions Windows which are registered with a path on NotifyChange. (Ticket #93)
-- AceConfigDialog-3.0: Allow image/imageCoords on toogle elements (Note that the width/height of the image on the toggle cannot be changed) (Ticket #82)
-- AceConfigDialog-3.0: Pass the groups "name" tag to DropDownGroups as the title. (Ticket #79)
-- AceDB-3.0: Remove the metatable from the DB before removing defaults, so we don't accidentally invoke it in the process. (Ticket #66)
-- AceDB-3.0: Don't save the profileKeys for namespaces, since we use the profile of the parent DB anyway. This will cut down on SV complexity when using alot of namespaces.
-- AceDB-3.0: Don't fire the OnProfileReset callback when copying a profile.
-- AceDBOptions-3.0: Show the current profile on the dialog. (Ticket #56)
-- AceComm-3.0: Add callbacks for message chunks going out the wire (via CTL). Useful for displaying progress for very large messages.
-- AceConsole-3.0: Add :Printf() so you don't have to do Print(format())
-
-Ace3 Beta - Revision 820 (August 7th, 2009)
---------------------------------------------
-- AceComm-3.0: Updated ChatThrottleLib to v21
-- AceGUI-3.0: Fixed a glitch in the TabGroup code that caused tabs to be unresponsive under rare conditions. (Ticket #38)
-- AceGUI-3.0: Consistent "disabled" behaviour of all widgets. (Ticket #47)
-- AceGUI-3.0: Changed the way widgets are handled on release to avoid a crash in the game client. (Ticket #49)
-- AceGUI-3.0: Fixed a glitch in the button graphics. (Ticket #58)
-- AceGUI-3.0: Localized the "Close" Text on the Frame widget.
-
-Ace3 Beta - Revision 803 (April 14th, 2009)
---------------------------------------------
-- AceConfig-3.0: Allow spaces in the keys of config tables. Spaces will be changed on the fly to underscores in AceConfigCmd-3.0 - there is no collision check in place, yet.
-- AceConfig-3.0: Support a "fontSize" attribute to the description type. Possible values are "small" (default), "medium" and "large".
-- AceConfigDialog-3.0: Fixed an error that would occur when calling InterfaceOptionsFrame_OpenToCategory from within an event handler in a Blizzard Options integrated frame. (Ticket #33)
-- AceConfigDialog-3.0: The "execute" type does now recognize the "image" attributes, and will display a clickable icon instead of the button when an image is supplied. (Ticket #35)
-- AceConfigDialog-3.0: Pass icons defined in the option table to the TreeGroup widget (Ticket #20)
-- AceConfigDialog-3.0: Fixed a bug that caused an empty group widget to be drawn if all groups were hidden.
-- AceConfigCmd-3.0: Improved the behaviour of select and multiselect elements. (Ticket #26)
-- AceDB-3.0: Add a GetNamespace function to the DB Objects which returns an existing namespace from the DB object.
-- AceGUI-3.0 Slider Widget: Properly show percentage values as min/max if isPercent is true. (Ticket #32)
-- AceGUI-3.0: Fixed an error in the TreeGroup Widget that caused execution to stop if no name was provided.
-- AceGUI-3.0: Fixed the behaviour of the MultiLineEditbox Widget (Accept button not clickable). (Ticket #28)
-- AceGUI-3.0: TabGroup: Set a maximum width for tabs based on the size of the widget. (Ticket #34)
-- AceGUI-3.0: Added a new InteractiveLabel with OnEnter/OnLeave/OnClick callbacks and a highlight texture
-- AceGUI-3.0: Add SetFont and SetFontObject functions to the Label widget (and the new InteractiveLabel)
-- AceGUI-3.0: Support icons in the TreeGroup display. (Ticket #20)
-- AceGUI-3.0: Added a new :SetRelativeWidth Widget-API that allows you to set the width of widgets relative to their container.
-- AceGUI-3.0: Alot of fixes, tweaks and consistency changes.
-
-Ace3 Beta - Revision 741 (Feb 15th, 2009)
---------------------------------------------
-- AceDBOptions-3.0: Disable the "Copy From" and "Delete" dropdowns if there are no profiles to choose from. (Ticket #19)
-- AceGUI-3.0: Improve TabGroup visual style - only stretch them to the full width if they would use more then 75% of the exisiting space.
-- AceGUI-3.0: Added a third optional argument to <container>:AddChild() to specify the position for the new widget. (Ticket #22)
-- AceConfigCmd-3.0: Improve help output when viewing groups.
-- AceConfigDialog-3.0: Refresh the Options Panel after a confirmation is canceled to reset the value to its previous value. (Ticket #23)
-- AceDB-3.0: Fix a data inconsistency when using false as a table key. (Ticket #25)
-
-Ace3 Beta - Revision 722 (Jan 4th, 2009)
---------------------------------------------
-- AceHook-3.0: Fix :SecureHookScript to not fail on previously empty scripts since frame:HookScript does nothing at all in that case. (Ticket #16)
-- AceLocale-3.0: Implement 'silent' option for :NewLocale to disable the warnings on unknown entrys (Ticket #18)
-- AceTimer-3.0: Implement :TimeLeft(handle) function (Ticket #10)
-- AceGUI-3.0: Fix TabGroup tab resizing to be consistent
-- AceGUI-3.0: Fixed EditBox alignment when the label is disabled (Ticket #13)
-- AceDB-3.0: Implement OnProfileShutdown callback (Ticket #7)
-- AceDBOptions-3.0: Updated esES and ruRU locale
-
-Ace3 Beta - Revision 706 (Oct 18th, 2008)
---------------------------------------------
-- First Beta release after WoWAce move
-- Removed WoW 2.4.x compat layer
-- AceGUI-3.0: Fix disabling of the Multiline Editbox
-- AceGUI-3.0: Improvements to the Keybinding Widget
-
-Ace3 Beta - Revision 81437 (Sept 6th, 2008)
---------------------------------------------
-- AceConfigDialog-3.0: the confirm callback will now receive the new value that is being set (same signature as the validate callback)
-- AceConfigDialog-3.0: :Close and :CloseAll are now safe to call from within callbacks.
-- AceGUI-3.0: Added new methods to the widget base table, see ACE-205 for full reference
-- AceGUI-3.0: Various fixes to Widgets and recycling process
-- Now compatible with WoW 3.0 (compat layer is to be removed upon 3.0 release)
-
-
-Ace3 Beta - Revision 76325 (June 9th, 2008)
---------------------------------------------
-- AceGUI-3.0: Finish Multiselect support for the Dropdown widget (nargiddley)
-- AceGUI-3.0: Re-write TabGroup layouting (nargiddley)
-- AceGUI-3.0: TreeGroup: Add :EnableButtonTooltips(enable) to make the default tooltips on the tree optional, enabled by default. (nargiddley)
-- AceGUI-3.0: TabGroup: Add OnTabEnter and OnTabLeave Callbacks  (nargiddley)
-- AceConfigDialog-3.0: Add :SelectGroup(appName, ...) - Selects the group given by the path specified then refreshes open windows. (nargiddley)
-- AceConfigDialog-3.0: :Open now accepts an optional path, when given will open the window with only the given group and its children visible (nargiddley)
-- AceConfigDialog-3.0: :AddToBlizOptions now accepts an optional path, this will add the config page to display the specified group and its children only. (nargiddley)
-- AceConfigDialog-3.0: ACE-189: allow multiselect to be shown as a dropdown by setting dialogControl = "Dropdown" (nargiddley)
-- AceConfigDialog-3.0: Add Custom tooltips to the TreeGroup and TabGroup, shows both name and desc for the group. (nargiddley)
-- AceConfigCmd-3.0: ACE-195: Remove unneeded references to .confirm, will no longer error when .confirm is a boolean (nargiddley)
-- AceAddon-3.0: Allow for an optional first argument to NewAddon to be a table to be used as the base for the addon. (ammo)
-
-Ace3 Beta - Revision 74633 (May 19th, 2008)
---------------------------------------------
-- AceTimer-3.0: ACE-173: don't error on nil handle for CancelTimer(), just bail out early. (ammo)
-- AceGUI-3.0: ACE-161, ACE-180, ACE-181: New and improved DropDown widget (originally coded by Borlox) (nargiddley,nevcairiel)
-- AceGUI-3.0: AceGUI will call OnWidthSet and OnHeightSet as frames resize (nargiddley)
-- AceGUI-3.0: TabGroup: Use OptionsFrameTabButtonTemplate for tabs (nargiddley)
-- AceGUI-3.0: TabGroup: Tabs now span multiple lines when there are too many to fit in the width of the frame (nargiddley)
-- AceGUI-3.0: TreeGroup: Tree is now sizable by dragging, orig patch by yssaril (nargiddley)
-- AceGUI-3.0: Flow layout will now reduce widgets width to fit rather than leaving them sticking out the side of container widgets (nargiddley)
-- AceGUI-3.0: Dropdowns will no longer be left open in the background when the frame is clicked or other widgets are activated (nargiddley)
-- AceGUI-3.0: ACE-159: Rename Release to OnRelease and Acquire to OnAcquire for widgets. (nargiddley)
-- AceGUI-3.0: ACE-171: add IsVisible and IsShown methods to the widget metatable (nargiddley)
-- AceGUI-3.0: ACE-164: add tooltips to tree to show full text of childs that got clipped (ammo)
-- AceGUI-3.0: ACE-174: make buttons in AceGUI-3.0 locale independant (ammo)
-- AceGUI-3.0: ACE-166: fix treegroup visual bug (ammo)
-- AceGUI-3.0: ACE-184: make numeric entry for slider more intuitive (ammo)
-- AceConfigCmd-3.0: ACE-172 - ignore description in cmd (ammo)
-- AceConsole-3.0:  nolonger check for existance of slashcommands, overwrite where needed. Last one wins, this enables AddonLoader to X-LoadOn-Slash and override the slashcommand from AddonLoader slashcommand with an Ace3 one. (Ammo)
-
-Ace3 Beta - Revision 69509 (April 13th, 2008)
----------------------------------------------
-- AceComm-3.0: turn off error messages when receiving invalid multi-part messages (its happening on login etc) (nevcairiel)
-- AceDBOptions-3.0: shorten info text at top to prevent scrollbars. (nevcairiel)
-- AceHook-3.0: ACE-162: fix unhooking of objects that were not actually hooked (nevcairiel)
-- AceDB-3.0: fire the DB callbacks after the namespaces changed their profile as well (nevcairiel)
-- AceDB-3.0: namespaces can now be individually reset using :ResetProfile() on the namespace directly (nevcairiel)
-- AceDB-3.0: added a optional argument to :ResetProfile to not populate the reset to all namespaces (so the main profile can reset individually without reseting all namespaces too)  (nevcairiel)
-
-Ace3 Beta - Revision 66329 (March 27th, 2008)
----------------------------------------------
-- Overall 2.4 clean ups - removing 2.4 checks and work arounds (nevcairiel)
-- AceBucket-3.0: clear the timer reference when unregistering a bucket to prevent a error when unregistering a bucket that was never fired (nevcairiel)
-- AceAddon-3.0: Bugfix when enabling/disabling modules from the parents OnEnable after disabling / enabling the parent addon. (ammo)
-- AceGUI-3.0: Don't parent the BlizOptionsGroup widget to UIParent and Hide it by default. Fixes stray controls on the screen. (nargiddley)
-- AceConfigDialog-3.0: Config windows without a default size won't incorrectly get a default size from a previously open window. (nargiddley)
-- AceDBOptions-3.0: added zhCN and zhTW locale (nevcairiel)
-
-Ace3 Beta - Revision 65665 (March 25th, 2008)
----------------------------------------------
-- AceGUI-3.0: ACE-139: Changed all Widgets to resemble the Blizzard 2.4 Options Style (nevcairiel)
-- AceGUI-3.0: Fixed "List"-Layout not reporting new width to "fill"-mode widgets (mikk)
-- AceGUI-3.0: added :SetColor to the Label widget (nevcairiel)
-- AceGUI-3.0: ACE-132: ColorPicker: added checkers texture for better alpha channel display, and fixed "white"-texture bug (nevcairiel,nargiddley,ammo)
-- AceConfig-3.0: ACE-113: Added uiName, uiType, handler, option, type to the info table (nevcairiel,nargiddley)
-- AceConfigDialog-3.0: ACE-139: Adjusted for 2.4 options panels (nevcairiel)
-- AceConfigDialog-3.0: Use "width" parameter for the description widget (if present) (nevcairiel)
-- AceConfigDialog-3.0: ACE-135: Add support for specifying a rowcount for multiline editboxes (nargiddley)
-- AceConfigDialog-3.0: :AddToBlizOptions will return the frame registered so you can use it in InterfaceOptionsFrame_OpenToFrame (nevcairiel)
-- AceConfigCmd-3.0: handle "hidden" in help-output (nevcairiel)
-- AceHook-3.0: fix unhooking of secure hooks (nevcairiel)
-- AceDBOptions-3.0: add optional argument to GetOptionsTable(db[, noDefaultProfiles]) - if set to true will not show the default profiles in the profile selection (nevcairiel)
-- AceDBOptions-3.0: added koKR locale (nevcairiel)
-- Ace3 Standalone: Removed the "Ace3" Category from the 2.4 options panel (nevcairiel)
-
-Ace3 Beta - Revision 64176 (March 10th, 2008)
----------------------------------------------
-- AceGUI-3.0: Improve Alpha handling for the ColorPicker widget, ColorPicker widget closes the ColorPickerFrame before opening to prevent values getting carried over (nargiddley)
-- AceGUI-3.0: The Slider widget will only react to the mousewheel after it has been clicked (anywhere including the label) to prevent accidental changes to the value when trying to scroll the container it is in (nargiddley)
-- AceGUI-3.0: The TreeGroup widget is scrollable with the mousewheel (nargiddley)
-- AceGUI-3.0: ACE-154: Fix frame levels in more cases to prevent widgets ending up behind their containers (nargiddley)
-- AceConfigDialog: Color picker obeys hasAlpha on the color type (nargiddley)
-- AceConfigDialog-3.0: ACE-155: Make sure that the selected group is type='group' when checking if it exists (nargiddley)
-- AceDBOptions-3.0: added frFR locale (nevcairiel)
-
-Ace3 Beta - Revision 63886 (March 8th, 2008)
----------------------------------------------
-- AceDBOptions-3.0: new library to provide a Ace3Options table to control the AceDB-3.0 profiles (nevcairiel)
-- AceDB-3.0: add "silent" option to DeleteProfile and CopyProfile when we deal with namespaces (nevcairiel)
-- AceDB-3.0: implement library upgrade path (nevcairiel)
-- AceDB-3.0: ACE-146: fix problem with non-table values overruling ['*']-type defaults (nevcairiel)
-- AceConsole-3.0: treat |T|t texture links similar to |H|h|h links. (ammo)
-- AceGUI-3.0: Use Blizzard Templates for the EditBox and DropDown widget (nevcairiel)
-- AceBucket-3.0: ACE-150: callback is now optional, if not supplied will use the eventname as method name (only possible if one event is supplied, and not a event table) (nevcairiel)
-- tests: adjust tests for AceGUI and AceConsole changes (nevcairiel)
-
-Ace3 Beta - Revision 63220 (Feb 29th, 2008)
----------------------------------------------
-- AceTimer-3.0: CancelAllTimers() now cancels silent (elkano)
-- AceConfigDialog: Add :SetDefaultSize(appName, width, height), sets the size the dialog will open to. Does not effect already open windows.  (nargiddley)
-- AceConfigDialog: Fix typo in type check for range values (nargiddley)
-- AceGUI: ColorPicker widget will correctly fire OnValueChanged for the cancel event of the colorpicker popup.  Reset ColorPicker's color on Acquire.  (nargiddley)
-- AceGUI: Fix Spelling of Aquire -> Acquire for widgets, all custom widgets will need to be updated.  A warning will be printed for widgets not upgraded yet.  (nargiddley)
-- AceConfigCmd-3.0: add simple coloring to slashcommand output. (ammo)
-- AceConsole-3.0: add some color to :Print (ammo)
-- AceAddon-3.0: set error level on library embedding to point to the :NewAddon call (nevcairiel)
-
-Ace3 Beta - Revision 62182 (Feb 20th, 2008)
----------------------------------------------
-- Ace3 StandAlone: Add a page to the Blizzard 2.4 Interface Options with icons to open dialogs for configs registered when installed standalone (nargiddley)
-- AceConfigDialog: type = 'description' now uses the fields image and imageCoords instead of icon and iconCoords, add imageWidth and imageHeight (nargiddley)
-- AceConfigDialog: Add :AddToBlizzardOptions(appName, name), this will add the specified config to the Blizzard Options pane new in 2.4.  This will only be available if running on the 2.4 PTR (nargiddley)
-- AceDB: fix GetProfiles() when setting the same profile twice (nevcairiel)
-- AceDB: bail out of :SetProfile early when trying to set to the same profile (nevcairiel)
-- AceDB: add nil checks to metatable handling (nevcairiel)
-- AceDB: clear tables that are empty after defaults removal (nevcairiel)
-- AceGUI: Fix a couple of layout bugs causing the width of groups to be wrong (nargiddley)
-- AceGUI: Add Icon widget (nargiddley)
-- AceGUI: Allow room for the border in the BlizOptionsGroup widget (nargiddley)
-- AceGUI: Button and Keybinding use UIPanelButtonTemplate2 (nargiddley)
-- AceConsole-3.0: Fix bug where no table for [self] was created when registering weak commands (ammo)
-- AceTimer-3.0: add missing :OnEmbedDisable (ammo)
-- AceAddon-3.0: added :GetName() that will always return the "real" name of a addon or module object without any prefixes (nevcairiel)
-
-Ace3 Beta - Revision 60697 (Feb 9th, 2008)
----------------------------------------------
-- CallbackHandler-1.0: remove unnecessary table creation if a event is fired thats not registered (nevcairiel)
-- AceAddon-3.0: fixed a bug with recursive addon loading (nevcairiel)
-- AceGUI: Update TabGroup's tablist format, tabs are selected by value not index (nargiddley)
-- AceGUI: Add MultiLineEditBox widget (nargiddley, originally by bam)
-- AceGUI: Small fix to the flow layout preventing controls overlapping in some cases (nargiddley)
-- AceConfigDialog: Implement control and dialogControl for types 'input' and 'select' (nargiddley)
-- AceConfigDialog: Add support for multiline = true on type = 'input' (nargiddley)
-- AceConfigDialog: Fix an error when all groups are hidden in a group with childGroups = 'select' (nargiddley)
-- AceConfigDialog: type = 'description' will now show .icon as an image with its text (nargiddley)
-- AceConfigDialog: multiline inputs are no longer forced to width = "full" (nargiddley)
-- AceConfigDialog: bug fix when loading without AceConsole present (nevcairiel)
-
-Ace3 Beta - Revision 60545 (Feb 7th, 2008)
----------------------------------------------
-- AceGUI: SetToplevel(true) for the Frame widget, multiple open windows should play nice together now (nargiddley)
-- AceGUI: Move Frames to the FULLSCREEN_DIALOG strata (nargiddley)
-- AceGUI: Dropdown, Editbox and Keybinding labels grey out when disabled (nargiddley)
-- AceGUI: Add OnClick callback to the TreeGroup widget (nargiddley)
-- AceConfigDialog: Confirm popups will be above the config window (nargiddley)
-
-Ace3 Beta - Revision 60163 (Feb 3rd, 2008)
----------------------------------------------
-- Initial Beta release
\ No newline at end of file
diff --git a/Locales/Core-Locale-deDE.lua b/Locales/Core-Locale-deDE.lua
deleted file mode 100644
index 839f31c..0000000
--- a/Locales/Core-Locale-deDE.lua
+++ /dev/null
@@ -1,862 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
-local L = LibStub("AceLocale-3.0"):NewLocale( "Core", "deDE")
-if not L then
-	return
-end
--- NewLocales
-
---PreCoded ALL
-L["JAMBA"] = "Jamba"
-L["JAMBA EE"] = "Jamba EE"
-
-L["EMA"] = "EMA"
-L[""] = true
-L[" "] = true
-L[": "] = true
-L["("] = true
-L[")"] = true
-L[" / "] = true
-L["/"] = true
-L["%"] = true
-L["N/A"] = true
-L["PUSH_SETTINGS"] = "Teile Einstellungen"
-L["PUSH_ALL_SETTINGS"] = "Teile Alle Einstellungen"
-L["PUSH_SETTINGS_INFO"] = "Teile Einstellungen mit Team Mitgliedern"
-L["MINION"] = "Minion"
-L["NAME"] = "Name"
-L["MASTER"] = "Master"
-L["ALL"] = "All"
-L["MESSAGES_HEADER"] = "Nachricht"
-L["MESSAGE_AREA"]  = "Nachrichten Region"
-L["SEND_WARNING_AREA"] = "Warnungs Region"
-L["PH"] = "PH"
-L["GUILD"] = "Gilde"
-L["CTRL"] = "Strg"
-L["SHIFT"] = "Shift"
-L["ALT"] = "Alt"
-L["UPDATE"] = "Update"
-
-
--- Display Options
-L["APPEARANCE_LAYOUT_HEALDER"] = "Aussehen und Anordnung"
-L["BLIZZARD"] = "Blizzard"
-L["BLIZZARD_TOOLTIP"] = "Blizzard Tooltip"
-L["BLIZZARD_DIALOG_BACKGROUND"] = "Blizzard Dialog Hintergrund"
-L["ARIAL_NARROW"] = "Arial Narrow"
-L["NUMBER_OF_ROWS"] = "Anzahl der Reihen"
-L["SCALE"] = "Skalierung"
-L["TRANSPARENCY"] = "Transparenz"
-L["BORDER_STYLE"] = "Rahmen Style"
-L["BORDER COLOUR"] = "Rahmen Farbe"
-L["BACKGROUND"] = "Hintergrund"
-L["BG_COLOUR"] = "Hintergrundfarbe"
-L["FONT"] = "Schriftart"
-L["FONT_SIZE"] = "Schriftart Größe"
-L["BAR_TEXTURES"] = "Statusbalken Textur"
-L["WIDTH"] = "Breite"
-L["HEIGHT"] = "Höhe"
-
--- Numbers
-L["1"] = "Eins"
-L["2"] = "Zwei"
-L["3"] = "Drei"
-L["4"] = "Vier"
-L["5"] = "Fünf"
-L["6"] = "Sechs"
-L["7"] = "Sieben"
-L["8"] = "Acht"
-L["9"] = "Neun"
-L["10"] = "Zehn"
-L["11"] = "Elf"
-L["12"] = "Zwölf"
-L["13"] = "Dreizehn"
-L["14"] = "Vierzehn"
-L["15"] = "Fünfzehn"
-L["16"] = "Sechzehn"
-L["17"] = "Siebenzehn"
-L["18"] = "Achtzehn"
-L["19"] = "Neunzehn"
-L["20"] = "Zwanzig"
-
---------------------------
--- Modules Locale
-L["NEWS"] = "Neuigkeiten"
-L["OPTIONS"] = "Optionen"
-L["SETUP"] = "Aufbau"
-L["PROFILES"] = "Profiles"
-L["TEAM"] = "Team"
-L["COMMUNICATIONS"] = "Kommunikationen"
-L["MESSAGE_DISPLAY"] = "Nachrichten Anzeige"
-L["GROUP_LIST"] = "Kategorien Liste"
-L["DISPLAY"] = "Anzeigen"
-L["ITEM_USE"] = "Gegenstände"
-L["VENDER_LIST_MODULE"] = "Verkaufen"
-L["INTERACTION"] = "Interaktionen"
-L["CURRENCY"] = "Währungen"
-L["TOON"] = "Toon"
-L["FOLLOW"] = "Folgen"
-L["PURCHASE"] = "Kaufen"
--- FUCKED UP!
-L["VENDER"] = "Händler"
-L["VENDOR"] = "Verkaufen"
-L["PURCHASE"] = "Kaufen"
-L["WARNINGS"] = "Warnungen"
-L["QUEST"] = "Quest"
-L["TRADE"] = "Handeln"
-L["REPAIR"] = "Reparieren"
-L["TALK"] = "Unterhaltungen"
-L["QUEST"] = "Quest"
-L["COMPLETION"] = "Abschluss"
-L["TRACKER"] = "Anzeige"
-
---------------------------
--- Pecoded String Formats
-L["SETTINGS_RECEIVED_FROM_A"] = function( characterName )
-	return string.format("Einstellungen erhalten von %s", characterName )
-end
-
-L["A_IS_NOT_IN_TEAM"] = function( characterName )
-	return string.format("%s ist nicht in der Team Liste. %s kann nicht zum Meister ernannt werden.", characterName )
-end
---------------------------
--- Core Locale
-L["STATUSTEXT"] = "The Awesome MultiBoxing Assistant Ebony's Edition"
-L["RESET_SETTINGS_FRAME"] = "Setzt Einstellungs Fenster zurück"
-L["MODULE_NOT_LOADED"] = "Modul nicht geladen oder nicht Aktuell"
-L["RELEASE_NOTES"] = "Veröffentlichungsnotiz "
-L["COPYING_PROFILE"] = "Copying profile: "
-L["CHANGING_PROFILE"] = "Änderungsprofil: "
-L["PROFILE_RESET"] = "Profile reset - iterating all modules."
-L["RESETTING_PROFILE"] = "Resetting profile: "
-L["PROFILE_DELETED"] = "Profile deleted - iterating all modules."
-L["DELETING_PROFILE"] = "Deleting profile: "
-L["Failed_LOAD_MODULE"] =  "Failed to load EMA Module: "
-L["TEXT1"] = "EMA Ebony's Edition v8 für BFA"
-L["TEXT2"] = ""
-L["TEXT3"] = "Dies ist eine Beta Version!"
-L["TEXT4"] = ""
-L["TEXT5"] = ""
-L["TEXT6"] = "Für mehr Informationen lies Bitte den ChangeLog"
-L["TEXT7"] = ""
-L["TEXT8"] = ""
-L["TEXT9"] = ""
-L["TEXT10"] = ""
-L["SPECIAL_THANKS"] = "Special Thanks:"
-L["THANKS1"] = "Michael \"Jafula\" Miller For Making Jamba That Some Of This Code Is Based Of"
-L["THANKS2"] = "tk911 für die Deutsche Übersetzung"
-L["THANKS3"] = ""
-L["WEBSITES"] = "Websites"
-L["ME"] = "Current Project Manger Jennifer (Ebony) Cally"
-L["ME_TWITTER"] = "https://twitter.com/Jenn_Ebony"
-L["D-B"] = "http://Dual-boxing.com"
-L["ISB"] = "http://IsBoxer.com"
-L["TEMP_WEBSITE1"] = ""
-L["TEMP_WEBSITE2"] = ""
-L["TEMP_WEBSITE3"] = ""
-L["COPYRIGHT"] = "Copyright (c) 2015-2018  Jennifer Cally"
-L["COPYRIGHTTWO"] = "Released Under License: The MIT License"
-L["FRAME_RESET"] = "Frame Reset"
--- Msg 8000
-L["ALL_SETTINGS_RESET"] = "Willkommen zu EMA \"Ebony's Edition\" für Patch 8.0.1 \nAlle EMA Einstellungen wurden Zurückgesetzt!"
---------------------------
--- Communications Locale
-
-L["A: Failed to deserialize command arguments for B from C."] = function( libraryName, moduleName, sender )
-	return libraryName..": Failed to deserialize command arguments for "..moduleName.." from "..sender.."."
-end
-L["AUTO_SET_TEAM"] = "Team Mitglieder automatisch On/Offline setzen"
-L["BOOST_COMMUNICATIONS"] = "Erhöhe EMA zu EMA Kommunikationen"
-L["BOOST_COMMUNICATIONS_HELP"] = "Erfordert Neustart, kann zu Verbindungsabbrüchen führen."
-L["USE_GUILD_COMMS"] = "Verwende Gilden Kommunikationen"
-L["USE_GUILD_COMMS_INFO"] = "Alle Teammitglieder müssen in der selben Gilde sein."
-
-----------------------------
--- Helper Locale
-L["COMMANDS"] = "Kommandos"
-L["SLASH_COMMANDS"] = "/Kommandos"
-
-----------------------------
--- Team Locale
-L["JAMBA-TEAM"] = "EMA-Team"
-L["INVITE_GROUP"] = "Lade Team in Gruppe ein"
-L["DISBAND_GROUP"] = "Löse Gruppe auf"
-L["SET_MASTER"] = "Mache Aktuellen Charakter zum Meister"
-L["ADD"] = "Hinzufügen"
-L["ADD_HELP"] = "Füge ein Mitglied zur Teamliste hinzu."
-L["REMOVE"] = "Entferne"
-L["REMOVE_REMOVE"] = "Entferne ein Mitglied aus der Teamliste."
-L["MASTER_HELP"] = "Ernenne einen Charakter zum Meister"
-L["I_AM_MASTER"] = "Ich bin der Meister"
-L["I_AM_MASTER_HELP"] = "Ernenne diesen Charakter zum Meister"
-L["INVITE"] = "Einladen"
-L["INVITE_HELP"] = "Ladet alle Teammitgieder in eine Gruppe ein."
-L["DISBAND"] = "Auflösen"
-L["DISBAND_HELP"] = "Alle Teammitgieder verlassen ihre Gruppe."
-L["ADD_GROUPS_MEMBERS"] = "Füge ein Gruppenmitglied hinzu"
-L["ADD_GROUPS_MEMBERS_HELP"] = "Füge ein Mitglied deiner Aktuellen Gruppe dem Team Hinzu."
-L["REMOVE_ALL_MEMBERS"] = "Entferne alle Mitglieder"
-L["REMOVE_ALL_MEMBERS_HELP"] = "Entfernt alle Mitglieder aus dem Team."
-L["SET_TEAM_OFFLINE"] = "Markiere Team als Offline"
-L["SET_TEAM_OFFLINE_HELP"] = "Markiert alle Teammitgieder als Offline"
-L["SET_TEAM_ONLINE"] = "Markiere Team als Online"
-L["SET_TEAM_ONLINE_HELP"] = "Markiert alle Teammitgieder als Online"
-L["TEAM_HEADER"] = "Team"
-L["GROUPS_HEADER"] = "Kategorie"
-L["BUTTON_ADD_HELP"] = "Füge ein Mitglied zur Team Liste hinzu\nBenützt werden kann:\nCharakterName\nCharakterName-realm\nZiel\nMouseover"
-L["BUTTON_ADDALL_HELP"] = "Fügt alle Gruppen/Schlachtzugsmitglieder der Team Liste hinzu"
-L["BUTTON_UP_HELP"] = "Bewege einen Charakter in der Team Liste nach Oben"
-L["BUTTON_ISBOXERADD_HELP"] = "Fügt dein IsBoxer Team deiner Teamliste hinzu."
-L["BUTTON_DOWN_HELP"] = "Bewege einen Charakter in der Team Liste nach Unten"
-L["BUTTON_REMOVE_HELP"] = "Entfernt das ausgewählte Mitglied aus der Teamliste"
-L["BUTTON_MASTER_HELP"] = "Ernenne das ausgewählte Mitglied zum Meister seiner Gruppe"
-L["BUTTON_GROUP_REMOVE_HELP"] = "Entfernt die Kategorie vom ausgewählten Charakter"
-L["CHECKBOX_ISBOXER_SYNC"] = "Synchronisiere mit IsBoxer"
-L["CHECKBOX_ISBOXER_SYNC_HELP"] = "Charakere basierent auf dem IsBoxer Team hinzufügen/entfernen."
-L["MASTER_CONTROL"] = "Meister Kontrolle"
-L["CHECKBOX_MASTER_LEADER"] = "Befördere Meister zum Gruppenanführer"
-L["CHECKBOX_MASTER_LEADER_HELP"] = "Meister wird immer der Gruppenanführer sein."
-L["CHECKBOX_CTM"] = "Setzte 'Mit Klicks Bewegen' bei Dienern"
-L["CHECKBOX_CTM_HELP"] = "Automatischen Aktivieren von 'Mit Klicks Bewegen' bei Dienern und Deaktivieren beim Meister."
-L["PARTY_CONTROLS"] = "Gruppen Einladungskontrolle"
-L["CHECKBOX_CONVERT_RAID"] = "Automatischen ändern zum Schlachtzugs"
-L["CHECKBOX_CONVERT_RAID_HELP"] = "Ändert Automatisch zum Schlachtzugs falls mehr als Fünf Charaktere eingeladen werden."
-L["CHECKBOX_ASSISTANT"] = "Automatisch zum Assistenten befördern"
-L["CHECKBOX_ASSISTANT_HELP"] = "Befördert Automatisch alle Schlachtzugsmitglieder zum Assistenten"
-L["CHECKBOX_TEAM"] = "Von Team Mitgliedern annehmen"
-L["CHECKBOX_TEAM_HELP"] = "Akzeptiert automatisch Einladungen von Team Mitgliedern."
-L["CHECKBOX_ACCEPT_FROM_FRIENDS"] = "Von Freunden annehmen"
-L["CHECKBOX_ACCEPT_FROM_FRIENDS_HELP"] = "Akzeptiert automatisch Einladungen von Freunden."
-L["CHECKBOX_ACCEPT_FROM_GUILD"] = "Von Gilde annehmen"
-L["CHECKBOX_ACCEPT_FROM_GUILD_HELP"] = "Akzeptiert automatisch Einladungen von Gilden Mitgliedern."
-L["CHECKBOX_DECLINE_STRANGERS"] = "Von Fremden ablehnen"
-L["CHECKBOX_DECLINE_STRANGERS_HELP"] = "Lehnt einladungen von allen anderen ab."
-L["NOT_LINKED"] = "(Nicht Verknüpft)"
-L["TEAM_NO_TARGET"] = "Kein Ziel oder Ziel ist kein Spieler"
-L["UNKNOWN_GROUP"] = "Unbekannte Kategorie"
-L["ONLINE"] = "Online"
-L["OFFLINE"] = "Offline"
-L["STATICPOPUP_ADD"] = "Trage Charakter-Server Namen ein um ihn der Team Liste hinzuzufügen:"
-L["STATICPOPUP_REMOVE"] = "Bist du dir sicher das du %s aus der Team Liste entfernen willst?"
-
---------------------------
--- Message Locale
-L["DEFAULT_CHAT_WINDOW"] = "Standard Chatfenster"
-L["WHISPER"] = "Flüstern"
-L["PARTY"] = "Gruppe"
-L["GUILD_OFFICER"] = "Gilden Offizier"
-L["RAID"] = "Schlachtzug"
-L["RAID_WARNING"] = "Schlachtzugs Warnung"
-L["MUTE"] = "Stummschlaten"
-L["DEFAULT_MESSAGE"] = "Standard Nachricht"
-L["DEFAULT_WARNING"] = "Standard Warnung"
-L["MUTE_POFILE"] = "Stummschalten (Standart)"
-L["ADD_MSG_HELP"] = "Hinzufügen einer Neuen Nachrichten Region"
-L["REMOVE_MSG_HELP"] = "Entferne eine Nachrichten Region"
-L["NAME"] = "Name"
-L["PASSWORD"] = "Passwort"
-L["AREA"]  = "Region auf dem Bildschirm"
-L["SOUND_TO_PLAY"] = "Geräusch"
-L["SAVE"] = "Speichern"
-L["STATICPOPUP_ADD_MSG"] = "Name der hinzuzufügenden Region?"
-L["REMOVE_MESSAGE_AREA"] = "Willst du \"%s\" aus der Liste entfernen?"
-L["MESSAGE_AREA_LIST"] = "Nachrichten Regions Liste"
-L["MESSAGE_AREA_CONFIGURATION"] = "Nachrichten Regions Konfigurierung"
-L["ERR_COULD_NOT_FIND_AREA"] = function( areaName )
-	return string.format("ERROR: Could not find area: %s", areaName)
-end
---------------------------
--- Tag/Group Locale
-L["ADD_TAG_HELP"]= "Add a Group To This Character."
-L["REMMOVE_TAG_HELP"] = "Remove A Tag From This Character."
-L["GROUP"] =  "Kategorie"
-L["BUTTON_TAG_ADD_HELP"] = "Füge eine Kategorie der Liste hinzu"
-L["BUTTON_TAG_REMOVE_HELP"] = "Entferne eine Kategorie aus der Liste"
-L["ADD_TO_GROUP"] = "Add To Group"
-L["ADD_TO_GROUP_HELP"] = "Add Character To Group"
-L["REMOVE_FROM_GROUP"] = "Remove From Group"
-L["REMOVE_FROM_GROUP_HELP"] = "Remove Character From Group"
-L["WRONG_TEXT_INPUT_GROUP"] = "Needs To Be In <Character-realm> <Group> Format"
-L["NEW_GROUP_NAME"] = "Füge eine Neue Kategorie hinzu:"
-L["REMOVE_FROM_TAG_LIST"] = "Willst du \"%s\" aus der Liste entfernen?"
---Note This need to be lowercase!
---If translated Make Sure you keep them as a the lowercase words or you Will breck Group/Tag
---It be a headache i don't need -- Ebony
-L["ALL_LOWER"] = "all"
-L["MASTER_LOWER"] = "master"
-L["MINION_LOWER"] = "minion"
-
---------------------------
--- Item-Use Locale
-L["ITEM-USE"] = "Gegenstände"
-L["ITEM"] = "Gegenstand"
-L["HIDE_ITEM_BAR"] = "Verstecke Gegenstands Anzeige"
-L["HIDE_ITEM_BAR_HELP"] = "Verstecke die Gegenstands Anzeige."
-L["SHOW_ITEM_BAR"] = "Zeige Gegenstands Anzeige an"
-L["SHOW_ITEM_BAR_HELP"] = "Zeigt die Gegenstands Anzeige an."
-L["CLEAR_ITEM_BAR"] = "Leere Gegenstands Anzeige"
-L["CLEAR_ITEM_BAR_HELP"] = "Leere die Gegenstands Anzeige(Entfernt alle Gegenstände)"
-L["CLEAR_BUTT"] = "Leeren"
-L["SYNC_BUTT"] = "Sync"
-L["TOOLTIP_SYNCHRONISE"] = "Synchronisiere die Gegenstands Anzeige"
-L["TOOLTIP_NOLONGER_IN_BAGS"] = "Entfernt Gegenstände die sich nicht länger in deiner Tasche befinden aus der Gegenstands Anzeige."
-L["NEW_QUEST_ITEM"] = "Neuer Gegenstand gefunden der eine Quest startet!"
-L["ITEM_USE_OPTIONS"] = "Gegenstands Anzeigen Optionen"
-L["SHOW_ITEM_BAR"] = "Zeige Gegenstands Anzeige"
-L["SHOW_ITEM_BAR_HELP"] = "Zeigt die Gegenstands Anzeige"
-L["ONLY_ON_MASTER"] = "Nur bei Meister"
-L["ONLY_ON_MASTER_HELP"] = "Zeigt die Gegenstands Anzeige nur beim Meister an."
-L["SHOW_ITEM_COUNT"] = "Zeige Gegenstandsanzahl an"
-L["SHOW_ITEM_COUNT_HELP"] = "Zeigt Gegenstandanzahl und Gegenstandanzahl Tooltips an."
-L["KEEP_BARS_SYNCHRONIZED"] = "Halte Gegenstands Anzeige bei Dienern Synchronisiert"
-L["KEEP_BARS_SYNCHRONIZED_HELP"] = "Halte Gegenstands Anzeige bei Dienern Synchronisiert"
-L["ADD_QUEST_ITEMS_TO_BAR"] = "Füge Questgegenstände automatisch der Anzeige hinzu"
-L["ADD_QUEST_ITEMS_TO_BAR_HELP"] = "Fügt verwendbare Questgegenstände automatisch der Anzeige hinzu."
-L["ADD_ARTIFACT_ITEMS"] = "Füge Artefaktmacht automatisch der Anzeige hinzu"
-L["ADD_ARTIFACT_ITEMS_HELP"] = "Fügt verwendbare Artefaktmacht automatisch der Anzeige hinzu. (Legion)"
-L["ADD_SATCHEL_ITEMS"] = "Füge Behälter automatisch der Anzeige hinzu"
-L["ADD_SATCHEL_ITEMS_HELP"] = "Fügt Behälter(Kisten/Beutel) automatisch der Anzeige hinzu. "
-L["HIDE_BUTTONS"] = "Verstecke Tasten"
-L["HIDE_BUTTONS_HELP"] = "Versteckt Tasten(Sync/Leeren)"
-L["HIDE_IN_COMBAT"] = "Im Kampf verstecken"
-L["HIDE_IN_COMBAT_HELP_IU"] = "Versteckt Anzeige im Kampf"
-L["NUMBER_OF_ITEMS"] = "Anzahl der Gegenstände"
-L["CLEAR_BUTT"] = "Leeren"
-L["SYNC_BUTT"] = "Sync"
-L["ITEM_BAR_CLEARED"] = "Gegenstands Anzeige geleert"
-L["TEAM_BAGS"] = "Gegenstände des Teams"
-L["BAG_BANK"] = "Taschen (Bank)"
-
---------------------------
--- EMA-Sell Locale
-L["SELL"] = "Verkauf"
-L["SELL_LIST"] = "Sell/Delete Item's List"
-L["SELL_ALL"] = "Sell or Delete If Not Sell Price All Item's In This List"
-L["ALT_SELL_ALL"] = "[Alt] um weitere Gegenstände zu verkaufen"
-L["ALT_SELL_ALL_HELP"] = "Halte [Alt] um gleiche Gegenstände auf allen Charakteren zu verkaufen."
-L["AUTO_SELL_ITEMS"] = "Gegenstände automatisch verkaufen"
-L["AUTO_SELL_ITEMS_HELP"] = "Gegenstände unterhalb automatisch verkaufen."
-L["ONLY_SB"] = "Nur Seelengebunden"
-L["ONLY_SB_HELP"] = "Nur Seelengebundene Gegenstände verkaufen."
-L["iLVL"] = "Gegenstandsstufe"
-L["iLVL_HELP"] = "Verkaufe Gegenstände unterhalb der angegebenen Gegenstandsstufe. "
-L["SELL_GRAY"] = "Verkaufe Graue Gegenstände"
-L["SELL_GRAY_HELP"] = "Verkauft alle Grauen Gegenstände"
-L["SELL_GREEN"] = "Verkaufe Ungewöhnliche Gegenstände"
-L["SELL_GREEN_HELP"] = "Verkauft alle Ungewöhnliche (Grün) Gegenstände"
-L["SELL_RARE"] = "Verkaufe Seltene Gegenstände"
-L["SELL_RARE_HELP"] = "Verkauft alle Seltene (Blau) Gegenstände"
-L["SELL_EPIC"] = "Verkaufe Epische Gegenstände"
-L["SELL_EPIC_HELP"]	= "Verkauft alle Epische (Lila) Gegenstände"
-L["SELL_LIST_DROP_ITEM"] = "Verkaufe Andere Gegenstände(Ziehe Gegenstände in die Box)"
-L["ITEM_TAG_ERR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
-L["POPUP_REMOVE_ITEM"] = "Bist du dir sicher das du den ausgewählten Gegenstand aus der Verkaufs Liste entfernen willst?"
-L["ADD_TO_LIST"] = "Adds Item To List"
-L["SELL_ITEMS"] = "Sell Items"
-L["POPUP_DELETE_ITEM"] = "What You like to delete?"
-L["I_HAVE_SOLD_X"] = function( temLink )
-	return string.format("Ich habe %s verkauft.", temLink)
-end
-L["I_SOLD_ITEMS_PLUS_GOLD"] = function( count )
-	return string.format( "Ich habe %s verkauft, für: ", count)
-end
-L["DELETE_ITEM"] = function( bagItemLink )
-	return string.format( "Ich habe %s GELÖSCHT!", bagItemLink)
-end
-
---------------------------
--- Interaction Locale
-L["TAXI"] = "Taxi"
-L["TAXI_OPTIONS"] = "Taxi Optionen"
-L["TAKE_TEAMS_TAXI"] = "Benutze Flugrouten mit Team"
-L["TAKE_TEAMS_TAXI_HELP"] = "Benutze die selbe Flugroute mit allen Team Mitgliedern \n(Andere Team Mitglieder müssen die Flugkarte geöffnet haben)."
-L["REQUEST_TAXI_STOP"] = "Beantrage Notlandung mit Team"
-L["REQUEST_TAXI_STOP_HELP"] = "[PH] REQUEST_TAXI_STOP_HELP"
-L["CLONES_TO_TAKE_TAXI_AFTER"] = "Diener Flug verzögerung (Sek)"
---Mount Locale
-L["MOUNT"] = "Reittier"
-L["MOUNT_OPTIONS"] = "Reittier Optionen"
-L["MOUNT_WITH_TEAM"] = "Aufsteigen mit dem Team"
-L["MOUNT_WITH_TEAM_HELP"] = "[PH] MOUNT_WITH_TEAM_HELP"
-L["DISMOUNT_WITH_TEAM"] = "Absteigen mit dem Team"
-L["DISMOUNT_WITH_TEAM_HELP"] = "Absteigen wenn das Team Absitzt"
-L["ONLY_DISMOUNT_WITH_MASTER"] = "Nur mit Meister Absteigen"
-L["ONLY_DISMOUNT_WITH_MASTER_HELP"] = "NUR Absteigen WENN DER MEISTER ABSITZT"
-L["ONLY_MOUNT_WHEN_IN_RANGE"] = "Nur Absteigen wenn in Reichweite"
-L["ONLY_MOUNT_WHEN_IN_RANGE_HELP"] = "Absteigen nur wenn das Team in Reichweite ist. \nFunktioniert nur in der Gruppe!"
-L["I_AM_UNABLE_TO_MOUNT"] = "Ich kann nicht Aufsteigen!"
--- Loot Locale
-L["LOOT_OPTIONS"] = "Beute Option Version 2.0"
-L["DISMOUNT_WITH_CHARACTER"] = "Dismount With Character That Dismount"
-L["ENABLE_AUTO_LOOT"] = "Verbesserte Beute aufteilung"
-L["ENABLE_AUTO_LOOT_HELP"] = "Alte Beute aufteilung \naber Besser!"
-L["TELL_TEAM_BOE_RARE"] = "Mitteilung bei Seltenen Gegenständen"
-L["TELL_TEAM_BOE_RARE_HELP"] = "Macht sich bemerkbar wenn ein Seltener Gegenstand gefunden wurde der nicht beim Aufheben gebunden ist."
-L["TELL_TEAM_BOE_EPIC"] = "Mitteilung bei Epischen Gegenständen"
-L["TELL_TEAM_BOE_EPIC_HELP"] = "Macht sich bemerkbar wenn ein Epischer Gegenstand gefunden wurde der nicht beim Aufheben gebunden ist."
-L["I_HAVE_LOOTED_X_Y_ITEM"] = function( rarity, itemName )
-	return string.format( "Ich habe einen %q Gegenstand gefunden: %s", rarity, itemName )
-end
-L["EPIC"] = "Epischen"
-L["RARE"] = "Selernen"
-L["REQUESTED_STOP_X"] = function( sender )
-	return string.format( "Ich habe eine anfrage für eine Notlandung von %s erhalten", sender )
-end
-L["SETTINGS_RECEIVED_FROM_A"] = function( characterName )
-	return string.format( "Neue Einstellungen von %s erhalten.", characterName )
-end
-L["I_AM_UNABLE_TO_FLY_TO_A"] = function( nodename )
-	return string.format( "Es ist mir nicht möglich nach %s zu fliegen.", nodename )
-end
---------------------------
--- Currency Locale
-L["EMA_CURRENCY"] = "EMA Währungen"
-L["SHOW_CURRENCY"] = "Zeige Währungen an"
-L["SHOW_CURRENCY_HELP"] = "Zeigt die Währungs Anzeige an."
-L["HIDE_CURRENCY"] = "Verstecke Währungen"
-L["HIDE_CURRENCY_HELP"] = "Versteckt die Währungs Anzeige für alle Team Mitglieder."
-L["CURRENCY_HEADER"] = "Währungs Auswahl für die Anzeige"
-L["GOLD"] = "Gold"
-L["GOLD_HELP"] = "Zeige Gold der Diener"
-L["GOLD_GB"] = "Zeige Gold in Gildenbank"
-L["GOLD_GB_HELP"] = "Zeige Gold in der Gildenbank.\n(Wird nur beim besuch der Gildenbank Aktualisiert)"
-L["CURR_STARTUP"] = "Zeige Währungs Anzeige beim Starten an"
-L["CURR_STARTUP_HELP"] = "Zeigt die Währungs Anzeige beim starten an.\n(Nur beim Meister)"
-L["LOCK_CURR_LIST"] = "Sperre die Währungs Anzeige"
-L["LOCK_CURR_LIST_HELP"] = "Sperrt die Währungs Anzeige, hindurch Klicken möglich."
-L["SPACE_FOR_NAME"] = "Platz für Namen"
-L["SPACE_FOR_GOLD"] =  "Platz für Namen"
-L["SPACE_FOR_POINTS"] = "Platz für Währungen"
-L["SPACE_BETWEEN_VALUES"] = "Platz zwischen Werten"
-L["TOTAL"] = "Gesamt"
-L["CURR"] = "Curr"
-
-
---------------------------
--- Display Team Locale
-L["EMA_TEAM"] = "EMA Team"
-L["HIDE_TEAM_DISPLAY"] = "Verstecke Team"
-L["HIDE_TEAM_DISPLAY_HELP"] = "Verstecke die Team Anzeige."
-L["SHOW_TEAM_DISPLAY"] = "Zeige Team"
-L["SHOW_TEAM_DISPLAY_HELP"] = "Zeige die Team Anzeige an."
-L["DISPLAY_HEADER"] = "Team Anzeigeoptionen"
-L["SHOW"] = "Anzeigen"
-L["SHOW_TEAM_FRAME"] = "Zeige Team Anzeige"
-L["SHOW_TEAM_FRAME_HELP"] = "Zeige EMA Team Anzeige"
-L["HIDE_IN_COMBAT_HELP_DT"] = "Verstecke Team Anzeige im Kampf"
-L["ENABLE_CLIQUE"] = "Aktiviere 'Clique' Unterstützung"
-L["ENABLE_CLIQUE_HELP"] = "Aktiviere die 'Clique' Unterstützung\n(benötigt [/Reload Ui])"
-L["SHOW_PARTY"] = "Zeige nur Gruppen Mitglieder"
-L["SHOW_PARTY_HELP"] = "Zeige nur aktuelle Gruppenmitglieder an."
-L["HEALTH_POWER_GROUP"] = "Gesundheit & Ressourcen außerhalb der Gruppe"
-L["HEALTH_POWER_GROUP_HELP"] = "Aktualisiert Gesundheit und Ressourcen über die aktuelle Gruppe hinaus \nBenötigt Gilden Kommunikationen!"
-L["SHOW_TITLE"] = "Zeige Titel"
-L["SHOW_TITLE_HELP"] = "Zeige Titel der Team Anzeige an."
-L["STACK_VERTICALLY"] = "Vertikale Team Anzeige"
-L["STACK_VERTICALLY_HELP"] = "Ordnet die Team Anzeige Vertikal an."
-L["CHARACTERS_PER_BAR"] = "Anzahl der Charaktere pro Reihe"
-L["SHOW_CHARACTER_PORTRAIT"] = "Zeige Charakter Portrait"
-L["SHOW_FOLLOW_BAR"] = "Zeige die 'Folgeanzeige' und den Charakter Namen"
-L["SHOW_NAME"] = "Zeige Charakter Namen"
-L["SHOW_XP_BAR"] = "Zeige Erfahrung\n\nund Artefaktmacht\nund Ehre\nund Ruf"
-L["VALUES"] = "Werte"
-L["VALUES_HELP"] = "Zeige Werte"
-L["PERCENTAGE"] = "Prozentual"
-L["PERCENTAGE_HELP"] = "Zeigt Prozente an."
-L["SHOW_XP"] = "Erfahrung"
-L["SHOW_XP_HELP"] = "Zeigt Team Erfahrung an."
-L["ARTIFACT_BAR"] = "Artefaktmacht"
-L["ARTIFACT_BAR_HELP"] = "Zeigt Team Artefaktmacht an."
-L["HONORXP"] = "Ehre"
-L["HONORXP_HELP"] = "Zeigt Team Ehre an."
-L["REPUTATION_BAR"] = "Ruf"
-L["REPUTATION_BAR_HELP"] = "Zeigt Team Ruf an."
-L["SHOW_HEALTH"] = "Zeige Team Gesundheit"
-L["SHOW_CLASS_COLORS"] = "Zeige Klassenfarbe"
-L["SHOW_CLASS_COLORS_HELP"] = "Färbt Gesundheit in der Klassenfarbe es Charakters an."
-L["POWER_HELP"] = "Zeit Team Ressourcen an\n\nMana, Wut, Etc..."
-L["CLASS_POWER"] = "Zeigt Team Klassen Ressourcen an\n\nCombopunkte\nSeelensplitter\nHeilige Kraft\nRunen"
-L["DEAD"] = "Tot"
-L["PORTRAIT_HEADER"] = "Portrait"
-L["FOLLOW_BAR_HEADER"] = "Folgen Anzeige"
-L["EXPERIENCE_HEADER"] = "Erfahrungs Anzeige"
-L["HEALTH_BAR_HEADER"] = "Gesundheits Anzeige"
-L["POWER_BAR_HEADER"] = "Ressourcen Anzeige"
-L["CLASS_BAR_HEADER"] = "Klassen Ressourcen Anzeige"
-
---------------------------
--- Follow Locale
-L["FOLLOW_BINDING_HEADER"] = "Folgen Tastenbelegung"
-L["FOLLOW_TRAIN"] = "Folgen im Zug"
-L["FOLLOW_STROBE_ME"] = "Auto Folgen AN"
-L["FOLLOW_STROBE_OFF"] = "Auto Folgen Aus"
-L["FOLLOW_BROKEN_MSG"] = "Folgen Unterbrochen!"
-L["FOLLOW_MASTER"] = "Folge dem Meister"
-L["FOLLOW_MASTER_HELP"] = "Folge dem aktuellen Meister"
-L["FOLLOW_TARGET"] = "Folge Ziel: <TargetName>"
-L["FOLLOW_TARGET_HELP"] = "Folge einem Spezifischen Ziel"
-L["FOLLOW_AFTER_COMBAT"] = "Automatisches Folgen nach dem Kampf"
-L["FOLLOW_AFTER_COMBAT_HELP"] = "Automatisches Folgen nach dem Kampf"
-L["DELAY_FOLLOW_AFTER_COMBAT"] = "Verzögerung in Sekunden"
-L["DELAY_FOLLOW_AFTER_COMBAT_HELP"] = "Verzögerung des Automatischen Folgen nach dem Kampf in Sekunden"
-L["FOLLOW_STROBING"] = "Beginnt wiederholtes Folgen <TargetName>"
-L["FOLLOW_STROBING_HELP"] = "Beginnt eine Sequenze von Folgebefehlen (Einstellbaren) \nZiel Spezifischer Charakter."
-L["FOLLOW_STROBING_ME"] = "Beginnt wiederholtes Folgen auf mir!"
-L["FOLLOW_STROBING_ME_HELP"] = "Beginnt eine Sequenze von Folge Befehlen (Einstellbaren) \nAktueller Charakter."
-L["FOLLOW_STROBING_END"] = "Beendet wiederholtes Folgen"
-L["FOLLOW_STROBING_END_HELP"] = "Beendet wiederholtes Folgen auf allen Charakteren."
-L["FOLLOW_SET_MASTER"] = "Bestimmt Folge Ziel durch Namen"
-L["FOLLOW_SET_MASTER_HELP"] = "Bestimmt Folge Ziel durch Namen"
-L["TRAIN"] = "Folge Kette"
-L["FOLLOW_ME"] = "Folge mir"
-L["TRAIN_HELP"] = "Alle Charaktere bilden eine Folgen Kette."
-L["FOLLOW_ME_HELP"] = "Folge Mor <EMA Kategorie>"
-L["SNW"] = "Unw"
-L["SNW_HELP"] = "Unterdrücke nächste Warnung"
-L["TIME_DELAY_FOLLOWING"] = "Verzögerung für automatisches Folgen nach dem Kampf"
-L["DIFFERENT_TOON_FOLLOW"] = "Benutze anderen Charakter als Folge Ziel"
-L["DIFFERENT_TOON_FOLLOW_HELP"] = "Benutze anderen Charakter unterhalb als Folge Ziel"
-L["NEW_FOLLOW_MASTER"] = "Neuer Folge Charakter"
-L["FOLLOW_BROKEN_WARNING"] = "Warnung beim brechen von Folgen"
-L["WARN_STOP_FOLLOWING"] = "Wenn ich aufhöre zu Folgen"
-L["WARN_STOP_FOLLOWING_HELP"] = "Benachrichtigt den Meister wenn ein Charakter aufhört ihm zu folgen."
-L["ONLY_IF_OUTSIDE_RANGE"] = "Nur warnen wenn außerhalb der Folge Reichweite"
-L["ONLY_IF_OUTSIDE_RANGE_HELP"] = "Warnt nur wenn sich der Charakter außerhalb der Reichweite befindet die benöigt wird um erneut zu folgen."
-L["FOLLOW_BROKEN_MESSAGE"] = "Benutzerdefinierte Nachricht wenn Charakter aufhört zufolgen"
-L["DO_NOT_WARN"] = "Nicht warnen wenn ..."
-L["IN_COMBAT"] = "Im Kampf"
-L["ANY_MEMBER_IN_COMBAT"] = "Ein Teammitglied im Kampf ist"
-L["FOLLOW_STROBING"] = "Wiederholtes Folgen aktiv"
-L["FOLLOW_STROBING_AJM_FOLLOW_COMMANDS."] = "Wiederholtes Folgen wird durch /EMA-Follow Befehle kontrolliert."
-L["USE_MASTER_STROBE_TARGET"] = "Meister ist IMMER Ziel Auto Folgen"
-L["PAUSE_FOLLOW_STROBING"] = "Pausiere Wiederholtes Folgen wenn ...."
-L["DRINKING_EATING"] = "Esse/Trinke"
-L["IN_A_VEHICLE"] = "In einem Fahrzeug"
-L["GROUP_FOLLOW_STROBE"] = "Kategorie für Auto Folgen"
-L["FREQUENCY"] = "Frequenz in Sekunden"
-L["FREQUENCY_COMABT"] = "Frequenz im Kampf in Sekunden"
-L["ON"] = "An"
-L["OFF"] = "Aus"
-L["DRINK"] = "Trinken"
-L["FOOD"] = "Essen"
-L["REFRESHMENT"] = "Erfrischung"
-
---------------------------
--- Vender/Purchase Locale.
-L["AUTO_BUY_ITEMS"] = "Gegenstände automatisch Kaufen"
-L["OVERFLOW"] = "Überkaufen"
-L["REMOVE_VENDER_LIST"] = "Entfernen von der Kaufliste"
-L["ITEM_DROP"] = "Gegenstand (Ziehe Gegenstand aus deiner Tasche in die Box)"
-L["PURCHASE_ITEMS"] = "Gegenstände automatisch Kaufen"
-L["ADD_ITEM"] = "Gegenstand hinzufügen"
-L["AMOUNT"] = "Anzahl"
-L["PURCHASE_MSG"] = "Kauf Nachrichten"
-L["ITEM_ERROR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
-L["NUM_ERROR"] = "Anzahl muss eine Nummer sein."
-L["BUY_POPUP_ACCEPT"] = "Bist du sicher das du den ausgewählten Gegenstand aus der Liste entfernen willst?"
-L["ERROR_BAGS_FULL"] =  "Ich habe nicht genug Platz in meiner Tasche um alles zu kaufen."
-L["ERROR_GOLD"] = "Ich hab nicht genug Gold um alles zu kaufen."
-L["ERROR_CURR"] = "Ich habe nicht genug der benötigten Währung um alles zu kaufen."
-
---------------------------
--- Trade Locale
-L["REMOVE_TRADE_LIST"] = "Bist du sicher das du den ausgewählten Gegenstand aus der Liste entfernen willst?"
-L["TRADE_LIST_HEADER"] = "Handels Liste"
-L["TRADE_LIST"] = "Handel die angegebenen Gegenständen"
-L["TRADE_LIST_HELP"] = "Alle in dieser angegeben Gegenstände werden entsprechend der Kategorien gehaldelt."
-L["TRADE_BOE_ITEMS"] = "Handel nicht gebundene Gegenstände"
-L["TRADE_BOE_ITEMS_HELP"] = "Handel alle Gegenstände die nicht beim Aufheben gebunden werden mit dem aktuellen Meister."
-L["TRADE_REAGENTS"] = "Handel alle Handwerksmaterialien"
-L["TRADE_REAGENTS_HELP"] = "Handel Alle Handwerksmaterialien mit dem aktuellen Meister"
-L["TRADE_OPTIONS"] = "Handel mit \"Meister\" Optionen"
-L["TRADE_GOLD"] = "Handel überschüssiges Gold"
-L["TRADE_GOLD_HELP"] = "Handel überschüssiges Gold von den Minions zum Meister \n\n ACHTUNG!\n Passe beim automatischen Handeln immer auf!"
-L["GOLD_TO_KEEP"] = "Anzahl des Goldes das die Minions behalten sollen"
-L["TRADE_TAG_ERR"] = "Gegenstands Bezeichnungen dürfen nur Buchstaben und Ziffern beinhalten"
-L["ERR_WILL_NOT_TRADE"] = "Das Ziel ist kein Teammitglied, Handel nicht möglich."
-L["ADD_ITEMS"] = "Füge Gegenstände hinzu"
-
---------------------------
--- Toon Locale
-L["ATTACKED"] = "Ich werde ANGEGRIFFEN!"
-L["TARGETING"] = "kein Ziel!"
-L["FOCUS"] = "kein Focus!"
-L["LOW_HEALTH"] = "wenig Gesundheit!"
-L["LOW_MANA"] = "wenig Mana!"
-L["BAGS_FULL"] = "volle Taschen!"
-L["CCED"] = "Ich habe"
--- Vendor
-L["AUTO_REPAIR"] = "Automatisches Reparieren"
-L["AUTO_REPAIR_HELP"] = "Minions versuchen bei Händlern automatisch zu Reparieren."
-L["REPAIR_GUILD_FUNDS"] = "Reparaturen von der Gildenbank zahlen"
-L["REPAIR_GUILD_FUNDS_HELP"] = "Versucht mit Gold von der Gildenbank zu reparieren."
--- Requests
-L["REQUESTS"] = "Anfragen"
-L["DENY_DUELS"] = "Duell Einladungen ablehnen"
-L["DENY_DUELS_HELP"] = "Lehnt Duell Anfragen automatisch ab."
-L["DENY_GUILD_INVITES"] = "Gildeneinladungen ablehnen"
-L["DENY_GUILD_INVITES_HELP"] = "Lehnt Gildeneinladungen automatisch ab."
-L["ACCEPT_RESURRECT"] = "Wiederbelebungen annehmen"
-L["ACCEPT_RESURRECT_AUTO"] = "Nimmt Wiederbelebungen automatisch an."
-L["ACCEPT_RESURRECT_FROM_TEAM"] = "Nur von Teammitgliedern"
-L["ACCEPT_RESURRECT_FROM_TEAM_HELP"] = "Automatische Annahme von Wiederbelebungsanfragen \nAuf ALLEN Teammitgiedern\nNur für Teammitgieder"
-
-L["RELEASE_PROMPTS"] = "Team Anzeige zum Geist Freilassen anzeigen"
-L["RELEASE_PROMPTS_HELP"] = "Sobald ein Teammitglied stirbt wird auf alles Charakteren eine Anzeige eingeblendet mit der alle Charaktere gleichzeitig den Geist Freilassen können. "
-L["SUMMON_REQUEST"] = "Beschwörungen annehmen"
-L["SUMMON_REQUEST_HELP"] = "Nimmt Beschwörungen automatisch an."
-L["GROUPTOOLS_HEADING"] = "Dungeon Werkzeuge"
-L["ROLE_CHECKS"] = "Gruppen Rollen akzeptieren"
-L["ROLE_CHECKS_HELP"] = "Wenn bereits eine Rolle ausgewählt ist wird diese automatisch angenommen"
-L["READY_CHECKS"] = "Bereitschafts Abfrage als Team annehmen"
-L["READY_CHECKS_HELP"] = "Bereitschafts Abfrage wird von allen Charakteren mit bestätigt."
-L["LFG_Teleport"] = "Dungeon Teleportation mit Team"
-L["LFG_Teleport_HELP"] = "Minions werden Teleportation in/aus einem Dungeon nachmachen."
-L["ROLL_LOOT"] = "Mit Team auf Beute würfeln"
-L["ROLL_LOOT_HELP"] = "Falls möglich würfeln alle Minions auf die gleichen Gegenstände wie der Master."
--- Warnings
-L["COMBAT"] = "Kampf"
-L["WARN_HIT"] = "Warnt falls ein Minion Schaden erleidet"
-L["WARN_HIT_HELP"] = "Warnt bei dem ersten Schaden denn ein Minion im Kampf erleidet."
-L["TARGET_NOT_MASTER"] = "Warnt wenn kein Ziel existiert"
-L["TARGET_NOT_MASTER_HELP"] = "Warnt wenn im Kampf kein Ziel existiert (Minion)"
-L["FOCUS_NOT_MASTER"] = "Warnt wenn kein Focus Ziel existiert"
-L["FOCUS_NOT_MASTER_HELP"] = "Warnt wenn im Kampf kein Focus Ziel existiert (Minion)"
-L["HEALTH_POWER"] = "Gesundheit / Mana"
-L["HEALTH_DROPS_BELOW"] = "Warnt wenn Gesundheit unter den Wert fällt"
-L["HEALTH_DROPS_BELOW_HELP"] = "Warnt wenn die Gesundheit eines Minions unter den Wert fällt"
-L["HEALTH_PERCENTAGE"] = "Gesundheitswert - warnt bei weniger als ... Prozent"
-L["MANA_DROPS_BELOW"] = "Warnt wenn Mana unter den Wert fällt"
-L["MANA_DROPS_BELOW_HELP"] = "Warnt wenn das Mana eines Minions unter den Wert fäll"
-L["MANA_PERCENTAGE"] = "Manawert - warnt bei weniger als ... Prozent"
-L["DURABILITY_DROPS_BELOW"] = "Warnt wenn Haltbarkeit unter den Wert fällt"
-L["DURABILITY_DROPS_BELOW_HELP"] = "Warnt wenn die Haltbarkeit eines Minions unter den Wert fällt."
-L["DURABILITY_PERCENTAGE"] = "Haltbarkeit - warnt bei weniger als ... Prozent"
-L["LOW_DURABILITY_TEXT"] = "Niedrige Haltbarkeit Text"
-L["DURABILITY_LOW_MSG"] = "Meine Haltbarkeit fällt auf"
-L["BAGS_FULL"] = "Taschen sind Voll"
-L["BAGS_FULL_HELP"] = "Warnt wenn Taschen Voll sind"
-L["BAG_SPACE"] = "Taschen Platz"
-L["OTHER"] = "Andere"
-L["WARN_IF_CC"] = "Warnt wenn ein Team Mitglied unter den Einfluss von Kontrollversucheffekten fällt"
-L["WARN_IF_CC_HELP"] = "Warnt wenn ein Team Mitglied unter den Einfluss von Kontrollversucheffekten fällt"
-L["RELEASE_TEAM_Q"] = "Mit Team Geist Freilassen?"
-L["RELEASE_TEAM"] = "Team freilassen"
-L["RECOVER_CORPSES"] = "Team wiederbeleben?"
-L["ERR_GOLD_TO_REPAIR"] = "Ich habe nicht genug Gold um alle Gegenstände zu Reparieren."
-L["RELEASE_CORPSE_FOR_X"] = function( delay )
-	return string.format( "Ich kann meinen Geist für %s sekunden nicht freilassen", delay )
-end
-L["I_REFUSED_A_DUEL_FROM_X"] = function( challenger )
-	return string.format( "Ich habe eine Duell Anfrage von %s abgelehnt.", challenger )
-end
-L["REFUSED_GUILD_INVITE"] = function( guild, inviter )
-	return string.format( "Ich habe eine Gildeneinladung für %s von %s abgelehnt.", guild, inviter )
-end
-L["SUMMON_FROM_X_TO_Y"] = function( sender, location )
-	return string.format( "Ich habe eine Beschwörung von: %s nach: %s angenommen.", sender, location )
-end
-L["REPAIRING_COST_ME_X"] = function( costString )
-    return string.format( "Reparieren kostet mich: %s", costString )
-end
-
---------------------------
--- Talk Locale
-
-L["TALK_OPTIONS"] = "Unterhaltungs Optionen"
-L["FORWARD_WHISPERS_MASTER_RELAY"] = "Leite Unterhaltungen zu und von dem Master weiter"
-L["FORWARD_WHISPERS_MASTER_RELAY_HELP"] = "Leitet geflüstertes zum Master weiter und \nleitet antworten zu dem flüsterer zurück."
-L["DO_NOT_BATTENET_WHISPERS"] = "Battle.net Nachrichten nicht weiterleiten"
-L["DO_NOT_BATTENET_WHISPERS_HELP"] = "Leitet keine Nachrichten über das Battle.net System weiter."
-
-L["FORWARD_FAKE_WHISPERS"] = "Weiterleitung per Falschem geflüster für Klickbare Spieler und Links"
-L["FORWARD_FAKE_WHISPERS_HELP"] = "Weiterleitung per Falschem geflüster für Klickbare Spieler und Links"
-L["FAKE_WHISPERS_CHANNEL"]  = "Sende Falsch geflüster an"
-L["FORWARDER_REPLY_QUEUE"] = "Zeigt Weiterleitenden im geflüster an den Master an"
-L["FORWARDER_REPLY_QUEUE_HELP"] = "Zeigt Weiterleitenden im geflüster an den Master an."
-L["ORIGINATOR_REPLY_QUEUE"] = "Zeigt den Flüsternden im geflüster an den Meister an"
-L["ORIGINATOR_REPLY_QUEUE_HELP"] = "Zeigt den Weiterleitenden Flüsterer im geflüster an den Meister an."
-L["MESSAGES_WITH_LINKS"] = "Zeige nur Nachrichten mit Links"
-L["MESSAGES_WITH_LINKS_HELP"] = "Zeige nur Nachrichten mit Links"
--- TOBEREMOVED
-L["CHAT_SNIPPETS"] = "Chat Snippets"
-L["ENABLE_CHAT_SNIPPETS"] = "Enable Chat Snippets"
-L["ENABLE_CHAT_SNIPPETS_HELP"] = "Chat Snippets Auto Send Messages To Players That Wispers Your Minions"
-L["SNIPPET_TEXT"] = "Snippet Text"
-L["CHAT_SNIPPET_POPUP"] = "Enter The Shortcut Text For This Chat Snippet:"
-L["REMOVE_CHAT_SNIPPET"] = "Are You Sure You Wish To Remove The Selected Chat Snippet?"
---END
-L["GM"] = "GM"
-L["TALK_VIA"] = " (über "
-L["BATTLE_NET"] = "<BatteTag>"
-L["<GM>"] = "<GameMaster>"
-L["WHISPERS"] = " flüstert: "
-L["WHISPERED_YOU"] = "Flüstert dir."
-
-------------------------
--- Quest Locale
-
-L["ABANDON_QUESTS_TEAM"] = "Willst du \"%s\" auf all deinen Toons abbrechen?"
-L["JUST_ME"] = "Nur bei Mir"
-L["ALL_TEAM"] = "Gesamten Team"
-L["TRACK_QUEST_ON_TEAM"] = "Willst du \"%s\" auf all deinen Toons verfolgen?"
-L["UNTRACK_QUEST_ON_TEAM"] = "Willst du \"%s\" auf all deinen Toons NICHT mehr verfolgen?"
-L["ABANDON_ALL_QUESTS"] = "Willst du \"ALLE\" deine Quests auf JEDEM Toon abbrechen? \nBist du Sicher?"
-L["YES_IAM_SURE"] = "Ja, ich bin mir Sicher"
-L["INFORMATION"] = "Informationen"
-L["QUESTINFORMATIONONE"] = "EMA-Quest behandelt alle Teammitgieder als wären sie Master."
-L["QUESTINFORMATIONTWO"] = "Quest Aktionen eines Charakters werden von allen anderen ebenfalls durchgeführt."
-L["QUESTINFORMATIONTHREE"] = "Egal wer aktuell Master ist."
-L["QUEST_HEADER"] = "Quest Annahme und Abgabe mit EMA"
-L["MIRROR_QUEST"] = "Quest Auswahl und Annahme"
-L["MIRROR_QUEST_HELP"] = "Spiegelt die Auswahl des Meisters auf das restliche Team."
-L["AUTO_SELECT_QUESTS"] = "Automatische Annahme aller Quests"
-L["AUTO_SELECT_QUESTS_HELP"] = "Automatische Questannahme \nSobald ein Questgeber angesprochen wurde."
-L["ACCEPT_QUESTS"] = "Quest annahme"
-L["ACCEPT_QUESTS_HELP"] = "Quest annahme"
-L["ACCEPT_QUEST_WITH_TEAM"] = "Nimmt Quests mit Team an"
-L["ACCEPT_QUEST_WITH_TEAM_HELP"] = "Nimmt Quests gleichzeitig mit dem Team an."
-L["QUEST_INFORMATION_AUTO"] = "AUTOMATISCH: Nimmt jede Quest an unabhängig vom Team."
-L["DONOT_AUTO_ACCEPT_QUESTS"] = "Nimmt Quests nicht automatisch an."
-L["DONOT_AUTO_ACCEPT_QUESTS_HELP"] = "Nimmt Quest niemals automatisch an."
-L["AUTO_ACCEPT_QUESTS"] = "Nimmt jede geteilte Quest Automatisch an"
-L["AUTO_ACCEPT_QUESTS_HELP"] = "Nimmt jede geteilte Quest Automatisch an unabhängig von Wem. "
-L["AUTO_ACCEPT_QUESTS_LIST"] = "Nimmt geteilte Quest an:"
-L["AUTO_ACCEPT_QUESTS_LIST_HELP"] = "Nimmt geteilte Quests von folgenden Quellen automatisch an."
-L["TEAM_QUEST_HELP"] = "Von jedem Team Mitglied."
-L["NPC"] = "Questgeber"
-L["NPC_HELP"] = "Von jedem Nicht-Spieler-Charakter."
-L["FRIENDS"] = "Freunden"
-L["FRIENDS_HELP"] = "Von jedem in deiner Freundes/BattleTag Liste."
--- Quest
-L["QUEST_GROUP_HELP"] = "Von jedem in deiner Gruppe."
-L["GUILD_HELP"] = "Von jedem in deiner Gilde."
-L["PH_RAID"] = "[PH] Raid"
-L["PH_RAID_HELP"] = "[PH] Raid"
-L["MASTER_SHARE_QUESTS"] = "Master teilt automatisch jede angenommene Quest"
-L["MASTER_SHARE_QUESTS_HELP"] = "Master wird versuchen jede angenommene Quest auch zuteilen."
-L["ACCEPT_ESCORT_QUEST"] = "Team akzeptiert jede Eskort Quest vom Team."
-L["ACCEPT_ESCORT_QUEST_HELP"] = "Automatische annahme von Eskort Quests die jemand im Team startet."
-L["HOLD_SHIFT_TO_OVERRIDE"] = "Halte [Shift] zum überschreiben der Automatischen Annahme/Abgabe von Quests"
-L["HOLD_SHIFT_TO_OVERRIDE_HELP"] = "Halte [Shift] zum überschreiben der Automatischen Annahme/Abgabe von Quests."
-L["SHOW_PANEL_UNDER_QUESTLOG"] = "Zeige Zusätzliche Tasten unter der Weltkarte"
-L["SHOW_PANEL_UNDER_QUESTLOG_HELP"] = "Zeige Zusätzliche Tasten unter der Weltkarte"
--- Completion
-L["QUEST_COMPLETION"] = "Quest Abschluss"
-L["ENABLE_QUEST_COMPLETION"] = "Aktiviere automatische Questabgabe"
-L["ENABLE_QUEST_COMPLETION_HELP"] = "Ermöglicht das automatische abgeben von Fertigen Quests."
-L["NOREWARDS_OR_ONEREWARD"] = "Quest hat keine oder eine Belohnung:"
-L["QUEST_DO_NOTHING"] = "Toon macht nichts"
-L["QUEST_DO_NOTHING_HELP"] = "Toon gibt Quest nicht automatisch ab."
-L["COMPLETE_QUEST_WITH_TEAM"] = "Toon gibt Quest mit Master ab"
-L["COMPLETE_QUEST_WITH_TEAM_HELP"] = "Alle geben ihre Quest gleichzeitig mit dem Master ab."
-L["AUTO_COMPLETE_QUEST"] = "Toon gibt Quest automatisch ab"
-L["AUTO_COMPLETE_QUEST_HELP"] = "Gibt Quests automatisch ab."
-L["MORE_THEN_ONE_REWARD"] = "Quest hat mehr als eine Belohnung:"
-L["MUST_CHOOSE_OWN_REWARD"] = "Toon muss Belohnung auswählen"
-L["MUST_CHOOSE_OWN_REWARD_HELP"] = "Toons müssen ihre Belohnung seperat auswählen"
-L["CHOOSE_SAME_REWARD"] = "Toons wählen die selbe Belohnung"
-L["CHOOSE_SAME_REWARD_HELP"] = "Toons wählen die selbe Belohnung wie der rest des Teams \n\nNur verwenden wenn alle Teammitglieder die selbe Klasse sind."
-L["MODIFIER_CHOOSE_SAME_REWARD"] = "Wenn eine Modifier Taste gehalten wird, wählen die Toons die selbe Belohnung"
-L["MODIFIER_CHOOSE_SAME_REWARD_HELP"] = "Wenn eine Modifier Taste gehalten wird, wählen die Toons die selbe Belohnung"
-L["OVERRIDE_REWARD_SELECTED"] = "Überschreibung: Wenn ein Minion bereits eine Belohnung ausgewählt hat, wählt er diesen"
-L["OVERRIDE_REWARD_SELECTED_HELP"] = "Überschreibung: Wenn ein Minion bereits eine Belohnung ausgewählt hat, wählt er diesen."
-L["SHARING_QUEST_TO_ALLMINIONS"] = "Teile Quests mit allen Minions"
-L["TRACKING_QUEST_TO_ALLMINIONS"] = "Verfolge Quests bei allen Minions"
-L["UNTRACKING_QUESTS_ALLMINIONS"] = "Entfolge Quests bei allen Minions"
-L["TOGGLE"] = "Wechseln"
-L["ABANDON_ALL"] = "ALLE Quests abbrechen"
-L["ABANDON_ALL_TOOLTIP"] = "Breche alle Quests auf Allen Minions ab"
-L["SHARE_ALL"] = "Teile Alle"
-L["SHARE_ALL_TOOLTIP"] = "Teile Alle Quests bei Allen Minions"
-L["TRACK_ALL"] = "Verfolge Alle"
-L["TRACK_ALL_TOOLTIP"] = "Verfolge Alle Quests bei Allen Minions"
-L["UNTRACK_ALL"] = "Entfolge Alle"
-L["UNTRACK_ALL_TOOLTIP"] = "Entfolge Alle Quests bei Allen Minions"
-L["ABANDONING_ALLQUEST"] = "Breche Quest bei allem Minions ab"
-
--- Quest Strings
-L["AUTOMATICALLY_ACCEPTED_ESCORT_QUEST"] = function( questName )
-	return string.format( "Eine Eskort Quest wurde angenommen: %s", questName )
-end
-L["INVENTORY_IS_FULL_CAN_NOT_HAND_IN_QUEST"] = function( questName )
-	return string.format( "Taschen sind voll, ich kann die Quest %s nicht abgeben.", questName )
-end
-L["ACCEPTED_QUEST_QN"] = function( questName )
-	return string.format( "%s angenommen", questName )
-end
-L["AUTO_ACCEPTED_PICKUPQUEST_QN"] = function( questName )
-	return string.format( "Eine Quest wurde automatisch angenommen: %s", questName )
-end
-L["AUTOMATICALLY_ACCEPTED_QUEST"] = function( questName )
-	return string.format( "Eine Quest wurde automatisch angenommen: %s", questName )
-end
-L["QUESTLOG_DO_NOT_HAVE_QUEST"] = function( questName )
-	return string.format( "Ich habe diese Quest nicht: %s", questName )
-end
-L["JAMBA_QUESTLOG_Have_Abandoned_Quest"] = function( questName )
-	return string.format( "Ich habe diese Quest abgebrochen: %s", questName )
-end
-
-------------------------
--- QuestTracker Locale
-
-L["SHOW_QUEST_WATCHER"] = "Zeige Quests an"
-L["SHOW_QUEST_WATCHER_HELP"] = "Zeige die Questanzeige an."
-L["HIDE_QUEST_WATCHER"] = "Verstecke Quests"
-L["HIDE_QUEST_WATCHER_HELP"] = "Versteckt die Questanzeige."
-L["QUEST_TRACKER_HEADER"] = "Quest Anzeige Einstellungen"
-L["ENABLE_TRACKER"] = "Aktiviere Quest Anzeige"
-L["ENABLE_TRACKER_HELP"] = "Aktivie die EMA Quest Anzeige"
-L["UNLOCK_TRACKER"] = "Entriegel Quest Anzeige"
-L["UNLOCK_TRACKER_HELP"] = "Entriegel die EMA Questanzeige. \n Halte[Alt] zum verschieben"
-L["HIDE_BLIZZ_OBJ_TRACKER"] = "Verstecke Blizzards Quest Anzeige"
-L["HIDE_BLIZZ_OBJ_TRACKER_HELP"] = "Versteckt die Standard Blizzard Quest verfolgung."
-L["SHOW_JOT_ON_MASTER"] = "Zeige Quest nur auf Master"
-L["SHOW_JOT_ON_MASTER_HELP"] = "Zeigt die EMA Quest Anzeige nur auf dem Master an."
-L["HIDE_JOT_IN_COMBAT"] = "Verstecke Quests im Kamp"
-L["HIDE_JOT_IN_COMBAT_HELP"] = "Verstecke die EMA Quest Anzeige im Kampf"
-L["SHOW_COMPLETED_OBJ_DONE"] = "Zeige Vollständige Quests an"
-L["SHOW_COMPLETED_OBJ_DONE_HELP"] = "Zeigt vervollständigte Quests als 'Fertig' an."
-L["HIDE_OBJ_COMPLETED"] = "Verstecke Vollständige Quests"
-L["HIDE_OBJ_COMPLETED_HELP"] = "Verstecke Vollständige Quests"
-L["SEND_PROGRESS_MESSAGES"] = "Teile Questfortschritte mit"
-L["SEND_PROGRESS_MESSAGES_HELP"] = "Teile Questfortschritt in der Nachrichten Region's Box unterhalb"
-L["QUESTWACHERINFORMATIONONE"] = "Um die Zeilen und Breite zu übernehmen wird ein [/reload] benötigt. "
-L["LINES_TO_DISPLAY"] = "Zeilen mit Informationen anzeigen"
-L["TRACKER_WIDTH"] = "Anzeige Breite"
-L["DONE"] = "Fertig"
-L["TRACKER_TITLE_NAME"] = "EMA Quest Anzeige"
-L["REWARDS"] = "Belohnung"
-L["REWARDS_TEXT"] = "Abschluss dieser Quest gewährt \nEuch:"
-L["HEADER_MOUSE_OVER_QUESTWATCHER"] = "Halte \"ALT\" gedrückt um die Quest Anzeige zu verschieben"
-L["UPDATE_MOUSE_OVER_QUESTWATCHER"] = "Zwingt die Quest Anzeige zu einer Aktualisierung"
-
-------------------------
--- Guild Locale
-L["GUILDTAB"] = ""
-L["GUILD_LIST_HEADER"] = "Gildenbank Liste"
-L["GUILD_LIST"] = "Verstaue aufgelistete Gegenstände in der Gildenbank"
-L["GUILD_LIST_HELP"] = "Verstaue aufgelistete Gegenstände Automatisch in der Gildenbank"
-L["GB_TAB_LIST"] = "Gildenbank Tab Number"
-L["GUILD_BOE_ITEMS"] = "Verstaue alle Nicht gebundenen Ausrüstung in der Gildenbank"
-L["GUILD_BOE_ITEMS_HELP"] = "Verstaue alle nicht beim aufheben gebundene Ausrüstung in der Gildenbank"
-L["GUILD_REAGENTS"] =  "Verstaue alle Handwerksmaterialien in der Gildenbank"
-L["GUILD_REAGENTS_HELP"] = "Verstaue alle Handwerksmaterialien in der Gildenbank"
-L["GB_OPTIONS"] = "Gildenbank Optionen"
-L["GB_GOLD"] = "Adjustiere Charakter Gold bei Gildenbank besuch"
-L["GB_GOLD_HELP"] = "Adjustiere Charakter Gold bei Gildenbank besuch"
-L["REMOVE_GUILD_LIST"] = "Bist du dir sicher das du den ausgewählten Gegenstand aus der Liste entfernen willst?"
-
-------------------------
--- X Locale
diff --git a/Locales/Core-Locale-enUS.lua b/Locales/Core-Locale-enUS.lua
deleted file mode 100644
index dd7cc20..0000000
--- a/Locales/Core-Locale-enUS.lua
+++ /dev/null
@@ -1,862 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
-local L = LibStub("AceLocale-3.0"):NewLocale( "Core", "enUS", true )
-
-
-
--- NewLocales
-
---PreCoded ALL
-L["JAMBA"] = "Jamba"
-L["JAMBA EE"] = "Jamba EE"
-
-L["EMA"] = "EMA"
-L[""] = true
-L[" "] = true
-L[": "] = true
-L["("] = true
-L[")"] = true
-L[" / "] = true
-L["/"] = true
-L["%"] = true
-L["N/A"] = true
-L["PUSH_SETTINGS"] = "Push Settings"
-L["PUSH_ALL_SETTINGS"] = "Push All Settings"
-L["PUSH_SETTINGS_INFO"] = "Push Settings To Team Members"
-L["MINION"] = "Minion"
-L["NAME"] = "Name"
-L["MASTER"] = "Master"
-L["ALL"] = "All"
-L["MESSAGES_HEADER"] = "Messages"
-L["MESSAGE_AREA"]  = "Message Area"
-L["SEND_WARNING_AREA"] = "Warning Area"
-L["PH"] = "PH"
-L["GUILD"] = "Guild"
-L["CTRL"] = "Ctrl"
-L["SHIFT"] = "Shift"
-L["ALT"] = "Alt"
-L["UPDATE"] = "Update"
-
-
--- Display Options
-L["APPEARANCE_LAYOUT_HEALDER"] = "Appearance & Layout"
-L["BLIZZARD"] = "Blizzard"
-L["BLIZZARD_TOOLTIP"] = "Blizzard Tooltip"
-L["BLIZZARD_DIALOG_BACKGROUND"] = "Blizzard Dialog Background"
-L["ARIAL_NARROW"] = "Arial Narrow"
-L["NUMBER_OF_ROWS"] = "Number Of Rows"
-L["SCALE"] = "Scale"
-L["TRANSPARENCY"] = "Transparency"
-L["BORDER_STYLE"] = "Border Style"
-L["BORDER COLOUR"] = "Border Colour"
-L["BACKGROUND"] = "Background"
-L["BG_COLOUR"] = "Background Colour"
-L["FONT"] = "Font"
-L["FONT_SIZE"] = "Font Size"
-L["BAR_TEXTURES"] = "Status Bar Textures"
-L["WIDTH"] = "Width"
-L["HEIGHT"] = "Hight"
-
--- Numbers
-L["1"] = "One"
-L["2"] = "Two"
-L["3"] = "Three"
-L["4"] = "Four"
-L["5"] = "Five"
-L["6"] = "Six"
-L["7"] = "Seven"
-L["8"] = "Eight"
-L["9"] = "Nine"
-L["10"] = "Ten"
-L["11"] = "Eleven"
-L["12"] = "Twelve"
-L["13"] = "Thirteen"
-L["14"] = "Fourteen"
-L["15"] = "Fifteen"
-L["16"] = "Sixteen"
-L["17"] = "Sventeen"
-L["18"] = "Eighteen"
-L["19"] = "Nineteen"
-L["20"] = "Twenty"
-
---------------------------
--- Modules Locale
-L["NEWS"] = "News"
-L["OPTIONS"] = "Options"
-L["SETUP"] = "Setup"
-L["PROFILES"] = "Profiles"
-L["TEAM"] = "Team"
-L["COMMUNICATIONS"] = "Communications"
-L["MESSAGE_DISPLAY"] = "Message Display"
-L["GROUP_LIST"] = "Group List"
-L["DISPLAY"] = "Display"
-L["ITEM_USE"] = "Item Use"
-L["VENDER_LIST_MODULE"] = "Sell List"
-L["INTERACTION"] = "Interaction"
-L["CURRENCY"] = "Currency"
-L["TOON"] = "Toon"
-L["FOLLOW"] = "Follow"
-L["PURCHASE"] = "Purchase"
--- FUCKED UP!
-L["VENDER"] = "Vendor"
-L["VENDOR"] = "Vendor"
-L["PURCHASE"] = "Purchase"
-L["WARNINGS"] = "Warnings"
-L["QUEST"] = "Quest"
-L["TRADE"] = "Trade"
-L["REPAIR"] = "Repair"
-L["TALK"] = "Talk"
-L["QUEST"] = "Quest"
-L["COMPLETION"] = "Completion"
-L["TRACKER"] = "Tracker"
-
---------------------------
--- Pecoded String Formats
-L["SETTINGS_RECEIVED_FROM_A"] = function( characterName )
-	return string.format("Settings Received From %s", characterName )
-end
-
-L["A_IS_NOT_IN_TEAM"] = function( characterName )
-	return string.format("%s Is Not In My Team List. I Can Not Set Them To Be My Master.", characterName )
-end
---------------------------
--- Core Locale
-L["STATUSTEXT"] = "EMA: The Even More Awesome MultiBoxing Assistant"
-L["RESET_SETTINGS_FRAME"] = "Reset Settings Frame"
-L["MODULE_NOT_LOADED"] = "Module Not Loaded Or Is Out Of Date"
-L["RELEASE_NOTES"] = "Release Notes "
-L["COPYING_PROFILE"] = "Copying profile: "
-L["CHANGING_PROFILE"] = "Changing profile: "
-L["PROFILE_RESET"] = "Profile reset - iterating all modules."
-L["RESETTING_PROFILE"] = "Resetting profile: "
-L["PROFILE_DELETED"] = "Profile deleted - iterating all modules."
-L["DELETING_PROFILE"] = "Deleting profile: "
-L["Failed_LOAD_MODULE"] =  "Failed to load Ema Module: "
-L["TEXT1"] = "Ebony's MultiBoxing Assistant v8 For BFA!"
-L["TEXT2"] = ""
-L["TEXT3"] = "This Build Is Beta!"
-L["TEXT4"] = ""
-L["TEXT5"] = ""
-L["TEXT6"] = "Read The ChangeLog For More Information"
-L["TEXT7"] = ""
-L["TEXT8"] = ""
-L["TEXT9"] = ""
-L["TEXT10"] = ""
-L["SPECIAL_THANKS"] = "Special Thanks:"
-L["THANKS1"] = "Michael \"Jafula\" Miller For Making Jamba That Some Of This Code Is Based Of"
-L["THANKS2"] = "tk911 For Translating EMA To German (DE)"
-L["THANKS3"] = ""
-L["WEBSITES"] = "Websites"
-L["ME"] = "Current Project Manger Jennifer (Ebony) Cally"
-L["ME_TWITTER"] = "https://twitter.com/Jenn_Ebony"
-L["D-B"] = "http://Dual-boxing.com"
-L["ISB"] = ""
-L["TEMP_WEBSITE1"] = ""
-L["TEMP_WEBSITE2"] = ""
-L["TEMP_WEBSITE3"] = ""
-L["COPYRIGHT"] = "Copyright (c) 2015-2018  Jennifer Cally"
-L["COPYRIGHTTWO"] = "Released Under License: The MIT License"
-L["FRAME_RESET"] = "Frame Reset"
--- Msg 8000
-L["ALL_SETTINGS_RESET"] = "Thank You For Useing EMA Please Report Bugs GitHub"
---------------------------
--- Communications Locale
-
-L["A: Failed to deserialize command arguments for B from C."] = function( libraryName, moduleName, sender )
-	return libraryName..": Failed to deserialize command arguments for "..moduleName.." from "..sender.."."
-end
-L["AUTO_SET_TEAM"] = "Auto Set Team Members On and Off Line"
-L["BOOST_COMMUNICATIONS"] = "Boost EMA Communications"
-L["BOOST_COMMUNICATIONS_HELP"] = "Reload Ui To Take Effect, May Cause Disconnections"
-L["USE_GUILD_COMMS"] = "Use Guild Communications"
-L["USE_GUILD_COMMS_INFO"] = "Use Guild Communications All Of Team Needs To Be In Same Guild"
-
-----------------------------
--- Helper Locale
-L["COMMANDS"] = "Commands"
-L["SLASH_COMMANDS"] = "Slash Commands"
-
-----------------------------
--- Team Locale
-L["JAMBA-TEAM"] = "Team"
-L["INVITE_GROUP"] = "Invite Team To Group"
-L["DISBAND_GROUP"] = "Disband Group"
-L["SET_MASTER"] = "Set Current Character The Master"
-L["ADD"] = "Add"
-L["ADD_HELP"] = "Add a member to the team list."
-L["REMOVE"] = "Remove"
-L["REMOVE_REMOVE"] = "Remove A Member From The Team List."
-L["MASTER_HELP"] = "Set The Master Character."
-L["I_AM_MASTER"] = "I'm The Master"
-L["I_AM_MASTER_HELP"] = "Set This Character To Be The Master Character."
-L["INVITE"] = "Invite"
-L["INVITE_HELP"] = "Invite Team Members To A Party With Or Without A <Group>."
-L["DISBAND"] = "Disband"
-L["DISBAND_HELP"] = "Disband All Team Members From Their Parties."
-L["ADD_GROUPS_MEMBERS"] = "Add Groups Members"
-L["ADD_GROUPS_MEMBERS_HELP"] = "Add Members In The Current Group To The Team."
-L["REMOVE_ALL_MEMBERS"] = "Remove All Members"
-L["REMOVE_ALL_MEMBERS_HELP"] = "Remove all members from the team."
-L["SET_TEAM_OFFLINE"] = "Set Team OffLine"
-L["SET_TEAM_OFFLINE_HELP"] = "Set All Team Members OffLine"
-L["SET_TEAM_ONLINE"] = "Set Team OnLine"
-L["SET_TEAM_ONLINE_HELP"] = "Set All Team Members OnLine"
-L["TEAM_HEADER"] = "Team"
-L["GROUPS_HEADER"] = "Groups"
-L["BUTTON_ADD_HELP"] = "Adds A Member To The Team List\nYou can Use:\nCharacterName\nCharacterName-realm\nTarget\nMouseover"
-L["BUTTON_ADDALL_HELP"] = "Adds all Party/Raid members to the team list"
-L["BUTTON_UP_HELP"] = "Move The Character Up A Place In The Team List"
-L["BUTTON_ISBOXERADD_HELP"] = "Adds IsBoxer Team Members To The Team List"
-L["BUTTON_DOWN_HELP"] = "Move The Character Down A Place In The Team List"
-L["BUTTON_REMOVE_HELP"] = "Removes Selected Member From The Team List"
-L["BUTTON_MASTER_HELP"] = "Set The Selected Member To Be The Master Of The Group"
-L["BUTTON_GROUP_REMOVE_HELP"] = "Removes The Group From The Selected Character"
-L["CHECKBOX_ISBOXER_SYNC"] = "Sync With Isboxer"
-L["CHECKBOX_ISBOXER_SYNC_HELP"] = "Sync With Isboxer TeamList \nAdd/Remove Characters No Longer In Isboxer Team"
-L["CHECKBOX_ISBOXER_ADD"] = "Auto Add Isboxer Team List"
-L["CHECKBOX_ISBOXER_ADD_HELP"] = "Automatically Adds Isboxer Team List Members \nNOTE:\nDoes Not Remove Members No Longer In The Isboxer Team"
-L["MASTER_CONTROL"] = "Master Control"
-L["CHECKBOX_MASTER_LEADER"] = "Promote Master To Party Leader."
-L["CHECKBOX_MASTER_LEADER_HELP"] = "Master Will Always Be The Party Leader."
-L["CHECKBOX_CTM"] = "Sets Click-To-Move On Minions"
-L["CHECKBOX_CTM_HELP"] = "Auto Activate Click-To-Move On Minions And Deactivate On Master."
-L["PARTY_CONTROLS"] = "Party Invitations Control"
-L["CHECKBOX_CONVERT_RAID"] = "Auto Convert To Raid"
-L["CHECKBOX_CONVERT_RAID_HELP"] = "Auto Convert To Raid If Team Is Over Five Characters"
-L["CHECKBOX_ASSISTANT"] = "Auto Set All Assistant"
-L["CHECKBOX_ASSISTANT_HELP"] = "Auto Set all raid Member's to Assistant."
-L["CHECKBOX_TEAM"] = "Accept From Team"
-L["CHECKBOX_TEAM_HELP"] = "Auto Accept Invites From The Team."
-L["CHECKBOX_ACCEPT_FROM_FRIENDS"] = "Accept From Friends"
-L["CHECKBOX_ACCEPT_FROM_FRIENDS_HELP"] = "Auto Accept Invites From Your Friends List."
-L["CHECKBOX_ACCEPT_FROM_GUILD"] = "Accept From Guild."
-L["CHECKBOX_ACCEPT_FROM_GUILD_HELP"] = "Auto Accept Invites From Your Guild."
-L["CHECKBOX_DECLINE_STRANGERS"] = "Decline from strangers."
-L["CHECKBOX_DECLINE_STRANGERS_HELP"] = "Decline Invites From Anyone Else"
-L["NOT_LINKED"] = "(Not Linked)"
-L["TEAM_NO_TARGET"] = "No Target Or Target Is Not A Player"
-L["UNKNOWN_GROUP"] = "Unknown Group"
-L["ONLINE"] = "Online"
-L["OFFLINE"] = "Offline"
-L["STATICPOPUP_ADD"] = "Enter character to add in name-server format:"
-L["STATICPOPUP_REMOVE"] = "Are you sure you wish to remove %s from the team list?"
-
---------------------------
--- Message Locale
-L["DEFAULT_CHAT_WINDOW"] = "Default Chat Window"
-L["WHISPER"] = "Whisper"
-L["PARTY"] = "Party"
-L["GUILD_OFFICER"] = "Guild Officer"
-L["RAID"] = "Raid"
-L["RAID_WARNING"] = "Raid Warning"
-L["MUTE"] = "MUTE"
-L["DEFAULT_MESSAGE"] = "Default Message"
-L["DEFAULT_WARNING"] = "Default Warning"
-L["MUTE_POFILE"] = "Mute (Default)"
-L["ADD_MSG_HELP"] = "Add's New Message Area"
-L["REMOVE_MSG_HELP"] = "Remove's Message Area"
-L["NAME"] = "Name"
-L["PASSWORD"] = "Password"
-L["AREA"]  = "Area On Screen"
-L["SOUND_TO_PLAY"] = "Sound To Play"
-L["SAVE"] = "Save"
-L["STATICPOPUP_ADD_MSG"] = "Enter Name Of The Message Area To Add:"
-L["REMOVE_MESSAGE_AREA"] = "Are You Sure You Wish To Remove \"%s\" From The Message Area List?"
-L["MESSAGE_AREA_LIST"] = "Message Area List"
-L["MESSAGE_AREA_CONFIGURATION"] = "Message Area Configuration"
-L["ERR_COULD_NOT_FIND_AREA"] = function( areaName )
-	return string.format("ERROR: Could not find area: %s", areaName)
-end
---------------------------
--- Tag/Group Locale
-L["ADD_TAG_HELP"]= "Add a Group To This Character."
-L["REMMOVE_TAG_HELP"] = "Remove A Tag From This Character."
-L["GROUP"] =  "Group"
-L["BUTTON_TAG_ADD_HELP"] = "Adds A New Group To The List"
-L["BUTTON_TAG_REMOVE_HELP"] = "Removes A Group From The List"
-L["ADD_TO_GROUP"] = "Add To Group"
-L["ADD_TO_GROUP_HELP"] = "Add Character To Group"
-L["REMOVE_FROM_GROUP"] = "Remove From Group"
-L["REMOVE_FROM_GROUP_HELP"] = "Remove Character From Group"
-L["WRONG_TEXT_INPUT_GROUP"] = "Needs To Be In <Character-realm> <Group> Format"
-L["NEW_GROUP_NAME"] = "Adds A New Group:"
-L["REMOVE_FROM_TAG_LIST"] = "Are You Sure You Wish To Remove %s From The Group List?"
---Note This need to be lowercase!
---If translated Make Sure you keep them as a the lowercase words or you Will breck Group/Tag
---It be a headache i don't need -- Ebony
-L["ALL_LOWER"] = "all"
-L["MASTER_LOWER"] = "master"
-L["MINION_LOWER"] = "minion"
-
---------------------------
--- Item-Use Locale
-L["ITEM-USE"] = "Item-Use"
-L["ITEM"] = "Item"
-L["HIDE_ITEM_BAR"] = "Hide Item Bar"
-L["HIDE_ITEM_BAR_HELP"] = "Hide The Item Bar Panel."
-L["SHOW_ITEM_BAR"] = "Show Item Bar"
-L["SHOW_ITEM_BAR_HELP"] = "Show The Item Bar Panel."
-L["CLEAR_ITEM_BAR"] = "Clear Item Bar"
-L["CLEAR_ITEM_BAR_HELP"] = "Clear The Item Bar (Remove All Items)."
-L["CLEAR_BUTT"] = "Clear"
-L["SYNC_BUTT"] = "Sync"
-L["TOOLTIP_SYNCHRONISE"] = "Synchronise The Item-Use Bar \nAnd Updates Item Count"
-L["TOOLTIP_NOLONGER_IN_BAGS"] = "Remove Items No Longer In Your Bags, From The Item Bar"
-L["NEW_QUEST_ITEM"] = "New Item That Starts A Quest Found!"
-L["ITEM_USE_OPTIONS"] = "Item Use Options"
-L["SHOW_ITEM_BAR"] = "Shows The ItemBar"
-L["SHOW_ITEM_BAR_HELP"] = "Shows The Ema Item Use Bar"
-L["ONLY_ON_MASTER"] = "Only On Master"
-L["ONLY_ON_MASTER_HELP"] = "Only Shows On The Master Character"
-L["SHOW_ITEM_COUNT"] = "Show Item Count"
-L["SHOW_ITEM_COUNT_HELP"] = "Show ItemCount and ItemCount Tooltips \nOn Ema Item Use Bar"
-L["KEEP_BARS_SYNCHRONIZED"] = "Keep Item Bars On Minions Synchronized"
-L["KEEP_BARS_SYNCHRONIZED_HELP"] = "Keep Item Bars On Minions Synchronized"
-L["ADD_QUEST_ITEMS_TO_BAR"] = "Automatically Add Quest Items To Bar"
-L["ADD_QUEST_ITEMS_TO_BAR_HELP"] = "Automatically Add's Useable Quest Items To Bar"
-L["ADD_ARTIFACT_ITEMS"] = "Automatically Add ArtifactPower Tokens To Bar"
-L["ADD_ARTIFACT_ITEMS_HELP"] = "Automatically Add ArtifactPower Tokens To Bar (Legion)"
-L["ADD_SATCHEL_ITEMS"] = "Automatically Add Satchel Items To Bar"
-L["ADD_SATCHEL_ITEMS_HELP"] = "Automatically Add Satchel Items To Bar ( Lootable Bags/Box's )"
-L["HIDE_BUTTONS"] = "Hide Buttons"
-L["HIDE_BUTTONS_HELP"] = "Hides The Top Buttons (Clear)"
-L["HIDE_IN_COMBAT"] = "Hide In Combat"
-L["HIDE_IN_COMBAT_HELP_IU"] = "Hide Item Bar In Combat"
-L["NUMBER_OF_ITEMS"] = "Number Of Items"
-L["ITEM_BAR_CLEARED"] = "Item Bar Cleared"
-L["TEAM_BAGS"] = "Items In Team Bags"
-L["BAG_BANK"] = "Bag (Banks)"
-
---------------------------
--- Sell Locale
-L["SELL"] = "Sell"
-L["SELL_LIST"] = "Sell/Delete Item's List"
-L["SELL_ALL"] = "Sell or Delete If Not Sell Price All Item's In This List"
-L["ALT_SELL_ALL"] = "Hold [Alt] While Selling An Item, To Sell On All Toons"
-L["ALT_SELL_ALL_HELP"] = "Hold [Alt] Key While Selling An Item To The Vendor, To Sell That Item On All Toons"
-L["AUTO_SELL_ITEMS"] = "Automatically Sell Items"
-L["AUTO_SELL_ITEMS_HELP"] = "Automatically Sell Items Below"
-L["ONLY_SB"] = "Only SoulBound"
-L["ONLY_SB_HELP"] = "Only Sell SoulBound Items"
-L["iLVL"] = "Item Level"
-L["iLVL_HELP"] = "Sell Items Below The Item Level"
-L["SELL_GRAY"] = "Sell Gray Items"
-L["SELL_GRAY_HELP"] = "Sell All Gray Items"
-L["SELL_GREEN"] = "Sell Uncommon Items"
-L["SELL_GREEN_HELP"] = "Sell All Uncommon(Green) Items"
-L["SELL_RARE"] = "Sell Rare Items"
-L["SELL_RARE_HELP"] = "Sell All Rare(Blue) Items"
-L["SELL_EPIC"] = "Sell Epic Items"
-L["SELL_EPIC_HELP"]	= "Sell All Epic(Purple) Items"
-L["SELL_LIST_DROP_ITEM"] = "Sell Other Item (DRAG ITEM TO BOX)"
-L["ITEM_TAG_ERR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
-L["POPUP_REMOVE_ITEM"] = "Are You Sure You Wish To Remove The Selected Item From The Auto Sell: Items List?"
-L["ADD_TO_LIST"] = "Adds Item To List"
-L["SELL_ITEMS"] = "Sell Items"
-L["POPUP_DELETE_ITEM"] = "What You like to delete?"
-L["I_HAVE_SOLD_X"] = function( temLink )
-	return string.format("I Have Sold: %s", temLink )
-end
-L["I_SOLD_ITEMS_PLUS_GOLD"] = function( count )
-	return string.format( "I have sold: %s Items And Made: ", count )
-end
-L["DELETE_ITEM"] = function( bagItemLink )
-	return string.format( "I Have DELETED: %s", bagItemLink )
-end
-
---------------------------
--- Interaction Locale
-L["TAXI"] = "Taxi"
-L["TAXI_OPTIONS"] = "Taxi Options"
-L["TAKE_TEAMS_TAXI"] = "Take Teams Taxi"
-L["TAKE_TEAMS_TAXI_HELP"] = "Take The Same Flight As The Any Team Member \n(Other Team Members Must Have Npc Flight Master Window Open)."
-L["REQUEST_TAXI_STOP"] = "Request Taxi Stop With Team"
-L["REQUEST_TAXI_STOP_HELP"] = "[PH] REQUEST_TAXI_STOP_HELP"
-L["CLONES_TO_TAKE_TAXI_AFTER"] = "Clones To Take Taxi After Leader"
---Mount Locale
-L["MOUNT"] = "Mount"
-L["MOUNT_OPTIONS"] = "Mount Options"
-L["MOUNT_WITH_TEAM"] = "Mount With Team"
-L["MOUNT_WITH_TEAM_HELP"] = "[PH] MOUNT_WITH_TEAM_HELP"
-L["DISMOUNT_WITH_TEAM"] = "Dismount With Team"
-L["DISMOUNT_WITH_TEAM_HELP"] = "Dismount When Any Team Dismounts"
-L["ONLY_DISMOUNT_WITH_MASTER"] = "Only Dismount's With Master"
-L["ONLY_DISMOUNT_WITH_MASTER_HELP"] = "Only Dismount's When Master Character Dismounts"
-L["ONLY_MOUNT_WHEN_IN_RANGE"] = "Only Mount When In Range"
-L["ONLY_MOUNT_WHEN_IN_RANGE_HELP"] = "Dismounts Olny When The Team Is In Range /nOnly Works In A Party!"
-L["I_AM_UNABLE_TO_MOUNT"] = "I Am Unable To Mount."
--- Loot Locale
-L["LOOT_OPTIONS"] = "Loot v2 Options"
-L["DISMOUNT_WITH_CHARACTER"] = "Dismount With Character That Dismount"
-L["ENABLE_AUTO_LOOT"] = "Enable Auto Loot"
-L["ENABLE_AUTO_LOOT_HELP"] = "Old Advanced Loot \nBut Better \nWorks Better WITH Blizzard Auto Loot"
-L["TELL_TEAM_BOE_RARE"] = "Tell Team BoE Rare"
-L["TELL_TEAM_BOE_RARE_HELP"] = "Tell The Team If I Loot A Boe Rare"
-L["TELL_TEAM_BOE_EPIC"] = "Tell Team Boe Epic"
-L["TELL_TEAM_BOE_EPIC_HELP"] = "Tell The Team If I Loot A Boe Epic"
-L["I_HAVE_LOOTED_X_Y_ITEM"] = function( rarity, itemName )
-	return string.format( "I Have Looted A %q BoE Item: %s", rarity, itemName )
-end
-L["EPIC"] = "Epic"
-L["RARE"] = "Rare"
-L["REQUESTED_STOP_X"] = function( sender )
-	return string.format( "I Have Requested a Stop From %s", sender )
-end
-L["SETTINGS_RECEIVED_FROM_A"] = function( characterName )
-	return string.format( "Settings Received From %s.", characterName )
-end
-L["I_AM_UNABLE_TO_FLY_TO_A"] = function( nodename )
-	return string.format( "I Am Unable To Fly To %s.", nodename )
-end
---------------------------
--- Currency Locale
-L["EMA_CURRENCY"] = "Currency"
-L["SHOW_CURRENCY"] = "Show Currency"
-L["SHOW_CURRENCY_HELP"] = "Show The Currency Frame Window."
-L["HIDE_CURRENCY"] = "Hide Currency"
-L["HIDE_CURRENCY_HELP"] = "Hide The Currency Values For All Members In The Team."
-L["CURRENCY_HEADER"] = "Currency Selection To Show On Frame"
-L["GOLD"] = "Gold"
-L["GOLD_HELP"] = "Shows The Minions Gold"
-L["GOLD_GB"] = "Include Gold In Guild Bank"
-L["GOLD_GB_HELP"] = "Show Gold In Guild Bank\n(This Does Not Update Unless You Visit The Guildbank)"
-L["CURR_STARTUP"] = "Open Currency List On Start Up"
-L["CURR_STARTUP_HELP"] = "Open Currency List On Start Up.\nThe Master Only)"
-L["LOCK_CURR_LIST"] = "Lock The Currency List Frame"
-L["LOCK_CURR_LIST_HELP"] = "Lock's The Currency List Frame And Enables Mouse Click-Through"
-L["SPACE_FOR_NAME"] = "Space For Name"
-L["SPACE_FOR_GOLD"] =  "Space For Gold"
-L["SPACE_FOR_POINTS"] = "Space For Points"
-L["SPACE_BETWEEN_VALUES"] = "Space Between Values"
-L["TOTAL"] = "Total"
-L["CURR"] = "Curr"
-
-
---------------------------
--- Display Team Locale
-L["EMA_TEAM"] = "EMA Team"
-L["HIDE_TEAM_DISPLAY"] = "Hide Team Display"
-L["HIDE_TEAM_DISPLAY_HELP"] = "Hide The Display Team Panel."
-L["SHOW_TEAM_DISPLAY"] = "Show Team Display"
-L["SHOW_TEAM_DISPLAY_HELP"] = "Show The Display Team Panel."
-L["DISPLAY_HEADER"] = "Display Team Options"
-L["SHOW"] = "Show"
-L["SHOW_TEAM_FRAME"] = "Show Team Frame"
-L["SHOW_TEAM_FRAME_HELP"] = "Show Ema Team Frame List"
-L["HIDE_IN_COMBAT_HELP_DT"] = "Hides The TeamFrame In Combat"
-L["ENABLE_CLIQUE"] = "Enable Clique Support"
-L["ENABLE_CLIQUE_HELP"] = "Enable Clique Support\n([/Reload Ui] To Take Effect)"
-L["SHOW_PARTY"] = "Only Show Party Members"
-L["SHOW_PARTY_HELP"] = "Only Show Party Team Members"
-L["HEALTH_POWER_GROUP"] = "Health & Power Out of Group"
-L["HEALTH_POWER_GROUP_HELP"] = "Update Health and Power Out Of Groups\nUse Guild Communications!"
-L["SHOW_TITLE"] = "Show Title on Frame"
-L["SHOW_TITLE_HELP"] = "Show Team List Title on Display Team Frame"
-L["STACK_VERTICALLY"] = "Stack Bars Vertically"
-L["STACK_VERTICALLY_HELP"] = "Stack Display Team Frame Bars Vertically"
-L["CHARACTERS_PER_BAR"] = "Number of Characters Per Row"
-L["SHOW_CHARACTER_PORTRAIT"] = "Shows Characters Portraits"
-L["SHOW_FOLLOW_BAR"] = "Shows the Follow Bar and Character Name"
-L["SHOW_NAME"] = "Show Character Name"
-L["SHOW_XP_BAR"] = "Show the Team Experience bar\n\nAnd Artifact XP Bar\nAnd Honor XP Bar\nAnd Reputation Bar"
-L["VALUES"] = "Values"
-L["VALUES_HELP"] = "Show Values"
-L["PERCENTAGE"] = "Percentage"
-L["PERCENTAGE_HELP"] = "Show Percentage"
-L["SHOW_XP"] = "Experience Bar"
-L["SHOW_XP_HELP"] = "Show the Team Experience bar"
-L["ARTIFACT_BAR"] = "Artifact Bar"
-L["ARTIFACT_BAR_HELP"] = "Show the Team Artifact Experience bar"
-L["HONORXP"] = "Show Honor Bar"
-L["HONORXP_HELP"] = "Show the Team Honor Experience Bar"
-L["REPUTATION_BAR"] = "Show Reputation Bar"
-L["REPUTATION_BAR_HELP"] = "Show the Team Reputation Bar"
-L["SHOW_HEALTH"] = "Show the Teams Health Bars"
-L["SHOW_CLASS_COLORS"] = "Show Class Colors"
-L["SHOW_CLASS_COLORS_HELP"] = "Show class Coulor on Health Bars"
-L["POWER_HELP"] = "Show the Team Power Bar\n\nMana, Rage, Etc..."
-L["CLASS_POWER"] = "Show the Teams Class Power Bar\n\nComboPoints\nSoulShards\nHoly Power\nRunes"
-L["DEAD"] = "Dead"
-L["PORTRAIT_HEADER"] = "Portrait"
-L["FOLLOW_BAR_HEADER"] = "Follow Status Bar"
-L["EXPERIENCE_HEADER"] = "Experience Bars"
-L["HEALTH_BAR_HEADER"] = "Health Bar"
-L["POWER_BAR_HEADER"] = "Power Bar"
-L["CLASS_BAR_HEADER"] = "Class Power Bar"
-
---------------------------
--- Follow Locale
-L["FOLLOW_BINDING_HEADER"] = "Follow Key Bindings"
-L["FOLLOW_TRAIN"] = "Follow As A Train"
-L["FOLLOW_STROBE_ME"] = "Follow Strobe Me"
-L["FOLLOW_STROBE_OFF"] = "Follow Strobe Off"
-L["FOLLOW_BROKEN_MSG"] = "Follow Broken!"
-L["FOLLOW_MASTER"] = "Follow The Master <Group>"
-L["FOLLOW_MASTER_HELP"] = "Follow The Master Currebt Master (Group)"
-L["FOLLOW_TARGET"] = "Follow A Target <TargetName>"
-L["FOLLOW_TARGET_HELP"] = "Follow The Specified Target (Group)"
-L["FOLLOW_AFTER_COMBAT"] = "Auto Folllow After Combat"
-L["FOLLOW_AFTER_COMBAT_HELP"] = "Automatically Follow After Combat"
-L["DELAY_FOLLOW_AFTER_COMBAT"] = "Delay Follow After Combat (S)"
-L["DELAY_FOLLOW_AFTER_COMBAT_HELP"] = "Delay_Follow_After_Combat In Seconds"
-L["FOLLOW_STROBING"] = "Begin Follow Strobing <TargetName>"
-L["FOLLOW_STROBING_HELP"] = "Begin A Sequence Of Follow Commands That Strobe Every Second (Configurable) A Specified Target."
-L["FOLLOW_STROBING_ME"] = "Begin Follow Strobing Me"
-L["FOLLOW_STROBING_ME_HELP"] = "Begin A Sequence Of Follow Commands That Strobe Every Second (Configurable) This Character"
-L["FOLLOW_STROBING_END"] = "Ends Follow Strobing"
-L["FOLLOW_STROBING_END_HELP"] = "Ends Follow Strobing On All Characters"
-L["FOLLOW_SET_MASTER"] = "Sets Follow By Name"
-L["FOLLOW_SET_MASTER_HELP"] = "Sets Follow By Name"
-L["TRAIN"] = "Makes All Characters Follow In A Train"
-L["FOLLOW_ME"] = "Follow Me"
-L["TRAIN_HELP"] = "Makes All Characters Follow In A Train Behind Each Other"
-L["FOLLOW_ME_HELP"] = "Follow Me <EMA Group>"
-L["SNW"] = "Snw"
-L["SNW_HELP"] = "Suppress Next Warning"
-L["TIME_DELAY_FOLLOWING"] = "Seconds To Delay Before Following After Combat"
-L["DIFFERENT_TOON_FOLLOW"] = "Use Different Character For Follow"
-L["DIFFERENT_TOON_FOLLOW_HELP"] = "Use Different Character Below For Follow"
-L["NEW_FOLLOW_MASTER"] = "New Follow Character"
-L["FOLLOW_BROKEN_WARNING"] = "Follow Broken Warning"
-L["WARN_STOP_FOLLOWING"] = "Warn If I Stop Following"
-L["WARN_STOP_FOLLOWING_HELP"] = "Tell The Master If A Character Stops Following"
-L["ONLY_IF_OUTSIDE_RANGE"] = "Only Warn If Outside Follow Range"
-L["ONLY_IF_OUTSIDE_RANGE_HELP"] = "Only Warn If Character Is Outside Follow Range"
-L["FOLLOW_BROKEN_MESSAGE"] = "Follow Broken Custom Message"
-L["DO_NOT_WARN"] = "Do Not Warn If"
-L["IN_COMBAT"] = "In Combat"
-L["ANY_MEMBER_IN_COMBAT"] = "Any Member In Combat"
-L["FOLLOW_STROBING"] = "Follow Strobing"
-L["FOLLOW_STROBING_EMA_FOLLOW_COMMANDS."] = "Follow Strobing Is Controlled By /Ema Commands."
-L["USE_MASTER_STROBE_TARGET"] = "Always Use Master As The Strobe Target"
-L["PAUSE_FOLLOW_STROBING"] = "Pause Follow Strobing If ...."
-L["DRINKING_EATING"] = "Drinking/Eating"
-L["IN_A_VEHICLE"] = "In A Vehicle"
-L["GROUP_FOLLOW_STROBE"] = "Group For Follow Strobe"
-L["FREQUENCY"] = "Frequency (S)"
-L["FREQUENCY_COMABT"] = "Frequency In Combat (S)"
-L["ON"] = "On"
-L["OFF"] = "Off"
-L["DRINK"] = "Drink"
-L["FOOD"] = "Food"
-L["REFRESHMENT"] = "Refreshment"
-
---------------------------
--- Vendor/Purchase Locale.
-L["AUTO_BUY_ITEMS"] = "Auto Buy Items"
-L["OVERFLOW"] = "Overflow"
-L["REMOVE_VENDER_LIST"] = "Remove From Vendor List"
-L["ITEM_DROP"] = "Item (Drag Item To Box From Your Bags)"
-L["PURCHASE_ITEMS"] = "Auto Purchase Items"
-L["ADD_ITEM"] = "Add Item"
-L["AMOUNT"] = "Amount"
-L["PURCHASE_MSG"] = "Purchase Messages"
-L["ITEM_ERROR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
-L["NUM_ERROR"] = "Amount To Buy Must Be A Number."
-L["BUY_POPUP_ACCEPT"] = "Are You Sure You Wish To Remove The Selected Item From The Auto Buy Items List?"
-L["ERROR_BAGS_FULL"] =  "I Do Not Have Enough Space In My Bags To Complete My Purchases."
-L["ERROR_GOLD"] = "I Do Not Have Enough Money To Complete My Purchases."
-L["ERROR_CURR"] = "I Do Not Have Enough Other Currency To Complete My Purchases."
-
---------------------------
--- Trade Locale
-L["REMOVE_TRADE_LIST"] = "Are You Sure You Wish To Remove The Selected Item From The Trade Items List?"
-L["TRADE_LIST_HEADER"] = "Trade Item List"
-L["TRADE_LIST"] = "Trade The List Of Items With Master"
-L["TRADE_LIST_HELP"] = "The List Will Trade With The Current Masster \nGroups Do not Currently Work"
-L["TRADE_BOE_ITEMS"] = "Trades Binds When Equipped Items With Master"
-L["TRADE_BOE_ITEMS_HELP"] = "Trade All Binds When Equipped Items With The Current Master"
-L["TRADE_REAGENTS"] = "Trades Crafting Reagents Items With Master"
-L["TRADE_REAGENTS_HELP"] = "Trades All Crafting Reagents Items Current Master"
-L["TRADE_OPTIONS"] = "Trade To \"Master\" Options"
-L["TRADE_GOLD"] = "Trade Excess Gold To Master From Minion"
-L["TRADE_GOLD_HELP"] = "Trade Excess Gold To Master From Minions \nAlways Be Careful When Auto Trading."
-L["GOLD_TO_KEEP"] = "Amount of Gold To Keep On Current Minion"
-L["TRADE_TAG_ERR"] = "Item Tags Must Only Be Made Up Of Letters And Numbers."
-L["ERR_WILL_NOT_TRADE"] = "Is Not A Member Of The Team, Will Not Trade Items."
-L["ADD_ITEMS"] = "Add Items"
-
---------------------------
--- Toon Locale
-L["ATTACKED"] = "I'm Attacked!"
-L["TARGETING"] = "Not Targeting!"
-L["FOCUS"] = "Not Focus!"
-L["LOW_HEALTH"] = "Low Health!"
-L["LOW_MANA"] = "Low_Mana!"
-L["BAGS_FULL"] = "Bags Full!"
-L["CCED"] = "I'm"
--- Vendor
-L["AUTO_REPAIR"] = "Auto Repair"
-L["AUTO_REPAIR_HELP"] = "Auto Repairs Toons Items When You Visit a Repair Merchant"
-L["REPAIR_GUILD_FUNDS"] = "Auto Repair With Guild Funds"
-L["REPAIR_GUILD_FUNDS_HELP"] = "Trys To Auto Repair With Guild Bank Funds \n Before There Own Gold"
--- Requests
-L["REQUESTS"] = "Requests"
-L["DENY_DUELS"] = "Auto Deny Duels"
-L["DENY_DUELS_HELP"] = "Automatically Deny Duels From Players \n On All Team Members"
-L["DENY_GUILD_INVITES"] = "Auto Deny Guild Invites"
-L["DENY_GUILD_INVITES_HELP"] = "Automatically Deny All Guild Invites"
-L["ACCEPT_RESURRECT"] = "Auto Accept Resurrect Request"
-L["ACCEPT_RESURRECT_AUTO"] = "Automatically Accept Resurrect Request \nOn All Team Members"
-L["ACCEPT_RESURRECT_FROM_TEAM"] = "Only From EMA Team Members"
-L["ACCEPT_RESURRECT_FROM_TEAM_HELP"] = "Automatically Accept Resurrect Request \nOn All Team Members\nOnly From Team Members"
-
-L["RELEASE_PROMPTS"] = "Display Team Release Prompts"
-L["RELEASE_PROMPTS_HELP"] = "Display EMA Team Release Popup Displays when the Team Dies"
-L["SUMMON_REQUEST"] = "Auto Accept Summon Request"
-L["SUMMON_REQUEST_HELP"] = "Automatically Accept Summon Requests"
-L["GROUPTOOLS_HEADING"] = "Instance Tools"
-L["ROLE_CHECKS"] = "Auto Accept Role Checks"
-L["ROLE_CHECKS_HELP"] = "Automatically Accept Role Checks \n\nIf A Role Is Already Set.."
-L["READY_CHECKS"] = "Accept Ready Checks With Team"
-L["READY_CHECKS_HELP"] = "Accept Ready Checks With Team \n\nIf Team Member Is The One That Does The Ready Check It Is Auto."
-L["LFG_Teleport"] = "Instance Teleport With Team"
-L["LFG_Teleport_HELP"] = "Minions Will Copy The Teams Instance Telport"
-L["ROLL_LOOT"] = "Roll Loot With Team"
-L["ROLL_LOOT_HELP"] = "Roll Loot With the Team \nIf Any Instance Has A Roll On A Item"
--- Warnings
-L["COMBAT"] = "Combat"
-L["WARN_HIT"] = "Warn If Minion Gets Hit"
-L["WARN_HIT_HELP"] = "Warn If Hit First Time In Combat (Minion)"
-L["TARGET_NOT_MASTER"] = "Warn If Target Not Master"
-L["TARGET_NOT_MASTER_HELP"] = "Warn If Target Not Master On Combat (Minion)"
-L["FOCUS_NOT_MASTER"] = "Warn If Focus Not Master"
-L["FOCUS_NOT_MASTER_HELP"] = "Warn If Focus Not Master On Combat (Minion)"
-L["HEALTH_POWER"] = "Health / Mana"
-L["HEALTH_DROPS_BELOW"] = "Warn If My Health Drops Below"
-L["HEALTH_DROPS_BELOW_HELP"] = "Warn Master If Health Drops Below A Certain Percent"
-L["HEALTH_PERCENTAGE"] = "Health Amount - Percentage Allowed Before Warning"
-L["MANA_DROPS_BELOW"] = "Warn If My Mana Drops Below"
-L["MANA_DROPS_BELOW_HELP"] = "Warn Master If Mana Drops Below A Certain Percent"
-L["MANA_PERCENTAGE"] = "Mana Amount - Percentage Allowed Before Warning"
-L["DURABILITY_DROPS_BELOW"] = "Durability Drops Below"
-L["DURABILITY_DROPS_BELOW_HELP"] = "Warn Master If My Durability Drops Below A Certain Percent"
-L["DURABILITY_PERCENTAGE"] = "Warn If My Durability Drops Below"
-L["LOW_DURABILITY_TEXT"] = "Low Durability Text"
-L["DURABILITY_LOW_MSG"] = "I Have My Durability At"
-L["BAGS_FULL"] = "Warn If Bags Are Full"
-L["BAGS_FULL_HELP"] = "Warn If All Regular Bags Are Full"
-L["BAG_SPACE"] = "Bag Space"
-L["OTHER"] = "Other"
-L["WARN_IF_CC"] = "Warn If Toon Gets Crowd Controled"
-L["WARN_IF_CC_HELP"] = "Warn If any Team Member Gets Crowd Control"
-L["RELEASE_TEAM_Q"] = "Release All Team?"
-L["RELEASE_TEAM"] = "Release Team"
-L["RECOVER_CORPSES"] = "Recover All Team Corpses?"
-L["ERR_GOLD_TO_REPAIR"] = "I Do Not Have Enough Money To Repair All My Items"
-L["RELEASE_CORPSE_FOR_X"] = function( delay )
-	return string.format( "I can not release to my Corpse for: %s seconds", delay )
-end
-L["I_REFUSED_A_DUEL_FROM_X"] = function( challenger )
-	return string.format( "I Refused A Duel From: %s", challenger )
-end
-L["REFUSED_GUILD_INVITE"] = function( guild, inviter )
-	return string.format( "I Refused A Guild Invite To: %s From: %s", guild, inviter )
-end
-L["SUMMON_FROM_X_TO_Y"] = function( sender, location )
-	return string.format( "I Accepted Summon From: %s To: %s", sender, location )
-end
-L["REPAIRING_COST_ME_X"] = function( costString )
-    return string.format( "Repairing Cost Me: %s", costString )
-end
-
---------------------------
--- Talk Locale
-
-L["TALK_OPTIONS"] = "Talk Options"
-L["FORWARD_WHISPERS_MASTER_RELAY"] = "Forward Whispers To Master And Relay Back"
-L["FORWARD_WHISPERS_MASTER_RELAY_HELP"] = "Forward Whispers To Master And \nRelay Back To The Character That Whispered You"
-L["DO_NOT_BATTENET_WHISPERS"] = "Do Not Forward Batte.Net Whispers"
-L["DO_NOT_BATTENET_WHISPERS_HELP"] = "Do Not Forward BatteTag Or RealID Whispers"
-
-L["FORWARD_FAKE_WHISPERS"] = "Forward Via Fake Whispers For Clickable Links And Players"
-L["FORWARD_FAKE_WHISPERS_HELP"] = "Forward Via Fake Whispers To Use As Clickable Links And Players"
-L["FAKE_WHISPERS_CHANNEL"]  = "Send Fake Whispers To"
-L["FORWARDER_REPLY_QUEUE"] = "Add Forwarder To Reply Queue On Master"
-L["FORWARDER_REPLY_QUEUE_HELP"] = "Add Forwarder To Reply Queue On Master"
-L["ORIGINATOR_REPLY_QUEUE"] = "Add Originator To Reply Queue On Master"
-L["ORIGINATOR_REPLY_QUEUE_HELP"] = "Add Originator To Reply Queue On Master"
-L["MESSAGES_WITH_LINKS"] = "Only Show Messages With Links"
-L["MESSAGES_WITH_LINKS_HELP"] = "Only Show Messages With Links"
--- TOBEREMOVED
-L["CHAT_SNIPPETS"] = "Chat Snippets"
-L["ENABLE_CHAT_SNIPPETS"] = "Enable Chat Snippets"
-L["ENABLE_CHAT_SNIPPETS_HELP"] = "Chat Snippets Auto Send Messages To Players That Wispers Your Minions"
-L["SNIPPET_TEXT"] = "Snippet Text"
-L["CHAT_SNIPPET_POPUP"] = "Enter The Shortcut Text For This Chat Snippet:"
-L["REMOVE_CHAT_SNIPPET"] = "Are You Sure You Wish To Remove The Selected Chat Snippet?"
---END
-L["GM"] = "GM"
-L["TALK_VIA"] = " (via "
-L["BATTLE_NET"] = "<BatteTag>"
-L["<GM>"] = "<GameMaster>"
-L["WHISPERS"] = " Whispers: "
-L["WHISPERED_YOU"] = "Whispered You."
-
-------------------------
--- Quest Locale
-
-L["ABANDON_QUESTS_TEAM"] = "Would you like to Abandon \"%s\" On All Toons?"
-L["JUST_ME"] = "Just Me"
-L["ALL_TEAM"] = "All Team"
-L["TRACK_QUEST_ON_TEAM"] = "Would you like to Track \"%s\" On All Toons?"
-L["UNTRACK_QUEST_ON_TEAM"] = "Would you like to Untrack \"%s\" On All Toons?"
-L["ABANDON_ALL_QUESTS"] = "This Will Abandon \"ALL\" Quests On Every Toon! \nYes, This Means You Will End Up With ZERO Quests In Your Quest Log! \nAre You Sure?"
-L["YES_IAM_SURE"] = "Yes I'm Sure"
-L["INFORMATION"] = "Information"
-L["QUESTINFORMATIONONE"] = "Quest Treats Any Team member as the Master."
-L["QUESTINFORMATIONTWO"] = "Quest actions by one character will be actioned by the other"
-L["QUESTINFORMATIONTHREE"] = "Characters Regardless Of Who The Master Is."
-L["QUEST_HEADER"] = "Toon Select & Decline Quest With Team"
-L["MIRROR_QUEST"] = "Quest Selection & Acceptance"
-L["MIRROR_QUEST_HELP"] = "Mirror Quest Selection With All Team"
-L["AUTO_SELECT_QUESTS"] = "All Auto Select Quests"
-L["AUTO_SELECT_QUESTS_HELP"] = "Automatically Pick Up Quest \nWhen You Talk To A Quest Giving NPC"
-L["ACCEPT_QUESTS"] = "Accept Quests"
-L["ACCEPT_QUESTS_HELP"] = "Accept Quests"
-L["ACCEPT_QUEST_WITH_TEAM"] = "Accept Quest With Team"
-L["ACCEPT_QUEST_WITH_TEAM_HELP"] = "Accept Quest With Team Members"
-L["QUEST_INFORMATION_AUTO"] = "Automatically: Accept Quests Regardless of the Team Selection"
-L["DONOT_AUTO_ACCEPT_QUESTS"] = "Do Not Auto Accept Quests"
-L["DONOT_AUTO_ACCEPT_QUESTS_HELP"] = "Nerver Auto Accept Quests From Anyone"
-L["AUTO_ACCEPT_QUESTS"] = "All Auto Accept ANY Quest"
-L["AUTO_ACCEPT_QUESTS_HELP"] = "All Auto Accept ANY Quest From Anyone"
-L["AUTO_ACCEPT_QUESTS_LIST"] = "Only Auto Accept Quests From:"
-L["AUTO_ACCEPT_QUESTS_LIST_HELP"] = "Only Auto Accept Quests From The Following  List"
-L["TEAM_QUEST_HELP"] = "Any EMA Team Member"
-L["NPC"] = "NPC"
-L["NPC_HELP"] = "Any Non-Player Character"
-L["FRIENDS"] = "Friends"
-L["FRIENDS_HELP"] = "Anyone On Your Friends List Or BattleTag Friends List"
--- Quest
-L["QUEST_GROUP_HELP"] = "Anyone In Your Party Group"
-L["GUILD_HELP"] = "Anyone In Your Guild"
-L["PH_RAID"] = "[PH] Raid"
-L["PH_RAID_HELP"] = "[PH] Raid"
-L["MASTER_SHARE_QUESTS"] = "Master Auto Share Quests When Accepted"
-L["MASTER_SHARE_QUESTS_HELP"] = "Master Will Try And Share Quests When Accepted"
-L["ACCEPT_ESCORT_QUEST"] = "Toon Auto Accept Escort Quest From Team"
-L["ACCEPT_ESCORT_QUEST_HELP"] = "Automatically Accept Escort Quests When A Team Picks One Up"
-L["HOLD_SHIFT_TO_OVERRIDE"] = "Hold Shift To Override Auto Select/Auto Complete"
-L["HOLD_SHIFT_TO_OVERRIDE_HELP"] = "Hold Shift Key To Override Auto Select/Auto Complete"
-L["SHOW_PANEL_UNDER_QUESTLOG"] = "Show Extra Buttons Panel Under WorldMap Quest Log"
-L["SHOW_PANEL_UNDER_QUESTLOG_HELP"] = "Show Extra Buttons Panel Under World Map Quest Log \nEG: TrackALL AbandonALL"
--- Completion
-L["QUEST_COMPLETION"] = "Quest Completion"
-L["ENABLE_QUEST_COMPLETION"] = "Enable Auto Quest Completion"
-L["ENABLE_QUEST_COMPLETION_HELP"] = "Enable Automatically Handing In Quest's"
-L["NOREWARDS_OR_ONEREWARD"] = "Quest Has No Rewards Or One Reward:"
-L["QUEST_DO_NOTHING"] = "Toon Do Nothing"
-L["QUEST_DO_NOTHING_HELP"] = "Do Not Automatically Hand In Quest"
-L["COMPLETE_QUEST_WITH_TEAM"] = "Toon Complete Quest With Team"
-L["COMPLETE_QUEST_WITH_TEAM_HELP"] = "Complete Quest With Team EMA Members"
-L["AUTO_COMPLETE_QUEST"] = "Automatically Complete Quest"
-L["AUTO_COMPLETE_QUEST_HELP"] = "Automatically Complete/Turn In The Quest"
-L["MORE_THEN_ONE_REWARD"] = "Quest Has More Than One Reward:"
-L["MUST_CHOOSE_OWN_REWARD"] = "Toon Must Choose Own Reward"
-L["MUST_CHOOSE_OWN_REWARD_HELP"] = "Toon Must Select Own Quest Reward"
-L["CHOOSE_SAME_REWARD"] = "Toon Choose Same Reward As Team"
-L["CHOOSE_SAME_REWARD_HELP"] = "Toon Will Choose Same Reward As EMA Team Members \n\nOnly Use If All Team Members Class"
-L["MODIFIER_CHOOSE_SAME_REWARD"] = "If Modifier Keys Pressed, Toon Choose Same Reward"
-L["MODIFIER_CHOOSE_SAME_REWARD_HELP"] = "If Modifier Key Below Is Pressed, Minion Can Choose Same Reward"
-L["OVERRIDE_REWARD_SELECTED"] = "Override: If Minion Already Has Reward Selected, Choose That Reward"
-L["OVERRIDE_REWARD_SELECTED_HELP"] = "Override: If Minion Already Has Reward Selected, Choose That Reward \nAnd Not Use The Current Toons Reward"
-L["SHARING_QUEST_TO_ALLMINIONS"] = "Sharing Quest's To All Minions"
-L["TRACKING_QUEST_TO_ALLMINIONS"] = "Tracking Quest's To All Minions"
-L["UNTRACKING_QUESTS_ALLMINIONS"] = "Untracking Quest's To All Minions"
-L["TOGGLE"] = "Toggle"
-L["ABANDON_ALL"] = "Abandon All Quests"
-L["ABANDON_ALL_TOOLTIP"] = "Aabandon All Quests On All Minions"
-L["SHARE_ALL"] = "Share ALL"
-L["SHARE_ALL_TOOLTIP"] = "Share All Quests To All Minions"
-L["TRACK_ALL"] = "Track All"
-L["TRACK_ALL_TOOLTIP"] = "Track All Quests On All Minions"
-L["UNTRACK_ALL"] = "Untrack All"
-L["UNTRACK_ALL_TOOLTIP"] = "Untrack All Quests on all Minions"
-L["ABANDONING_ALLQUEST"] = "Abandoning Quest's To All Toons"
-
--- Quest Strings
-L["AUTOMATICALLY_ACCEPTED_ESCORT_QUEST"] = function( questName )
-	return string.format( "Automatically Accepted Escort Quest: %s", questName )
-end
-L["INVENTORY_IS_FULL_CAN_NOT_HAND_IN_QUEST"] = function( questName )
-	return string.format( "Inventory Is Full Can Not Hand In Quest: %s", questName )
-end
-L["ACCEPTED_QUEST_QN"] = function( questName )
-	return string.format( "Accepted Quest: %s", questName )
-end
-L["AUTO_ACCEPTED_PICKUPQUEST_QN"] = function( questName )
-	return string.format( "Automatically Accepted PickupQuest: %s", questName )
-end
-L["AUTOMATICALLY_ACCEPTED_QUEST"] = function( questName )
-	return string.format( "Automatically Accepted Quest: %s", questName )
-end
-L["QUESTLOG_DO_NOT_HAVE_QUEST"] = function( questName )
-	return string.format( "I Do Not Have The Quest: %s", questName )
-end
-L["QUESTLOG_HAVE_ABANDONED_QUEST"] = function( questName )
-	return string.format( "I Have Abandoned The Quest: %s", questName )
-end
-
-------------------------
--- QuestTracker Locale
-
-L["SHOW_QUEST_WATCHER"] = "Show Objective Tracker"
-L["SHOW_QUEST_WATCHER_HELP"] = "Show The Objective/Quest EMA Tracker Window."
-L["HIDE_QUEST_WATCHER"] = "Hide Objective Tracker"
-L["HIDE_QUEST_WATCHER_HELP"] = "Hides The Objective/Quest EMA Tracker Window."
-L["QUEST_TRACKER_HEADER"] = "Quest Tracker Settings"
-L["ENABLE_TRACKER"] = "Enable Objective Tracker"
-L["ENABLE_TRACKER_HELP"] = "Enables The EMA Objective/Quest Tracker"
-L["UNLOCK_TRACKER"] = "Unlocks The Objective Tracker"
-L["UNLOCK_TRACKER_HELP"] = "Unlocks The Objective/Quest Tracker \n\nHold Alt key To Move It\nLock to Click Through"
-L["HIDE_BLIZZ_OBJ_TRACKER"] = "Hide Blizzard's Objectives Tracker"
-L["HIDE_BLIZZ_OBJ_TRACKER_HELP"] = "Hides Defualt Blizzard Objective\Quest Tracker"
-L["SHOW_JOT_ON_MASTER"] = "Show The JOT On Master Toon"
-L["SHOW_JOT_ON_MASTER_HELP"] = "Only show (EMA Objective Tracker) On Master Character Only"
-L["HIDE_JOT_IN_COMBAT"] = "Hide JOT In Combat"
-L["HIDE_JOT_IN_COMBAT_HELP"] = "Hide EMA Objective/Quest Tracker in Combat"
-L["SHOW_COMPLETED_OBJ_DONE"] = "Show Completed Objectives As 'DONE'"
-L["SHOW_COMPLETED_OBJ_DONE_HELP"] = "Show Completed Objectives/Quests As 'DONE'"
-L["HIDE_OBJ_COMPLETED"] = "Hide Objectives Completed"
-L["HIDE_OBJ_COMPLETED_HELP"] = "Hide Objectives/Quests Completed By The Team"
-L["SEND_PROGRESS_MESSAGES"] = "Send Progress Messages"
-L["SEND_PROGRESS_MESSAGES_HELP"] = "Send Progress Messages To Message Area Box Below"
-L["QUESTWACHERINFORMATIONONE"] = "You Will Need To Do UI [/reload] To Change Lines And Width"
-L["LINES_TO_DISPLAY"] = "Lines Of Information To Display"
-L["TRACKER_WIDTH"] = "Tracker Width"
-L["DONE"] = "Done"
-L["TRACKER_TITLE_NAME"] = "EMA Objectives Tracker"
-L["REWARDS"] = "Rewards"
-L["REWARDS_TEXT"] = "Completing This Quest Will \nReward You With:"
-L["HEADER_MOUSE_OVER_QUESTWATCHER"] = "Hold Down \"ALT\" Key To Move EMA Objectives Tracker"
-L["UPDATE_MOUSE_OVER_QUESTWATCHER"] = "Force A Update Of The EMA Objectives Tracker"
-
-------------------------
--- Guild Locale
-L["GUILDTAB"] = ""
-L["GUILD_LIST_HEADER"] = "Guild Bank List"
-L["GUILD_LIST"] = "Put Listed Items In The Guild Bank"
-L["GUILD_LIST_HELP"] = "Automatically Put Listed Items Below In The Guild Bank"
-L["GB_TAB_LIST"] = "Guild Bank Number Tab"
-L["GUILD_BOE_ITEMS"] = "Places All Binds When Equipped Items In The GuildBank"
-L["GUILD_BOE_ITEMS_HELP"] = "Places All Binds When Equipped Items In The GuildBank"
-L["GUILD_REAGENTS"] =  "Places All Crafting Reagents Items In The GuildBank"
-L["GUILD_REAGENTS_HELP"] = "Places All Crafting Reagents Items In The GuildBank"
-L["GB_OPTIONS"] = "Guild Bank Options"
-L["GB_GOLD"] = "Adjust Characters Money While Visiting A Guild Bank"
-L["GB_GOLD_HELP"] = "Adjust Characters Money While Visiting A Guild Bank"
-L["REMOVE_GUILD_LIST"] = "Are You Sure You Wish To Remove The Selected Item From The Guild Items List?"
-
-------------------------
--- X Locale
\ No newline at end of file
diff --git a/Locales/Locales.xml b/Locales/Locales.xml
deleted file mode 100644
index 853ef37..0000000
--- a/Locales/Locales.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<!--
-				Jamba EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )
-				Current Author: Jennifer Cally (Ebony)
-				Copyright 2015 - 2018 Jennifer Cally "Ebony"
-
-				License: The MIT License (MIT)
-
--->
-<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd" xmlns="http://www.blizzard.com/wow/ui/">
-	<Script file="Core-Locale-enUS.lua" />
-	<Script file="Core-Locale-deDE.lua" />
-</Ui>
\ No newline at end of file
diff --git a/Media/AddGroup.tga b/Media/AddGroup.tga
deleted file mode 100644
index df9c5fa..0000000
Binary files a/Media/AddGroup.tga and /dev/null differ
diff --git a/Media/AddPlayerIcon.tga b/Media/AddPlayerIcon.tga
deleted file mode 100644
index 6f81830..0000000
Binary files a/Media/AddPlayerIcon.tga and /dev/null differ
diff --git a/Media/CharAdd.tga b/Media/CharAdd.tga
deleted file mode 100644
index efd131f..0000000
Binary files a/Media/CharAdd.tga and /dev/null differ
diff --git a/Media/CharAddParty.tga b/Media/CharAddParty.tga
deleted file mode 100644
index b1e37e5..0000000
Binary files a/Media/CharAddParty.tga and /dev/null differ
diff --git a/Media/CharDown.tga b/Media/CharDown.tga
deleted file mode 100644
index 01c0729..0000000
Binary files a/Media/CharDown.tga and /dev/null differ
diff --git a/Media/CharMaster.tga b/Media/CharMaster.tga
deleted file mode 100644
index b281ed3..0000000
Binary files a/Media/CharMaster.tga and /dev/null differ
diff --git a/Media/CharRemove.tga b/Media/CharRemove.tga
deleted file mode 100644
index dfeaf08..0000000
Binary files a/Media/CharRemove.tga and /dev/null differ
diff --git a/Media/CharRemoveParty.tga b/Media/CharRemoveParty.tga
deleted file mode 100644
index 0870bdd..0000000
Binary files a/Media/CharRemoveParty.tga and /dev/null differ
diff --git a/Media/CharUp.tga b/Media/CharUp.tga
deleted file mode 100644
index 071bcbe..0000000
Binary files a/Media/CharUp.tga and /dev/null differ
diff --git a/Media/ChatIcon.tga b/Media/ChatIcon.tga
deleted file mode 100644
index 49758e0..0000000
Binary files a/Media/ChatIcon.tga and /dev/null differ
diff --git a/Media/CommsLogo.tga b/Media/CommsLogo.tga
deleted file mode 100644
index 40f669f..0000000
Binary files a/Media/CommsLogo.tga and /dev/null differ
diff --git a/Media/EMALogo.tga b/Media/EMALogo.tga
deleted file mode 100644
index e90e005..0000000
Binary files a/Media/EMALogo.tga and /dev/null differ
diff --git a/Media/FollowIcon.tga b/Media/FollowIcon.tga
deleted file mode 100644
index 5d12f00..0000000
Binary files a/Media/FollowIcon.tga and /dev/null differ
diff --git a/Media/GoldIcon.tga b/Media/GoldIcon.tga
deleted file mode 100644
index 388ed3c..0000000
Binary files a/Media/GoldIcon.tga and /dev/null differ
diff --git a/Media/GroupIcon.tga b/Media/GroupIcon.tga
deleted file mode 100644
index a0c41f3..0000000
Binary files a/Media/GroupIcon.tga and /dev/null differ
diff --git a/Media/GuildIcon.tga b/Media/GuildIcon.tga
deleted file mode 100644
index f3d6c43..0000000
Binary files a/Media/GuildIcon.tga and /dev/null differ
diff --git a/Media/HeaderLogo.tga b/Media/HeaderLogo.tga
deleted file mode 100644
index a5fb8e1..0000000
Binary files a/Media/HeaderLogo.tga and /dev/null differ
diff --git a/Media/InteractionIcon.tga b/Media/InteractionIcon.tga
deleted file mode 100644
index 97e8b87..0000000
Binary files a/Media/InteractionIcon.tga and /dev/null differ
diff --git a/Media/Isboxer_Add.tga b/Media/Isboxer_Add.tga
deleted file mode 100644
index c2e567f..0000000
Binary files a/Media/Isboxer_Add.tga and /dev/null differ
diff --git a/Media/ItemUseIcon.tga b/Media/ItemUseIcon.tga
deleted file mode 100644
index a279fbf..0000000
Binary files a/Media/ItemUseIcon.tga and /dev/null differ
diff --git a/Media/NewsIcon.tga b/Media/NewsIcon.tga
deleted file mode 100644
index ad891c5..0000000
Binary files a/Media/NewsIcon.tga and /dev/null differ
diff --git a/Media/QuestCompletionIcon.tga b/Media/QuestCompletionIcon.tga
deleted file mode 100644
index 8ce7191..0000000
Binary files a/Media/QuestCompletionIcon.tga and /dev/null differ
diff --git a/Media/QuestIcon.tga b/Media/QuestIcon.tga
deleted file mode 100644
index d3e5fc8..0000000
Binary files a/Media/QuestIcon.tga and /dev/null differ
diff --git a/Media/QuestTrackerIcon.tga b/Media/QuestTrackerIcon.tga
deleted file mode 100644
index 73d8793..0000000
Binary files a/Media/QuestTrackerIcon.tga and /dev/null differ
diff --git a/Media/RemoveGroup.tga b/Media/RemoveGroup.tga
deleted file mode 100644
index 4ab900f..0000000
Binary files a/Media/RemoveGroup.tga and /dev/null differ
diff --git a/Media/SellIcon.tga b/Media/SellIcon.tga
deleted file mode 100644
index bd94dc7..0000000
Binary files a/Media/SellIcon.tga and /dev/null differ
diff --git a/Media/SettingsIcon.tga b/Media/SettingsIcon.tga
deleted file mode 100644
index a610010..0000000
Binary files a/Media/SettingsIcon.tga and /dev/null differ
diff --git a/Media/TeamCore.tga b/Media/TeamCore.tga
deleted file mode 100644
index c836d99..0000000
Binary files a/Media/TeamCore.tga and /dev/null differ
diff --git a/Media/Toon.tga b/Media/Toon.tga
deleted file mode 100644
index 30e76c4..0000000
Binary files a/Media/Toon.tga and /dev/null differ
diff --git a/Media/TradeIcon.tga b/Media/TradeIcon.tga
deleted file mode 100644
index 5c7c0b5..0000000
Binary files a/Media/TradeIcon.tga and /dev/null differ
diff --git a/Media/WarningIcon.tga b/Media/WarningIcon.tga
deleted file mode 100644
index 253bbb8..0000000
Binary files a/Media/WarningIcon.tga and /dev/null differ
diff --git a/Media/moduleIconRepair.tga b/Media/moduleIconRepair.tga
deleted file mode 100644
index 5465642..0000000
Binary files a/Media/moduleIconRepair.tga and /dev/null differ
diff --git a/Modules/DisplayTeam.lua b/Modules/DisplayTeam.lua
deleted file mode 100644
index f99408a..0000000
--- a/Modules/DisplayTeam.lua
+++ /dev/null
@@ -1,3356 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "EMA" that is 								--
---				Released under the MIT License 										--
---				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"DisplayTeam",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Load libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
-local LibButtonGlow = LibStub:GetLibrary( "LibButtonGlow-1.0")
-EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
-
--- Constants required by EMAModule and Locale for this module.
-EMA.moduleName = "JmbDspTm"
-EMA.settingsDatabaseName = "DisplayTeamProfileDB"
-EMA.chatCommand = "ema-display-team"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["DISPLAY"]
-EMA.moduleDisplayName = L["DISPLAY"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\TeamCore.tga"
--- order
-EMA.moduleOrder = 50
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		showTeamList = true,
-		showTeamListOnMasterOnly = false,
-		hideTeamListInCombat = false,
-		enableClique = false,
-		statusBarTexture = L["BLIZZARD"],
-		borderStyle = L["BLIZZARD_TOOLTIP"],
-		backgroundStyle = L["BLIZZARD_DIALOG_BACKGROUND"],
-		fontStyle = L["ARIAL_NARROW"],
-		fontSize = 12,
-		teamListScale = 1,
-		teamListTitleHeight = 15,
-		teamListVerticalSpacing = 3,
-		teamListHorizontalSpacing = 6,
-		barVerticalSpacing = 2,
-		barHorizontalSpacing = 2,
-		charactersPerRow = 1,
-		--Old code kept for Legacy Purpose
-		barsAreStackedVertically = false,
-		teamListHorizontal = true,
-		showListTitle = true,
-		olnyShowInParty = false,
-		healthManaOutOfParty = false,
-		showCharacterPortrait = false,
-		characterPortraitWidth = 80,
-		showFollowStatus = true,
-		followStatusWidth = 100,
-		followStatusHeight = 15,
-		followStatusShowName = true,
-		showExperienceStatus = true,
-		showXpStatus = true,
-		showArtifactStatus = false,
-		showHonorStatus = false,
-		showRepStatus = false,
-		experienceStatusWidth = 100,
-		experienceStatusHeight = 15,
-		experienceStatusShowValues = false,
-		experienceStatusShowPercentage = true,
-		showHealthStatus = false,
-		showClassColors = false,
-		healthStatusWidth = 100,
-		healthStatusHeight = 25,
-		healthStatusShowValues = true,
-		healthStatusShowPercentage = true,
-		showPowerStatus = false,
-		powerStatusWidth = 100,
-		powerStatusHeight = 15,
-		powerStatusShowValues = true,
-		powerStatusShowPercentage = true,
-		showComboStatus = false,
-		comboStatusWidth = 100,
-		comboStatusHeight = 10,
-		comboStatusShowValues = true,
-		comboStatusShowPercentage = true,
-		showToolTipInfo = false,
---		ShowEquippedOnly = false,
-		framePoint = "LEFT",
-		frameRelativePoint = "LEFT",
-		frameXOffset = 0,
-		frameYOffset = 30,
-		frameAlpha = 1.0,
-		frameBackgroundColourR = 1.0,
-		frameBackgroundColourG = 1.0,
-		frameBackgroundColourB = 1.0,
-		frameBackgroundColourA = 1.0,
-		frameBorderColourR = 1.0,
-		frameBorderColourG = 1.0,
-		frameBorderColourB = 1.0,
-		frameBorderColourA = 1.0,
-		timerCount = 1,
-		currGold = true
-	},
-}
-
--- Debug message.
-function EMA:DebugMessage( ... )
-	--EMA:Print( ... )
-end
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = "group",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-display-team push",
-				get = false,
-				set = "EMASendSettings",
-			},
-			hide = {
-				type = "input",
-				name = L["HIDE_TEAM_DISPLAY"],
-				desc = L["HIDE_TEAM_DISPLAY_HELP"],
-				usage = "/EMA-display-team hide",
-				get = false,
-				set = "HideTeamListCommand",
-			},
-			show = {
-				type = "input",
-				name = L["SHOW_TEAM_DISPLAY"],
-				desc = L["SHOW_TEAM_DISPLAY_HELP"],
-				usage = "/EMA-display-team show",
-				get = false,
-				set = "ShowTeamListCommand",
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_FOLLOW_STATUS_UPDATE = "FlwStsUpd"
-EMA.COMMAND_EXPERIENCE_STATUS_UPDATE = "ExpStsUpd"
-EMA.COMMAND_REPUTATION_STATUS_UPDATE = "RepStsUpd"
-EMA.COMMAND_COMBO_STATUS_UPDATE = "CboStsUpd"
-EMA.COMMAND_REQUEST_INFO = "SendInfo"
-EMA.COMMAND_COMBAT_STATUS_UPDATE = "InComStsUpd"
-EMA.COMMAND_POWER_STATUS_UPDATE = "PowStsUpd"
-EMA.COMMAND_HEALTH_STATUS_UPDATE = "heaStsUpd"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Constants used by module.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Variables used by module.
--------------------------------------------------------------------------------------------------------------
-
--- Team display variables.
-EMA.globalFramePrefix = "EMADisplayTeam"
-EMA.characterStatusBar = {}
-EMA.totalMembersDisplayed = 0
-EMA.teamListCreated = false
-EMA.refreshHideTeamListControlsPending = false
-EMA.refreshShowTeamListControlsPending = false
-EMA.updateSettingsAfterCombat = false
-
--------------------------------------------------------------------------------------------------------------
--- Team Frame.
--------------------------------------------------------------------------------------------------------------
-
-local function GetCharacterHeight()
-	local height = 0
-	local heightPortrait = 0
-	local heightFollowStatus = 0
-	local heightExperienceStatus = 0
-	local heightHealthStatus = 0
-	local heightPowerStatus = 0
-	local heightComboStatus = 0
-	local heightAllBars = 0
-	if EMA.db.showCharacterPortrait == true then
-		heightPortrait = EMA.db.characterPortraitWidth + EMA.db.teamListVerticalSpacing
-	end
-	if EMA.db.showFollowStatus == true then
-		heightFollowStatus = EMA.db.followStatusHeight + EMA.db.barVerticalSpacing
-		heightAllBars = heightAllBars + heightFollowStatus
-	end
-	if EMA.db.showExperienceStatus == true then
-		heightExperienceStatus = EMA.db.experienceStatusHeight + EMA.db.barVerticalSpacing
-		heightAllBars = heightAllBars + heightExperienceStatus
-	end
-	if EMA.db.showHealthStatus == true then
-		heightHealthStatus = EMA.db.healthStatusHeight + EMA.db.barVerticalSpacing
-		heightAllBars = heightAllBars + heightHealthStatus
-	end
-	if EMA.db.showPowerStatus == true then
-		heightPowerStatus = EMA.db.powerStatusHeight + EMA.db.barVerticalSpacing
-		heightAllBars = heightAllBars + heightPowerStatus
-	end
-	if EMA.db.showComboStatus == true then
-		heightComboStatus = EMA.db.comboStatusHeight + EMA.db.barVerticalSpacing
-		heightAllBars = heightAllBars + heightComboStatus
-	end
-	if EMA.db.barsAreStackedVertically == true then
-		height = max( heightPortrait, heightAllBars )
-
-	else
-		height = max( heightPortrait, heightFollowStatus, heightExperienceStatus, heightHealthStatus, heightPowerStatus, heightComboStatus )
-		--height = max( heightPortrait, heightBagInformation, heightFollowStatus, heightExperienceStatus, heightReputationStatus, heightHealthStatus, heightPowerStatus, heightComboStatus )
-	end
-	return height
-end
-
-local function GetCharacterWidth()
-	local width = 0
-	local widthPortrait = 0
-	local widthFollowStatus = 0
-	local widthExperienceStatus = 0
-	local widthHealthStatus = 0
-	local widthPowerStatus = 0
-	local widthComboStatus = 0
-	local widthAllBars = 0
-	if EMA.db.showCharacterPortrait == true then
-		widthPortrait = EMA.db.characterPortraitWidth + EMA.db.teamListHorizontalSpacing
-	end
-	if EMA.db.showFollowStatus == true then
-		widthFollowStatus = EMA.db.followStatusWidth + EMA.db.barHorizontalSpacing
-		widthAllBars = widthAllBars + widthFollowStatus
-	end
-	if EMA.db.showExperienceStatus == true then
-		widthExperienceStatus = EMA.db.experienceStatusWidth + EMA.db.barHorizontalSpacing
-		widthAllBars = widthAllBars + widthExperienceStatus
-	end
-	if EMA.db.showHealthStatus == true then
-		widthHealthStatus = EMA.db.healthStatusWidth + EMA.db.barHorizontalSpacing
-		widthAllBars = widthAllBars + widthHealthStatus
-	end
-	if EMA.db.showPowerStatus == true then
-		widthPowerStatus = EMA.db.powerStatusWidth + EMA.db.barHorizontalSpacing
-		widthAllBars = widthAllBars + widthPowerStatus
-	end
-	if EMA.db.showComboStatus == true then
-		widthComboStatus = EMA.db.comboStatusWidth + EMA.db.barHorizontalSpacing
-		widthAllBars = widthAllBars + widthComboStatus
-	end
-	if EMA.db.barsAreStackedVertically == true then
-		width = widthPortrait + max( widthFollowStatus, widthExperienceStatus, widthHealthStatus, widthPowerStatus, widthComboStatus )
-		--width = widthPortrait + max( widthBagInformation, widthFollowStatus, widthExperienceStatus, widthReputationStatus, widthHealthStatus, widthPowerStatus, widthComboStatus )
-	else
-		width = widthPortrait + widthAllBars
-	end
-	return width
-end
-
-local function UpdateEMATeamListDimensions()
-	local frame = EMADisplayTeamListFrame
-	if EMA.db.showListTitle == true then
-		EMA.db.teamListTitleHeight = 15
-		EMADisplayTeamListFrame.titleName:SetText( L["EMA_TEAM"] )
-	else
-		EMA.db.teamListTitleHeight = 0
-		EMADisplayTeamListFrame.titleName:SetText( "" )
-	end
-	if EMA.db.teamListHorizontal == true then
-		--Old code kept for Legacy Purpose
-		--	frame:SetWidth( (EMA.db.teamListVerticalSpacing * 3) + (GetCharacterWidth() * EMA.totalMembersDisplayed) )
-		--	frame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() )
-	else
-		frame:SetWidth( (EMA.db.teamListHorizontalSpacing * 3) + GetCharacterWidth() )
-		frame:SetHeight( EMA.db.teamListTitleHeight + (GetCharacterHeight() * EMA.totalMembersDisplayed) + (EMA.db.teamListVerticalSpacing * 3) )
-	end
-	frame:SetScale( EMA.db.teamListScale )
-end
-
-local function CreateEMATeamListFrame()
-	-- The frame.
-	local frame = CreateFrame( "Frame", "EMADisplayTeamListWindowFrame", UIParent )
-	frame.obj = EMA
-	frame:SetFrameStrata( "LOW" )
-	frame:SetToplevel( true )
-	frame:SetClampedToScreen( true )
-	frame:EnableMouse( true )
-	frame:SetMovable( true )
-	frame:RegisterForDrag( "LeftButton" )
-	frame:SetScript( "OnDragStart",
-		function( this )
-			if IsAltKeyDown() then
-				if not UnitAffectingCombat("player") then
-					-- TODO: SO ARROW ICON ON MOUDE
-					this:StartMoving()
-				end
-			end
-		end )
-	frame:SetScript( "OnDragStop",
-		function( this )
-			this:StopMovingOrSizing()
-			local point, relativeTo, relativePoint, xOffset, yOffset = this:GetPoint()
-			EMA.db.framePoint = point
-			EMA.db.frameRelativePoint = relativePoint
-			EMA.db.frameXOffset = xOffset
-			EMA.db.frameYOffset = yOffset
-		end	)
-	frame:ClearAllPoints()
-	frame:SetPoint( EMA.db.framePoint, UIParent, EMA.db.frameRelativePoint, EMA.db.frameXOffset, EMA.db.frameYOffset )
-	frame:SetBackdrop( {
-		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
-		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-		tile = true, tileSize = 10, edgeSize = 10,
-		insets = { left = 3, right = 3, top = 3, bottom = 3 }
-	} )
-	-- Create the title for the team list frame.
-	local titleName = frame:CreateFontString( "EMADisplayTeamListWindowFrameTitleText", "OVERLAY", "GameFontNormal" )
-	titleName:SetPoint( "TOP", frame, "TOP", 0, -5 )
-	titleName:SetTextColor( 1.00, 1.00, 1.00 )
-	titleName:SetText( L["EMA_TEAM"] )
-	frame.titleName = titleName
-	-- Set transparency of the the frame (and all its children).
-	frame:SetAlpha(EMA.db.frameAlpha)
-
-	-- Set the global frame reference for this frame.
-	EMADisplayTeamListFrame = frame
-
-	EMA:SettingsUpdateBorderStyle()
-	EMA.teamListCreated = true
-
-end
-
-local function CanDisplayTeamList()
-	local canShow = false
-	if EMA.db.showTeamList == true then
-		if EMA.db.showTeamListOnMasterOnly == true then
-			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-				canShow = true
-			end
-		else
-			canShow = true
-		end
-	end
-	return canShow
-end
-
-function EMA:ShowTeamListCommand()
-	EMA.db.showTeamList = true
-	EMA:SetTeamListVisibility()
-end
-
-function EMA:HideTeamListCommand()
-	EMA.db.showTeamList = false
-	EMA:SetTeamListVisibility()
-end
-
-function EMA:SetTeamListVisibility()
-	if CanDisplayTeamList() == true then
-		EMADisplayTeamListFrame:ClearAllPoints()
-		EMADisplayTeamListFrame:SetPoint( EMA.db.framePoint, UIParent, EMA.db.frameRelativePoint, EMA.db.frameXOffset, EMA.db.frameYOffset )
-		EMADisplayTeamListFrame:SetAlpha( EMA.db.frameAlpha )
-		EMADisplayTeamListFrame:Show()
-	else
-		EMADisplayTeamListFrame:Hide()
-	end
-end
-
-function EMA:RefreshTeamListControlsHide()
-	if InCombatLockdown() then
-		EMA.refreshHideTeamListControlsPending = true
-		return
-	end
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		characterName = EMAUtilities:AddRealmToNameIfMissing ( characterName )
-		-- Hide their status bar.
-		EMA:HideEMATeamStatusBar( characterName )
-	end
-	UpdateEMATeamListDimensions()
-end
-
-function EMA:RefreshTeamListControlsShow()
-	if InCombatLockdown() then
-		EMA.refreshShowTeamListControlsPending = true
-		return
-	end
-
-	EMA.totalMembersDisplayed = 0
-	for index, characterName in EMAApi.TeamListOrdered() do
-		characterName = EMAUtilities:AddRealmToNameIfMissing ( characterName )
-		-- Is the team member online?
-	if EMAApi.GetCharacterOnlineStatus( characterName ) == true then
-		-- Checks the player is the party to hide the bar if needed.
-			if EMA.db.olnyShowInParty == true then
-				if UnitClass(Ambiguate( characterName, "none" ) ) then
-				-- Yes, the team member is online, draw their status bars.
-					EMA:UpdateEMATeamStatusBar( characterName, EMA.totalMembersDisplayed )
-					EMA.totalMembersDisplayed = EMA.totalMembersDisplayed + 1
-				end
-			else
-					EMA:UpdateEMATeamStatusBar( characterName, EMA.totalMembersDisplayed )
-					EMA.totalMembersDisplayed = EMA.totalMembersDisplayed + 1
-			end
-		end
-	end
-	UpdateEMATeamListDimensions()
-end
-
-function EMA:RefreshTeamListControls()
-	EMA:RefreshTeamListControlsHide()
-	EMA:RefreshTeamListControlsShow()
-end
-
-function EMA:SettingsUpdateStatusBarTexture()
-	local statusBarTexture = EMA.SharedMedia:Fetch( "statusbar", EMA.db.statusBarTexture )
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		characterStatusBar["followBar"]:SetStatusBarTexture( statusBarTexture )
-		characterStatusBar["followBar"]:GetStatusBarTexture():SetHorizTile( false )
-		characterStatusBar["followBar"]:GetStatusBarTexture():SetVertTile( false )
-		characterStatusBar["experienceBar"]:SetStatusBarTexture( statusBarTexture )
-		characterStatusBar["experienceBar"]:GetStatusBarTexture():SetHorizTile( false )
-		characterStatusBar["experienceBar"]:GetStatusBarTexture():SetVertTile( false )
-		characterStatusBar["experienceArtBar"]:SetStatusBarTexture( statusBarTexture )
-		characterStatusBar["experienceArtBar"]:GetStatusBarTexture():SetHorizTile( false )
-		characterStatusBar["experienceArtBar"]:GetStatusBarTexture():SetVertTile( false )
-	--	characterStatusBar["experienceHonorBar"]:SetStatusBarTexture( statusBarTexture )
-	--	characterStatusBar["experienceHonorBar"]:GetStatusBarTexture():SetHorizTile( false )
-	--	characterStatusBar["experienceHonorBar"]:GetStatusBarTexture():SetVertTile( false )
-		characterStatusBar["reputationBar"]:SetStatusBarTexture( statusBarTexture )
-		characterStatusBar["reputationBar"]:GetStatusBarTexture():SetHorizTile( false )
-		characterStatusBar["reputationBar"]:GetStatusBarTexture():SetVertTile( false )
-		characterStatusBar["healthBar"]:SetStatusBarTexture( statusBarTexture )
-		characterStatusBar["healthBar"]:GetStatusBarTexture():SetHorizTile( false )
-		characterStatusBar["healthBar"]:GetStatusBarTexture():SetVertTile( false )
-		characterStatusBar["powerBar"]:SetStatusBarTexture( statusBarTexture )
-		characterStatusBar["powerBar"]:GetStatusBarTexture():SetHorizTile( false )
-		characterStatusBar["powerBar"]:GetStatusBarTexture():SetVertTile( false )
-		characterStatusBar["comboBar"]:SetStatusBarTexture( statusBarTexture )
-		characterStatusBar["comboBar"]:GetStatusBarTexture():SetHorizTile( false )
-		characterStatusBar["comboBar"]:GetStatusBarTexture():SetVertTile( false )
-	end
-end
-
-function EMA:SettingsUpdateFontStyle()
-	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.fontStyle )
-	local textSize = EMA.db.fontSize
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		characterStatusBar["followBarText"]:SetFont( textFont , textSize , "OUTLINE")
-		characterStatusBar["experienceBarText"]:SetFont( textFont , textSize , "OUTLINE")
-		characterStatusBar["experienceArtBarText"]:SetFont( textFont , textSize , "OUTLINE")
---		characterStatusBar["experienceHonorBarText"]:SetFont( textFont , textSize , "OUTLINE")
-		characterStatusBar["reputationBarText"]:SetFont( textFont , textSize , "OUTLINE")
-		characterStatusBar["healthBarText"]:SetFont( textFont , textSize , "OUTLINE")
-		characterStatusBar["powerBarText"]:SetFont( textFont , textSize , "OUTLINE")
-		characterStatusBar["comboBarText"]:SetFont( textFont , textSize , "OUTLINE")
-
-	end
-end
-
-function EMA:SettingsUpdateBorderStyle()
-	local borderStyle = EMA.SharedMedia:Fetch( "border", EMA.db.borderStyle )
-	local backgroundStyle = EMA.SharedMedia:Fetch( "background", EMA.db.backgroundStyle )
-	local frame = EMADisplayTeamListFrame
-	frame:SetBackdrop( {
-		bgFile = backgroundStyle,
-		edgeFile = borderStyle,
-		tile = true, tileSize = frame:GetWidth(), edgeSize = 10,
-		insets = { left = 3, right = 3, top = 3, bottom = 3 }
-	} )
-	frame:SetBackdropColor( EMA.db.frameBackgroundColourR, EMA.db.frameBackgroundColourG, EMA.db.frameBackgroundColourB, EMA.db.frameBackgroundColourA )
-	frame:SetBackdropBorderColor( EMA.db.frameBorderColourR, EMA.db.frameBorderColourG, EMA.db.frameBorderColourB, EMA.db.frameBorderColourA )
-end
-
-function EMA:CreateEMATeamStatusBar( characterName, parentFrame )
-	local statusBarTexture = EMA.SharedMedia:Fetch( "statusbar", EMA.db.statusBarTexture )
-	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.fontStyle )
-	local textSize = EMA.db.fontSize
-
-	-- Create the table to hold the status bars for this character.
-	EMA.characterStatusBar[characterName] = {}
-	-- Get the status bars table.
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	-- Set the portrait.
-	local portraitName = EMA.globalFramePrefix.."PortraitButton"
-	local portraitButton = CreateFrame( "PlayerModel", portraitName, parentFrame )
-	portraitButton:ClearModel()
-	local portraitName = Ambiguate( characterName, "none" )
-	portraitButton:SetUnit( portraitName )
-	portraitButton:SetPortraitZoom( 1 )
-    portraitButton:SetCamDistanceScale( 1 )
-    portraitButton:SetPosition( 0, 0, 0 )
-	local portraitButtonClick = CreateFrame( "CheckButton", portraitName.."Click", parentFrame, "SecureActionButtonTemplate" )
-	portraitButtonClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
-	characterStatusBar["portraitButton"] = portraitButton
-	characterStatusBar["portraitButtonClick"] = portraitButtonClick
-	-- Set the follow bar.
-	local followName = EMA.globalFramePrefix.."FollowBar"
-	local followBar = CreateFrame( "StatusBar", followName, parentFrame) --, "TextStatusBar,SecureActionButtonTemplate" )
-	followBar.backgroundTexture = followBar:CreateTexture( followName.."BackgroundTexture", "ARTWORK" )
-	followBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
-	followBar:SetStatusBarTexture( statusBarTexture )
-	followBar:GetStatusBarTexture():SetHorizTile( false )
-	followBar:GetStatusBarTexture():SetVertTile( false )
-	followBar:SetStatusBarColor( 0.55, 0.15, 0.15, 0.25 )
-	followBar:SetMinMaxValues( 0, 100 )
-	followBar:SetValue( 100 )
-	followBar:SetFrameStrata( "LOW" )
-	followBar:SetAlpha( 1 )
-	local followBarClick = CreateFrame( "CheckButton", followName.."Click", parentFrame, "SecureActionButtonTemplate" )
-	followBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
-	followBarClick:SetFrameStrata( "MEDIUM" )
-	characterStatusBar["followBar"] = followBar
-	characterStatusBar["followBarClick"] = followBarClick
-	local followBarText = followBar:CreateFontString( followName.."Text", "OVERLAY", "GameFontNormal" )
-	followBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	followBarText:SetFont( textFont , textSize, "OUTLINE")
-	followBarText:SetAllPoints()
-	characterStatusBar["followBarText"] = followBarText
-	EMA:SettingsUpdateFollowText( characterName ) --, UnitLevel( Ambiguate( characterName, "none" ) ), nil, nil )
-	-- Set the experience bar.
-	local experienceName = EMA.globalFramePrefix.."ExperienceBar"
-	local experienceBar = CreateFrame( "StatusBar", experienceName, parentFrame, "AnimatedStatusBarTemplate" ) --"TextStatusBar,SecureActionButtonTemplate" )
-	experienceBar.backgroundTexture = experienceBar:CreateTexture( experienceName.."BackgroundTexture", "ARTWORK" )
-	experienceBar.backgroundTexture:SetColorTexture( 0.0, 0.39, 0.88, 0.15 )
-	experienceBar:SetStatusBarTexture( statusBarTexture )
-	experienceBar:GetStatusBarTexture():SetHorizTile( false )
-	experienceBar:GetStatusBarTexture():SetVertTile( false )
-	experienceBar:SetMinMaxValues( 0, 100 )
-	experienceBar:SetValue( 100 )
-	experienceBar:SetFrameStrata( "LOW" )
-	local experienceBarClick = CreateFrame( "CheckButton", experienceName.."Click", parentFrame, "SecureActionButtonTemplate" )
-	experienceBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
-	experienceBarClick:SetFrameStrata( "MEDIUM" )
-	characterStatusBar["experienceBar"] = experienceBar
-	characterStatusBar["experienceBarClick"] = experienceBarClick
-	local experienceBarText = experienceBar:CreateFontString( experienceName.."Text", "OVERLAY", "GameFontNormal" )
-	experienceBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	experienceBarText:SetFont( textFont , textSize, "OUTLINE")
-	experienceBarText:SetAllPoints()
-	experienceBarText.playerExperience = 100
-	experienceBarText.playerMaxExperience = 100
-	experienceBarText.exhaustionStateID = 1
-	experienceBarText.playerLevel = 1
-	characterStatusBar["experienceBarText"] = experienceBarText
-	EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil )
-	-- Set the artifactXP bar.
-	local experienceArtName = EMA.globalFramePrefix.."ExperienceArtBar"
-	local experienceArtBar = CreateFrame( "StatusBar", experienceArtName, parentFrame, "AnimatedStatusBarTemplate" ) --"TextStatusBar,SecureActionButtonTemplate" )
-	experienceArtBar.backgroundTexture = experienceArtBar:CreateTexture( experienceArtName.."BackgroundTexture", "ARTWORK" )
-	experienceArtBar.backgroundTexture:SetColorTexture( 1.0, 0.0, 0.0, 0.15 )
-	experienceArtBar:SetStatusBarTexture( statusBarTexture )
-	experienceArtBar:GetStatusBarTexture():SetHorizTile( false )
-	experienceArtBar:GetStatusBarTexture():SetVertTile( false )
-	experienceArtBar:SetMinMaxValues( 0, 100 )
-	experienceArtBar:SetValue( 100 )
-	experienceArtBar:SetFrameStrata( "LOW" )
-	local experienceArtBarClick = CreateFrame( "CheckButton", experienceArtName.."Click", parentFrame, "SecureActionButtonTemplate" )
-	experienceArtBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
-	experienceArtBarClick:SetFrameStrata( "MEDIUM" )
-	characterStatusBar["experienceArtBar"] = experienceArtBar
-	characterStatusBar["experienceArtBarClick"] = experienceArtBarClick
-	local experienceArtBarText = experienceArtBar:CreateFontString( experienceArtName.."Text", "OVERLAY", "GameFontNormal" )
-	experienceArtBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	experienceArtBarText:SetFont( textFont , textSize, "OUTLINE")
-	experienceArtBarText:SetAllPoints()
-	experienceArtBarText.artifactName = "N/A"
-	experienceArtBarText.artifactXP = 0
-	experienceArtBarText.artifactForNextPoint = 100
-	experienceArtBarText.artifactPointsSpent = 1
-	experienceArtBarText.artifactPointsAvailable = 0
-	characterStatusBar["experienceArtBarText"] = experienceArtBarText
-	EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil )
---[[
-	-- Set the HonorXP bar.
-	local experienceHonorName = EMA.globalFramePrefix.."ExperienceHonorBar"
-	local experienceHonorBar = CreateFrame( "StatusBar", experienceHonorName, parentFrame, "AnimatedStatusBarTemplate" ) --"TextStatusBar,SecureActionButtonTemplate" )
-	experienceHonorBar.backgroundTexture = experienceArtBar:CreateTexture( experienceArtName.."BackgroundTexture", "ARTWORK" )
-	experienceHonorBar.backgroundTexture:SetColorTexture( 1.0, 0.0, 0.0, 0.15 )
-	experienceHonorBar:SetStatusBarTexture( statusBarTexture )
-	experienceHonorBar:GetStatusBarTexture():SetHorizTile( false )
-	experienceHonorBar:GetStatusBarTexture():SetVertTile( false )
-	experienceHonorBar:SetMinMaxValues( 0, 100 )
-	experienceHonorBar:SetValue( 100 )
-	experienceHonorBar:SetFrameStrata( "LOW" )
-	local experienceHonorBarClick = CreateFrame( "CheckButton", experienceHonorName.."Click", parentFrame, "SecureActionButtonTemplate" )
-	experienceHonorBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
-	experienceHonorBarClick:SetFrameStrata( "MEDIUM" )
-	characterStatusBar["experienceHonorBar"] = experienceHonorBar
-	characterStatusBar["experienceHonorBarClick"] = experienceHonorBarClick
-	local experienceHonorBarText = experienceHonorBar:CreateFontString( experienceHonorName.."Text", "OVERLAY", "GameFontNormal" )
-	experienceHonorBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	experienceHonorBarText:SetFont( textFont , textSize, "OUTLINE")
-	experienceHonorBarText:SetAllPoints()
-	experienceHonorBarText.honorLevel = 0
-	experienceHonorBarText.honorXP = 0
-	experienceHonorBarText.honorMax = 100
-	experienceHonorBarText.honorExhaustionStateID = 1
-	experienceHonorBarText.canPrestige = "N/A"
-	characterStatusBar["experienceHonorBarText"] = experienceHonorBarText
-	EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil )
-]]
-	-- Set the reputation bar.
-	local reputationName = EMA.globalFramePrefix.."ReputationBar"
-	local reputationBar = CreateFrame( "StatusBar", reputationName, parentFrame, "AnimatedStatusBarTemplate" ) --"TextStatusBar,SecureActionButtonTemplate" )
-	reputationBar.backgroundTexture = reputationBar:CreateTexture( reputationName.."BackgroundTexture", "ARTWORK" )
-	reputationBar.backgroundTexture:SetColorTexture( 0.0, 0.39, 0.88, 0.15 )
-	reputationBar:SetStatusBarTexture( statusBarTexture )
-	reputationBar:GetStatusBarTexture():SetHorizTile( false )
-	reputationBar:GetStatusBarTexture():SetVertTile( false )
-	reputationBar:SetMinMaxValues( 0, 100 )
-	reputationBar:SetValue( 100 )
-	reputationBar:SetFrameStrata( "LOW" )
-	local reputationBarClick = CreateFrame( "CheckButton", reputationName.."Click", parentFrame, "SecureActionButtonTemplate" )
-	reputationBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
-	reputationBarClick:SetFrameStrata( "MEDIUM" )
-	characterStatusBar["reputationBar"] = reputationBar
-	characterStatusBar["reputationBarClick"] = reputationBarClick
-	local reputationBarText = reputationBar:CreateFontString( reputationName.."Text", "OVERLAY", "GameFontNormal" )
-	reputationBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	reputationBarText:SetFont( textFont , textSize, "OUTLINE")
-	reputationBarText:SetAllPoints()
-	reputationBarText.reputationName = "Faction"
-	reputationBarText.reputationStandingID = 4
-	reputationBarText.reputationBarMin = 0
-	reputationBarText.reputationBarMax = 100
-	reputationBarText.reputationBarValue = 100
-	characterStatusBar["reputationBarText"] = reputationBarText
-	EMA:UpdateReputationStatus( characterName, nil, nil, nil )
-	-- Set the health bar.
-
-	local healthName = EMA.globalFramePrefix.."HealthBar"
-	local healthBar = CreateFrame( "StatusBar", healthName, parentFrame, "TextStatusBar","SecureActionButtonTemplate" )
-	healthBar.backgroundTexture = healthBar:CreateTexture( healthName.."BackgroundTexture", "ARTWORK" )
-	healthBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
-	healthBar:SetStatusBarTexture( statusBarTexture )
-	healthBar:GetStatusBarTexture():SetHorizTile( false )
-	healthBar:GetStatusBarTexture():SetVertTile( false )
-	healthBar:SetMinMaxValues( 0, 100 )
-	healthBar:SetValue( 100 )
-	healthBar:SetFrameStrata( "LOW" )
-	healthBar:SetAlpha( 1 )
-
-
-	local healthIncomingName = EMA.globalFramePrefix.."HealthIncomingBar"
-	local healthIncomingBar = CreateFrame( "StatusBar", healthIncomingName, parentFrame, "TextStatusBar","SecureActionButtonTemplate" )
-	healthIncomingBar.backgroundTexture = healthIncomingBar:CreateTexture( healthIncomingName.."BackgroundTexture", "ARTWORK" )
-	healthIncomingBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
-	healthIncomingBar:SetStatusBarTexture( statusBarTexture )
-	healthIncomingBar:GetStatusBarTexture():SetHorizTile( false )
-	healthIncomingBar:GetStatusBarTexture():SetVertTile( false )
-	healthIncomingBar:SetMinMaxValues( 0, 100 )
-	healthIncomingBar:SetValue( 0 )
-	healthIncomingBar:SetFrameStrata( "BACKGROUND" )
-	healthIncomingBar:SetAlpha( 1 )
-
-	-- Set the heal Incoming bar
-
-	local healthBarClick = CreateFrame( "CheckButton", healthName.."Click"..characterName, parentFrame, "SecureActionButtonTemplate" )
-	healthBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
-	healthBarClick:SetFrameStrata( "MEDIUM" )
-	characterStatusBar["healthBar"] = healthBar
-	characterStatusBar["healthIncomingBar"] = healthIncomingBar
-	characterStatusBar["healthBarClick"] = healthBarClick
-	local healthBarText = healthBar:CreateFontString( healthName.."Text", "OVERLAY", "GameFontNormal" )
-	healthBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	healthBarText:SetFont( textFont , textSize, "OUTLINE")
-	healthBarText:SetAllPoints()
-	healthBarText.playerHealth = 100
-	healthBarText.playerMaxHealth = 100
-	healthBarText.inComingHeal = 0
-	characterStatusBar["healthBarText"] = healthBarText
-	EMA:UpdateHealthStatus( characterName, nil, nil )
-
-
-	-- Set the power bar.
-	local powerName = EMA.globalFramePrefix.."PowerBar"
-	local powerBar = CreateFrame( "StatusBar", powerName, parentFrame, "TextStatusBar","SecureActionButtonTemplate" )
-	powerBar.backgroundTexture = powerBar:CreateTexture( powerName.."BackgroundTexture", "ARTWORK" )
-	powerBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
-	powerBar:SetStatusBarTexture( statusBarTexture )
-	powerBar:GetStatusBarTexture():SetHorizTile( false )
-	powerBar:GetStatusBarTexture():SetVertTile( false )
-	powerBar:SetMinMaxValues( 0, 100 )
-	powerBar:SetValue( 100 )
-	powerBar:SetFrameStrata( "LOW" )
-	powerBar:SetAlpha( 1 )
-	local powerBarClick = CreateFrame( "CheckButton", powerName.."Click"..characterName, parentFrame, "SecureActionButtonTemplate" )
-	powerBarClick:SetAttribute( "unit", Ambiguate( characterName, "all" ) )
-	powerBarClick:SetFrameStrata( "MEDIUM" )
-	characterStatusBar["powerBar"] = powerBar
-	characterStatusBar["powerBarClick"] = powerBarClick
-	local powerBarText = powerBar:CreateFontString( powerName.."Text", "OVERLAY", "GameFontNormal" )
-	powerBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	powerBarText:SetFont( textFont , textSize, "OUTLINE")
-	powerBarText:SetAllPoints()
-	powerBarText.playerPower = 100
-	powerBarText.playerMaxPower = 100
-	characterStatusBar["powerBarText"] = powerBarText
-	EMA:UpdatePowerStatus( characterName, nil, nil, nil )
-	-- Set the Combo Points bar.
-	local comboName = EMA.globalFramePrefix.."ComboBar"
-	local comboBar = CreateFrame( "StatusBar", comboName, parentFrame, "TextStatusBar","SecureActionButtonTemplate" )
-	comboBar.backgroundTexture = comboBar:CreateTexture( comboName.."BackgroundTexture", "ARTWORK" )
-	comboBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
-	comboBar:SetStatusBarTexture( statusBarTexture )
-	comboBar:GetStatusBarTexture():SetHorizTile( false )
-	comboBar:GetStatusBarTexture():SetVertTile( false )
-	comboBar:SetStatusBarColor( 1.00, 0.0, 0.0, 1.00 )
-	comboBar:SetMinMaxValues( 0, 5 )
-	comboBar:SetValue( 5 )
-	comboBar:SetFrameStrata( "LOW" )
-	comboBar:SetAlpha( 1 )
-	local comboBarClick = CreateFrame( "CheckButton", comboName.."Click"..characterName, parentFrame, "SecureActionButtonTemplate" )
-	comboBarClick:SetAttribute( "unit", characterName )
-	comboBarClick:SetFrameStrata( "MEDIUM" )
-	characterStatusBar["comboBar"] = comboBar
-	characterStatusBar["comboBarClick"] = comboBarClick
-	local comboBarText = comboBar:CreateFontString( comboName.."Text", "OVERLAY", "GameFontNormal" )
-	comboBarText:SetTextColor( 1.00, 1.00, 0.0, 1.00 )
-	comboBarText:SetFont( textFont , textSize, "OUTLINE")
-	comboBarText:SetAllPoints()
-	comboBarText.playerCombo = 0
-	comboBarText.playerMaxCombo = 5
-	characterStatusBar["comboBarText"] = comboBarText
-	EMA:UpdateComboStatus( characterName, nil, nil )
-	-- Add the health and power click bars to ClickCastFrames for addons like Clique to use.
-	--Ebony if Support for Clique if not on then default to target unit
-	--TODO there got to be a better way to doing this for sure but right now i can not be assed to do this for now you need to reload the UI when turning off and on clique support.
-	ClickCastFrames = ClickCastFrames or {}
-	if EMA.db.enableClique == true then
-		ClickCastFrames[portraitButtonClick] = true
-		ClickCastFrames[followBarClick] = true
-		ClickCastFrames[experienceBarClick] = true
-		ClickCastFrames[reputationBarClick] = true
-		ClickCastFrames[healthBarClick] = true
-		ClickCastFrames[powerBarClick] = true
-		ClickCastFrames[comboBarClick] = true
-	else
-		portraitButtonClick:SetAttribute( "type1", "target")
-		followBarClick:SetAttribute( "type1", "target")
-		experienceBarClick:SetAttribute( "type1", "target")
-		reputationBarClick:SetAttribute( "type1", "target")
-		healthBarClick:SetAttribute( "type1", "target")
-		powerBarClick:SetAttribute( "type1", "target")
-		comboBarClick:SetAttribute( "type1", "target")
-	end
-end
-
-
-function EMA:HideEMATeamStatusBar( characterName )
-	local parentFrame = EMADisplayTeamListFrame
-	-- Get (or create and get) the character status bar information.
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	if characterStatusBar == nil then
-		EMA:CreateEMATeamStatusBar( characterName, parentFrame )
-		characterStatusBar = EMA.characterStatusBar[characterName]
-	end
-	--if characterStatusBar ~= nil then
-	-- Hide the bars.
-	characterStatusBar["portraitButton"]:Hide()
-	characterStatusBar["portraitButtonClick"]:Hide()
-	characterStatusBar["followBar"]:Hide()
-	characterStatusBar["followBarClick"]:Hide()
-	characterStatusBar["experienceBar"]:Hide()
-	characterStatusBar["experienceBarClick"]:Hide()
-	characterStatusBar["experienceArtBar"]:Hide()
-	characterStatusBar["experienceArtBarClick"]:Hide()
---	characterStatusBar["experienceHonorBar"]:Hide()
---	characterStatusBar["experienceHonorBarClick"]:Hide()
-	characterStatusBar["reputationBar"]:Hide()
-	characterStatusBar["reputationBarClick"]:Hide()
-	characterStatusBar["healthBar"]:Hide()
-	characterStatusBar["healthIncomingBar"]:Hide()
-	characterStatusBar["healthBarClick"]:Hide()
-	characterStatusBar["powerBar"]:Hide()
-	characterStatusBar["powerBarClick"]:Hide()
-	characterStatusBar["comboBar"]:Hide()
-	characterStatusBar["comboBarClick"]:Hide()
-	--end
-end
-
-
-function EMA:UpdateEMATeamStatusBar( characterName, characterPosition )
-	local parentFrame = EMADisplayTeamListFrame
-	-- Get (or create and get) the character status bar information.
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	if characterStatusBar == nil then
-		EMA:CreateEMATeamStatusBar( characterName, parentFrame )
-		characterStatusBar = EMA.characterStatusBar[characterName]
-	end
-	-- Set the positions.
-	local characterHeight = GetCharacterHeight()
-	local characterWidth = GetCharacterWidth()
-	local positionLeft = 0
-	local positionTop = -EMA.db.teamListTitleHeight - (EMA.db.teamListVerticalSpacing * 2)
-	local charactersPerRow = EMA.db.charactersPerRow
-	if EMA.db.teamListHorizontal == true then
-		if characterPosition < charactersPerRow then
-			positionLeft = -6 + (characterPosition * characterWidth) + (EMA.db.teamListHorizontalSpacing * 3)
-			parentFrame:SetWidth( (EMA.db.teamListVerticalSpacing * 3) + (GetCharacterWidth() ) + ( positionLeft ) )
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() )
-		-- Row 2
-		elseif 	characterPosition < ( charactersPerRow * 2 ) then
-			positionLeft = -6 + (characterPosition - charactersPerRow ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
-			positionTop = (positionTop - characterHeight)
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + ( GetCharacterHeight() ) * 2 )
-		-- Row 3
-		elseif 	characterPosition < ( charactersPerRow * 3 ) then
-			positionLeft = -6 + (characterPosition - charactersPerRow * 2 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
-			positionTop = (positionTop - characterHeight * 2 )
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 3 )
-			-- Row 4
-		elseif 	characterPosition < ( charactersPerRow * 4 ) then
-			positionLeft = -6 + (characterPosition - charactersPerRow * 3 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
-			positionTop = (positionTop - characterHeight * 3 )
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 4 )
-		-- Row 5
-		elseif 	characterPosition < ( charactersPerRow * 5 ) then
-			positionLeft = -6 + (characterPosition - charactersPerRow * 4 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
-			positionTop = (positionTop - characterHeight * 4 )
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 5)
-		-- Row 6
-		elseif 	characterPosition < ( charactersPerRow * 6 ) then
-			positionLeft = -6 + (characterPosition - charactersPerRow * 5 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
-			positionTop = (positionTop - characterHeight * 5 )
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 6 )
-		--Row 7
-		elseif 	characterPosition < ( charactersPerRow * 7 ) then
-			positionLeft = -6 + (characterPosition - charactersPerRow * 6 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
-			positionTop = (positionTop - characterHeight * 6 )
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 7 )
-		--Row 8
-		elseif 	characterPosition < ( charactersPerRow * 8 ) then
-			positionLeft = -6 + (characterPosition - charactersPerRow * 7 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
-			positionTop = (positionTop - characterHeight * 7 )
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 8 )
-		--Row 9
-		elseif 	characterPosition < ( charactersPerRow * 9 ) then
-			positionLeft = -6 + (characterPosition - charactersPerRow * 8 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
-			positionTop = (positionTop - characterHeight * 8 )
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 9 )
-			--Row 10
-		elseif 	characterPosition < ( charactersPerRow * 10 ) then
-			positionLeft = -6 + (characterPosition - charactersPerRow * 9 ) * ( characterWidth ) + (EMA.db.teamListHorizontalSpacing * 3)
-			positionTop = (positionTop - characterHeight * 9 )
-			parentFrame:SetHeight( EMA.db.teamListTitleHeight + (EMA.db.teamListVerticalSpacing * 3) + GetCharacterHeight() * 10 )
-		else
-			return
-		end
-	--Old code kept for Legacy Purpose
-		--positionLeft = -6 + (characterPosition * characterWidth) + (EMA.db.teamListHorizontalSpacing * 3)
-	else
-		positionLeft = 6
-		positionTop = positionTop - (characterPosition * characterHeight)
-	end
-	-- Display the portrait.
-
-	local portraitButton = characterStatusBar["portraitButton"]
-	local portraitButtonClick = characterStatusBar["portraitButtonClick"]
-	if EMA.db.showCharacterPortrait == true then
-		portraitButton:ClearModel()
-		local portraitName = Ambiguate( characterName, "none" )
-		portraitButton:SetUnit( portraitName )
-		portraitButton:SetPortraitZoom( 1 )
-        portraitButton:SetCamDistanceScale( 1 )
-        portraitButton:SetPosition( 0, 0, 0 )
-        portraitButton:SetWidth( EMA.db.characterPortraitWidth )
-		portraitButton:SetHeight( EMA.db.characterPortraitWidth )
-		portraitButton:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		portraitButtonClick:SetWidth( EMA.db.characterPortraitWidth )
-		portraitButtonClick:SetHeight( EMA.db.characterPortraitWidth )
-		portraitButtonClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		portraitButton:Show()
-		portraitButtonClick:Show()
-		positionLeft = positionLeft + EMA.db.characterPortraitWidth + EMA.db.teamListHorizontalSpacing
-	else
-		portraitButton:Hide()
-		portraitButtonClick:Hide()
-	end
-	-- Display the follow bar.
-	local followBar	= characterStatusBar["followBar"]
-	local followBarClick = characterStatusBar["followBarClick"]
-	if EMA.db.showFollowStatus == true then
-		followBar.backgroundTexture:SetAllPoints()
-		followBar:SetWidth( EMA.db.followStatusWidth )
-		followBar:SetHeight( EMA.db.followStatusHeight )
-		followBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		followBarClick:SetWidth( EMA.db.followStatusWidth )
-		followBarClick:SetHeight( EMA.db.followStatusHeight )
-		followBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		followBar:Show()
-		followBarClick:Show()
-		if EMA.db.barsAreStackedVertically == true then
-			positionTop = positionTop - EMA.db.followStatusHeight - EMA.db.barVerticalSpacing
-		else
-			positionLeft = positionLeft + EMA.db.followStatusWidth + EMA.db.teamListHorizontalSpacing
-		end
-	else
-		followBar:Hide()
-		followBarClick:Hide()
-	end
-	-- Display the experience bar.
-	local experienceBar	= characterStatusBar["experienceBar"]
-	local experienceBarClick = characterStatusBar["experienceBarClick"]
-	local experienceArtBar = characterStatusBar["experienceArtBar"]
-	local experienceArtBarClick	= characterStatusBar["experienceArtBarClick"]
-	local experienceHonorBar = characterStatusBar["experienceHonorBar"]
-	local experienceHonorBarClick = characterStatusBar["experienceHonorBarClick"]
-	local reputationBar	= characterStatusBar["reputationBar"]
-	local reputationBarClick = characterStatusBar["reputationBarClick"]
-	if EMA.db.showExperienceStatus == true then
-		--EMA:Print("TestLevel", characterName, level, maxLevel, xpDisabled, showXP, showArtifact )
-		local showBarCount = 0
-		if EMA.db.showXpStatus == true then
-			showBarCount = showBarCount + 1
-			showBeforeBar = parentFrame
-			showXP = true
-		end
-		if EMA.db.showArtifactStatus == true then
-			--EMA:Print("ShowArtifact")
-			showBarCount = showBarCount + 1
-			if EMA.db.showXpStatus == true then
-				showArtBeforeBar = experienceBar
-				setArtPoint = "BOTTOMLEFT"
-				setArtLeft = 0
-				setArtTop = -1
-			else
-				showArtBeforeBar = parentFrame
-				setArtPoint = "TOPLEFT"
-				setArtLeft = positionLeft
-				setArtTop = positionTop
-			end
-		end
-	--[[if EMA.db.showHonorStatus == true then
-			--EMA:Print("ShowHonorXP")
-			showBarCount = showBarCount + 1
-			if EMA.db.showXpStatus == true and EMA.db.showArtifactStatus == false then
-				showHonorBeforeBar = experienceBar
-				setHonorPoint = "BOTTOMLEFT"
-				setHonorLeft = 0
-				setHonorTop = -1
-			elseif EMA.db.showArtifactStatus == true then
-				showHonorBeforeBar = experienceArtBar
-				setHonorPoint = "BOTTOMLEFT"
-				setHonorLeft = 0
-				setHonorTop = -1
-			else
-				showHonorBeforeBar = parentFrame
-				setHonorPoint = "TOPLEFT"
-				setHonorLeft = positionLeft
-				setHonorTop = positionTop
-			end
-		end
-	]]
-		if EMA.db.showRepStatus == true then
-			--EMA:Print("Show Reputation")
-			showBarCount = showBarCount + 1
-			if EMA.db.showXpStatus == true and EMA.db.showArtifactStatus == false then --and EMA.db.showHonorStatus == false then
-				--EMA:Print("Show Reputation 1")
-				showRepBeforeBar = experienceBar
-				setRepPoint = "BOTTOMLEFT"
-				setRepLeft = 0
-				setRepTop = -1
-			elseif EMA.db.showArtifactStatus == true then --and EMA.db.showHonorStatus == false then
-				--EMA:Print("Show Reputation 2")
-				showRepBeforeBar = experienceArtBar
-				setRepPoint = "BOTTOMLEFT"
-				setRepLeft = 0
-				setRepTop = -1
-		--[[	elseif EMA.db.showHonorStatus == true then
-				--EMA:Print("Show Reputation 3")
-				showRepBeforeBar = experienceHonorBar
-				setRepPoint = "BOTTOMLEFT"
-				setRepLeft = 0
-				setRepTop = -1
-		]]
-			else
-				--EMA:Print("Show Reputation 4")
-				showRepBeforeBar = parentFrame
-				setRepPoint = "TOPLEFT"
-				setRepLeft = positionLeft
-				setRepTop = positionTop
-			end
-		end
-		if showBarCount < 1 then
-			showBarCount = showBarCount + 1
-		end
-		--EMA:Print("showBarCountTest", showBarCount)
-		--Xp Bar
-			experienceBar.backgroundTexture:SetAllPoints()
-			experienceBar:SetWidth( EMA.db.experienceStatusWidth )
-			experienceBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
-			experienceBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft , positionTop )
-			experienceBarClick:SetWidth( EMA.db.experienceStatusWidth )
-			experienceBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
-			experienceBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		if EMA.db.showXpStatus == true then
-			experienceBar:Show()
-			experienceBarClick:Show()
-		else
-			experienceBar:Hide()
-			experienceBarClick:Hide()
-		end
-		--Artifact Bar
-			experienceArtBar.backgroundTexture:SetAllPoints()
-			experienceArtBar:SetWidth( EMA.db.experienceStatusWidth )
-			experienceArtBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
-			experienceArtBar:SetPoint( "TOPLEFT", showArtBeforeBar, setArtPoint, setArtLeft , setArtTop )
-			experienceArtBarClick:SetPoint( "TOPLEFT", showArtBeforeBar, setArtPoint, setArtLeft , setArtTop )
-			experienceArtBarClick:SetWidth( EMA.db.experienceStatusWidth )
-			experienceArtBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
-		if EMA.db.showArtifactStatus == true then
-			experienceArtBar:Show()
-			experienceArtBarClick:Show()
-		else
-			experienceArtBar:Hide()
-			experienceArtBarClick:Hide()
-		end
-	--[[	-- Honor
-			experienceHonorBar.backgroundTexture:SetAllPoints()
-			experienceHonorBar:SetWidth( EMA.db.experienceStatusWidth )
-			experienceHonorBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
-			experienceHonorBar:SetPoint( "TOPLEFT", showHonorBeforeBar , setHonorPoint, setHonorLeft, setHonorTop )
-			experienceHonorBarClick:SetPoint( "TOPLEFT", showHonorBeforeBar , setHonorPoint, setHonorLeft, setHonorTop )
-			experienceHonorBarClick:SetWidth( EMA.db.experienceStatusWidth )
-			experienceHonorBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
-		if EMA.db.showHonorStatus == true then
-			experienceHonorBar:Show()
-			experienceHonorBarClick:Show()
-		else
-			experienceHonorBar:Hide()
-			experienceHonorBarClick:Hide()
-		end
-	]]	--rep
-			reputationBar.backgroundTexture:SetAllPoints()
-			reputationBar:SetWidth( EMA.db.experienceStatusWidth )
-			reputationBar:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
-			reputationBar:SetPoint( "TOPLEFT", showRepBeforeBar , setRepPoint, setRepLeft, setRepTop )
-			reputationBarClick:SetPoint( "TOPLEFT", showRepBeforeBar , setRepPoint, setRepLeft, setRepTop )
-			reputationBarClick:SetWidth( EMA.db.experienceStatusWidth )
-			reputationBarClick:SetHeight( EMA.db.experienceStatusHeight / showBarCount )
-		if EMA.db.showRepStatus == true then
-			reputationBar:Show()
-			reputationBarClick:Show()
-		else
-			reputationBar:Hide()
-			reputationBarClick:Hide()
-		end
-
-		if EMA.db.barsAreStackedVertically == true then
-			positionTop = positionTop - EMA.db.experienceStatusHeight - EMA.db.barVerticalSpacing
-		else
-			positionLeft = positionLeft + EMA.db.experienceStatusWidth + EMA.db.teamListHorizontalSpacing
-		end
-
-	else
-		experienceBar:Hide()
-		experienceBarClick:Hide()
-		experienceArtBar:Hide()
-		experienceArtBarClick:Hide()
-	--	experienceHonorBar:Hide()
-	--	experienceHonorBarClick:Hide()
-	end
-	-- Display the health bar.
-	local healthBar	= characterStatusBar["healthBar"]
-	local healthIncomingBar = characterStatusBar["healthIncomingBar"]
-	local healthBarClick = characterStatusBar["healthBarClick"]
-	if EMA.db.showHealthStatus == true then
-		healthBar.backgroundTexture:SetAllPoints()
-		healthBar:SetWidth( EMA.db.healthStatusWidth )
-		healthBar:SetHeight( EMA.db.healthStatusHeight )
-		healthBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		healthBarClick:SetWidth( EMA.db.healthStatusWidth )
-		healthBarClick:SetHeight( EMA.db.healthStatusHeight )
-		healthBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		healthBar:Show()
-		healthBarClick:Show()
-		if EMA.db.barsAreStackedVertically == true then
-			positionTop = positionTop - EMA.db.healthStatusHeight - EMA.db.barVerticalSpacing
-		else
-			positionLeft = positionLeft + EMA.db.healthStatusWidth + EMA.db.teamListHorizontalSpacing
-		end
-	else
-		healthBar:Hide()
-		healthBarClick:Hide()
-	end
-	-- Display the health Incoming bar.
-	if EMA.db.showHealthStatus == true then
-		healthIncomingBar.backgroundTexture:SetAllPoints()
-		healthIncomingBar:SetWidth( EMA.db.healthStatusWidth )
-		healthIncomingBar:SetHeight( EMA.db.healthStatusHeight )
-		healthIncomingBar:SetPoint( "TOPLEFT", healthBar, "TOPLEFT", 0, 0 )
-		healthIncomingBar:Show()
-	else
-		healthIncomingBar:Hide()
-		--healthBarClick:Hide()
-	end
-	-- Display the power bar.
-	local powerBar = characterStatusBar["powerBar"]
-	local powerBarClick = characterStatusBar["powerBarClick"]
-	if EMA.db.showPowerStatus == true then
-		powerBar.backgroundTexture:SetAllPoints()
-		powerBar:SetWidth( EMA.db.powerStatusWidth )
-		powerBar:SetHeight( EMA.db.powerStatusHeight )
-		powerBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		powerBarClick:SetWidth( EMA.db.powerStatusWidth )
-		powerBarClick:SetHeight( EMA.db.powerStatusHeight )
-		powerBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		powerBar:Show()
-		powerBarClick:Show()
-		if EMA.db.barsAreStackedVertically == true then
-			positionTop = positionTop - EMA.db.powerStatusHeight - EMA.db.barVerticalSpacing
-		else
-			positionLeft = positionLeft + EMA.db.powerStatusWidth + EMA.db.teamListHorizontalSpacing
-		end
-	else
-		powerBar:Hide()
-		powerBarClick:Hide()
-	end
-	-- Display the Combo Point bar.
-	local comboBar = characterStatusBar["comboBar"]
-	local comboBarClick = characterStatusBar["comboBarClick"]
-	if EMA.db.showComboStatus == true then
-		comboBar.backgroundTexture:SetAllPoints()
-		comboBar:SetWidth( EMA.db.comboStatusWidth )
-		comboBar:SetHeight( EMA.db.comboStatusHeight )
-		comboBar:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		comboBarClick:SetWidth( EMA.db.comboStatusWidth )
-		comboBarClick:SetHeight( EMA.db.comboStatusHeight )
-		comboBarClick:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		comboBar:Show()
-		comboBarClick:Show()
-		if EMA.db.barsAreStackedVertically == true then
-			positionTop = positionTop - EMA.db.comboStatusHeight - EMA.db.barVerticalSpacing
-		else
-			positionLeft = positionLeft + EMA.db.comboStatusWidth + EMA.db.teamListHorizontalSpacing
-		end
-	else
-		comboBar:Hide()
-		comboBarClick:Hide()
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreateDisplayOptions( top )
-	-- Get positions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
-	local sliderHeight = EMAHelperSettings:GetSliderHeight()
-	local mediaHeight = EMAHelperSettings:GetMediaHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( true )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local sectionSpacing = verticalSpacing * 4
-	local halfWidthSlider = (headingWidth - horizontalSpacing) / 2
-	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
-	local column2left = left + halfWidthSlider
-	local left2 = left + thirdWidth
-	local left3 = left + (thirdWidth * 2)
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	-- Create show.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["DISPLAY_HEADER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsCheckBoxShowTeamList = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SHOW_TEAM_FRAME"],
-		EMA.SettingsToggleShowTeamList,
-		L["SHOW_TEAM_FRAME_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxShowTeamListOnlyOnMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ONLY_ON_MASTER"],
-		EMA.SettingsToggleShowTeamListOnMasterOnly,
-		L["ONLY_ON_MASTER_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxHideTeamListInCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["HIDE_IN_COMBAT"],
-		EMA.SettingsToggleHideTeamListInCombat,
-		L["HIDE_IN_COMBAT_HELP_DT"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxEnableClique = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ENABLE_CLIQUE"],
-		EMA.SettingsToggleEnableClique,
-		L["ENABLE_CLIQUE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxOlnyShowInParty = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SHOW_PARTY"],
-		EMA.SettingsToggleOlnyShowinParty,
-		L["SHOW_PARTY_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxHpManaOutOfParty = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["HEALTH_POWER_GROUP"],
-		EMA.SettingsToggleHpManaOutOfParty,
-		L["HEALTH_POWER_GROUP_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	-- Create appearance & layout.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["APPEARANCE_LAYOUT_HEALDER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsCheckBoxShowListTitle = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["SHOW_TITLE"],
-		EMA.SettingsToggleShowTeamListTitle,
-		L["SHOW_TITLE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxStackVertically = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["STACK_VERTICALLY_HELP"],
-		EMA.SettingsToggleStackVertically,
-		L["STACK_VERTICALLY_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCharactersPerBar = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["CHARACTERS_PER_BAR"]
-	)
-	EMA.settingsControl.displayOptionsCharactersPerBar:SetSliderValues( 1, 10, 1 )
-	EMA.settingsControl.displayOptionsCharactersPerBar:SetCallback( "OnValueChanged", EMA.SettingsChangeCharactersPerBar )
-
-
-	EMA.settingsControl.displayOptionsTeamListScaleSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left,
-		movingTop,
-		L["SCALE"]
-	)
-	EMA.settingsControl.displayOptionsTeamListScaleSlider:SetSliderValues( 0.5, 2, 0.01 )
-	EMA.settingsControl.displayOptionsTeamListScaleSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeScale )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-
-	EMA.settingsControl.displayOptionsTeamListTransparencySlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["TRANSPARENCY"]
-	)
-	EMA.settingsControl.displayOptionsTeamListTransparencySlider:SetSliderValues( 0, 1, 0.01 )
-	EMA.settingsControl.displayOptionsTeamListTransparencySlider:SetCallback( "OnValueChanged", EMA.SettingsChangeTransparency )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsTeamListMediaStatus = EMAHelperSettings:CreateMediaStatus(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["BAR_TEXTURES"]
-	)
-	EMA.settingsControl.displayOptionsTeamListMediaStatus:SetCallback( "OnValueChanged", EMA.SettingsChangeStatusBarTexture )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsTeamListMediaBorder = EMAHelperSettings:CreateMediaBorder(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["BORDER_STYLE"]
-	)
-	EMA.settingsControl.displayOptionsTeamListMediaBorder:SetCallback( "OnValueChanged", EMA.SettingsChangeBorderStyle )
-	EMA.settingsControl.displayOptionsBorderColourPicker = EMAHelperSettings:CreateColourPicker(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left + 15,
-		movingTop - 15,
-		L["BORDER COLOUR"]
-	)
-	EMA.settingsControl.displayOptionsBorderColourPicker:SetHasAlpha( true )
-	EMA.settingsControl.displayOptionsBorderColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBorderColourPickerChanged )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsTeamListMediaBackground = EMAHelperSettings:CreateMediaBackground(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["BACKGROUND"]
-	)
-	EMA.settingsControl.displayOptionsTeamListMediaBackground:SetCallback( "OnValueChanged", EMA.SettingsChangeBackgroundStyle )
-	EMA.settingsControl.displayOptionsBackgroundColourPicker = EMAHelperSettings:CreateColourPicker(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left + 15,
-		movingTop - 15,
-		L["BG_COLOUR"]
-	)
-	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetHasAlpha( true )
-	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBackgroundColourPickerChanged )
-	--Set the font
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsTeamListMediaFont = EMAHelperSettings:CreateMediaFont(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["FONT"]
-	)
-	EMA.settingsControl.displayOptionsTeamListMediaFont:SetCallback( "OnValueChanged", EMA.SettingsChangeFontStyle )
-	EMA.settingsControl.displayOptionsSetFontSize = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left,
-		movingTop,
-		L["FONT_SIZE"]
-	)
-	EMA.settingsControl.displayOptionsSetFontSize:SetSliderValues( 8, 20 , 1 )
-	EMA.settingsControl.displayOptionsSetFontSize:SetCallback( "OnValueChanged", EMA.SettingsChangeFontSize )
-	movingTop = movingTop - mediaHeight - sectionSpacing
-	-- Create portrait.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PORTRAIT_HEADER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsCheckBoxShowPortrait = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SHOW"],
-		EMA.SettingsToggleShowPortrait,
-		L["SHOW_CHARACTER_PORTRAIT"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsPortraitWidthSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["WIDTH"]
-	)
-	EMA.settingsControl.displayOptionsPortraitWidthSlider:SetSliderValues( 15, 300, 1 )
-	EMA.settingsControl.displayOptionsPortraitWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangePortraitWidth )
-	movingTop = movingTop - sliderHeight - sectionSpacing
-	-- Create follow status.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_BAR_HEADER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsCheckBoxShowFollowStatus = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["SHOW"],
-		EMA.SettingsToggleShowFollowStatus,
-		L["SHOW_FOLLOW_BAR"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowFollowStatusName = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left2,
-		movingTop,
-		L["NAME"],
-		EMA.SettingsToggleShowFollowStatusName,
-		L["SHOW_NAME"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsFollowStatusWidthSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["WIDTH"]
-	)
-	EMA.settingsControl.displayOptionsFollowStatusWidthSlider:SetSliderValues( 15, 300, 1 )
-	EMA.settingsControl.displayOptionsFollowStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeFollowStatusWidth )
-	EMA.settingsControl.displayOptionsFollowStatusHeightSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left,
-		movingTop,
-		L["HEIGHT"]
-	)
-	EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetSliderValues( 15, 100, 1 )
-	EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeFollowStatusHeight )
-	movingTop = movingTop - sliderHeight - sectionSpacing
-	-- Create experience status.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["EXPERIENCE_HEADER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatus = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["SHOW"],
-		EMA.SettingsToggleShowExperienceStatus,
-		L["SHOW_XP_BAR"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left2,
-		movingTop,
-		L["VALUES"],
-		EMA.SettingsToggleShowExperienceStatusValues,
-		L["VALUES_HELP"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left3,
-		movingTop,
-		L["PERCENTAGE"],
-		EMA.SettingsToggleShowExperienceStatusPercentage,
-		L["PERCENTAGE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxShowXpStatus = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["SHOW_XP"],
-		EMA.SettingsToggleShowXpStatus,
-		L["SHOW_XP_HELP"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowArtifactStatus = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left2,
-		movingTop,
-		L["ARTIFACT_BAR"],
-		EMA.SettingsToggleShowArtifactStatus,
-		L["ARTIFACT_BAR_HELP"]
-	)
---[[
-	EMA.settingsControl.displayOptionsCheckBoxShowHonorStatus = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left3,
-		movingTop,
-		L["HONORXP"],
-		EMA.SettingsToggleShowHonorStatus,
-		L["HONORXP_HELP"]
-	)
-]]
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxShowRepStatus = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["REPUTATION_BAR"],
-		EMA.SettingsToggleShowRepStatus,
-		L["REPUTATION_BAR_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsExperienceStatusWidthSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["WIDTH"]
-	)
-	EMA.settingsControl.displayOptionsExperienceStatusWidthSlider:SetSliderValues( 15, 300, 1 )
-	EMA.settingsControl.displayOptionsExperienceStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeExperienceStatusWidth )
-	EMA.settingsControl.displayOptionsExperienceStatusHeightSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left,
-		movingTop,
-		L["HEIGHT"]
-	)
-	EMA.settingsControl.displayOptionsExperienceStatusHeightSlider:SetSliderValues( 15, 100, 1 )
-	EMA.settingsControl.displayOptionsExperienceStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeExperienceStatusHeight )
-	movingTop = movingTop - sliderHeight - sectionSpacing
-	-- Create health status.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["HEALTH_BAR_HEADER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatus = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["SHOW"],
-		EMA.SettingsToggleShowHealthStatus,
-		L["SHOW_HEALTH"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusValues = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left2,
-		movingTop,
-		L["VALUES"],
-		EMA.SettingsToggleShowHealthStatusValues,
-		L["VALUES_HELP"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left3,
-		movingTop,
-		L["PERCENTAGE"],
-		EMA.SettingsToggleShowHealthStatusPercentage,
-		L["PERCENTAGE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxShowClassColors = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["SHOW_CLASS_COLORS"],
-		EMA.SettingsToggleShowClassColors,
-		L["SHOW_CLASS_COLORS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsHealthStatusWidthSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["WIDTH"]
-	)
-	EMA.settingsControl.displayOptionsHealthStatusWidthSlider:SetSliderValues( 15, 300, 1 )
-	EMA.settingsControl.displayOptionsHealthStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeHealthStatusWidth )
-	EMA.settingsControl.displayOptionsHealthStatusHeightSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left,
-		movingTop,
-		L["HEIGHT"]
-	)
-	EMA.settingsControl.displayOptionsHealthStatusHeightSlider:SetSliderValues( 15, 100, 1 )
-	EMA.settingsControl.displayOptionsHealthStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeHealthStatusHeight )
-	movingTop = movingTop - sliderHeight - sectionSpacing
-	-- Create power status.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["POWER_BAR_HEADER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatus = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["SHOW"],
-		EMA.SettingsToggleShowPowerStatus,
-		L["POWER_HELP"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusValues = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left2,
-		movingTop,
-		L["VALUES"],
-		EMA.SettingsToggleShowPowerStatusValues,
-		L["VALUES_HELP"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusPercentage = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left3,
-		movingTop,
-		L["PERCENTAGE"],
-		EMA.SettingsToggleShowPowerStatusPercentage,
-		L["PERCENTAGE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsPowerStatusWidthSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["WIDTH"]
-	)
-	EMA.settingsControl.displayOptionsPowerStatusWidthSlider:SetSliderValues( 15, 300, 1 )
-	EMA.settingsControl.displayOptionsPowerStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangePowerStatusWidth )
-	EMA.settingsControl.displayOptionsPowerStatusHeightSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left,
-		movingTop,
-		L["HEIGHT"]
-	)
-	EMA.settingsControl.displayOptionsPowerStatusHeightSlider:SetSliderValues( 10, 100, 1 )
-	EMA.settingsControl.displayOptionsPowerStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangePowerStatusHeight )
-	movingTop = movingTop - sliderHeight - sectionSpacing
-	-- Create Combo Point status.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CLASS_BAR_HEADER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsCheckBoxShowComboStatus = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["SHOW"],
-		EMA.SettingsToggleShowComboStatus,
-		L["CLASS_POWER"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowComboStatusValues = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left2,
-		movingTop,
-		L["VALUES"],
-		EMA.SettingsToggleShowComboStatusValues,
-		L["VALUES_HELP"]
-	)
-	EMA.settingsControl.displayOptionsCheckBoxShowComboStatusPercentage = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left3,
-		movingTop,
-		L["PERCENTAGE"],
-		EMA.SettingsToggleShowComboStatusPercentage,
-		L["PERCENTAGE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsComboStatusWidthSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["WIDTH"]
-	)
-	EMA.settingsControl.displayOptionsComboStatusWidthSlider:SetSliderValues( 15, 300, 1 )
-	EMA.settingsControl.displayOptionsComboStatusWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeComboStatusWidth )
-	EMA.settingsControl.displayOptionsComboStatusHeightSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left,
-		movingTop,
-		L["HEIGHT"]
-	)
-	EMA.settingsControl.displayOptionsComboStatusHeightSlider:SetSliderValues( 10, 100, 1 )
-	EMA.settingsControl.displayOptionsComboStatusHeightSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeComboStatusHeight )
-	movingTop = movingTop - sliderHeight - sectionSpacing
-	return movingTop
-end
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfDisplayOptions = SettingsCreateDisplayOptions( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfDisplayOptions )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-	EMA:RefreshTeamListControlsHide()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	EMA.settingsControl.displayOptionsCheckBoxShowTeamList:SetValue( EMA.db.showTeamList )
-	EMA.settingsControl.displayOptionsCheckBoxShowTeamListOnlyOnMaster:SetValue( EMA.db.showTeamListOnMasterOnly )
-	EMA.settingsControl.displayOptionsCheckBoxHideTeamListInCombat:SetValue( EMA.db.hideTeamListInCombat )
-	EMA.settingsControl.displayOptionsCheckBoxEnableClique:SetValue( EMA.db.enableClique )
-	EMA.settingsControl.displayOptionsCharactersPerBar:SetValue( EMA.db.charactersPerRow )
-	EMA.settingsControl.displayOptionsCheckBoxStackVertically:SetValue( EMA.db.barsAreStackedVertically )
-	EMA.settingsControl.displayOptionsCheckBoxShowListTitle:SetValue( EMA.db.showListTitle )
-	EMA.settingsControl.displayOptionsCheckBoxOlnyShowInParty:SetValue( EMA.db.olnyShowInParty )
-	EMA.settingsControl.displayOptionsCheckBoxHpManaOutOfParty:SetValue ( EMA.db.healthManaOutOfParty )
-	EMA.settingsControl.displayOptionsTeamListTransparencySlider:SetValue( EMA.db.frameAlpha )
-	EMA.settingsControl.displayOptionsTeamListScaleSlider:SetValue( EMA.db.teamListScale )
-	EMA.settingsControl.displayOptionsTeamListMediaStatus:SetValue( EMA.db.statusBarTexture )
-	EMA.settingsControl.displayOptionsTeamListMediaBorder:SetValue( EMA.db.borderStyle )
-	EMA.settingsControl.displayOptionsTeamListMediaBackground:SetValue( EMA.db.backgroundStyle )
-	EMA.settingsControl.displayOptionsTeamListMediaFont:SetValue( EMA.db.fontStyle )
-	EMA.settingsControl.displayOptionsSetFontSize:SetValue( EMA.db.fontSize )
-	EMA.settingsControl.displayOptionsCheckBoxShowPortrait:SetValue( EMA.db.showCharacterPortrait )
-	EMA.settingsControl.displayOptionsPortraitWidthSlider:SetValue( EMA.db.characterPortraitWidth )
-	EMA.settingsControl.displayOptionsCheckBoxShowFollowStatus:SetValue( EMA.db.showFollowStatus )
-	EMA.settingsControl.displayOptionsCheckBoxShowFollowStatusName:SetValue( EMA.db.followStatusShowName )
-	EMA.settingsControl.displayOptionsFollowStatusWidthSlider:SetValue( EMA.db.followStatusWidth )
-	EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetValue( EMA.db.followStatusHeight )
-	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatus:SetValue( EMA.db.showExperienceStatus )
-	EMA.settingsControl.displayOptionsCheckBoxShowXpStatus:SetValue( EMA.db.showXpStatus )
-	EMA.settingsControl.displayOptionsCheckBoxShowArtifactStatus:SetValue( EMA.db.showArtifactStatus )
---	EMA.settingsControl.displayOptionsCheckBoxShowHonorStatus:SetValue( EMA.db.showHonorStatus )
-	EMA.settingsControl.displayOptionsCheckBoxShowRepStatus:SetValue( EMA.db.showRepStatus )
-	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues:SetValue( EMA.db.experienceStatusShowValues )
-	EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage:SetValue( EMA.db.experienceStatusShowPercentage )
-	EMA.settingsControl.displayOptionsExperienceStatusWidthSlider:SetValue( EMA.db.experienceStatusWidth )
-	EMA.settingsControl.displayOptionsExperienceStatusHeightSlider:SetValue( EMA.db.experienceStatusHeight )
-	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatus:SetValue( EMA.db.showHealthStatus )
-	EMA.settingsControl.displayOptionsCheckBoxShowClassColors:SetValue( EMA.db.showClassColors )
-	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusValues:SetValue( EMA.db.healthStatusShowValues )
-	EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage:SetValue( EMA.db.healthStatusShowPercentage )
-	EMA.settingsControl.displayOptionsHealthStatusWidthSlider:SetValue( EMA.db.healthStatusWidth )
-	EMA.settingsControl.displayOptionsHealthStatusHeightSlider:SetValue( EMA.db.healthStatusHeight )
-	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatus:SetValue( EMA.db.showPowerStatus )
-	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusValues:SetValue( EMA.db.powerStatusShowValues )
-	EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusPercentage:SetValue( EMA.db.powerStatusShowPercentage )
-	EMA.settingsControl.displayOptionsPowerStatusWidthSlider:SetValue( EMA.db.powerStatusWidth )
-	EMA.settingsControl.displayOptionsPowerStatusHeightSlider:SetValue( EMA.db.powerStatusHeight )
-	EMA.settingsControl.displayOptionsCheckBoxShowComboStatus:SetValue( EMA.db.showComboStatus )
-	EMA.settingsControl.displayOptionsCheckBoxShowComboStatusValues:SetValue( EMA.db.comboStatusShowValues )
-	EMA.settingsControl.displayOptionsCheckBoxShowComboStatusPercentage:SetValue( EMA.db.comboStatusShowPercentage )
-	EMA.settingsControl.displayOptionsComboStatusWidthSlider:SetValue( EMA.db.comboStatusWidth )
-	EMA.settingsControl.displayOptionsComboStatusHeightSlider:SetValue( EMA.db.comboStatusHeight )
-	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetColor( EMA.db.frameBackgroundColourR, EMA.db.frameBackgroundColourG, EMA.db.frameBackgroundColourB, EMA.db.frameBackgroundColourA )
-	EMA.settingsControl.displayOptionsBorderColourPicker:SetColor( EMA.db.frameBorderColourR, EMA.db.frameBorderColourG, EMA.db.frameBorderColourB, EMA.db.frameBorderColourA )
---	EMA.settingsControl.displayOptionsCheckBoxShowEquippedOnly:SetValue( EMA.db.ShowEquippedOnly )
-	-- State.
-	-- Trying to change state in combat lockdown causes taint. Let's not do that. Eventually it would be nice to have a "proper state driven team display",
-	-- but this workaround is enough for now.
-	if not InCombatLockdown() then
-		EMA.settingsControl.displayOptionsCheckBoxShowTeamListOnlyOnMaster:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxHideTeamListInCombat:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxEnableClique:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCharactersPerBar:SetDisabled(not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxStackVertically:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxShowListTitle:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxOlnyShowInParty:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxHpManaOutOfParty:SetDisabled( not EMA.db.showTeamList)
-		EMA.settingsControl.displayOptionsTeamListScaleSlider:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsTeamListTransparencySlider:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsTeamListMediaStatus:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsTeamListMediaBorder:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsTeamListMediaBackground:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsTeamListMediaFont:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsSetFontSize:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxShowPortrait:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsPortraitWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showCharacterPortrait )
-		EMA.settingsControl.displayOptionsCheckBoxShowFollowStatus:SetDisabled( not EMA.db.showTeamList)
-		EMA.settingsControl.displayOptionsCheckBoxShowFollowStatusName:SetDisabled( not EMA.db.showTeamList or not EMA.db.showFollowStatus )
-		EMA.settingsControl.displayOptionsFollowStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showFollowStatus )
-		EMA.settingsControl.displayOptionsFollowStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showFollowStatus)
-		EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatus:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxShowXpStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus)
-		EMA.settingsControl.displayOptionsCheckBoxShowArtifactStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus)
---		EMA.settingsControl.displayOptionsCheckBoxShowHonorStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus)
-		EMA.settingsControl.displayOptionsCheckBoxShowRepStatus:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus )
-		EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusValues:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus )
-		EMA.settingsControl.displayOptionsCheckBoxShowExperienceStatusPercentage:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus )
-		EMA.settingsControl.displayOptionsExperienceStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus)
-		EMA.settingsControl.displayOptionsExperienceStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showExperienceStatus )
-		EMA.settingsControl.displayOptionsCheckBoxShowHealthStatus:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxShowClassColors:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
-		EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusValues:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
-		EMA.settingsControl.displayOptionsCheckBoxShowHealthStatusPercentage:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
-		EMA.settingsControl.displayOptionsHealthStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
-		EMA.settingsControl.displayOptionsHealthStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showHealthStatus )
-		EMA.settingsControl.displayOptionsCheckBoxShowPowerStatus:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusValues:SetDisabled( not EMA.db.showTeamList or not EMA.db.showPowerStatus )
-		EMA.settingsControl.displayOptionsCheckBoxShowPowerStatusPercentage:SetDisabled( not EMA.db.showTeamList or not EMA.db.showPowerStatus )
-		EMA.settingsControl.displayOptionsPowerStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showPowerStatus )
-		EMA.settingsControl.displayOptionsPowerStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showPowerStatus )
-		EMA.settingsControl.displayOptionsCheckBoxShowComboStatus:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsCheckBoxShowComboStatusValues:SetDisabled( not EMA.db.showTeamList or not EMA.db.showComboStatus )
-		EMA.settingsControl.displayOptionsCheckBoxShowComboStatusPercentage:SetDisabled( not EMA.db.showTeamList or not EMA.db.showComboStatus)
-		EMA.settingsControl.displayOptionsComboStatusWidthSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showComboStatus)
-		EMA.settingsControl.displayOptionsComboStatusHeightSlider:SetDisabled( not EMA.db.showTeamList or not EMA.db.showComboStatus)
-		EMA.settingsControl.displayOptionsBackgroundColourPicker:SetDisabled( not EMA.db.showTeamList )
-		EMA.settingsControl.displayOptionsBorderColourPicker:SetDisabled( not EMA.db.showTeamList )
-		if EMA.teamListCreated == true then
-			EMA:RefreshTeamListControls()
-			EMA:SettingsUpdateBorderStyle()
-			EMA:SettingsUpdateStatusBarTexture()
-			EMA:SettingsUpdateFontStyle()
-			EMA:SetTeamListVisibility()
-			EMA:SettingsUpdateFollowTextAll()
-			EMA:SettingsUpdateExperienceAll()
-			EMA:SettingsUpdateReputationAll()
-			EMA:SettingsUpdateHealthAll()
-			EMA:SettingsUpdatePowerAll()
-			EMA:SettingsUpdateComboAll()
-		end
-	else
-		EMA.updateSettingsAfterCombat = true
-	end
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.showTeamList = settings.showTeamList
-		EMA.db.showTeamListOnMasterOnly = settings.showTeamListOnMasterOnly
-		EMA.db.hideTeamListInCombat = settings.hideTeamListInCombat
-		EMA.db.enableClique = settings.enableClique
-		EMA.db.charactersPerRow = settings.charactersPerRow
-		EMA.db.barsAreStackedVertically = settings.barsAreStackedVertically
-		EMA.db.teamListHorizontal = settings.teamListHorizontal
-		EMA.db.showListTitle = settings.showListTitle
-		EMA.db.olnyShowInParty = settings.olnyShowInParty
-		EMA.db.healthManaOutOfParty = settings.healthManaOutOfParty
-		EMA.db.teamListScale = settings.teamListScale
-		EMA.db.statusBarTexture = settings.statusBarTexture
-		EMA.db.borderStyle = settings.borderStyle
-		EMA.db.backgroundStyle = settings.backgroundStyle
-		EMA.db.fontStyle = settings.fontStyle
-		EMA.db.fontSize = settings.fontSize
-		EMA.db.showCharacterPortrait = settings.showCharacterPortrait
-		EMA.db.characterPortraitWidth = settings.characterPortraitWidth
-		EMA.db.showFollowStatus = settings.showFollowStatus
-		EMA.db.followStatusWidth = settings.followStatusWidth
-		EMA.db.followStatusHeight = settings.followStatusHeight
-		EMA.db.followStatusShowName = settings.followStatusShowName
-		EMA.db.showExperienceStatus = settings.showExperienceStatus
-		EMA.db.showXpStatus = settings.showXpStatus
-		EMA.db.showArtifactStatus = settings.showArtifactStatus
---		EMA.db.showHonorStatus = settings.showHonorStatus
-		EMA.db.showRepStatus = settings.showRepStatus
-		EMA.db.experienceStatusWidth = settings.experienceStatusWidth
-		EMA.db.experienceStatusHeight = settings.experienceStatusHeight
-		EMA.db.experienceStatusShowValues = settings.experienceStatusShowValues
-		EMA.db.experienceStatusShowPercentage = settings.experienceStatusShowPercentage
-		EMA.db.showHealthStatus = settings.showHealthStatus
-		EMA.db.showClassColors = settings.showClassColors
-		EMA.db.healthStatusWidth = settings.healthStatusWidth
-		EMA.db.healthStatusHeight = settings.healthStatusHeight
-		EMA.db.healthStatusShowValues = settings.healthStatusShowValues
-		EMA.db.healthStatusShowPercentage = settings.healthStatusShowPercentage
-		EMA.db.showPowerStatus = settings.showPowerStatus
-		EMA.db.powerStatusWidth = settings.powerStatusWidth
-		EMA.db.powerStatusHeight = settings.powerStatusHeight
-		EMA.db.powerStatusShowValues = settings.powerStatusShowValues
-		EMA.db.powerStatusShowPercentage = settings.powerStatusShowPercentage
-		EMA.db.showComboStatus = settings.showComboStatus
-		EMA.db.comboStatusWidth = settings.comboStatusWidth
-		EMA.db.comboStatusHeight = settings.comboStatusHeight
-		EMA.db.comboStatusShowValues = settings.comboStatusShowValues
-		EMA.db.comboStatusShowPercentage = settings.comboStatusShowPercentage
-		EMA.db.frameAlpha = settings.frameAlpha
-		EMA.db.framePoint = settings.framePoint
-		EMA.db.frameRelativePoint = settings.frameRelativePoint
-		EMA.db.frameXOffset = settings.frameXOffset
-		EMA.db.frameYOffset = settings.frameYOffset
-		EMA.db.frameBackgroundColourR = settings.frameBackgroundColourR
-		EMA.db.frameBackgroundColourG = settings.frameBackgroundColourG
-		EMA.db.frameBackgroundColourB = settings.frameBackgroundColourB
-		EMA.db.frameBackgroundColourA = settings.frameBackgroundColourA
-		EMA.db.frameBorderColourR = settings.frameBorderColourR
-		EMA.db.frameBorderColourG = settings.frameBorderColourG
-		EMA.db.frameBorderColourB = settings.frameBorderColourB
-		EMA.db.frameBorderColourA = settings.frameBorderColourA
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Callbacks.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsToggleShowTeamList( event, checked )
-	EMA.db.showTeamList = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowTeamListOnMasterOnly( event, checked )
-	EMA.db.showTeamListOnMasterOnly = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHideTeamListInCombat( event, checked )
-	EMA.db.hideTeamListInCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleEnableClique( event, checked )
-	EMA.db.enableClique = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeCharactersPerBar( event, value )
-	EMA.db.charactersPerRow = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-
-function EMA:SettingsToggleStackVertically( event, checked )
-	EMA.db.barsAreStackedVertically = checked;
-	EMA.db.teamListHorizontal = checked;
-	EMA:SettingsRefresh();
-end
-
-
-function EMA:SettingsToggleShowTeamListTitle( event, checked )
-	EMA.db.showListTitle = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleOlnyShowinParty( event, checked )
-	EMA.db.olnyShowInParty = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHpManaOutOfParty( event, checked )
-	EMA.db.healthManaOutOfParty = checked
-	EMA:SettingsRefresh()
-end
-
-
-function EMA:SettingsChangeScale( event, value )
-	EMA.db.teamListScale = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeTransparency( event, value )
-	EMA.db.frameAlpha = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeStatusBarTexture( event, value )
-	EMA.db.statusBarTexture = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeBorderStyle( event, value )
-	EMA.db.borderStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeBackgroundStyle( event, value )
-	EMA.db.backgroundStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeFontStyle( event, value )
-	EMA.db.fontStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeFontSize( event, value )
-	EMA.db.fontSize = value
-	EMA:SettingsRefresh()
-end
-
-
-function EMA:SettingsToggleShowPortrait( event, checked )
-	EMA.db.showCharacterPortrait = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangePortraitWidth( event, value )
-	EMA.db.characterPortraitWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowFollowStatus( event, checked )
-	EMA.db.showFollowStatus = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowFollowStatusName( event, checked )
-	EMA.db.followStatusShowName = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowToolTipInfo( event, checked )
-	EMA.db.showToolTipInfo = checked
-	EMA:SettingsRefresh()
-end
-
-
-function EMA:SettingsChangeFollowStatusWidth( event, value )
-	EMA.db.followStatusWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeFollowStatusHeight( event, value )
-	EMA.db.followStatusHeight = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowExperienceStatus( event, checked )
-	EMA.db.showExperienceStatus = checked
-	EMA:SettingsRefresh()
-end
---
-
-function EMA:SettingsToggleShowXpStatus( event, checked )
-	EMA.db.showXpStatus = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowArtifactStatus( event, checked )
-	EMA.db.showArtifactStatus = checked
-	EMA:SettingsRefresh()
-end
---[[
-function EMA:SettingsToggleShowHonorStatus( event, checked )
-	EMA.db.showHonorStatus = checked
-	EMA:SettingsRefresh()
-end
-]]
-function EMA:SettingsToggleShowRepStatus( event, checked )
-	EMA.db.showRepStatus = checked
-	EMA:SettingsRefresh()
-end
---
-
-function EMA:SettingsToggleShowExperienceStatusValues( event, checked )
-	EMA.db.experienceStatusShowValues = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowExperienceStatusPercentage( event, checked )
-	EMA.db.experienceStatusShowPercentage = checked
-	EMA.SettingsRefresh()
-end
-
-function EMA:SettingsChangeExperienceStatusWidth( event, value )
-	EMA.db.experienceStatusWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeExperienceStatusHeight( event, value )
-	EMA.db.experienceStatusHeight = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowHealthStatus( event, checked )
-	EMA.db.showHealthStatus = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowClassColors( event, checked )
-	EMA.db.showClassColors = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowHealthStatusValues( event, checked )
-	EMA.db.healthStatusShowValues = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowHealthStatusPercentage( event, checked )
-	EMA.db.healthStatusShowPercentage = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeHealthStatusWidth( event, value )
-	EMA.db.healthStatusWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeHealthStatusHeight( event, value )
-	EMA.db.healthStatusHeight = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowPowerStatus( event, checked )
-	EMA.db.showPowerStatus = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowPowerStatusValues( event, checked )
-	EMA.db.powerStatusShowValues = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowPowerStatusPercentage( event, checked )
-	EMA.db.powerStatusShowPercentage = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangePowerStatusWidth( event, value )
-	EMA.db.powerStatusWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangePowerStatusHeight( event, value )
-	EMA.db.powerStatusHeight = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowComboStatus( event, checked )
-	EMA.db.showComboStatus = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowComboStatusValues( event, checked )
-	EMA.db.comboStatusShowValues = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowComboStatusPercentage( event, checked )
-	EMA.db.comboStatusShowPercentage = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeComboStatusWidth( event, value )
-	EMA.db.comboStatusWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeComboStatusHeight( event, value )
-	EMA.db.comboStatusHeight = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsBackgroundColourPickerChanged( event, r, g, b, a )
-	EMA.db.frameBackgroundColourR = r
-	EMA.db.frameBackgroundColourG = g
-	EMA.db.frameBackgroundColourB = b
-	EMA.db.frameBackgroundColourA = a
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsBorderColourPickerChanged( event, r, g, b, a )
-	EMA.db.frameBorderColourR = r
-	EMA.db.frameBorderColourG = g
-	EMA.db.frameBorderColourB = b
-	EMA.db.frameBorderColourA = a
-	EMA:SettingsRefresh()
-end
-
---[[
-function EMA:SettingsToggleShowEquippedOnly( event, checked )
-	EMA.db.ShowEquippedOnly = checked
-	EMA:SettingsRefresh()
-end ]]
-
-
--------------------------------------------------------------------------------------------------------------
--- Commands.
--------------------------------------------------------------------------------------------------------------
-
--- A EMA command has been recieved.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	EMA:DebugMessage( "EMAOnCommandReceived", characterName )
-	--EMA:Print("DebugCommandReceived", characterName, commandName )
-	if commandName == EMA.COMMAND_FOLLOW_STATUS_UPDATE then
-		EMA:ProcessUpdateFollowStatusMessage( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_EXPERIENCE_STATUS_UPDATE then
-		EMA:ProcessUpdateExperienceStatusMessage( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_REPUTATION_STATUS_UPDATE then
-		EMA:ProcessUpdateReputationStatusMessage( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_COMBO_STATUS_UPDATE then
-		EMA:ProcessUpdateComboStatusMessage( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_COMBAT_STATUS_UPDATE then
-		EMA:ProcessUpdateCombatStatusMessage( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_HEALTH_STATUS_UPDATE then
-		EMA:ProcessUpdateHealthStatusMessage( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_POWER_STATUS_UPDATE then
-		EMA:ProcessUpdatePowerStatusMessage(characterName, ... )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Shared Media Callbacks
--------------------------------------------------------------------------------------------------------------
-
-function EMA:LibSharedMedia_Registered()
-end
-
-function EMA:LibSharedMedia_SetGlobal()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Status Bar Updates.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Range Status Bar Updates.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:RangeUpdateCommand()
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		--EMA:Print("name", characterName )
-		local name = Ambiguate( characterName, "none" )
-		local range = UnitInRange( name )
-
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Follow Status Bar Updates.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:AUTOFOLLOW_BEGIN( event, name, ... )
-	if EMA.isFollowing == false then
-		EMA:ScheduleTimer( "SendFollowStatusUpdateCommand", 1 , true)
-		EMA.isFollowing = true
-	end
-end
-
-function EMA:AUTOFOLLOW_END( event, ... )
-	EMA:ScheduleTimer( "SendFollowStatusUpdateCommand", 1 , false )
-end
-
-
-function EMA:SendFollowStatusUpdateCommand( isFollowing )
-	if EMA.db.showTeamList == true and EMA.db.showFollowStatus == true then
-		local canSend = false
-		local alpha = AutoFollowStatus:GetAlpha()
-		--EMA:Print("testA", alpha)
-		if alpha < 1 then
-			canSend = true
-			EMA.isFollowing = false
-		end
-		if isFollowing == true then
-			canSend = true
-		end
-		-- Check to see if EMAFollow is enabled and follow strobing is on.  If this is the case then
-		-- do not send the follow update.
-		if EMAApi.Follow ~= nil then
-			if EMAApi.Follow.IsFollowingStrobing() == true then
-				canSend = false
-			end
-		end
-		--EMA:Print("canSend", canSend )
-		if canSend == true then
-			if EMA.db.showTeamListOnMasterOnly == true then
-				EMA:EMASendCommandToMaster( EMA.COMMAND_FOLLOW_STATUS_UPDATE, isFollowing )
-			else
-				EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_STATUS_UPDATE, isFollowing )
-			end
-		end
-	end
-end
-
-
-function EMA:ProcessUpdateFollowStatusMessage( characterName, isFollowing )
-	EMA:UpdateFollowStatus( characterName, isFollowing )
-end
-
-function EMA:UpdateFollowStatus( characterName, isFollowing )
-	--EMA:Print("follow", characterName, "follow", isFollowing)
-	if CanDisplayTeamList() == false then
-		return
-	end
-	if EMA.db.showFollowStatus == false then
-		return
-	end
-	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	if characterStatusBar == nil then
-		return
-	end
-	local followBar = characterStatusBar["followBar"]
-	if isFollowing == true then
-		-- Following.
-		followBar:SetStatusBarColor( 0.05, 0.85, 0.05, 1.00 )
-		LibButtonGlow.HideOverlayGlow(followBar)
-	else
-		if isFollowLeader == true then
-			-- Follow leader.
-			followBar:SetStatusBarColor( 0.55, 0.15, 0.15, 0.25 )
-			LibButtonGlow.HideOverlayGlow(followBar)
-		else
-			-- Not following.
-		LibButtonGlow.ShowOverlayGlow(followBar)
-		followBar:SetStatusBarColor( 0.85, 0.05, 0.05, 1.00 )
-		EMA:ScheduleTimer("EndGlowFollowBar", 2 , followBar)
-		end
-	end
-end
-
-function EMA:EndGlowFollowBar(frame)
-	LibButtonGlow.HideOverlayGlow(frame)
-end
-
--- TEXT and Combat updates
-
-function EMA:SendCombatStatusUpdateCommand()
-	local inCombat = UnitAffectingCombat("player")
-	--EMA:Print("canSend", inCombat)
-	if EMA.db.showTeamListOnMasterOnly == true then
-		EMA:EMASendCommandToMaster( EMA.COMMAND_COMBAT_STATUS_UPDATE, inCombat )
-	else
-		EMA:EMASendCommandToTeam( EMA.COMMAND_COMBAT_STATUS_UPDATE, inCombat )
-	end
-end
-
-function EMA:SettingsUpdateFollowTextAll()
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		EMA:SettingsUpdateFollowText( characterName, nil )
-	end
-end
-
-
-function EMA:ProcessUpdateCombatStatusMessage( characterName, inCombat )
---	EMA:Print("test", characterName, inCombat )
-	EMA:SettingsUpdateFollowText( characterName, inCombat )
-end
-
-
-function EMA:SettingsUpdateFollowText( characterName, inCombat )
-	--EMA:Print("FollowTextInfo", characterName, inCombat) -- debug
-	if CanDisplayTeamList() == false then
-		return
-	end
-	if EMA.db.showFollowStatus == false then
-		return
-	end
-	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	if characterStatusBar == nil then
-		return
-	end
-	local followBarText = characterStatusBar["followBarText"]
-
-	if inCombat == true then
-		followBarText:SetTextColor(1.0, 0.5, 0.25)
-	else
-		followBarText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	end
-
-	local text = ""
-	if EMA.db.followStatusShowName == true then
-		text = text..Ambiguate( characterName, "none" )
-	end
-	followBarText:SetText( text )
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- Experience Status Bar Updates.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:PLAYER_XP_UPDATE( event, ... )
-	EMA:SendExperienceStatusUpdateCommand()
-end
-
-function EMA:UPDATE_EXHAUSTION( event, ... )
-	--TODO This Event Is Spaming so we have turned it off for now it does it in rested areas
-	--EMA:Print("testSpam")
-	--EMA:SendExperienceStatusUpdateCommand()
-end
-
-function EMA:PLAYER_LEVEL_UP( event, ... )
-	EMA:SendExperienceStatusUpdateCommand()
-end
-
-function EMA:ARTIFACT_XP_UPDATE(event, ...)
-	EMA:SendExperienceStatusUpdateCommand()
-end
-
---[[ CLEAN UP FOR 8.0
-function EMA:HONOR_XP_UPDATE(event, arg1, agr2, ...)
-	--EMA:SendExperienceStatusUpdateCommand()
-end
-
-function EMA:HONOR_LEVEL_UPDATE(event, arg1, agr2, ...)
-	---EMA:SendExperienceStatusUpdateCommand()
-end
-
-function EMA:HONOR_PRESTIGE_UPDATE(event, arg1, agr2, ...)
-	--EMA:SendExperienceStatusUpdateCommand()
-end
-]]
-
-function EMA:SendExperienceStatusUpdateCommand()
-	if EMA.db.showTeamList == true and EMA.db.showExperienceStatus == true then
-		--Player XP
-		local playerExperience = UnitXP( "player" )
-		local playerMaxExperience = UnitXPMax( "player" )
-		local playerMaxLevel = GetMaxPlayerLevel()
-		local playerLevel = UnitLevel("player")
-		local exhaustionStateID, exhaustionStateName, exhaustionStateMultiplier = GetRestState()
-		--Artifact XP
-		local artifactName = "n/a"
-		local artifactXP = 0
-		local artifactForNextPoint = 100
-		local artifactPointsAvailable = 0
-		local artifactPointsSpent = 0
-
-
-	local azeriteItemLocation = C_AzeriteItem.FindActiveAzeriteItem()
-	if (azeriteItemLocation) and HasArtifactEquipped() == false then
-		local azeriteXP, azeriteTotalXP = C_AzeriteItem.GetAzeriteItemXPInfo(azeriteItemLocation)
-		local azeriteLevel = C_AzeriteItem.GetPowerLevel(azeriteItemLocation)
-		local azeriteItem = Item:CreateFromItemLocation(azeriteItemLocation)
-		local azeriteName = azeriteItem:GetItemName()
-		--EMA:Print("test", azeriteName, azeriteXP, azeriteTotalXP )
-		artifactName = azeriteName
-		artifactXP = azeriteXP
-		artifactForNextPoint = azeriteTotalXP
-		artifactPointsAvailable = 0
-		artifactPointsSpent	= 0
-	end
---Remove From 8.0
---[[
-		local honorXP = UnitHonor("player")
-		local prestigeLevel = UnitPrestige("Player")
-		local honorMax = UnitHonorMax("player")
-		-- A DityDityHack if capped --Ebony
-		if honorMax == 0 then
-			honorMax = 10000
-		end
-		local HonorLevel = UnitHonorLevel("player")
-		local honorExhaustionStateID = GetHonorRestState()
-		if not (honorexhaustionStateID == 1) then
-			honorExhaustionStateID = 0
-		end
-]]
-		--	EMA:Print("testSend", honorXP, honorMax, HonorLevel, honorExhaustionStateID)
-		if EMA.db.showTeamListOnMasterOnly == true then
-				--EMA:Print("Testtoteam", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend)
-				--EMA:Print("TestTOTEAM", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend)
-				EMA:EMASendCommandToMaster( EMA.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactPointsSpent, artifactForNextPoint, artifactPointsAvailable )--, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID )
-			else
-				--EMA:DebugMessage( "SendExperienceStatusUpdateCommand TO TEAM!" )
-				--EMA:Print("TestTOTEAM", characterName, name, xp, xpForNextPoint, numPointsAvailableToSpend)
-				EMA:EMASendCommandToTeam( EMA.COMMAND_EXPERIENCE_STATUS_UPDATE, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactPointsSpent, artifactForNextPoint, artifactPointsAvailable ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID)
-			end
-	end
-end
-
-function EMA:ProcessUpdateExperienceStatusMessage( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactForNextPoint, artifactPointsSpent, artifactPointsAvailable ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID)
-	EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactForNextPoint, artifactPointsSpent, artifactPointsAvailable ) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID )
-end
-
-function EMA:SettingsUpdateExperienceAll()
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		EMA:UpdateExperienceStatus( characterName, nil, nil, nil, nil, nil, nil, nil, nil, nil) --, nil, nil, nil, nil, nil )
-	end
-end
-
-function EMA:UpdateExperienceStatus( characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel, artifactName, artifactXP, artifactPointsSpent, artifactForNextPoint, artifactPointsAvailable) --, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID )
---	EMA:Print( "UpdateExperienceStatus", characterName, playerExperience, playerMaxExperience, exhaustionStateID, playerLevel)
---	EMA:Print("ArtTest", characterName, "name", artifactName, "xp", artifactXP, "Points", artifactForNextPoint, artifactPointsAvailable)
---	EMA:Print("honorTest", characterName, honorXP, honorMax, HonorLevel, prestigeLevel, honorExhaustionStateID)
-	if CanDisplayTeamList() == false then
-		return
-	end
-	if EMA.db.showExperienceStatus == false then
-		return
-	end
-	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	if characterStatusBar == nil then
-		return
-	end
-
-	local experienceBarText = characterStatusBar["experienceBarText"]
-	local experienceBar = characterStatusBar["experienceBar"]
-
-	local experienceArtBarText = characterStatusBar["experienceArtBarText"]
-	if characterStatusBar["experienceArtBarText"] == nil then
-		return
-	end
-	local experienceArtBar = characterStatusBar["experienceArtBar"]
-	if characterStatusBar["experienceArtBar"] == nil then
-		return
-	end
---[[
-	local experienceHonorBarText = characterStatusBar["experienceHonorBarText"]
-	if characterStatusBar["experienceHonorBarText"] == nil then
-		return
-	end
-	local experienceHonorBar = characterStatusBar["experienceHonorBar"]
-	if characterStatusBar["experienceHonorBar"] == nil then
-		return
-	end
-]]
-	if playerExperience == nil then
-		playerExperience = experienceBarText.playerExperience
-	end
-	if playerMaxExperience == nil then
-		playerMaxExperience = experienceBarText.playerMaxExperience
-	end
-	if exhaustionStateID == nil then
-		exhaustionStateID = experienceBarText.exhaustionStateID
-	end
-	if playerLevel == nil then
-		playerLevel = experienceBarText.playerLevel
-	end
-	if artifactName == nil then
-		artifactName = experienceArtBarText.artifactName
-	end
-
-	if artifactXP == nil then
-		artifactXP = experienceArtBarText.artifactXP
-	end
-	if artifactPointsSpent == nil then
-		artifactPointsSpent = experienceArtBarText.artifactPointsSpent
-	end
-	if artifactForNextPoint == nil then
-		artifactForNextPoint = experienceArtBarText.artifactForNextPoint
-	end
-
-	if artifactPointsAvailable == nil then
-		artifactPointsAvailable = experienceArtBarText.artifactPointsAvailable
-	end
---[[
-	if honorXP == nil then
-		honorXP = experienceHonorBarText.honorXP
-	end
-
-	if honorMax == nil then
-		honorMax = experienceHonorBarText.honorMax
-	end
-
-	if HonorLevel == nil then
-		honorLevel = experienceHonorBarText.honorLevel
-	end
-
-	if honorExhaustionStateID == nil then
-		honorExhaustionStateID = experienceHonorBarText.honorExhaustionStateID
-	end
-]]
-	experienceBarText.playerExperience = playerExperience
-	experienceBarText.playerMaxExperience = playerMaxExperience
-	experienceBarText.exhaustionStateID = exhaustionStateID
-	experienceBarText.playerLevel = playerLevel
-	experienceArtBarText.artifactName = artifactName
-	experienceArtBarText.artifactXP = artifactXP
-	experienceArtBarText.artifactPointsSpent = artifactPointsSpent
-	experienceArtBarText.artifactForNextPoint = artifactForNextPoint
-	experienceArtBarText.artifactPointsAvailable = artifactPointsAvailable
---[[
-	experienceHonorBarText.honorXP = honorXP
-	experienceHonorBarText.honorMax = honorMax
-	experienceHonorBarText.honorLevel = honorLevel
-	experienceHonorBarText.honorExhaustionStateID = honorExhaustionStateID
-]]
-	local min, max = math.min(0, playerExperience), playerMaxExperience
-
-	experienceBar:SetAnimatedValues(playerExperience, min, max , playerLevel)
-	experienceArtBar:SetAnimatedValues(artifactXP, 0, artifactForNextPoint, artifactPointsAvailable + artifactPointsSpent)
---	experienceHonorBar:SetAnimatedValues(honorXP, 0, honorMax, honorLevel)
-
-	local text = ""
-	if EMA.db.experienceStatusShowValues == true then
-		text = text..tostring( AbbreviateLargeNumbers(playerExperience) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxExperience) )..L[" "]
-	end
-	if EMA.db.experienceStatusShowPercentage == true then
-		if EMA.db.experienceStatusShowValues == true then
-			text = tostring( AbbreviateLargeNumbers(playerExperience) )..L[" "]..L["("]..tostring( floor( (playerExperience/playerMaxExperience)*100) )..L["%"]..L[")"]
-		else
-			text = tostring( floor( (playerExperience/playerMaxExperience)*100) )..L["%"]
-		end
-	end
-	experienceBarText:SetText( text )
-	if exhaustionStateID == 1 then
-		experienceBar:SetStatusBarColor( 0.0, 0.39, 0.88, 1.0 )
-		experienceBar.backgroundTexture:SetColorTexture( 0.0, 0.39, 0.88, 0.15 )
-	else
-		experienceBar:SetStatusBarColor( 0.58, 0.0, 0.55, 1.0 )
-		experienceBar.backgroundTexture:SetColorTexture( 0.58, 0.0, 0.55, 0.15 )
-	end
-
---ArtText
-	local artText = ""
-	--EMA:Print("TextTest", artifactXP, artifactForNextPoint)
-	if EMA.db.experienceStatusShowValues == true and EMA.db.experienceStatusShowPercentage == false then
-		artText = artText..tostring( AbbreviateLargeNumbers(artifactXP ) )..L[" / "]..tostring( AbbreviateLargeNumbers(artifactForNextPoint) )..L[" "]
-	end
-	if EMA.db.experienceStatusShowPercentage == true then
-		if EMA.db.experienceStatusShowValues == true then
-			artText = artText..L["("]..tostring( AbbreviateLargeNumbers(artifactXP ) )..L[" "]..tostring( floor( (artifactXP/artifactForNextPoint)*100) )..L["%"]..L[")"]
-		else
-			artText = artText..L["("]..tostring( floor( (artifactXP/artifactForNextPoint)*100) )..L["%"]..L[")"]
-		end
-	end
-	if artifactPointsAvailable > 0 then
-		artText = artText..L[" "].."[+ "..artifactPointsAvailable.."]"
-	end
-	--EMA:Print("arttest", artText)
-	experienceArtBarText:SetText( artText )
-	experienceArtBar:SetStatusBarColor( 0.901, 0.8, 0.601, 1.0 )
-	experienceArtBar.backgroundTexture:SetColorTexture( 0.901, 0.8, 0.601, 0.20 )
-
---[[
-	--HonorText
-	local honorText = ""
-	if EMA.db.showExpInfo == true then
-		if prestigeLevel > 0 then
-			honorText = honorText..prestigeLevel.."-"..honorLevel..L[" "]
-		else
-			honorText = honorText..honorLevel..L[" "]
-		end
-	end
-	if EMA.db.experienceStatusShowValues == true then
-		honorText = honorText..tostring( AbbreviateLargeNumbers(honorXP) )..L[" / "]..tostring( AbbreviateLargeNumbers(honorMax) )..L[" "]
-	end
-	if EMA.db.experienceStatusShowPercentage == true then
-		if EMA.db.experienceStatusShowValues == true then
-			honorText = honorText..tostring( AbbreviateLargeNumbers(honorXP) )..L[" "]..L["("]..tostring( floor( (honorXP/honorMax)*100) )..L["%"]..L[")"]
-		else
-			honorText = honorText..L["("]..tostring( floor( (honorXP/honorMax)*100) )..L["%"]..L[")"]
-		end
-	end
-	experienceHonorBarText:SetText( honorText )
-	if honorExhaustionStateID == 1 then
-		experienceHonorBar:SetStatusBarColor( 1.0, 0.71, 0.0, 1.0 )
-		experienceHonorBar.backgroundTexture:SetColorTexture( 1.0, 0.71, 0.0, 0.20 )
-	else
-		experienceHonorBar:SetStatusBarColor( 1.0, 0.24, 0.0, 1.0 )
-		experienceHonorBar.backgroundTexture:SetColorTexture( 1.0, 0.24, 0.0, 0.20 )
-	end
-]]
-end
-
-
-
-
--------------------------------------------------------------------------------------------------------------
--- Reputation Status Bar Updates.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:CHAT_MSG_COMBAT_FACTION_CHANGE( event, ... )
-	EMA:SendReputationStatusUpdateCommand()
-end
-
-function EMA:SetWatchedFactionIndex( index )
-	EMA:ScheduleTimer( "SendReputationStatusUpdateCommand", 5 )
-end
-
-function EMA:SendReputationStatusUpdateCommand()
-	if EMA.db.showTeamList == true and EMA.db.showRepStatus == true then
-		local reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue = GetWatchedFactionInfo()
-		if EMA.db.showTeamListOnMasterOnly == true then
-			EMA:EMASendCommandToMaster( EMA.COMMAND_REPUTATION_STATUS_UPDATE, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue )
-		else
-			EMA:EMASendCommandToTeam( EMA.COMMAND_REPUTATION_STATUS_UPDATE, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue )
-		end
-	end
-end
-
-function EMA:ProcessUpdateReputationStatusMessage( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue)
-	EMA:UpdateReputationStatus( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue)
-end
-
-function EMA:SettingsUpdateReputationAll()
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		EMA:UpdateReputationStatus( characterName, nil, nil, nil, nil, nil, nil )
-	end
-end
-
-function EMA:UpdateReputationStatus( characterName, reputationName, reputationStandingID, reputationBarMin, reputationBarMax, reputationBarValue)
-	if CanDisplayTeamList() == false then
-		return
-	end
-	if EMA.db.showRepStatus == false then
-		return
-	end
-	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	if characterStatusBar == nil then
-		return
-	end
-	local reputationBarText = characterStatusBar["reputationBarText"]
-	local reputationBar = characterStatusBar["reputationBar"]
-	if reputationName == nil then
-		reputationName = reputationBarText.reputationName
-	end
-	if reputationStandingID == nil then
-		reputationStandingID = reputationBarText.reputationStandingID
-	end
-	if reputationBarMin == nil then
-		reputationBarMin = reputationBarText.reputationBarMin
-	end
-	if reputationBarMax == nil then
-		reputationBarMax = reputationBarText.reputationBarMax
-	end
-	if reputationBarValue == nil then
-		reputationBarValue = reputationBarText.reputationBarValue
-	end
-	reputationBarText.reputationName = reputationName
-	reputationBarText.reputationStandingID = reputationStandingID
-	reputationBarText.reputationBarMin = reputationBarMin
-	reputationBarText.reputationBarMax = reputationBarMax
-	reputationBarText.reputationBarValue = reputationBarValue
-
-	--reputationBar:SetMinMaxValues( tonumber( reputationBarMin ), tonumber( reputationBarMax ) )
-	--reputationBar:SetValue( tonumber( reputationBarValue ) )
-	reputationBar:SetAnimatedValues(reputationBarValue, reputationBarMin, reputationBarMax, 0 )
-
-   if reputationName == 0 then
-        reputationBarMin = 0
-        reputationBarMax = 100
-        reputationBarValue = 100
-        reputationStandingID = 1
-    end
---[[
-	if 	UnitInParty(Ambiguate( characterName, "none" ) ) == true then
-		if range == false then
-			reputationBar:SetAlpha( 0.5 )
-		else
-			reputationBar:SetAlpha( 1 )
-		end
-	else
-		reputationBar:SetAlpha( 1 )
-	end
---]]
-	local text = ""
-	if EMA.db.experienceStatusShowValues == true then
-		text = text..tostring( AbbreviateLargeNumbers(reputationBarValue-reputationBarMin) )..L[" / "]..tostring( AbbreviateLargeNumbers(reputationBarMax-reputationBarMin) )..L[" "]
-	end
-	if EMA.db.experienceStatusShowPercentage == true then
-		local textPercentage = tostring( floor( (reputationBarValue-reputationBarMin)/(reputationBarMax-reputationBarMin)*100 ) )..L["%"]
-		if EMA.db.experienceStatusShowValues == true then
-			text = tostring( AbbreviateLargeNumbers(reputationBarValue-reputationBarMin) )..L[" "]..L["("]..textPercentage..L[")"]
-		else
-			text = text..textPercentage
-		end
-	end
-	reputationBarText:SetText( text )
-	local barColor = _G.FACTION_BAR_COLORS[reputationStandingID]
-	if barColor ~= nil then
-		reputationBar:SetStatusBarColor( barColor.r, barColor.g, barColor.b, 1.0 )
-		reputationBar.backgroundTexture:SetColorTexture( barColor.r, barColor.g, barColor.b, 0.15 )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Health Status Bar Updates.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:UNIT_HEALTH( event, unit, ... )
-	--EMA:Print("test2", unit)
-	EMA:SendHealthStatusUpdateCommand( unit )
-end
-
-function EMA:UNIT_MAXHEALTH( event, unit, ... )
-	--EMA:Print("sendtest2", unit )
-	EMA:SendHealthStatusUpdateCommand( unit )
-end
-
-function EMA:UNIT_HEAL_PREDICTION( event, unit, ... )
-	--EMA:Print("test2", unit)
-	EMA:SendHealthStatusUpdateCommand( unit )
-end
-
-
-function EMA:SendHealthStatusUpdateCommand(unit)
-	--EMA:Print("debugHealthUpd", unit )
-	if unit == nil then
-		return
-	end
-	if EMA.db.showTeamList == true and EMA.db.showHealthStatus == true then
-		if EMA.db.healthManaOutOfParty == true then
-			if unit == "player" then
-				--EMA:Print("itsme", unit)
-				local playerHealth = UnitHealth( unit )
-				local playerMaxHealth = UnitHealthMax( unit )
-				local inComingHeal = UnitGetIncomingHeals( unit )
-				local _, class = UnitClass ("player")
-
-				if EMA.db.showTeamListOnMasterOnly == true then
-					--EMA:Print( "SendHealthStatusUpdateCommand TO Master!" )
-					EMA:EMASendCommandToMaster( EMA.COMMAND_HEALTH_STATUS_UPDATE, playerHealth, playerMaxHealth, inComingHeal, class )
-				else
-					--EMA:Print( "SendHealthStatusUpdateCommand TO Team!" )
-					EMA:EMASendCommandToTeam( EMA.COMMAND_HEALTH_STATUS_UPDATE, playerHealth, playerMaxHealth, inComingHeal, class )
-				end
-			end
-		else
-			local playerHealth = UnitHealth( unit )
-			local playerMaxHealth = UnitHealthMax( unit )
-			local inComingHeal = UnitGetIncomingHeals( unit )
-			local characterName, characterRealm = UnitName( unit )
-			local _, class = UnitClass ( unit )
-			local character = EMAUtilities:AddRealmToNameIfNotNil( characterName, characterRealm )
-			--EMA:Print("HeathStats", character, playerHealth, playerMaxHealth)
-			EMA:UpdateHealthStatus( character, playerHealth, playerMaxHealth, inComingHeal, class)
-		end
-	end
-end
-
-function EMA:ProcessUpdateHealthStatusMessage( characterName, playerHealth, playerMaxHealth, inComingHeal, class )
-	EMA:UpdateHealthStatus( characterName, playerHealth, playerMaxHealth, inComingHeal, class)
-end
-
-function EMA:SettingsUpdateHealthAll()
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		EMA:UpdateHealthStatus( characterName, nil, nil, nil, nil )
-	end
-end
-
-function EMA:UpdateHealthStatus( characterName, playerHealth, playerMaxHealth, inComingHeal, class )
-	--EMA:Print("testUpdate", characterName, playerHealth, playerMaxHealth, inComingHeal, class )
-		if characterName == nil then
-		return
-	end
-	if CanDisplayTeamList() == false then
-		return
-	end
-	if EMA.db.showHealthStatus == false then
-		return
-	end
-	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	if characterStatusBar == nil then
-		return
-	end
-	local healthBarText = characterStatusBar["healthBarText"]
-	local healthBar = characterStatusBar["healthBar"]
-	local healthIncomingBar = characterStatusBar["healthIncomingBar"]
-
-	if playerMaxHealth == 0 then
-		playerMaxHealth = healthBarText.playerMaxHealth
-	end
-	if playerHealth == nil then
-		playerHealth = healthBarText.playerHealth
-	end
-	if playerMaxHealth == nil then
-		playerMaxHealth = healthBarText.playerMaxHealth
-	end
-	if inComingHeal == nil then
-		inComingHeal = healthBarText.inComingHeal
-	end
-	healthBarText.playerHealth = playerHealth
-	healthBarText.playerMaxHealth = playerMaxHealth
-	healthBarText.inComingHeal = inComingHeal
-	-- Set statusBar
-	healthBar:SetMinMaxValues( 0, tonumber( playerMaxHealth ) )
-	healthBar:SetValue( tonumber( playerHealth ) )
-	healthIncomingBar:SetMinMaxValues( 0, tonumber( playerMaxHealth ) )
-	healthIncomingBar:SetValue( tonumber( playerHealth ) )
-
-	if inComingHeal > 0 then
---	EMA:Print("incomingHeal", inComingHeal)
-		healthIncomingBar:SetValue( tonumber( playerHealth + inComingHeal ) )
-		healthIncomingBar:SetStatusBarColor( 0, 1, 0, 1 )
-	end
-	local text = ""
-	if UnitIsDeadOrGhost(Ambiguate( characterName, "none" ) ) == true then
-		--EMA:Print("dead", characterName)
-		text = text..L["DEAD"]
-	else
-		if EMA.db.healthStatusShowValues == true then
-			text = text..tostring( AbbreviateLargeNumbers(playerHealth) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxHealth) )..L[" "]
-		end
-		if EMA.db.healthStatusShowPercentage == true then
-			if EMA.db.healthStatusShowValues == true then
-				text = tostring( AbbreviateLargeNumbers(playerHealth) )..L[" "]..L["("]..tostring( floor( (playerHealth/playerMaxHealth)*100) )..L["%"]..L[")"]
-			else
-				text = tostring( floor( (playerHealth/playerMaxHealth)*100) )..L["%"]
-			end
-		end
-	end
-	healthBarText:SetText( text )
-	EMA:SetStatusBarColourForHealth( healthBar, floor((playerHealth/playerMaxHealth)*100), characterName, class)
-end
-
--- TODO Support for classColors
-function EMA:SetStatusBarColourForHealth( statusBar, statusValue, characterName, class )
-	--EMA:Print("colour class", statusValue, characterName)
-	local classColor = RAID_CLASS_COLORS[class]
-	if classColor ~= nil and EMA.db.showClassColors == true then
-		-- EMA:Print("test", characterName, class, classColor.r, classColor.g, classColor.b )
-		local r = classColor.r
-		local g = classColor.g
-		local b = classColor.b
-		statusBar:SetStatusBarColor( r, g, b, 1 )
-	else
-		local r, g, b = 0, 0, 0
-		statusValue = statusValue / 100
-		if( statusValue > 0.5 ) then
-			r = (1.0 - statusValue) * 2
-			g = 1.0
-		else
-			r = 1.0
-			g = statusValue * 2
-		end
-		b = b
-		statusBar:SetStatusBarColor( r, g, b )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Power Status Bar Updates.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:UNIT_POWER( event, unit, ... )
-	EMA:SendPowerStatusUpdateCommand( unit )
-end
-
-function EMA:UNIT_DISPLAYPOWER( event, unit, ... )
-	EMA:SendPowerStatusUpdateCommand( unit )
-end
-
-function EMA:SendPowerStatusUpdateCommand( unit )
-	if EMA.db.showTeamList == true and EMA.db.showPowerStatus == true then
-		if EMA.db.healthManaOutOfParty == true then
-			if unit == "player" then
-				--EMA:Print("itsme", unit)
-				local playerPower = UnitPower( unit )
-				local playerMaxPower = UnitPowerMax( unit )
-				local _, powerToken = UnitPowerType( unit )
-				if EMA.db.showTeamListOnMasterOnly == true then
-					--EMA:Print( "SendHealthStatusUpdateCommand TO Master!"  )
-					EMA:EMASendCommandToMaster( EMA.COMMAND_POWER_STATUS_UPDATE, playerPower, powerToken )
-				else
-					--EMA:Print( "SendHealthStatusUpdateCommand TO Team!", playerPower, playerMaxPower, powerToken )
-					EMA:EMASendCommandToTeam( EMA.COMMAND_POWER_STATUS_UPDATE, playerPower, playerMaxPower, powerToken )
-				end
-			end
-		else
-			local playerPower = UnitPower( unit )
-			local playerMaxPower = UnitPowerMax( unit )
-			local characterName, characterRealm = UnitName( unit )
-			local _, powerToken = UnitPowerType( unit )
-			local character = EMAUtilities:AddRealmToNameIfNotNil( characterName, characterRealm )
-			--EMA:Print("power", character, playerPower, playerMaxPower )
-			EMA:UpdatePowerStatus( character, playerPower, playerMaxPower, powerToken)
-		end
-	end
-end
-
-function EMA:ProcessUpdatePowerStatusMessage( characterName, playerPower, playerMaxPower, powerToken )
-	EMA:UpdatePowerStatus( characterName, playerPower, playerMaxPower, powerToken )
-end
-
-function EMA:SettingsUpdatePowerAll()
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		EMA:UpdatePowerStatus( characterName, nil, nil, nil )
-	end
-end
-
-function EMA:UpdatePowerStatus( characterName, playerPower, playerMaxPower, powerToken)
-	--EMA:Print("testPOwer", characterName, playerPower, playerMaxPower, powerToken )
-	if characterName == nil then
-		return
-	end
-	if CanDisplayTeamList() == false then
-		return
-	end
-	if EMA.db.showPowerStatus == false then
-		return
-	end
-	local originalChatacterName = characterName
-	characterName = EMAUtilities:AddRealmToNameIfMissing( characterName )
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	if characterStatusBar == nil then
-		return
-	end
-	local powerBarText = characterStatusBar["powerBarText"]
-	local powerBar = characterStatusBar["powerBar"]
-
-	if playerMaxPower == 0 then
-		playerMaxPower = powerBarText.playerMaxPower
-	end
-
-	if playerPower == nil then
-		playerPower = powerBarText.playerPower
-	end
-	if playerMaxPower == nil then
-		playerMaxPower = powerBarText.playerMaxPower
-	end
-	powerBarText.playerPower = playerPower
-	powerBarText.playerMaxPower = playerMaxPower
-	powerBar:SetMinMaxValues( 0, tonumber( playerMaxPower ) )
-	powerBar:SetValue( tonumber( playerPower ) )
-	local text = ""
-	if EMA.db.powerStatusShowValues == true then
-		text = text..tostring( AbbreviateLargeNumbers(playerPower) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxPower) )..L[" "]
-	end
-	if EMA.db.powerStatusShowPercentage == true then
-		if EMA.db.powerStatusShowValues == true then
-			text = tostring( AbbreviateLargeNumbers(playerPower) )..L[" "]..L["("]..tostring( floor( (playerPower/playerMaxPower)*100) )..L["%"]..L[")"]
-		else
-			text = tostring( floor( (playerPower/playerMaxPower)*100) )..L["%"]
-		end
-	end
-	powerBarText:SetText( text )
-	EMA:SetStatusBarColourForPower( powerBar, powerToken )--originalChatacterName )
-end
-
-function EMA:SetStatusBarColourForPower( statusBar, powerToken )
-	local info = PowerBarColor[powerToken]
-	if info ~= nil then
-	--	EMA:Print("powertest", powerToken, info.r, info.g, info.b )
-		statusBar:SetStatusBarColor( info.r, info.g, info.b, 1 )
-		statusBar.backgroundTexture:SetColorTexture( info.r, info.g, info.b, 0.25 )
-
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Combo Points Status Bar Updates.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:UNIT_POWER_FREQUENT( event, Unit, powerType, ... )
-	--TODO there got to be a better way to clean this code up Checking to see if its the event we need and then send the command to the update if it is.
-	--EMA:Print("EventTest", Unit, powerType)
-	if Unit == "player" then
-		--EMA:Print("player", Unit, powerType)
-		if( event and powerType == "COMBO_POINTS" ) then
-			EMA:SendComboStatusUpdateCommand()
-		elseif( event and powerType == "SOUL_SHARDS" ) then
-			EMA:SendComboStatusUpdateCommand()
-		elseif( event and powerType == "HOLY_POWER" ) then
-			EMA:SendComboStatusUpdateCommand()
-		elseif( event and powerType == "ARCANE_CHARGES" ) then
-			EMA:SendComboStatusUpdateCommand()
-		elseif( event and powerType == "CHI" ) then
-			EMA:SendComboStatusUpdateCommand()
-		else
-			return
-		end
-	end
-end
-
-function EMA:RUNE_POWER_UPDATE( event, ...)
-	EMA:SendComboStatusUpdateCommand()
-end
-
-function EMA:SendComboStatusUpdateCommand()
-	--EMA:Print("test")
-	if EMA.db.showTeamList == true and EMA.db.showComboStatus == true then
-		-- get powerType from http://wowprogramming.com/docs/api_types#powerType as there no real API to get this infomation as of yet.
-		local Class = select(2, UnitClass("player"))
-		--EMA:Print("class", Class)
-		-- Combo Points
-		if Class == "DRUID" then
-			PowerType = 4
-		-- Combo Points
-		elseif Class == "ROGUE" then
-			PowerType = 4
-		-- Warlock's soulshards
-		elseif Class == "WARLOCK" then
-				PowerType = 7
-		-- Paladin Holy Power
-		elseif Class == "PALADIN" then
-			PowerType = 9
-		-- DEATHKNIGHT Runes
-		elseif Class == "DEATHKNIGHT" then
-			PowerType = 5
-		-- Mage ARCANE_CHARGES
-		elseif Class == "MAGE" then
-			PowerType = 16
-		-- Monk Cil
-		elseif Class == "MONK" then
-			PowerType = 12
-		else
-			return
-		end
-
-		local playerCombo = UnitPower ( "player", PowerType)
-		local playerMaxCombo = UnitPowerMax( "player", PowerType)
-
-		--Deathkight Dity Hacky Hacky.
-		if Class == "DEATHKNIGHT" then
-			for i=1, playerMaxCombo do
-				local start, duration, runeReady = GetRuneCooldown(i)
-					if not runeReady then
-						playerCombo = playerCombo - 1
-					end
-			end
-		end
-		--EMA:Print ("PowerType", PowerType, playerCombo, playerMaxCombo, class)
-		if EMA.db.showTeamListOnMasterOnly == true then
-			EMA:DebugMessage( "SendComboStatusUpdateCommand TO Master!" )
-			EMA:EMASendCommandToMaster( EMA.COMMAND_COMBO_STATUS_UPDATE, playerCombo, playerMaxCombo, class )
-		else
-			EMA:DebugMessage( "SendComboStatusUpdateCommand TO TEAM!" )
-			EMA:EMASendCommandToTeam( EMA.COMMAND_COMBO_STATUS_UPDATE, playerCombo, playerMaxCombo, class )
-		end
-	end
-end
-
-function EMA:ProcessUpdateComboStatusMessage( characterName, playerCombo, playerMaxCombo, class )
-	EMA:UpdateComboStatus( characterName, playerCombo , playerMaxCombo, class)
-end
-
-function EMA:SettingsUpdateComboAll()
-	for characterName, characterStatusBar in pairs( EMA.characterStatusBar ) do
-		EMA:UpdateComboStatus( characterName, nil, nil, nil )
-	end
-end
-
-function EMA:UpdateComboStatus( characterName, playerCombo, playerMaxCombo, class )
-	if CanDisplayTeamList() == false then
-		return
-	end
-
-	if EMA.db.showComboStatus == false then
-		return
-	end
-
-	local characterStatusBar = EMA.characterStatusBar[characterName]
-	if characterStatusBar == nil then
-		return
-	end
-
-	local comboBarText = characterStatusBar["comboBarText"]
-	local comboBar = characterStatusBar["comboBar"]
-
-	if playerCombo == nil then
-		playerCombo = comboBarText.playerCombo
-	end
-	if playerMaxCombo == 0 then
-		playerMaxCombo = comboBarText.playerMaxCombo
-	end
-	if playerMaxCombo == nil then
-		playerMaxCombo = comboBarText.playerMaxCombo
-	end
-
-	comboBarText.playerCombo = playerCombo
-	comboBarText.playerMaxCombo = playerMaxCombo
-	comboBar:SetMinMaxValues( 0, tonumber( playerMaxCombo ) )
-	comboBar:SetValue( tonumber( playerCombo ) )
-	local text = ""
-
-	if EMA.db.comboStatusShowValues == true then
-		text = text..tostring( AbbreviateLargeNumbers(playerCombo) )..L[" / "]..tostring( AbbreviateLargeNumbers(playerMaxCombo) )..L[" "]
-	end
-
-	if EMA.db.ComboStatusShowPercentage == true then
-		if EMA.db.comboStatusShowValues == true then
-			text = text..tostring( AbbreviateLargeNumbers(playerCombo) )..L[" "]..L["("]..tostring( floor( (playerCombo/playerMaxCombo)*100) )..L["%"]..L[")"]
-		else
-			text = tostring( floor( (playerCombo/playerMaxCombo)*100) )..L["%"]
-		end
-	end
-	comboBarText:SetText( text )
-	EMA:SetStatusBarColourForCombo( comboBar, class )
-end
-
-function EMA:SetStatusBarColourForCombo( comboBar, Class )
-	if Class == "WARLOCK" then
-		-- Purple
-		comboBar:SetStatusBarColor( 0.58, 0.51, 0.79, 1 )
-		comboBar.backgroundTexture:SetColorTexture( 0.58, 0.51, 0.79, 0.25)
-	elseif  Class == "PALADIN" then
-		--yellow(gold)
-		comboBar:SetStatusBarColor( 0.96, 0.55, 0.73, 1 )
-		comboBar.backgroundTexture:SetColorTexture( 0.96, 0.55, 0.73, 0.25)
-	elseif Class =="DEATHKNIGHT" then
-		--Sky Blue?
-		comboBar:SetStatusBarColor( 0.60, 0.80, 1.0, 1 )
-		comboBar.backgroundTexture:SetColorTexture( 0.60, 0.80, 1.0, 0.25)
-	elseif Class =="MAGE" then
-		--Very Blue ice?
-		comboBar:SetStatusBarColor( 0.07, 0.30, 0.92, 1 )
-		comboBar.backgroundTexture:SetColorTexture( 0.07, 0.30, 0.92, 0.25)
-	elseif Class =="MONK" then
-		--Greenish
-		comboBar:SetStatusBarColor( 0.44, 0.79, 0.67, 1 )
-		comboBar.backgroundTexture:SetColorTexture( 0.44, 0.79, 0.67, 0.25)
-	else
-		return
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	EMA.previousSlotsFree = 0
-	EMA.previousTotalSlots = 0
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Create the team list frame.
-	CreateEMATeamListFrame()
-	EMA:SetTeamListVisibility()
-	-- Is Following to stop spam
-	EMA.isFollowing = false
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
-	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
-	EMA:RegisterEvent( "AUTOFOLLOW_BEGIN" )
-	EMA:RegisterEvent( "AUTOFOLLOW_END" )
-	EMA:RegisterEvent( "PLAYER_XP_UPDATE" )
-	EMA:RegisterEvent( "UPDATE_EXHAUSTION" )
-	EMA:RegisterEvent( "PLAYER_LEVEL_UP" )
-	EMA:RegisterEvent( "UNIT_HEALTH" )
-	EMA:RegisterEvent( "UNIT_MAXHEALTH" )
-	EMA:RegisterEvent( "UNIT_HEAL_PREDICTION" )
-	--TODO Adds support for 8.0.x
-	if EMAPrivate.Core.isBetaBuild() == true then
-		EMA:RegisterEvent( "UNIT_POWER_UPDATE", "UNIT_POWER" )
-	else
-		EMA:RegisterEvent( "UNIT_POWER", "UNIT_POWER" )
-	end
-	EMA:RegisterEvent( "UNIT_MAXPOWER", "UNIT_POWER" )
-	EMA:RegisterEvent( "UNIT_DISPLAYPOWER" )
-	EMA:RegisterEvent( "CHAT_MSG_COMBAT_FACTION_CHANGE" )
-	EMA:RegisterEvent( "UNIT_POWER_FREQUENT")
-	EMA:RegisterEvent( "RUNE_POWER_UPDATE" )
-	EMA:RegisterEvent( "PLAYER_TALENT_UPDATE")
-	--EMA:RegisterEvent( "HONOR_XP_UPDATE" )
-	--EMA:RegisterEvent( "HONOR_LEVEL_UPDATE" )
-	--EMA:RegisterEvent( "HONOR_PRESTIGE_UPDATE" )
-	EMA:RegisterEvent( "GROUP_ROSTER_UPDATE" )
-	EMA:RegisterEvent( "ARTIFACT_XP_UPDATE" )
-	EMA:RegisterEvent("UNIT_PORTRAIT_UPDATE")
-	EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_Registered" )
-    EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_SetGlobal" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_CHARACTER_ADDED, "OnCharactersChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_CHARACTER_REMOVED, "OnCharactersChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_ORDER_CHANGED, "OnCharactersChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_ONLINE, "OnCharactersChanged")
-	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_OFFLINE, "OnCharactersChanged")
-
-	EMA:SecureHook( "SetWatchedFactionIndex" )
-	EMA:ScheduleTimer( "RefreshTeamListControls", 3 )
-	EMA:ScheduleTimer( "SendExperienceStatusUpdateCommand", 8 )
-	EMA:ScheduleTimer( "SendReputationStatusUpdateCommand", 5 )
-	EMA:ScheduleTimer( "SendHealthStatusUpdateCommand", 5, "player" )
-	EMA:ScheduleTimer( "SendPowerStatusUpdateCommand", 5, "player" )
-	EMA:ScheduleTimer( "SendComboStatusUpdateCommand", 5 )
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
-
-function EMA:UpdateAll(event, ...)
-	EMA:ScheduleTimer( "RefreshTeamListControls", 3 )
-	EMA:ScheduleTimer( "SendExperienceStatusUpdateCommand", 2 )
-	EMA:ScheduleTimer( "SendReputationStatusUpdateCommand", 2 )
-	EMA:ScheduleTimer( "SendComboStatusUpdateCommand", 2 )
-end
-
-
-function EMA:OnMasterChanged( message, characterName )
-	EMA:SettingsRefresh()
-end
-
-function EMA:GROUP_ROSTER_UPDATE()
-	EMA:ScheduleTimer( "RefreshTeamListControls", 1 )
-	EMA:ScheduleTimer( "SendExperienceStatusUpdateCommand", 1 )
-	EMA:ScheduleTimer( "SendReputationStatusUpdateCommand", 1 )
-	EMA:ScheduleTimer( "SendComboStatusUpdateCommand", 1 )
-	for index, characterName in EMAApi.TeamListOrderedOnline() do
-		unit = Ambiguate( characterName, "none" )
-		EMA:ScheduleTimer( "SendHealthStatusUpdateCommand", 2, unit )
-		EMA:ScheduleTimer( "SendPowerStatusUpdateCommand", 2, unit )
-	end
-end
-
-function EMA:UNIT_PORTRAIT_UPDATE(event, ...)
-	if EMA.db.showCharacterPortrait == true then
-		EMA:RefreshTeamListControls()
-	end
-end
-
-function EMA:PLAYER_REGEN_ENABLED( event, ... )
-	if EMA.db.hideTeamListInCombat == true then
-		EMA:SetTeamListVisibility()
-	end
-	if EMA.refreshHideTeamListControlsPending == true then
-		EMA:RefreshTeamListControlsHide()
-		EMA.refreshHideTeamListControlsPending = false
-	end
-	if EMA.refreshShowTeamListControlsPending == true then
-		EMA:RefreshTeamListControlsShow()
-		EMA.refreshShowTeamListControlsPending = false
-	end
-	if EMA.updateSettingsAfterCombat == true then
-		EMA:SettingsRefresh()
-		EMA.updateSettingsAfterCombat = false
-	end
-	-- Ebony added follow bar combat Text Change To Orange
-	if EMA.db.showTeamList == true and EMA.db.showFollowStatus == true then
-		EMA:ScheduleTimer( "SendCombatStatusUpdateCommand", 1 )
-	end
-end
-
-function EMA:PLAYER_REGEN_DISABLED( event, ... )
-	if EMA.db.hideTeamListInCombat == true then
-		EMADisplayTeamListFrame:Hide()
-	end
-	-- Ebony added follow bar Combat Text Change To Orange
-	if EMA.db.showTeamList == true and EMA.db.showFollowStatus == true then
-		EMA:ScheduleTimer( "SendCombatStatusUpdateCommand", 1 )
-	end
-end
-
-function EMA:PLAYER_TALENT_UPDATE(event, ...)
-	EMA:SendComboStatusUpdateCommand()
-	EMA:ScheduleTimer( "SendExperienceStatusUpdateCommand", 1 )
-end
-
-function EMA:OnCharactersChanged()
-	EMA:RefreshTeamListControls()
-end
-
diff --git a/Modules/Follow.lua b/Modules/Follow.lua
deleted file mode 100644
index 539e410..0000000
--- a/Modules/Follow.lua
+++ /dev/null
@@ -1,1311 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "EMA" that is 								--
---				Released under the MIT License 										--
---				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Follow",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceTimer-3.0"
-)
-
--- Get the EMA Utilities Library.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "Follow"
-EMA.settingsDatabaseName = "FollowProfileDB"
-EMA.chatCommand = "ema-follow"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["TOON"]
-EMA.moduleDisplayName = L["FOLLOW"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\FollowIcon.tga"
--- order
-EMA.moduleOrder = 50
-
--- EMA key bindings.
-
-BINDING_HEADER_F0LLOW = L["FOLLOW_BINDING_HEADER"]
-BINDING_NAME_FOLLOWME = L["FOLLOW_ME"]
-BINDING_NAME_FOLLOWSTROBEME = L["FOLLOW_STROBE_ME"]
-BINDING_NAME_FOLLOWSTROBEOFF = L["FOLLOW_STROBE_OFF"]
-BINDING_NAME_FOLLOWTEAIN = L["FOLLOW_TRAIN"]
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		warnWhenFollowBreaks = true,
-		followBrokenMessage = L["FOLLOW_BROKEN_MSG"],
-		autoFollowAfterCombat = false,
-		useAfterCombatDelay = false,
-		afterCombatDelay = "3",
-		strobeFrequencySeconds = "1",
-		strobeFrequencySecondsInCombat = "1",
-		doNotWarnFollowBreakInCombat = false,
-		doNotWarnFollowBreakMembersInCombat = false,
-		doNotWarnFollowStrobing = false,
-		strobePauseInCombat = false,
-		strobePauseIfDrinking = false,
-		strobePauseIfInVehicle = false,
-		strobePauseTag = EMAApi.AllTag(),
-		warningArea = EMAApi.DefaultWarningArea(),
-		followMaster = "",
-		useFollowMaster = false,
-		overrideStrobeTargetWithMaster = false,
-		onlyWarnIfOutOfFollowRange = false,
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-follow push",
-				get = false,
-				set = "EMASendSettings",
-			},
-			master = {
-				type = "input",
-				name = L["FOLLOW_MASTER"],
-				desc = L["FOLLOW_MASTER_HELP"],
-				usage = "/EMA-follow master <tag>",
-				get = false,
-				set = "FollowMasterCommand",
-			},
-			target = {
-				type = "input",
-				name = L["FOLLOW_TARGET"],
-				desc = L["FOLLOW_TARGET_HELP"],
-				usage = "/EMA-follow target <target> <tag>",
-				get = false,
-				set = "FollowTargetCommand",
-			},
-			afterCombat = {
-				type = "input",
-				name = L["FOLLOW_AFTER_COMBAT"],
-				desc = L["FOLLOW_AFTER_COMBAT_HELP"],
-				usage = "/EMA-follow aftercombat <on|off> <tag>",
-			},
-			strobeOn = {
-				type = "input",
-				name = L["FOLLOW_STROBING"],
-				desc = L["FOLLOW_STROBING_HELP"],
-				usage = "/EMA-follow strobeon <target> <tag>",
-				get = false,
-				set = "FollowStrobeOnCommand",
-			},
-			strobeOnMe = {
-				type = "input",
-				name = L["FOLLOW_STROBING_ME"],
-				desc = L["FOLLOW_STROBING_ME_HELP"],
-				usage = "/EMA-follow strobeonme <tag>",
-				get = false,
-				set = "FollowStrobeOnMeCommand",
-			},
-			strobeOff = {
-				type = "input",
-				name = L["FOLLOW_STROBING_END"],
-				desc = L["FOLLOW_STROBING_END_HELP"],
-				usage = "/EMA-follow strobeoff <tag>",
-				get = false,
-				set = "FollowStrobeOffCommand",
-			},
-			setmaster = {
-				type = "input",
-				name = L["FOLLOW_SET_MASTER"],
-				desc = L["FOLLOW_SET_MASTER_HELP"],
-				usage = "/EMA-follow setmaster <name> <tag>",
-				get = false,
-				set = "CommandSetFollowMaster",
-			},
-			train = {
-				type = "input",
-				name = L["TRAIN"],
-				desc = L["TRAIN_HELP"],
-				usage = "/EMA-follow train <tag>",
-				get = false,
-				set = "CommandFollowTrain",
-			},
-			me = {
-				type = "input",
-				name = L["FOLLOW_ME"],
-				desc = L["FOLLOW_ME_HELP"],
-				usage = "/EMA-follow me <tag>",
-				get = false,
-				set = "CommandFollowMe",
-			},
-			snw = {
-				type = "input",
-				name = L["SNW"],
-				desc = L["SNW_HELP"],
-				usage = "/EMA-follow snw",
-				get = false,
-				set = "SuppressNextFollowWarningCommand",
-			},
-		},
-	}
-	return configuration
-end
-
-local function DebugMessage( ... )
-	--EMA:Print( ... )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_FOLLOW_TARGET = "FollowTarget"
-EMA.COMMAND_AUTO_FOLLOW_AFTER_COMBAT = "AutoFollowAfterCombat"
-EMA.COMMAND_FOLLOW_STROBE_ON = "FollowStrobeOn"
-EMA.COMMAND_FOLLOW_STROBE_OFF = "FollowStrobeOff"
-EMA.COMMAND_SET_FOLLOW_MASTER = "FollowMaster"
-EMA.COMMAND_FOLLOW_TRAIN = "FollowTrain"
-EMA.COMMAND_FOLLOW_ME = "FollowMe"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SortTeamListOrdered( characterA, characterB )
-	local positionA = EMAApi.GetPositionForCharacterName ( characterA )
-	local positionB = EMAApi.GetPositionForCharacterName ( characterB )
-	return positionA < positionB
-end
-
-local function BuildAndSetTeamList()
-	EMAUtilities:ClearTable( EMA.teamList )
-	for characterName, order in EMAApi.TeamList() do
-		table.insert( EMA.teamList, characterName )
-		table.sort( EMA.teamList, SortTeamListOrdered )
-	end
-	EMA.settingsControl.dropdownFollowMaster:SetList( EMA.teamList )
-end
-
-local function SettingsCreateDisplayOptions( top )
-	-- Get positions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( true )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
-	local column2left = left + halfWidth
-	local left2 = left + thirdWidth
-	local left3 = left + (thirdWidth * 2)
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_AFTER_COMBAT"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxAutoFollowAfterCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["FOLLOW_AFTER_COMBAT"],
-		EMA.SettingsToggleAutoFollowAfterCombat,
-		L["FOLLOW_AFTER_COMBAT_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxDelayAutoFollowAfterCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["DELAY_FOLLOW_AFTER_COMBAT"],
-		EMA.SettingsToggleDelayAutoFollowAfterCombat
-
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.editBoxFollowAfterCombatDelaySeconds = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TIME_DELAY_FOLLOWING"]
-	)
-	EMA.settingsControl.editBoxFollowAfterCombatDelaySeconds:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowAfterCombatDelaySeconds )
-	movingTop = movingTop - editBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_MASTER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxUseFollowMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["DIFFERENT_TOON_FOLLOW"],
-		EMA.SettingsToggleUseFollowMaster,
-		L["DIFFERENT_TOON_FOLLOW_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.dropdownFollowMaster = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["NEW_FOLLOW_MASTER"]
-	)
-	BuildAndSetTeamList()
-	EMA.settingsControl.dropdownFollowMaster:SetCallback( "OnValueChanged", EMA.SettingsSetFollowMaster )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_BROKEN_WARNING"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxWarnWhenFollowBreaks = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["WARN_STOP_FOLLOWING"],
-		EMA.SettingsToggleWarnWhenFollowBreaks
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxOnlyWarnIfOutOfFollowRange = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ONLY_IF_OUTSIDE_RANGE"],
-		EMA.SettingsToggleOnlyWarnIfOutOfFollowRange,
-		L["ONLY_IF_OUTSIDE_RANGE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.editBoxFollowBrokenMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["FOLLOW_BROKEN_MESSAGE"]
-	)
-	EMA.settingsControl.editBoxFollowBrokenMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowBrokenMessage )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SEND_WARNING_AREA"]
-	)
-	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	EMA.settingsControl.labelDoNotWarnIf = EMAHelperSettings:CreateLabel(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["DO_NOT_WARN"]
-	)
-	movingTop = movingTop - labelHeight
-	EMA.settingsControl.checkBoxDoNotWarnInCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["IN_COMBAT"],
-		EMA.SettingsToggleDoNotWarnInCombat,
-		L["IN_COMBAT"]
-	)
-	EMA.settingsControl.checkBoxDoNotWarnMembersInCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		column2left,
-		movingTop,
-		L["ANY_MEMBER_IN_COMBAT"],
-		EMA.SettingsToggleDoNotWarnMembersInCombat
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxDoNotWarnFollowStrobing = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["FOLLOW_STROBING"],
-		EMA.SettingsToggleDoNotWarnFollowStrobing
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["FOLLOW_STROBING"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.labelStrobeHelp = EMAHelperSettings:CreateLabel(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["FOLLOW_STROBING_EMA_FOLLOW_COMMANDS."]
-	)
-	movingTop = movingTop - labelHeight
-	EMA.settingsControl.checkBoxOverrideStrobeTargetWithMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["USE_MASTER_STROBE_TARGET"],
-		EMA.SettingsToggleOverrideStrobeTargetWithMaster
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.labelPauseStrobeHelp = EMAHelperSettings:CreateLabel(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["PAUSE_FOLLOW_STROBING"]
-	)
-	movingTop = movingTop - labelHeight
-	EMA.settingsControl.checkBoxPauseInCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["IN_COMBAT"],
-		EMA.SettingsTogglePauseInCombat
-	)
-	EMA.settingsControl.checkBoxPauseDrinking = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		column2left, --left,
-		movingTop,
-		L["DRINKING_EATING"],
-		EMA.SettingsTogglePauseDrinking
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxPauseIfInVehicle = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["IN_A_VEHICLE"],
-		EMA.SettingsTogglePauseIfInVehicle
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.editBoxFollowStrobePauseTag = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["GROUP_FOLLOW_STROBE"]
-	)
-	EMA.settingsControl.editBoxFollowStrobePauseTag:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowStrobePauseTag )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.editBoxFollowStrobeDelaySeconds = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["FREQUENCY"]
-	)
-	EMA.settingsControl.editBoxFollowStrobeDelaySeconds:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowStrobeDelaySeconds )
-	EMA.settingsControl.editBoxFollowStrobeDelaySecondsInCombat = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
-		halfWidth,
-		column2left,
-		movingTop,
-		L["FREQUENCY_COMABT"]
-	)
-	EMA.settingsControl.editBoxFollowStrobeDelaySecondsInCombat:SetCallback( "OnEnterPressed", EMA.EditBoxChangedFollowStrobeDelaySecondsInCombat )
-	movingTop = movingTop - editBoxHeight
-	return movingTop
-end
-
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-end
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfDisplayOptions = SettingsCreateDisplayOptions( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfDisplayOptions )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	-- Set values.
-	EMA.settingsControl.checkBoxAutoFollowAfterCombat:SetValue( EMA.db.autoFollowAfterCombat )
-	EMA.settingsControl.checkBoxDelayAutoFollowAfterCombat:SetValue( EMA.db.useAfterCombatDelay )
-	EMA.settingsControl.editBoxFollowAfterCombatDelaySeconds:SetText( EMA.db.afterCombatDelay )
-	EMA.settingsControl.checkBoxWarnWhenFollowBreaks:SetValue( EMA.db.warnWhenFollowBreaks )
-	EMA.settingsControl.checkBoxOnlyWarnIfOutOfFollowRange:SetValue( EMA.db.onlyWarnIfOutOfFollowRange )
-	EMA.settingsControl.editBoxFollowBrokenMessage:SetText( EMA.db.followBrokenMessage )
-	EMA.settingsControl.checkBoxDoNotWarnInCombat:SetValue( EMA.db.doNotWarnFollowBreakInCombat )
-	EMA.settingsControl.checkBoxDoNotWarnMembersInCombat:SetValue( EMA.db.doNotWarnFollowBreakMembersInCombat )
-	EMA.settingsControl.checkBoxDoNotWarnFollowStrobing:SetValue( EMA.db.doNotWarnFollowStrobing )
-	EMA.settingsControl.checkBoxOverrideStrobeTargetWithMaster:SetValue( EMA.db.overrideStrobeTargetWithMaster )
-	EMA.settingsControl.checkBoxPauseInCombat:SetValue( EMA.db.strobePauseInCombat )
-	EMA.settingsControl.checkBoxPauseDrinking:SetValue( EMA.db.strobePauseIfDrinking )
-	EMA.settingsControl.checkBoxPauseIfInVehicle:SetValue( EMA.db.strobePauseIfInVehicle )
-	EMA.settingsControl.editBoxFollowStrobePauseTag:SetText( EMA.db.strobePauseTag )
-	EMA.settingsControl.editBoxFollowStrobeDelaySeconds:SetText( EMA.db.strobeFrequencySeconds )
-	EMA.settingsControl.editBoxFollowStrobeDelaySecondsInCombat:SetText( EMA.db.strobeFrequencySecondsInCombat )
-	EMA.settingsControl.dropdownWarningArea:SetValue( EMA.db.warningArea )
-	EMA.settingsControl.dropdownFollowMaster:SetValue( EMA.db.followMaster )
-	EMA.settingsControl.checkBoxUseFollowMaster:SetValue( EMA.db.useFollowMaster )
-	-- Set state.
-	EMA.settingsControl.checkBoxDelayAutoFollowAfterCombat:SetDisabled( not EMA.db.autoFollowAfterCombat )
-	EMA.settingsControl.editBoxFollowAfterCombatDelaySeconds:SetDisabled( not EMA.db.autoFollowAfterCombat or not EMA.db.useAfterCombatDelay )
-	EMA.settingsControl.dropdownFollowMaster:SetDisabled( not EMA.db.useFollowMaster )
-	EMA.settingsControl.editBoxFollowBrokenMessage:SetDisabled( not EMA.db.warnWhenFollowBreaks )
-	EMA.settingsControl.checkBoxOnlyWarnIfOutOfFollowRange:SetDisabled( not EMA.db.warnWhenFollowBreaks )
-	EMA.settingsControl.checkBoxDoNotWarnInCombat:SetDisabled( not EMA.db.warnWhenFollowBreaks )
-	EMA.settingsControl.checkBoxDoNotWarnMembersInCombat:SetDisabled( not EMA.db.warnWhenFollowBreaks )
-	EMA.settingsControl.checkBoxDoNotWarnFollowStrobing:SetDisabled( not EMA.db.warnWhenFollowBreaks )
-	EMA.settingsControl.dropdownWarningArea:SetDisabled( not EMA.db.warnWhenFollowBreaks )
-	EMA.settingsControl.labelDoNotWarnIf:SetDisabled( not EMA.db.warnWhenFollowBreaks )
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsToggleUseFollowMaster( event, checked )
-	EMA.db.useFollowMaster = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoFollowAfterCombat( event, checked )
-	EMA.db.autoFollowAfterCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDelayAutoFollowAfterCombat( event, checked )
-	EMA.db.useAfterCombatDelay = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedFollowAfterCombatDelaySeconds( event, text )
-	EMA.db.afterCombatDelay = tonumber( text )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleWarnWhenFollowBreaks( event, checked )
-	EMA.db.warnWhenFollowBreaks = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleOnlyWarnIfOutOfFollowRange( event, checked )
-	EMA.db.onlyWarnIfOutOfFollowRange = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedFollowBrokenMessage( event, text )
-	EMA.db.followBrokenMessage = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDoNotWarnInCombat( event, checked )
-	EMA.db.doNotWarnFollowBreakInCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDoNotWarnMembersInCombat( event, checked )
-	EMA.db.doNotWarnFollowBreakMembersInCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDoNotWarnFollowStrobing( event, checked )
-	EMA.db.doNotWarnFollowStrobing = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleOverrideStrobeTargetWithMaster( event, checked )
-	EMA.db.overrideStrobeTargetWithMaster = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsTogglePauseInCombat( event, checked )
-	EMA.db.strobePauseInCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsTogglePauseDrinking( event, checked )
-	EMA.db.strobePauseIfDrinking = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsTogglePauseIfInVehicle( event, checked )
-	EMA.db.strobePauseIfInVehicle = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedFollowStrobePauseTag( event, text )
-	EMA.db.strobePauseTag = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedFollowStrobeDelaySeconds( event, text )
-	EMA.db.strobeFrequencySeconds = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedFollowStrobeDelaySecondsInCombat( event, text )
-	EMA.db.strobeFrequencySecondsInCombat = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetWarningArea( event, value )
-	EMA.db.warningArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetFollowMaster( event, value )
-	EMA.db.followMaster = value
-	EMA:SettingsRefresh()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Key bindings.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:UPDATE_BINDINGS()
-	if InCombatLockdown() then
-		return
-	end
-	ClearOverrideBindings( EMA.keyBindingFrame )
-	local key1, key2 = GetBindingKey( "FOLLOWME" )
-	if key1 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowMe" )
-	end
-	if key2 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowMe" )
-	end
-	local key1, key2 = GetBindingKey( "FOLLOWSTROBEME" )
-	if key1 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowStrobeMe" )
-	end
-	if key2 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowStrobeMe" )
-	end
-	local key1, key2 = GetBindingKey( "FOLLOWSTROBEOFF" )
-	if key1 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowStrobeOff" )
-	end
-	if key2 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowStrobeOff" )
-	end
-		local key1, key2 = GetBindingKey( "FOLLOWTEAIN" )
-	if key1 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, "EMAFollowSecureButtonFollowTrain" )
-	end
-	if key2 then
-		SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, "EMAFollowSecureButtonFollowTrain" )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	EMA.EMAExternalNoWarnNextBreak = false
-	EMA.EMAExternalNoWarnNextSecondBreak = false
-	-- An empty team list.
-	EMA.teamList = {}
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Current follow target.
-	EMA.currentFollowTarget = EMAApi.GetMasterName()
-	EMA:UpdateFollowTargetToFollowMaster()
-	-- Set to true if EMA initiated a follow.
-	EMA.EMASetFollowTarget = false
-	-- Following flag.
-	EMA.isFollowing = false
-	-- Strobing follow.
-	EMA.currentFollowStrobeTarget = EMAApi.GetMasterName()
-	EMA.followingStrobing = false
-	EMA.followStrobeTimer = nil
-	EMA.followingStrobingPaused = false
-	-- Not in combat flag.
-	EMA.outOfCombat = true
-	-- Character on taxi flag.
-	EMA.characterIsOnTaxi = false
--- Key bindings.
-	EMAFollowSecureButtonInvite = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowMe", nil, "SecureActionButtonTemplate" )
-	EMAFollowSecureButtonInvite:SetAttribute( "type", "macro" )
-	EMAFollowSecureButtonInvite:SetAttribute( "macrotext", "/ema-follow me all" )
-	EMAFollowSecureButtonInvite:Hide()
-	EMAFollowSecureButtonInvite = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowStrobeMe", nil, "SecureActionButtonTemplate" )
-	EMAFollowSecureButtonInvite:SetAttribute( "type", "macro" )
-	EMAFollowSecureButtonInvite:SetAttribute( "macrotext", "/ema-follow strobeonme all" )
-	EMAFollowSecureButtonInvite:Hide()
-	EMAFollowSecureButtonInvite = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowStrobeOff", nil, "SecureActionButtonTemplate" )
-	EMAFollowSecureButtonInvite:SetAttribute( "type", "macro" )
-	EMAFollowSecureButtonInvite:SetAttribute( "macrotext", "/ema-follow strobeoff all" )
-	EMAFollowSecureButtonInvite:Hide()
-	EMAFollowSecureButtonInvite = CreateFrame( "CheckButton", "EMAFollowSecureButtonFollowTrain", nil, "SecureActionButtonTemplate" )
-	EMAFollowSecureButtonInvite:SetAttribute( "type", "macro" )
-	EMAFollowSecureButtonInvite:SetAttribute( "macrotext", "/ema-follow train all" )
-	EMAFollowSecureButtonInvite:Hide()
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	-- WoW events.
-	EMA:RegisterEvent( "AUTOFOLLOW_BEGIN" )
-	EMA:RegisterEvent( "AUTOFOLLOW_END" )
-	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
-	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
-	EMA:RegisterEvent( "PLAYER_CONTROL_GAINED" )
-	EMA:RegisterEvent( "UNIT_ENTERING_VEHICLE" )
-	EMA:RegisterEvent( "UNIT_EXITING_VEHICLE" )
-	EMA:RegisterEvent( "UI_ERROR_MESSAGE", "TEST_FOLLOW" )
-	-- Initialise key bindings.
-	EMA.keyBindingFrame = CreateFrame( "Frame", nil, UIParent )
-	EMA:RegisterEvent( "UPDATE_BINDINGS" )
-	EMA:UPDATE_BINDINGS()
-	-- EMA events.
-	if EMAApi.Taxi ~= nil then
-		EMA:RegisterMessage( EMAApi.Taxi.MESSAGE_TAXI_TAKEN, "CharacterOnTaxi" )
-	end
-	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_CHARACTER_ADDED, "OnTeamChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_CHARACTER_REMOVED, "OnTeamChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-end
-
-
-function EMA:TEST_FOLLOW(event, arg1, message, ...  )
-	--EMA:Print("test", message )
-	if message == ERR_INVALID_FOLLOW_TARGET_PVP_COMBAT or message == ERR_INVALID_FOLLOW_PVP_COMBAT then
-		--EMA:Print("test", message )
-
-		EMA:EMASendMessageToTeam( EMA.db.warningArea, "I can't follow You, Am engaged in PVP", false )
-	end
-end
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.warnWhenFollowBreaks = settings.warnWhenFollowBreaks
-		EMA.db.followBrokenMessage = settings.followBrokenMessage
-		EMA.db.autoFollowAfterCombat = settings.autoFollowAfterCombat
-		EMA.db.strobeFrequencySeconds = settings.strobeFrequencySeconds
-		EMA.db.strobeFrequencySecondsInCombat = settings.strobeFrequencySecondsInCombat
-		EMA.db.doNotWarnFollowBreakInCombat = settings.doNotWarnFollowBreakInCombat
-		EMA.db.doNotWarnFollowBreakMembersInCombat = settings.doNotWarnFollowBreakMembersInCombat
-		EMA.db.strobePauseInCombat = settings.strobePauseInCombat
-		EMA.db.strobePauseIfInVehicle = settings.strobePauseIfInVehicle
-		EMA.db.strobePauseIfDrinking = settings.strobePauseIfDrinking
-		EMA.db.strobePauseTag = settings.strobePauseTag
-		EMA.db.doNotWarnFollowStrobing = settings.doNotWarnFollowStrobing
-		EMA.db.warningArea = settings.warningArea
-		EMA.db.followMaster = settings.followMaster
-		EMA.db.useFollowMaster = settings.useFollowMaster
-		EMA.db.overrideStrobeTargetWithMaster = settings.overrideStrobeTargetWithMaster
-		EMA.db.useAfterCombatDelay = settings.useAfterCombatDelay
-		EMA.db.afterCombatDelay = settings.afterCombatDelay
-		EMA.db.onlyWarnIfOutOfFollowRange = settings.onlyWarnIfOutOfFollowRange
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Follow functionality.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:UNIT_ENTERING_VEHICLE()
-	if EMA.db.strobePauseIfInVehicle == true then
-		if EMA.followingStrobing == true then
-			if EMA.followingStrobingPaused == false then
-				EMA:FollowStrobingPause( true )
-			end
-		end
-	end
-end
-
-function EMA:UNIT_EXITING_VEHICLE()
-	if EMA.db.strobePauseIfInVehicle == true then
-		if EMA.followingStrobing == true then
-			if EMA.followingStrobingPaused == true then
-				EMA:FollowStrobingPause( false )
-			end
-		end
-	end
-end
-
-function EMA:AreTeamMembersInCombat()
-	local inCombat = false
-	for index, characterName in EMAApi.TeamListOrdered() do
-		-- Is the team member online?
-		if EMAApi.GetCharacterOnlineStatus( characterName ) == true then
-			-- Yes, is the character in combat?
-			if UnitAffectingCombat( Ambiguate( characterName, "none" ) ) then
-			inCombat = true
-				break
-			end
-		end
-	end
-	return inCombat
-end
-
-function EMA:IsFollowingStrobing()
-	return EMA.followingStrobing
-end
-
-function EMA:IsFollowingStrobingPaused()
-	return EMA.followingStrobingPaused
-end
-
-
-function EMA:CharacterOnTaxi()
-	EMA:SetNoFollowBrokenWarningNextBreak()
-	if EMA:IsFollowingStrobing() == true then
-		if EMA:IsFollowingStrobingPaused() == false then
-			EMA:FollowStrobingPause( true )
-			EMA.characterIsOnTaxi = true
-		end
-	end
-end
-
-
-function EMA:PLAYER_CONTROL_GAINED()
-	if EMA.characterIsOnTaxi == true then
-		EMA.characterIsOnTaxi = false
-		if EMA:IsFollowingStrobing() == true then
-			if EMA:IsFollowingStrobingPaused() == true then
-				EMA:FollowStrobingPause( false )
-			end
-		end
-	end
-end
-
-
-function EMA:SuppressNextFollowWarningCommand( info, parameters )
-	EMA:SuppressNextFollowWarning()
-end
-
-function EMA:SuppressNextFollowWarning()
-	-- Events are fired as follows for a /follow command.
-	if EMA.isFollowing == true then
-		EMA:SetNoFollowBrokenWarningNextBreak()
-		EMA:SetNoFollowBrokenWarningNextSecondBreak()
-	else
-		EMA:SetNoFollowBrokenWarningNextBreak()
-	end
-end
-
-function EMA:SetNoFollowBrokenWarningNextBreak()
-	EMA.EMAExternalNoWarnNextBreak = true
-end
-
-function EMA:SetNoFollowBrokenWarningNextSecondBreak()
-	EMA.EMAExternalNoWarnNextSecondBreak = true
-end
-
-
-function EMA:AUTOFOLLOW_BEGIN( event, target, ... )
-	EMA.currentFollowTarget = target
-	EMA.isFollowing = true
-end
-
-function EMA:AUTOFOLLOW_END( event, ... )
-	EMA.isFollowing = false
-	EMA:ScheduleTimer( "AutoFollowEndUpdate", 0.5 )
-end
-
--- checks the follow system Msg, is there under 1 always 1 unless it fadeing.
-function EMA:AutoFollowEndUpdate()
-	local alpha = AutoFollowStatus:GetAlpha()
-	--EMA:Print("updatetest", test)
-	if alpha < 1 then
-		--EMA:Print("canSend")
-		EMA:AutoFollowEndSend()
-	end
-end
-
-function EMA:AutoFollowEndSend()
-	-- If warn if auto follow breaks is on...
-	local canWarn = false
-	if EMA.db.warnWhenFollowBreaks == true then
-		if EMA.EMASetFollowTarget == false then
-			canWarn = true
-		end
-	end
-	-- Do not warn if on Taxi
-	if UnitOnTaxi("player") == true then
-		--EMA:Print("taxi")
-		canWarn = false
-	end
-	--Do not warn if in combat?
-	if EMA.db.doNotWarnFollowBreakInCombat == true and EMA.outOfCombat == false then
-		--EMA:Print("Do Not warn in comabt")
-		canWarn = false
-	end
-	--Do not warn if a passenger in a vehicle.
-	if UnitInVehicle("Player") == true and UnitControllingVehicle("player") == false then
-		--EMA:Print("UnitInVehicle")
-		canWarn = false
-	end
-	-- Do not warn if any other members in combat?
-	if EMA.db.doNotWarnFollowBreakMembersInCombat == true and EMA:AreTeamMembersInCombat() == true or UnitAffectingCombat("player") == true then
-		--EMA:Print("doNotWarnFollowBreakMembersInCombat")
-		canWarn = false
-	end
-	-- Don't warn about follow breaking if follow strobing is on or paused.
-	if EMA.db.doNotWarnFollowStrobing == true then
-		if EMA.followingStrobing == true or EMA.followStrobingPaused == true then
-			--EMA:Print("FollowStrobing")
-			canWarn = false
-		end
-	end
-	-- Check to see if range warning is in effect. This olny works in a party it seems!!
-	if EMA.db.onlyWarnIfOutOfFollowRange == true then
-		if CheckInteractDistance( EMA.currentFollowTarget, 4 ) then
-			--EMA:Print("CheckInteractDistance")
-			canWarn = false
-		end
-	end
-	-- If allowed to warn, then warn.
-	if canWarn == true then
-		EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.followBrokenMessage, false )
-	end
-	EMA.EMASetFollowTarget = false
-end
-
-function EMA:PLAYER_REGEN_ENABLED()
-	EMA.outOfCombat = true
-	-- Is auto follow after combat on?
-	if EMA.db.autoFollowAfterCombat == true then
-		if EMA.db.useAfterCombatDelay == false then
-			EMA:FollowTarget( EMA.currentFollowTarget )
-		else
-			EMA:ScheduleTimer( "FollowTarget", tonumber( EMA.db.afterCombatDelay ), EMA.currentFollowTarget )
-		end
-	end
-	-- Is follow strobing on?
-	if EMA:IsFollowingStrobing() == true then
-		-- Pause follow strobing while in combat?
-		if EMA.db.strobePauseInCombat == true then
-			-- Un-pause follow strobing.
-			EMA:FollowStrobingPause( false )
-		else
-			-- Not pausing, so check strobe rate.
-			if EMA.db.strobeFrequencySeconds ~= EMA.db.strobeFrequencySecondsInCombat then
-				EMA:FollowStrobeOn( EMA.currentFollowStrobeTarget )
-			end
-		end
-	end
-end
-
-function EMA:PLAYER_REGEN_DISABLED()
-	EMA.outOfCombat = false
-	-- Is follow strobing on?
-	if EMA:IsFollowingStrobing() == true then
-		-- Pause follow strobing while in combat?
-		if EMA.db.strobePauseInCombat == true then
-			-- Pause follow strobing.
-			EMA:FollowStrobingPause( true )
-		else
-			-- Not pausing, so check strobe rate.
-			if EMA.db.strobeFrequencySeconds ~= EMA.db.strobeFrequencySecondsInCombat then
-				EMA:FollowStrobeOn( EMA.currentFollowStrobeTarget )
-			end
-		end
-	end
-end
-
-function EMA:AutoFollowAfterCombatCommand( info, parameters )
-	-- Get the on/off state and the tag of who to send to.
-	local state, tag = strsplit( " ", parameters )
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:AutoFollowAfterCombatSendCommand( state, tag )
-	else
-		EMA:DoToggleAutoFollowAfterCombat( state )
-	end
-end
-
-function EMA:AutoFollowAfterCombatSendCommand( state, tag )
-	EMA:EMASendCommandToTeam( EMA.COMMAND_AUTO_FOLLOW_AFTER_COMBAT, state, tag )
-end
-
-function EMA:AutoFollowAfterCombatReceiveCommand( state, tag )
-	-- If this character responds to this tag...
-	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
-		EMA:DoToggleAutoFollowAfterCombat( state )
-	end
-end
-
-function EMA:DoToggleAutoFollowAfterCombat( state )
-	-- Translate the on/off state from string to boolean/nil.
-	local setToOn = EMAUtilities:GetOnOrOffFromCommand( state, L["ON"], L["OFF"] )
-	-- If nil, then assume false.
-	if setToOn == nil then
-		setToOn = false
-	end
-	-- Then set the flag appropriately.
-	EMA:SettingsToggleAutoFollowAfterCombat( nil, setToOn )
-	-- Refresh the settings.
-	EMA:SettingsRefresh()
-end
-
-function EMA:GetCurrentFollowTarget()
-	return EMA.currentFollowTarget
-end
-
-function EMA:GetCurrentFollowStrobeTarget()
-	return EMA.currentFollowStrobeTarget
-end
-
-function EMA:UpdateFollowTargetToFollowMaster()
-	if EMA.db.useFollowMaster == true then
-		EMA.currentFollowTarget = EMAApi.GetMasterName()
-		if EMA.db.followMaster ~= "" then
-			if EMAApi.GetCharacterOnlineStatus( EMA.db.followMaster ) == true then
-				EMA.currentFollowTarget = EMA.db.followMaster
-			end
-		end
-	end
-end
-
-function EMA:OnMasterChanged()
-	if EMA.db.autoFollowAfterCombat == true then
-		EMA.currentFollowTarget = EMAApi.GetMasterName()
-		EMA:UpdateFollowTargetToFollowMaster()
-	end
-	if EMA.followingStrobing == true then
-		if EMA.db.overrideStrobeTargetWithMaster == true then
-			EMA.currentFollowStrobeTarget = EMAApi.GetMasterName()
-			EMA:FollowStrobeOn( EMA.currentFollowStrobeTarget )
-		end
-	end
-end
-
-function EMA:OnTeamChanged()
-	BuildAndSetTeamList()
-end
-
-function EMA:CommandFollowTrain( info, parameters )
-	local tag = parameters
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_TRAIN, tag )
-	end
-end
-
-function EMA:ReceiveCommandFollowTrain( tag )
-	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
-		local characterInFront = nil
-		for index, character in EMAApi.TeamListOrderedOnline() do
-			if character == EMA.characterName then
-				if characterInFront ~= nil then
-					FollowUnit( Ambiguate( characterInFront, "none" ), true )
-				end
-				return
-			else
-				if EMAApi.DoesCharacterHaveTag( character, tag ) then
-					characterInFront = character
-				end
-			end
-		end
-	end
-end
-
-function EMA:CommandFollowMe( info, parameters )
-	local tag = parameters
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_ME, tag )
-	end
-end
-
-function EMA:ReceiveCommandFollowMe( characterName, tag )
-	--EMA:Print("testfollowme", characterName, tag )
-	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
-		FollowUnit( Ambiguate( characterName, "none" ), true )
-	end
-end
-
-
-function EMA:CommandSetFollowMaster( info, parameters )
-	local target, tag = strsplit( " ", parameters )
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:EMASendCommandToTeam( EMA.COMMAND_SET_FOLLOW_MASTER, target, tag )
-	else
-		EMA.db.followMaster = target
-		EMA:UpdateFollowTargetToFollowMaster()
-	end
-end
-
-function EMA:ReceiveCommandSetFollowMaster( target, tag )
-	if EMAPrivate.Tag.DoesCharacterHaveTag( EMA.characterName, tag ) then
-		EMA.db.followMaster = target
-		EMA:UpdateFollowTargetToFollowMaster()
-	end
-end
-
-function EMA:FollowMasterCommand( info, parameters )
-	-- The only parameter for this command is tag.  If there is a tag, send the command to all
-	-- the members, otherwise just this character.
-	local tag = parameters
-	-- Set the current follow target to the master.
-	EMA.currentFollowTarget = EMAApi.GetMasterName()
-	EMA:UpdateFollowTargetToFollowMaster()
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:FollowTargetSendCommand( EMA.currentFollowTarget, tag )
-	else
-		EMA:SuppressNextFollowWarning()
-		EMA:FollowTarget( EMA.currentFollowTarget )
-	end
-end
-
-function EMA:FollowTargetCommand( info, parameters )
-	local target, tag = strsplit( " ", parameters )
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:FollowTargetSendCommand( target, tag )
-	else
-		EMA.currentFollowTarget = target
-		EMA:SuppressNextFollowWarning()
-		EMA:FollowTarget( EMA.currentFollowTarget )
-	end
-end
-
-function EMA:FollowTargetSendCommand( target, tag )
-	EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_TARGET, target, tag )
-end
-
-function EMA:FollowTargetReceiveCommand( target, tag )
-	-- If this character responds to this tag...
-	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
-		-- Then follow the target specified.
-		EMA.currentFollowTarget = target
-		EMA:SuppressNextFollowWarning()
-		EMA:FollowTarget( EMA.currentFollowTarget )
-	end
-end
-
-function EMA:FollowStrobeOnMeCommand( info, parameters )
-	local tag = parameters
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:FollowStrobeOnSendCommand( EMA.characterName, tag )
-	else
-		EMA:FollowStrobeOn( EMA.characterName )
-	end
-end
-
-function EMA:FollowStrobeOnLastCommand( info, parameters )
-	local tag = parameters
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:FollowStrobeOnSendCommand( EMA.currentFollowStrobeTarget, tag )
-	else
-		EMA:FollowStrobeOn( EMA.currentFollowStrobeTarget )
-	end
-end
-
-function EMA:FollowStrobeOnCommand( info, parameters )
-	local target, tag = strsplit( " ", parameters )
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:FollowStrobeOnSendCommand( target, tag )
-	else
-		EMA:FollowStrobeOn( target )
-	end
-end
-
-function EMA:FollowStrobeOnSendCommand( target, tag )
-	EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_STROBE_ON, target, tag )
-end
-
-function EMA:FollowStrobeOnReceiveCommand( target, tag )
-	-- If this character responds to this tag...
-	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
-		-- Then follow the target specified - strobing.
-		EMA:FollowStrobeOn( target )
-	end
-end
-
-function EMA:FollowStrobeOffCommand( info, parameters )
-	local tag = parameters
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:FollowStrobeOffSendCommand( tag )
-	else
-		EMA:FollowStrobeOff()
-	end
-end
-
-function EMA:FollowStrobeOffSendCommand( tag )
-	EMA:EMASendCommandToTeam( EMA.COMMAND_FOLLOW_STROBE_OFF, tag )
-end
-
-function EMA:FollowStrobeOffReceiveCommand( tag )
-	-- If this character responds to this tag...
-	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) then
-		-- Then follow the target specified - turn off strobing.
-		EMA:FollowStrobeOff()
-		FollowUnit( "Player", true )
-	end
-end
-
-function EMA:FollowTarget( target )
-	-- Attempting to follow self?  Note: if target ever is party1, etc, then this will not catch the same character.
-	if target == EMA.characterName then
-		return
-	end
-	local canFollowTarget = true
-	-- If follow strobing and pause strobing if drinking then...
-	if EMA.followingStrobing == true and EMA.db.strobePauseIfDrinking == true then
-		-- And the character has the pause tag...
-		if EMAApi.DoesCharacterHaveTag( EMA.characterName, EMA.db.strobePauseTag ) == true then
-			-- Check player for drinking buff.
-			if EMAUtilities:DoesThisCharacterHaveBuff( L["DRINK"] ) == true then
-				-- Have drinking buff, do not allow follow.
-				canFollowTarget = false
-			end
-			if EMAUtilities:DoesThisCharacterHaveBuff( L["FOOD"] ) == true then
-				-- Have eating buff, do not allow follow.
-				canFollowTarget = false
-			end
-			if EMAUtilities:DoesThisCharacterHaveBuff( L["REFRESHMENT"] ) == true then
-				-- Eating Mage food Yum Yum Yum.
-				canFollowTarget = false
-			end
-		end
-	end
-	-- If follow strobing and strobing paused.
-	if EMA.followingStrobing == true and EMA.followingStrobingPaused == true then
-		-- Follow strobing is paused, do not follow target.
-		canFollowTarget = false
-	end
-	-- If allowed to follow the target, then...
-	if canFollowTarget == true then
-		-- Set the EMA set this flag toggle, so not to complain about follow broken after combat.
-		--if (EMA.db.autoFollowAfterCombat == true) or (EMA.followingStrobing == true) then
-		if 	EMA.followingStrobing == true then
-			EMA.EMASetFollowTarget = true
-		end
-		--EMA:Print( target )
-		-- Follow unit only works when in a party or raid for resolving against player names.
-		FollowUnit( Ambiguate( target, "none" ), true )
-	end
-end
-
-function EMA:FollowStrobeOn( target )
-	EMA.currentFollowStrobeTarget = target
-	-- Do the initial follow.
-    EMA:FollowTarget( EMA.currentFollowStrobeTarget )
-	-- If the timer is running, then
-	if EMA.followingStrobing == true then
-		EMA:FollowStrobeOff()
-	end
-	-- Set up a timer to do another follow command.
-	EMA.followingStrobing = true
-	local seconds = EMA.db.strobeFrequencySeconds
-	if InCombatLockdown() then
-		seconds = EMA.db.strobeFrequencySecondsInCombat
-	end
-	EMA.followStrobeTimer = EMA:ScheduleRepeatingTimer( "FollowTarget", tonumber( seconds ), EMA.currentFollowStrobeTarget )
-end
-
-function EMA:FollowStrobeOff()
-	-- Stop the timer from doing another follow command.
-	if EMA.followingStrobing == true then
-		EMA.followingStrobing = false
-		EMA:CancelTimer( EMA.followStrobeTimer )
-	end
-end
-
-function EMA:FollowStrobingPause( pause )
-	if pause == true then
-		-- Is follow strobing on?
-		if EMA.followingStrobing == true then
-			-- Yes, turn it off, if this character has a tag that matches the pause follow strobe tag.
-			if EMAApi.DoesCharacterHaveTag( EMA.characterName, EMA.db.strobePauseTag ) == true then
-				EMA.followingStrobingPaused = true
-			end
-		end
-	else
-		-- Is follow strobing paused?
-		if EMA.followingStrobingPaused == true then
-			-- Yes, turn it on, if this character has a tag that matches the pause follow strobe tag.
-			if EMAApi.DoesCharacterHaveTag( EMA.characterName, EMA.db.strobePauseTag ) == true then
-				EMA.followingStrobingPaused = false
-			end
-		end
-	end
-end
-
--- A EMA command has been recieved.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if commandName == EMA.COMMAND_FOLLOW_TARGET then
-		EMA:FollowTargetReceiveCommand( ... )
-	end
-	if commandName == EMA.COMMAND_AUTO_FOLLOW_AFTER_COMBAT then
-		EMA:AutoFollowAfterCombatReceiveCommand( ... )
-	end
-	if commandName == EMA.COMMAND_FOLLOW_STROBE_ON then
-		EMA:FollowStrobeOnReceiveCommand( ... )
-	end
-	if commandName == EMA.COMMAND_FOLLOW_STROBE_OFF then
-		EMA:FollowStrobeOffReceiveCommand( ... )
-	end
-	if commandName == EMA.COMMAND_SET_FOLLOW_MASTER then
-		EMA:ReceiveCommandSetFollowMaster( ... )
-	end
-	if commandName == EMA.COMMAND_FOLLOW_TRAIN then
-		EMA:ReceiveCommandFollowTrain( ... )
-	end
-	if commandName == EMA.COMMAND_FOLLOW_ME then
-		EMA:ReceiveCommandFollowMe( characterName, ... )
-	end
-end
-
-EMAApi.Follow = {}
-EMAApi.Follow.IsFollowingStrobing = EMA.IsFollowingStrobing
-EMAApi.Follow.IsFollowingStrobingPaused = EMA.IsFollowingStrobingPaused
-EMAApi.Follow.GetCurrentFollowTarget = EMA.GetCurrentFollowTarget
-EMAApi.Follow.GetCurrentFollowStrobeTarget = EMA.GetCurrentFollowStrobeTarget
-EMAApi.Follow.SuppressNextFollowWarning = EMA.SuppressNextFollowWarning
diff --git a/Modules/Guild.lua b/Modules/Guild.lua
deleted file mode 100644
index 81786bc..0000000
--- a/Modules/Guild.lua
+++ /dev/null
@@ -1,708 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "EMA" that is 								--
---				Released under the MIT License 										--
---				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Guild",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Get the EMA Utilities Library.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
-local AceGUI = LibStub( "AceGUI-3.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "Guild"
-EMA.settingsDatabaseName = "GuildProfileDB"
-EMA.chatCommand = "ema-guild"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["INTERACTION"]
-EMA.moduleDisplayName = L["GUILD"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\GuildIcon.tga"
--- order
-EMA.moduleOrder = 20
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		messageArea = EMAApi.DefaultMessageArea(),
-		showEMAGuildWindow = false,
-		GuildBoEItems = false,
-		GuildCRItems = false,
-		autoGuildItemsList = {},
-		adjustMoneyWithGuildBank = false,
-		goldAmountToKeepOnToon = 250,
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_ALL_SETTINGS"],
-				usage = "/EMA-Guild push",
-				get = false,
-				set = "EMASendSettings",
-				guiHidden = true,
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
-
--------------------------------------------------------------------------------------------------------------
--- Popup Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function InitializePopupDialogs()
-	StaticPopupDialogs["EMAGuild_CONFIRM_REMOVE_Guild_ITEMS"] = {
-        text = L["REMOVE_GUILD_LIST"],
-        button1 = YES,
-        button2 = NO,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function()
-			EMA:RemoveItem()
-		end,
-    }
-end
-
--------------------------------------------------------------------------------------------------------------
--- GBank Tab Dropdown Stuff
--------------------------------------------------------------------------------------------------------------
-
-EMA.simpleAreaList = {}
-EMA.simpleGrpAreaList = {}
-
-function EMA:TabAreaList()
-	return pairs( EMA.simpleAreaList )
-end
-
-function EMA:RefreshTabDropDownList()
-	EMAUtilities:ClearTable( EMA.simpleAreaList )
-	for index = 1, GetNumGuildBankTabs() do
-		EMA.simpleAreaList[index] = L["GUILDTAB"]..L[" "]..index
-	end
-	table.sort( EMA.simpleAreaList )
-	EMA.settingsControl.tabNumListDropDownList:SetList( EMA.simpleAreaList )
-end
-
-------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-	EMA.autoGuildItemLink = nil
-	EMA.autoGuildBankTab = 1
-	EMA.GroupName = EMAApi.AllTag()
-	EMA.putItemsInGB = {}
-	-- Create the settings control.
-	EMA:SettingsCreate()
-	-- Initialse the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	EMA:RegisterEvent( "GUILDBANKFRAME_OPENED" ) -- Temp!
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
-	-- Update DropDownList
-	EMA:ScheduleTimer("RefreshTabDropDownList", 1 )
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-	-- AceHook-3.0 will tidy up the hooks for us.
-end
-
-function EMA:SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfInfo = EMA:SettingsCreateGuild( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsCreateGuild( top )
-	local buttonControlWidth = 85
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local GuildWidth = headingWidth
-	local movingTop = top
-	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["GUILD_LIST_HEADER"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxShowEMAGuildWindow = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["GUILD_LIST"],
-		EMA.SettingsToggleShowEMAGuildWindow,
-		L["GUILD_LIST_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.GuildItemsHighlightRow = 1
-	EMA.settingsControl.GuildItemsOffset = 1
-	local list = {}
-	list.listFrameName = "EMAGuildIteamsSettingsFrame"
-	list.parentFrame = EMA.settingsControl.widgetSettings.content
-	list.listTop = movingTop
-	list.listLeft = left
-	list.listWidth = GuildWidth
-	list.rowHeight = 15
-	list.rowsToDisplay = 10
-	list.columnsToDisplay = 3
-	list.columnInformation = {}
-	list.columnInformation[1] = {}
-	list.columnInformation[1].width = 40
-	list.columnInformation[1].alignment = "LEFT"
-	list.columnInformation[2] = {}
-	list.columnInformation[2].width = 30
-	list.columnInformation[2].alignment = "LEFT"
-	list.columnInformation[3] = {}
-	list.columnInformation[3].width = 30
-	list.columnInformation[3].alignment = "LEFT"
-	list.scrollRefreshCallback = EMA.SettingsScrollRefresh
-	list.rowClickCallback = EMA.SettingsGuildItemsRowClick
-	EMA.settingsControl.GuildItems = list
-	EMAHelperSettings:CreateScrollList( EMA.settingsControl.GuildItems )
-	movingTop = movingTop - list.listHeight - verticalSpacing
-	EMA.settingsControl.GuildItemsButtonRemove = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		buttonControlWidth,
-		left,
-		movingTop,
-		L["REMOVE"],
-		EMA.SettingsGuildItemsRemoveClick
-	)
-	movingTop = movingTop -	buttonHeight - verticalSpacing
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ADD_ITEMS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.GuildItemsEditBoxGuildItem = EMAHelperSettings:CreateEditBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ITEM_DROP"]
-	)
-	EMA.settingsControl.GuildItemsEditBoxGuildItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedGuildItem )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.tabNumListDropDownList = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		dropBoxWidth,
-		left,
-		movingTop,
-		L["GB_TAB_LIST"]
-	)
-	EMA.settingsControl.tabNumListDropDownList:SetList( EMA.TabAreaList() )
-	EMA.settingsControl.tabNumListDropDownList:SetCallback( "OnValueChanged",  EMA.GBTabDropDownList )
-	--Group
-	EMA.settingsControl.GuildItemsEditBoxGuildTag = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		dropBoxWidth,
-		left + dropBoxWidth + horizontalSpacing,
-		movingTop,
-		L["GROUP_LIST"]
-	)
-	EMA.settingsControl.GuildItemsEditBoxGuildTag:SetList( EMAApi.GroupList() )
-	EMA.settingsControl.GuildItemsEditBoxGuildTag:SetCallback( "OnValueChanged",  EMA.GroupListDropDownList )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.GuildItemsButtonAdd = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		buttonControlWidth,
-		left,
-		movingTop,
-		L["ADD"],
-		EMA.SettingsGuildItemsAddClick
-	)
-	movingTop = movingTop -	buttonHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["GB_OPTIONS"], movingTop, false )
-	movingTop = movingTop - headingHeight
---[[
-	EMA.settingsControl.checkBoxGuildBoEItems = EMAHelperSettings:CreateCheckBox(
-	EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["GUILD_BOE_ITEMS"],
-		EMA.SettingsToggleGuildBoEItems,
-		L["GUILD_BOE_ITEMS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxGuildCRItems = EMAHelperSettings:CreateCheckBox(
-	EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["GUILD_REAGENTS"],
-		EMA.SettingsToggleGuildCRItems,
-		L["GUILD_REAGENTS_HELP"]
-	)
-
-	movingTop = movingTop - checkBoxHeight
-]]
-	EMA.settingsControl.checkBoxAdjustMoneyOnToonViaGuildBank = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["GB_GOLD"],
-		EMA.SettingsToggleAdjustMoneyOnToonViaGuildBank,
-		L["GB_GOLD_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.editBoxGoldAmountToLeaveOnToon = EMAHelperSettings:CreateEditBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["GOLD_TO_KEEP"]
-	)
-	EMA.settingsControl.editBoxGoldAmountToLeaveOnToon:SetCallback( "OnEnterPressed", EMA.EditBoxChangedGoldAmountToLeaveOnToon )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	return movingTop
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- Settings Callbacks.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsScrollRefresh()
-	FauxScrollFrame_Update(
-		EMA.settingsControl.GuildItems.listScrollFrame,
-		EMA:GetGuildItemsMaxPosition(),
-		EMA.settingsControl.GuildItems.rowsToDisplay,
-		EMA.settingsControl.GuildItems.rowHeight
-	)
-	EMA.settingsControl.GuildItemsOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.GuildItems.listScrollFrame )
-	for iterateDisplayRows = 1, EMA.settingsControl.GuildItems.rowsToDisplay do
-		-- Reset.
-		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
-		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[3].textString:SetText( "" )
-		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.GuildItems.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
-		-- Get data.
-		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.GuildItemsOffset
-		if dataRowNumber <= EMA:GetGuildItemsMaxPosition() then
-			-- Put data information into columns.
-			local GuildItemsInformation = EMA:GetGuildItemsAtPosition( dataRowNumber )
-			EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[1].textString:SetText( GuildItemsInformation.name )
-			EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[2].textString:SetText( GuildItemsInformation.GBTab )
-			EMA.settingsControl.GuildItems.rows[iterateDisplayRows].columns[3].textString:SetText( GuildItemsInformation.tag )
-			-- Highlight the selected row.
-			if dataRowNumber == EMA.settingsControl.GuildItemsHighlightRow then
-				EMA.settingsControl.GuildItems.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
-			end
-		end
-	end
-end
-
-function EMA:SettingsGuildItemsRowClick( rowNumber, columnNumber )
-	if EMA.settingsControl.GuildItemsOffset + rowNumber <= EMA:GetGuildItemsMaxPosition() then
-		EMA.settingsControl.GuildItemsHighlightRow = EMA.settingsControl.GuildItemsOffset + rowNumber
-		EMA:SettingsScrollRefresh()
-	end
-end
-
-function EMA:SettingsGuildItemsRemoveClick( event )
-	StaticPopup_Show( "EMAGuild_CONFIRM_REMOVE_Guild_ITEMS" )
-end
-
-function EMA:SettingsEditBoxChangedGuildItem( event, text )
-	EMA.autoGuildItemLink = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:GBTabDropDownList (event, value )
-	-- if nil or the blank group then don't get Name.
-	if value == " " or value == nil then
-		return
-	end
-	EMA.autoGuildBankTab = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:GroupListDropDownList (event, value )
-	-- if nil or the blank group then don't get Name.
-	if value == " " or value == nil then
-		return
-	end
-	for index, groupName in ipairs( EMAApi.GroupList() ) do
-		if index == value then
-			EMA.GroupName = groupName
-			break
-		end
-	end
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsGuildItemsAddClick( event )
-	if EMA.autoGuildItemLink ~= nil and EMA.autoGuildBankTab ~= nil and EMA.GroupName ~= nil then
-		EMA:AddItem( EMA.autoGuildItemLink, EMA.autoGuildBankTab, EMA.GroupName )
-		EMA.autoGuildItemLink = nil
-		EMA:SettingsRefresh()
-	end
-end
-
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-end
-
-function EMA:OnGroupAreasChanged( message )
-	EMA.settingsControl.GuildItemsEditBoxGuildTag:SetList( EMAApi.GroupList() )
-end
-
-function EMA:SettingsSetMessageArea( event, value )
-	EMA.db.messageArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowEMAGuildWindow( event, checked )
-	EMA.db.showEMAGuildWindow = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleGuildBoEItems(event, checked )
-	EMA.db.GuildBoEItems = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleGuildCRItems(event, checked )
-	EMA.db.GuildCRItems = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAdjustMoneyOnToonViaGuildBank( event, checked )
-	EMA.db.adjustMoneyWithGuildBank = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAdjustMoneyWithMasterOnGuild( event, checked )
-	EMA.db.adjustMoneyWithMasterOnGuild = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedGoldAmountToLeaveOnToon( event, text )
-	EMA.db.goldAmountToKeepOnToon = tonumber( text )
-	if EMA.db.goldAmountToKeepOnToon == nil then
-		EMA.db.goldAmountToKeepOnToon = 0
-	end
-	EMA:SettingsRefresh()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.messageArea = settings.messageArea
-		EMA.db.showEMAGuildWindow = settings.showEMAGuildWindow
-		EMA.db.GuildBoEItems = settings.GuildBoEItems
-		EMA.db.GuildCRItems = settings.GuildCRItems
-		EMA.db.autoGuildItemsList = EMAUtilities:CopyTable( settings.autoGuildItemsList )
-		EMA.db.adjustMoneyWithGuildBank = settings.adjustMoneyWithGuildBank
-		EMA.db.goldAmountToKeepOnToon = settings.goldAmountToKeepOnToon
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	EMA.settingsControl.checkBoxShowEMAGuildWindow:SetValue( EMA.db.showEMAGuildWindow )
---	EMA.settingsControl.checkBoxGuildBoEItems:SetValue( EMA.db.GuildBoEItems )
---	EMA.settingsControl.checkBoxGuildCRItems:SetValue( EMA.db.GuildCRItems )
-	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
-	EMA.settingsControl.checkBoxAdjustMoneyOnToonViaGuildBank:SetValue( EMA.db.adjustMoneyWithGuildBank )
-	EMA.settingsControl.editBoxGoldAmountToLeaveOnToon:SetText( tostring( EMA.db.goldAmountToKeepOnToon ) )
-	EMA.settingsControl.editBoxGoldAmountToLeaveOnToon:SetDisabled( not EMA.db.adjustMoneyWithGuildBank )
-	EMA.settingsControl.GuildItemsEditBoxGuildItem:SetDisabled( not EMA.db.showEMAGuildWindow )
-	EMA.settingsControl.GuildItemsEditBoxGuildTag:SetDisabled( not EMA.db.showEMAGuildWindow )
-	EMA.settingsControl.tabNumListDropDownList:SetDisabled( not EMA.db.showEMAGuildWindow )
-	EMA.settingsControl.GuildItemsButtonRemove:SetDisabled( not EMA.db.showEMAGuildWindow )
-	EMA.settingsControl.GuildItemsButtonAdd:SetDisabled( not EMA.db.showEMAGuildWindow )
-	EMA:SettingsScrollRefresh()
-
-end
-
---Comms not sure if we going to use comms here.
--- A EMA command has been received.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if characterName == self.characterName then
-		return
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Guild functionality.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:GetGuildItemsMaxPosition()
-	return #EMA.db.autoGuildItemsList
-end
-
-function EMA:GetGuildItemsAtPosition( position )
-	return EMA.db.autoGuildItemsList[position]
-end
-
-function EMA:AddItem( itemLink, GBTab, itemTag )
-	--EMA:Print("testDBAdd", itemLink, GBTab, itemTag )
-	-- Get some more information about the item.
-	local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo( itemLink )
-	-- If the item could be found.
-	if name ~= nil then
-		local itemInformation = {}
-		itemInformation.link = link
-		itemInformation.name = name
-		itemInformation.GBTab = GBTab
-		itemInformation.tag = itemTag
-			table.insert( EMA.db.autoGuildItemsList, itemInformation )
-			EMA:SettingsRefresh()
-			EMA:SettingsGuildItemsRowClick( 1, 1 )
-	end
-end
-
-function EMA:RemoveItem()
-	table.remove( EMA.db.autoGuildItemsList, EMA.settingsControl.GuildItemsHighlightRow )
-	EMA:SettingsRefresh()
-	EMA:SettingsGuildItemsRowClick( 1, 1 )
-end
-
-
-function EMA:GUILDBANKFRAME_OPENED()
-	if 	EMA.db.showEMAGuildWindow == true then
-		EMA:AddToGuildBankFromList()
-	end
-	if EMA.db.adjustMoneyWithGuildBank == true then
-		AddGoldToGuildBank()
-	end
-end
-
-function EMA:AddToGuildBankFromList()
-	local delay = 1.5
-	for position, itemInformation in pairs( EMA.db.autoGuildItemsList ) do
-		if EMAApi.IsCharacterInGroup(EMA.characterName, itemInformation.tag ) == true then
-			--EMA:Print("AddToGB", position, itemInformation.name, itemInformation.GBTab )
-			name, icon, isViewable, canDeposit, numWithdrawals, remainingWithdrawals = GetGuildBankTabInfo(itemInformation.GBTab)
-			if canDeposit == true then
-				for bag,slot,link in LibBagUtils:Iterate("BAGS", itemInformation.link ) do
-					if bag ~= nil then
-						delay = delay + 1.5
-						EMA:ScheduleTimer("PlaceItemInGuildBank", delay, bag, slot, itemInformation.GBTab )
-					end
-				end
-			end
-		end
-	end
-end
-
-function EMA:SelectBankTab( tab )
-	if GetCurrentGuildBankTab() == tab then
-	else
-		GuildBankTab_OnClick(_G["GuildBankTab" .. tab], "LeftButton", tab )
-	end
-end
-
-function EMA:PlaceItemInGuildBank(bag, slot, tab)
-	if GuildBankFrame:IsVisible() == true then
-		EMA:SelectBankTab( tab )
-		if GetCurrentGuildBankTab() == tab then
-			PickupContainerItem( bag,slot )
-			UseContainerItem( bag,slot )
-		end
-	end
-end
-
----------
-function EMA:GuildBoEItems()
-	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-		return
-	end
-	for index, character in EMAApi.TeamListOrderedOnline() do
-		--EMA:Print("Team", character )
-		local teamCharacterName = ( Ambiguate( character, "short" ) )
-		local GuildPlayersName = GetUnitName("NPC")
-		if GuildPlayersName == teamCharacterName then
-			if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
-				for bag,slot,link in LibBagUtils:Iterate("BAGS") do
-					if bag ~= nil then
-						local _, _, locked, quality = GetContainerItemInfo(bag, slot)
-						-- quality is Uncommon (green) to  Epic (purple) 2 - 3 - 4
-						if quality ~= nil and locked == false then
-							if quality >= 2 and quality <= 4 then
-								-- tooltips scan is the olny way to find if the item is BoE in bags!
-								local isBoe = EMAUtilities:ToolTipBagScaner(link, bag, slot)
-								-- if the item is boe then add it to the Guild list!
-								if isBoe ~= ITEM_SOULBOUND then
-									--EMA:Print("test21", link, locked)
-									for iterateGuildSlots = 1, (MAX_Guild_ITEMS - 1) do
-										if GetGuildPlayerItemLink( iterateGuildSlots ) == nil then
-											PickupContainerItem( bag, slot )
-											ClickGuildButton( iterateGuildSlots )
-										end
-									end
-								end
-							end
-						end
-					end
-				end
-			end
-		end
-	end
-end
-
-function EMA:GuildCRItems()
-	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-		return
-	end
-	for index, character in EMAApi.TeamListOrderedOnline() do
-		--EMA:Print("Team", character )
-		local teamCharacterName = ( Ambiguate( character, "short" ) )
-		local GuildPlayersName = GetUnitName("NPC")
-		if GuildPlayersName == teamCharacterName then
-			if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
-				for bag,slot,itemLink in LibBagUtils:Iterate("BAGS") do
-					if itemLink then
-						-- using legion CraftingReagent API, as tooltip massess up some "items"
-						local _,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,isCraftingReagent = GetItemInfo(itemLink)
-						if isCraftingReagent == true then
-							--EMA:Print("GuildCraftingGoods", isCraftingReagent, itemLink)
-							-- tooltips scan is the olny way to find if the item is BOP in bags!
-							local isBop = EMAUtilities:TooltipScaner(itemLink)
-							--EMA:Print("testBOP", itemLink, isBop)
-							if isBop ~= ITEM_BIND_ON_PICKUP then
-							--EMA:Print("AddToGuild", itemLink)
-								for iterateGuildSlots = 1, (MAX_Guild_ITEMS - 1) do
-									if GetGuildPlayerItemLink( iterateGuildSlots ) == nil then
-										PickupContainerItem( bag, slot )
-										ClickGuildButton( iterateGuildSlots )
-									end
-								end
-							end
-						end
-					end
-				end
-			end
-		end
-	end
-end
-
-function AddGoldToGuildBank()
-	if not CanWithdrawGuildBankMoney() then
-		return
-	end
-	local moneyToKeepOnToon = tonumber( EMA.db.goldAmountToKeepOnToon ) * 10000
-	local moneyOnToon = GetMoney()
-	local moneyToDepositOrWithdraw = moneyOnToon - moneyToKeepOnToon
-	--EMA:Print(" testa", moneyToDepositOrWithdraw )
-	if moneyToDepositOrWithdraw == 0 then
-		return
-	end
-	if moneyToDepositOrWithdraw > 0 then
-	--	EMA:Print(" test", moneyToDepositOrWithdraw )
-		--DepositGuildBankMoney( moneyToDepositOrWithdraw )
-		EMA:ScheduleTimer("SendMoneyToGuild", 0.5, moneyToDepositOrWithdraw)
-	else
-		local takeoutmoney = -1 * moneyToDepositOrWithdraw
-	--	EMA:Print("takeout", takeoutmoney)
-		EMA:ScheduleTimer("TakeMoneyOut", 0.5, takeoutmoney )
-	end
-end
-
-
-function EMA:SendMoneyToGuild( money )
-	DepositGuildBankMoney( money )
-end
-
-function EMA:TakeMoneyOut( money )
-	WithdrawGuildBankMoney( money )
-end
\ No newline at end of file
diff --git a/Modules/Information.lua b/Modules/Information.lua
deleted file mode 100644
index 9ad3893..0000000
--- a/Modules/Information.lua
+++ /dev/null
@@ -1,1586 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "EMA" that is 								--
---				Released under the MIT License 										--
---				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Information",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceTimer-3.0"
-)
-
--- Get the EMA Utilities Library.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
-EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "Information"
-EMA.settingsDatabaseName = "CurrProfileDB"
-EMA.chatCommand = "ema-information"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["DISPLAY"]
-EMA.moduleDisplayName = L["CURRENCY"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\SellIcon.tga"
--- order
-EMA.moduleOrder = 3
-
-EMA.globalCurrencyFramePrefix = "EMAToonCurrencyListFrame"
-EMA.currTypes = {}
-EMA.simpleCurrList = {}
-
--- Currency Identifiers. To add you own just add a new line at the bottom of this part
--- http://www.wowhead.com/currencies
--- Old Stuff
---EMA.currTypes.DalaranJewelcraftingToken = 61
-EMA.currTypes.ChampionsSeal = 241
---EMA.currTypes.IllustriousJewelcraftersToken = 361
-EMA.currTypes.TolBaradCommendation = 391
-EMA.currTypes.LesserCharmOfGoodFortune = 738
-EMA.currTypes.ElderCharmOfGoodFortune = 697
-EMA.currTypes.MoguRuneOfFate = 752
-EMA.currTypes.WarforgedSeal = 776
-EMA.currTypes.BloodyCoin = 789
-EMA.currTypes.TimelessCoin = 777
---WoD Currency
-EMA.currTypes.GarrisonResources = 824
-EMA.currTypes.TemperedFate = 994
-EMA.currTypes.ApexisCrystal = 823
-EMA.currTypes.Darkmoon = 515
-EMA.currTypes.Oil = 1101
-EMA.currTypes.InevitableFate = 1129
-EMA.currTypes.TimeWalker = 1166
-EMA.currTypes.Valor = 1191
---Legion Currency
-EMA.currTypes.OrderResources = 1220
-EMA.currTypes.AncientMana = 1155
-EMA.currTypes.NetherShard = 1226
-EMA.currTypes.SealofBrokenFate = 1273
-EMA.currTypes.ShadowyCoins = 1154
-EMA.currTypes.SightlessEye = 1149
-EMA.currTypes.TimeWornArtifact = 1268
-EMA.currTypes.CuriousCoin = 1275
---7.2
-EMA.currTypes.LegionfallWarSupplies = 1342
---7.2.5
-EMA.currTypes.CoinsOfAir = 1416
---7.3
-EMA.currTypes.WakeningEssence = 1533
-EMA.currTypes.VeiledArgunite = 1508
-
--------------------------------------- End of edit --------------------------------------------------------------
-
-function EMA:CurrencyIconAndName( id )
-	local fullName, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered, quality = GetCurrencyInfo(id)
-	local currName = strconcat(" |T"..icon..":20|t", L[" "]..fullName)
-	return currName
-end
-
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		currGold = true,
-		currGoldInGuildBank = false,
-		-- Currency default's
-		CcurrTypeOne = EMA.currTypes.OrderResources,
-		CcurrTypeOneName = EMA:CurrencyIconAndName(EMA.currTypes.OrderResources),
-		CcurrTypeTwo = EMA.currTypes.AncientMana,
-		CcurrTypeTwoName = EMA:CurrencyIconAndName(EMA.currTypes.AncientMana),
-		CcurrTypeThree = EMA.currTypes.TimeWalker,
-		CcurrTypeThreeName = EMA:CurrencyIconAndName(EMA.currTypes.TimeWalker),
-		CcurrTypeFour = EMA.currTypes.SightlessEye,
-		CcurrTypeFourName = EMA:CurrencyIconAndName(EMA.currTypes.SightlessEye),
-		CcurrTypeFive = 1,
-		CcurrTypeFiveName = "",
-		CcurrTypeSix = 1,
-		CcurrTypeSixName = "",
-		currencyFrameAlpha = 1.0,
-		currencyFramePoint = "CENTER",
-		currencyFrameRelativePoint = "CENTER",
-		currencyFrameXOffset = 0,
-		currencyFrameYOffset = 0,
-		currencyFrameBackgroundColourR = 1.0,
-		currencyFrameBackgroundColourG = 1.0,
-		currencyFrameBackgroundColourB = 1.0,
-		currencyFrameBackgroundColourA = 1.0,
-		currencyFrameBorderColourR = 1.0,
-		currencyFrameBorderColourG = 1.0,
-		currencyFrameBorderColourB = 1.0,
-		currencyFrameBorderColourA = 1.0,
-		currencyBorderStyle = L["BLIZZARD_TOOLTIP"],
-		currencyBackgroundStyle = L["BLIZZARD_DIALOG_BACKGROUND"],
-		currencyFontStyle = L["ARIAL_NARROW"],
-		currencyFontSize = 12,
-		currencyScale = 1,
-		currencyNameWidth = 60,
-		currencyPointsWidth = 50,
-		currencyGoldWidth = 140,
-		currencySpacingWidth = 3,
-		currencyLockWindow = false,
-		currOpenStartUpMaster = false,
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			show = {
-				type = "input",
-				name = L["SHOW_CURRENCY"],
-				desc = L["SHOW_CURRENCY_HELP"],
-				usage = "/EMA-curr show",
-				get = false,
-				set = "EMAToonRequestCurrency",
-			},
-			hide = {
-				type = "input",
-				name = L["HIDE_CURRENCY"],
-				desc = L["HIDE_CURRENCY_HELP"],
-				usage = "/EMA-curr hide",
-				get = false,
-				set = "EMAToonHideCurrency",
-			},
-			push = {
-				type = "input",
-				name = L["PUSH_ALL_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-curr push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
-local function DebugMessage( ... )
-	--EMA:Print( ... )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_REQUEST_CURRENCY = "SendCurrency"
-EMA.COMMAND_HERE_IS_CURRENCY = "HereIsCurrency"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Variables used by module.
--------------------------------------------------------------------------------------------------------------
-
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfInfo = EMA:SettingsCreateCurrency( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
-
-
-
-function EMA:SettingsCreateCurrency( top )
-	-- Get positions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local sliderHeight = EMAHelperSettings:GetSliderHeight()
-	local mediaHeight = EMAHelperSettings:GetMediaHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight() + 10
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local continueLabelHeight = 18
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( true )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local indent = horizontalSpacing * 12
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local thirdWidth = (headingWidth - (horizontalSpacing * 5)) / 5
-	local halfWidthSlider = (headingWidth - horizontalSpacing) / 2
-	local column2left = left + halfWidthSlider
-	local left2 = left + thirdWidth
-	local left3 = left + (thirdWidth * 1)
-	local right = left + halfWidth + horizontalSpacing
-	local movingTop = top
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CURRENCY_HEADER"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxCurrencyGold = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["GOLD"],
-		EMA.SettingsToggleCurrencyGold,
-		L["GOLD_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxCurrencyGoldInGuildBank = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["GOLD_GB"],
-		EMA.SettingsToggleCurrencyGoldInGuildBank,
-		L["GOLD_GB_HELP"]
-	)
-	--Currency One & Two
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.editBoxCurrencyTypeOneID = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		halfWidth,
-		left + indent,
-		movingTop,
-		L["CURRENCY"]..L[" "]..L["1"]
-	)
-	EMA.settingsControl.editBoxCurrencyTypeOneID:SetList( EMA.CurrDropDownBox() )
-	EMA.settingsControl.editBoxCurrencyTypeOneID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeOneID)
-	EMA.settingsControl.editBoxCurrencyTypeTwoID = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		halfWidth,
-		right + indent,
-		movingTop,
-		L["CURRENCY"]..L[" "]..L["2"]
-	)
-	EMA.settingsControl.editBoxCurrencyTypeTwoID:SetList( EMA.CurrDropDownBox() )
-	EMA.settingsControl.editBoxCurrencyTypeTwoID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeTwoID)
-	--Currency Three & Four
-	movingTop = movingTop - dropdownHeight
-	EMA.settingsControl.editBoxCurrencyTypeThreeID = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		halfWidth,
-		left + indent,
-		movingTop,
-		L["CURRENCY"]..L[" "]..L["3"]
-	)
-	EMA.settingsControl.editBoxCurrencyTypeThreeID:SetList( EMA.CurrDropDownBox() )
-	EMA.settingsControl.editBoxCurrencyTypeThreeID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeThreeID)
-	EMA.settingsControl.editBoxCurrencyTypeFourID = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		halfWidth,
-		right + indent,
-		movingTop,
-		L["CURRENCY"]..L[" "]..L["4"]
-	)
-	EMA.settingsControl.editBoxCurrencyTypeFourID:SetList( EMA.CurrDropDownBox() )
-	EMA.settingsControl.editBoxCurrencyTypeFourID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeFourID)
-	--Currency Five & Six
-	movingTop = movingTop - dropdownHeight
-	EMA.settingsControl.editBoxCurrencyTypeFiveID = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		halfWidth,
-		left + indent,
-		movingTop,
-		L["CURRENCY"]..L[" "]..L["5"]
-	)
-	EMA.settingsControl.editBoxCurrencyTypeFiveID:SetList( EMA.CurrDropDownBox() )
-	EMA.settingsControl.editBoxCurrencyTypeFiveID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeFiveID)
-	EMA.settingsControl.editBoxCurrencyTypeSixID = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		halfWidth,
-		right + indent,
-		movingTop,
-		L["CURRENCY"]..L[" "]..L["6"]
-	)
-	EMA.settingsControl.editBoxCurrencyTypeSixID:SetList( EMA.CurrDropDownBox() )
-	EMA.settingsControl.editBoxCurrencyTypeSixID:SetCallback( "OnValueChanged",  EMA.EditBoxChangedCurrencyTypeSixID)
-	-- Other Stuff
-	movingTop = movingTop - dropdownHeight
-	EMA.settingsControl.currencyButtonShowList = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SHOW_CURRENCY"],
-		EMA.EMAToonRequestCurrency,
-		L["SHOW_CURRENCY_HELP"]
-	)
-	movingTop = movingTop - buttonHeight
-	EMA.settingsControl.checkBoxCurrencyOpenStartUpMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["CURR_STARTUP"],
-		EMA.SettingsToggleCurrencyOpenStartUpMaster,
-		L["CURR_STARTUP_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Create appearance & layout.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["APPEARANCE_LAYOUT_HEALDER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxCurrencyLockWindow = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["LOCK_CURR_LIST"],
-		EMA.SettingsToggleCurrencyLockWindow,
-		L["LOCK_CURR_LIST_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.currencyScaleSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SCALE"]
-	)
-	EMA.settingsControl.currencyScaleSlider:SetSliderValues( 0.5, 2, 0.01 )
-	EMA.settingsControl.currencyScaleSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeScale )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.currencyTransparencySlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TRANSPARENCY"]
-	)
-	EMA.settingsControl.currencyTransparencySlider:SetSliderValues( 0, 1, 0.01 )
-	EMA.settingsControl.currencyTransparencySlider:SetCallback( "OnValueChanged", EMA.SettingsChangeTransparency )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.currencyMediaBorder = EMAHelperSettings:CreateMediaBorder(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["BORDER_STYLE"]
-	)
-	EMA.settingsControl.currencyMediaBorder:SetCallback( "OnValueChanged", EMA.SettingsChangeBorderStyle )
-
-	EMA.settingsControl.currencyBorderColourPicker = EMAHelperSettings:CreateColourPicker(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left + 15,
-		movingTop - 15,
-		L["BORDER COLOUR"]
-	)
-	EMA.settingsControl.currencyBorderColourPicker:SetHasAlpha( true )
-	EMA.settingsControl.currencyBorderColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBorderColourPickerChanged )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMA.settingsControl.currencyMediaBackground = EMAHelperSettings:CreateMediaBackground(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["BACKGROUND"]
-	)
-	EMA.settingsControl.currencyMediaBackground:SetCallback( "OnValueChanged", EMA.SettingsChangeBackgroundStyle )
-	EMA.settingsControl.currencyBackgroundColourPicker = EMAHelperSettings:CreateColourPicker(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left + 15,
-		movingTop - 15,
-		L["BG_COLOUR"]
-	)
-	EMA.settingsControl.currencyBackgroundColourPicker:SetHasAlpha( true )
-	EMA.settingsControl.currencyBackgroundColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBackgroundColourPickerChanged )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	--Font
-	EMA.settingsControl.currencyMediaFont = EMAHelperSettings:CreateMediaFont(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["FONT"]
-	)
-	EMA.settingsControl.currencyMediaFont:SetCallback( "OnValueChanged", EMA.SettingsChangeFontStyle )
-	EMA.settingsControl.currencyFontSize = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		column2left,
-		movingTop,
-		L["FONT_SIZE"]
-	)
-	EMA.settingsControl.currencyFontSize:SetSliderValues( 8, 20 , 1 )
-	EMA.settingsControl.currencyFontSize:SetCallback( "OnValueChanged", EMA.SettingsChangeFontSize )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMA.settingsControl.currencySliderSpaceForName = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SPACE_FOR_NAME"]
-	)
-	EMA.settingsControl.currencySliderSpaceForName:SetSliderValues( 20, 200, 1 )
-	EMA.settingsControl.currencySliderSpaceForName:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceForName )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.currencySliderSpaceForGold = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SPACE_FOR_GOLD"]
-	)
-	EMA.settingsControl.currencySliderSpaceForGold:SetSliderValues( 20, 200, 1 )
-	EMA.settingsControl.currencySliderSpaceForGold:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceForGold )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.currencySliderSpaceForPoints = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SPACE_FOR_POINTS"]
-	)
-	EMA.settingsControl.currencySliderSpaceForPoints:SetSliderValues( 20, 200, 1 )
-	EMA.settingsControl.currencySliderSpaceForPoints:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceForPoints )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.currencySliderSpaceBetweenValues = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SPACE_BETWEEN_VALUES"]
-	)
-	EMA.settingsControl.currencySliderSpaceBetweenValues:SetSliderValues( 0, 20, 1 )
-	EMA.settingsControl.currencySliderSpaceBetweenValues:SetCallback( "OnValueChanged", EMA.SettingsChangeSliderSpaceBetweenValues )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	return movingTop
-end
-
-
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	EMA.settingsControl.checkBoxCurrencyGold:SetValue( EMA.db.currGold )
-	EMA.settingsControl.checkBoxCurrencyGoldInGuildBank:SetValue( EMA.db.currGoldInGuildBank )
-	EMA.settingsControl.checkBoxCurrencyGoldInGuildBank:SetDisabled( not EMA.db.currGold )
-	EMA.settingsControl.editBoxCurrencyTypeOneID:SetValue( EMA.db.CcurrTypeOneName )
-	EMA.settingsControl.editBoxCurrencyTypeTwoID:SetValue ( EMA.db.CcurrTypeTwoName )
-	EMA.settingsControl.editBoxCurrencyTypeThreeID:SetValue ( EMA.db.CcurrTypeThreeName )
-	EMA.settingsControl.editBoxCurrencyTypeFourID:SetValue ( EMA.db.CcurrTypeFourName )
-	EMA.settingsControl.editBoxCurrencyTypeFiveID:SetValue ( EMA.db.CcurrTypeFiveName )
-	EMA.settingsControl.editBoxCurrencyTypeSixID:SetValue ( EMA.db.CcurrTypeSixName )
-	--state
-	EMA.settingsControl.checkBoxCurrencyOpenStartUpMaster:SetValue( EMA.db.currOpenStartUpMaster )
-	EMA.settingsControl.currencyTransparencySlider:SetValue( EMA.db.currencyFrameAlpha )
-	EMA.settingsControl.currencyScaleSlider:SetValue( EMA.db.currencyScale )
-	EMA.settingsControl.currencyMediaBorder:SetValue( EMA.db.currencyBorderStyle )
-	EMA.settingsControl.currencyMediaBackground:SetValue( EMA.db.currencyBackgroundStyle )
-	EMA.settingsControl.currencyBackgroundColourPicker:SetColor( EMA.db.currencyFrameBackgroundColourR, EMA.db.currencyFrameBackgroundColourG, EMA.db.currencyFrameBackgroundColourB, EMA.db.currencyFrameBackgroundColourA )
-	EMA.settingsControl.currencyBorderColourPicker:SetColor( EMA.db.currencyFrameBorderColourR, EMA.db.currencyFrameBorderColourG, EMA.db.currencyFrameBorderColourB, EMA.db.currencyFrameBorderColourA )
-	EMA.settingsControl.currencyMediaFont:SetValue( EMA.db.currencyFontStyle )
-	EMA.settingsControl.currencyFontSize:SetValue( EMA.db.currencyFontSize )
-	EMA.settingsControl.currencySliderSpaceForName:SetValue( EMA.db.currencyNameWidth )
-	EMA.settingsControl.currencySliderSpaceForGold:SetValue( EMA.db.currencyGoldWidth )
-	EMA.settingsControl.currencySliderSpaceForPoints:SetValue( EMA.db.currencyPointsWidth )
-	EMA.settingsControl.currencySliderSpaceBetweenValues:SetValue( EMA.db.currencySpacingWidth )
-	EMA.settingsControl.checkBoxCurrencyLockWindow:SetValue( EMA.db.currencyLockWindow )
-	if EMA.currencyListFrameCreated == true then
-		EMA:CurrencyListSetColumnWidth()
-		EMA:SettingsUpdateBorderStyle()
-		EMA:SettingsUpdateFontStyle()
-		EMA:CurrencyUpdateWindowLock()
-		EMAToonCurrencyListFrame:SetScale( EMA.db.currencyScale )
-		EMA:UpdateHendingText()
-		EMA:CurrencyListSetHeight()
-	end
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsToggleCurrencyGold( event, checked )
-	EMA.db.currGold = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleCurrencyGoldInGuildBank( event, checked )
-	EMA.db.currGoldInGuildBank = checked
-	EMA:SettingsRefresh()
-end
-
-
-function EMA:EditBoxChangedCurrencyTypeOneID( event, value )
-	local currName, id = EMA:MatchCurrValue(value)
-		EMA.db.CcurrTypeOne = id
-		EMA.db.CcurrTypeOneName = currName
-		EMA:EMAToonRequestCurrency()
-		EMA:SettingsRefresh()
-end
-
-
-function EMA:EditBoxChangedCurrencyTypeTwoID( event, value )
-	local currName, id = EMA:MatchCurrValue(value)
-		EMA.db.CcurrTypeTwo = id
-		EMA.db.CcurrTypeTwoName = currName
-		EMA:EMAToonRequestCurrency()
-		EMA:SettingsRefresh()
-end
-
-
-function EMA:EditBoxChangedCurrencyTypeThreeID( event, value )
-	local currName, id = EMA:MatchCurrValue(value)
-		EMA.db.CcurrTypeThree = id
-		EMA.db.CcurrTypeThreeName = currName
-		EMA:EMAToonRequestCurrency()
-		EMA:SettingsRefresh()
-end
-
-
-function EMA:EditBoxChangedCurrencyTypeFourID( event, value )
-	local currName, id = EMA:MatchCurrValue(value)
-		EMA.db.CcurrTypeFour = id
-		EMA.db.CcurrTypeFourName = currName
-		EMA:EMAToonRequestCurrency()
-		EMA:SettingsRefresh()
-end
-
-
-function EMA:EditBoxChangedCurrencyTypeFiveID( event, value )
-	local currName, id = EMA:MatchCurrValue(value)
-		EMA.db.CcurrTypeFive = id
-		EMA.db.CcurrTypeFiveName = currName
-		EMA:EMAToonRequestCurrency()
-		EMA:SettingsRefresh()
-end
-
-
-function EMA:EditBoxChangedCurrencyTypeSixID( event, value )
-	--EMA:Print("test", value)
-	local currName, id = EMA:MatchCurrValue(value)
-		EMA.db.CcurrTypeSix = id
-		EMA.db.CcurrTypeSixName = currName
-		EMA:EMAToonRequestCurrency()
-		EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleCurrencyOpenStartUpMaster( event, checked )
-	EMA.db.currOpenStartUpMaster = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeScale( event, value )
-	EMA.db.currencyScale = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeTransparency( event, value )
-	EMA.db.currencyFrameAlpha = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeBorderStyle( event, value )
-	EMA.db.currencyBorderStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeBackgroundStyle( event, value )
-	EMA.db.currencyBackgroundStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsBackgroundColourPickerChanged( event, r, g, b, a )
-	EMA.db.currencyFrameBackgroundColourR = r
-	EMA.db.currencyFrameBackgroundColourG = g
-	EMA.db.currencyFrameBackgroundColourB = b
-	EMA.db.currencyFrameBackgroundColourA = a
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsBorderColourPickerChanged( event, r, g, b, a )
-	EMA.db.currencyFrameBorderColourR = r
-	EMA.db.currencyFrameBorderColourG = g
-	EMA.db.currencyFrameBorderColourB = b
-	EMA.db.currencyFrameBorderColourA = a
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeFontStyle( event, value )
-	EMA.db.currencyFontStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeFontSize( event, value )
-	EMA.db.currencyFontSize = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeSliderSpaceForName( event, value )
-	EMA.db.currencyNameWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeSliderSpaceForGold( event, value )
-	EMA.db.currencyGoldWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeSliderSpaceForPoints( event, value )
-	EMA.db.currencyPointsWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeSliderSpaceBetweenValues( event, value )
-	EMA.db.currencySpacingWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleCurrencyLockWindow( event, checked )
-	EMA.db.currencyLockWindow = checked
-	EMA:CurrencyUpdateWindowLock()
-	EMA:SettingsRefresh()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	EMA.currencyTotalGold = 0
-	EMA.currencyListFrameCreated = false
-	EMA.currencyFrameCharacterInfo = {}
-	EMA.currentCurrencyValues = {}
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Create the currency list frame.
-	EMA:CreateEMAToonCurrencyListFrame()
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	-- WoW events.
-	--EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-	if EMA.db.currOpenStartUpMaster == true then
-		if EMAApi.IsCharacterTheMaster( self.characterName ) == true then
-			EMA:ScheduleTimer( "EMAToonRequestCurrency", 20 )
-		end
-	end
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.currGold = settings.currGold
-		EMA.db.currGoldInGuildBank = settings.currGoldInGuildBank
-		EMA.db.CcurrTypeOne = settings.CcurrTypeOne
-		EMA.db.CcurrTypeOneName = settings.CcurrTypeOneName
-		EMA.db.CcurrTypeTwo = settings.CcurrTypeTwo
-		EMA.db.CcurrTypeTwoName = settings.CcurrTypeTwoName
-		EMA.db.CcurrTypeThree = settings.CcurrTypeThree
-		EMA.db.CcurrTypeThreeName = settings.CcurrTypeThreeName
-		EMA.db.CcurrTypeFour = settings.CcurrTypeFour
-		EMA.db.CcurrTypeFourName = settings.CcurrTypeFourName
-		EMA.db.CcurrTypeFive = settings.CcurrTypeFive
-		EMA.db.CcurrTypeFiveName = settings.CcurrTypeFiveName
-		EMA.db.CcurrTypeSix = settings.CcurrTypeSix
-		EMA.db.CcurrTypeSixName = settings.CcurrTypeSixName
-		EMA.db.currOpenStartUpMaster = settings.currOpenStartUpMaster
-		EMA.db.currencyScale = settings.currencyScale
-		EMA.db.currencyFrameAlpha = settings.currencyFrameAlpha
-		EMA.db.currencyFramePoint = settings.currencyFramePoint
-		EMA.db.currencyFrameRelativePoint = settings.currencyFrameRelativePoint
-		EMA.db.currencyFrameXOffset = settings.currencyFrameXOffset
-		EMA.db.currencyFrameYOffset = settings.currencyFrameYOffset
-		EMA.db.currencyFrameBackgroundColourR = settings.currencyFrameBackgroundColourR
-		EMA.db.currencyFrameBackgroundColourG = settings.currencyFrameBackgroundColourG
-		EMA.db.currencyFrameBackgroundColourB = settings.currencyFrameBackgroundColourB
-		EMA.db.currencyFrameBackgroundColourA = settings.currencyFrameBackgroundColourA
-		EMA.db.currencyFrameBorderColourR = settings.currencyFrameBorderColourR
-		EMA.db.currencyFrameBorderColourG = settings.currencyFrameBorderColourG
-		EMA.db.currencyFrameBorderColourB = settings.currencyFrameBorderColourB
-		EMA.db.currencyFrameBorderColourA = settings.currencyFrameBorderColourA
-		EMA.db.currencyBorderStyle = settings.currencyBorderStyle
-		EMA.db.currencyBackgroundStyle = settings.currencyBackgroundStyle
-		EMA.db.currencyFontSize = settings.currencyFontSize
-		EMA.db.currencyFontStyle = settings.currencyFontStyle
-		EMA.db.currencyNameWidth = settings.currencyNameWidth
-		EMA.db.currencyPointsWidth = settings.currencyPointsWidth
-		EMA.db.currencyGoldWidth = settings.currencyGoldWidth
-		EMA.db.currencySpacingWidth = settings.currencySpacingWidth
-		EMA.db.currencyLockWindow = settings.currencyLockWindow
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
-function EMA:CurrDropDownBox()
-	for name, id in pairs( EMA.currTypes ) do
-		local currName = EMA:CurrencyIconAndName( id )
-		EMA.simpleCurrList[currName] = currName
-	end
-	EMA.simpleCurrList[""] = ""
-	table.sort( EMA.simpleCurrList )
-	return EMA.simpleCurrList
-end
-
-
-function EMA:MatchCurrValue(value)
-	if value == "" then
-		return "", 0
-	end
-	for name, id in pairs( EMA.currTypes ) do
-		local currName = EMA:CurrencyIconAndName( id )
-		if value == currName then
-			return currName, id
-		end
-	end
-end
-
-function EMA:CreateEMAToonCurrencyListFrame()
-	-- The frame.
-	local frame = CreateFrame( "Frame", "EMAToonCurrencyListWindowFrame", UIParent )
-	frame.obj = EMA
-	frame:SetFrameStrata( "LOW" )
-	frame:SetToplevel( false )
-	frame:SetClampedToScreen( true )
-	frame:EnableMouse( true )
-	frame:SetMovable( true )
-	frame:RegisterForDrag( "LeftButton" )
-	frame:SetScript( "OnDragStart",
-		function( this )
-			if IsAltKeyDown() then
-				this:StartMoving()
-			end
-		end )
-	frame:SetScript( "OnDragStop",
-		function( this )
-			this:StopMovingOrSizing()
-			local point, relativeTo, relativePoint, xOffset, yOffset = this:GetPoint()
-			EMA.db.currencyFramePoint = point
-			EMA.db.currencyFrameRelativePoint = relativePoint
-			EMA.db.currencyFrameXOffset = xOffset
-			EMA.db.currencyFrameYOffset = yOffset
-		end	)
-	frame:SetWidth( 500 )
-	frame:SetHeight( 200 )
-	frame:ClearAllPoints()
-	frame:SetPoint( EMA.db.currencyFramePoint, UIParent, EMA.db.currencyFrameRelativePoint, EMA.db.currencyFrameXOffset, EMA.db.currencyFrameYOffset )
-	frame:SetBackdrop( {
-		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
-		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-		tile = true, tileSize = 10, edgeSize = 10,
-		insets = { left = 3, right = 3, top = 3, bottom = 3 }
-	} )
-
-	-- Create the title for the frame.
-	local titleName = frame:CreateFontString( "EMAToonCurrencyListWindowFrameTitleText", "OVERLAY", "GameFontNormal" )
-	titleName:SetPoint( "TOPLEFT", frame, "TOPLEFT", 3, -8 )
-	titleName:SetTextColor( NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1.0 )
-	titleName:SetText( L["CURRENCY"] )
-	titleName:SetWidth( 200 )
-	titleName:SetJustifyH( "LEFT" )
-	titleName:SetWordWrap( false )
-	frame.titleName = titleName
-
-	-- Create the headings.
-	local left = 10
-	local spacing = 50
-	local width = 50
-	local top = -30
-	local parentFrame = frame
-	local r = 1.0
-	local g = 0.96
-	local b = 0.41
-	local a = 1.0
-	-- Set the characters name font string.
-	local frameCharacterName = EMA.globalCurrencyFramePrefix.."TitleCharacterName"
-	local frameCharacterNameText = parentFrame:CreateFontString( frameCharacterName.."Text", "OVERLAY", "GameFontNormal" )
-	frameCharacterNameText:SetText( L["NAME"] )
-	frameCharacterNameText:SetTextColor( r, g, b, a )
-	frameCharacterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameCharacterNameText:SetWidth( width * 2.5 )
-	frameCharacterNameText:SetJustifyH( "LEFT" )
-	frame.characterNameText = frameCharacterNameText
-	left = left + (spacing * 2)
-	-- Set the Gold font string.
-	local frameGold = EMA.globalCurrencyFramePrefix.."TitleGold"
-	local frameGoldText = parentFrame:CreateFontString( frameGold.."Text", "OVERLAY", "GameFontNormal" )
-	frameGoldText:SetText( L["GOLD"] )
-	frameGoldText:SetTextColor( r, g, b, a )
-	frameGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameGoldText:SetWidth( width )
-	frameGoldText:SetJustifyH( "CENTER" )
-	frame.GoldText = frameGoldText
-	left = left + spacing
-	-- Set the TypeOne font string.
-	local frameTypeOne = EMA.globalCurrencyFramePrefix.."TitleTypeOne"
-	local frameTypeOneText = parentFrame:CreateFontString( frameTypeOne.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeOneText:SetText( L["CURR"]..L["1"] )
-	frameTypeOneText:SetTextColor( r, g, b, a )
-	frameTypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeOneText:SetWidth( width )
-	frameTypeOneText:SetJustifyH( "CENTER" )
-	frame.TypeOneText = frameTypeOneText
-	left = left + spacing
-	-- Set the TypeTwo font string.
-	local frameTypeTwo = EMA.globalCurrencyFramePrefix.."TitleTypeTwo"
-	local frameTypeTwoText = parentFrame:CreateFontString( frameTypeTwo.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeTwoText:SetText( L["CURR"]..L["2"] )
-	frameTypeTwoText:SetTextColor( r, g, b, a )
-	frameTypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeTwoText:SetWidth( width )
-	frameTypeTwoText:SetJustifyH( "CENTER" )
-	frame.TypeTwoText = frameTypeTwoText
-	left = left + spacing
-	-- Set the TypeThree font string.
-	local frameTypeThree = EMA.globalCurrencyFramePrefix.."TitleTypeThree"
-	local frameTypeThreeText = parentFrame:CreateFontString( frameTypeThree.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeThreeText:SetText( L["CURR"]..L["3"] )
-	frameTypeThreeText:SetTextColor( r, g, b, a )
-	frameTypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeThreeText:SetWidth( width )
-	frameTypeThreeText:SetJustifyH( "CENTER" )
-	frame.TypeThreeText = frameTypeThreeText
-	left = left + spacing
-	-- Set the TypeFour font string.
-	local frameTypeFour = EMA.globalCurrencyFramePrefix.."TitleTypeFour"
-	local frameTypeFourText = parentFrame:CreateFontString( frameTypeFour.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeFourText:SetText( L["CURR"]..L["4"] )
-	frameTypeFourText:SetTextColor( r, g, b, a )
-	frameTypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeFourText:SetWidth( width )
-	frameTypeFourText:SetJustifyH( "CENTER" )
-	frame.TypeFourText = frameTypeFourText
-	left = left + spacing
-	-- Set the TypeFive font string.
-	local frameTypeFive = EMA.globalCurrencyFramePrefix.."TitleTypeFive"
-	local frameTypeFiveText = parentFrame:CreateFontString( frameTypeFive.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeFiveText:SetText( L["CURR"]..L["5"] )
-	frameTypeFiveText:SetTextColor( r, g, b, a )
-	frameTypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeFiveText:SetWidth( width )
-	frameTypeFiveText:SetJustifyH( "CENTER" )
-	frame.TypeFiveText = frameTypeFiveText
-	left = left + spacing
-	-- Set the TypeSix font string.
-	local frameTypeSix = EMA.globalCurrencyFramePrefix.."TitleTypeSix"
-	local frameTypeSixText = parentFrame:CreateFontString( frameTypeSix.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeSixText:SetText( L["CURR"]..L["6"] )
-	frameTypeSixText:SetTextColor( r, g, b, a )
-	frameTypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeSixText:SetWidth( width )
-	frameTypeSixText:SetJustifyH( "CENTER" )
-	frame.TypeSixText = frameTypeSixText
-	left = left + spacing
-	-- Set the Total Gold font string.
-	left = 10
-	top = -50
-	local frameTotalGoldTitle = EMA.globalCurrencyFramePrefix.."TitleTotalGold"
-	local frameTotalGoldTitleText = parentFrame:CreateFontString( frameTotalGoldTitle.."Text", "OVERLAY", "GameFontNormal" )
-	frameTotalGoldTitleText:SetText( L["TOTAL"] )
-	frameTotalGoldTitleText:SetTextColor( r, g, b, a )
-	frameTotalGoldTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTotalGoldTitleText:SetWidth( width )
-	frameTotalGoldTitleText:SetJustifyH( "LEFT" )
-	frame.TotalGoldTitleText = frameTotalGoldTitleText
-
-	local frameTotalGoldGuildTitle = EMA.globalCurrencyFramePrefix.."TitleTotalGoldGuild"
-	local frameTotalGoldGuildTitleText = parentFrame:CreateFontString( frameTotalGoldGuildTitle.."Text", "OVERLAY", "GameFontNormal" )
-	frameTotalGoldGuildTitleText:SetText( L["GUILD"] )
-	frameTotalGoldGuildTitleText:SetTextColor( r, g, b, a )
-	frameTotalGoldGuildTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTotalGoldGuildTitleText:SetWidth( width )
-	frameTotalGoldGuildTitleText:SetJustifyH( "LEFT" )
-	frame.TotalGoldGuildTitleText = frameTotalGoldGuildTitleText
-
-	local frameTotalGold = EMA.globalCurrencyFramePrefix.."TotalGold"
-	local frameTotalGoldText = parentFrame:CreateFontString( frameTotalGold.."Text", "OVERLAY", "GameFontNormal" )
-	frameTotalGoldText:SetText( "0" )
-	frameTotalGoldText:SetTextColor( r, g, b, a )
-	frameTotalGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTotalGoldText:SetWidth( width )
-	frameTotalGoldText:SetJustifyH( "RIGHT" )
-	frame.TotalGoldText = frameTotalGoldText
-
-	local frameTotalGoldGuild = EMA.globalCurrencyFramePrefix.."TotalGoldGuild"
-	local frameTotalGoldGuildText = parentFrame:CreateFontString( frameTotalGoldGuild.."Text", "OVERLAY", "GameFontNormal" )
-	frameTotalGoldGuildText:SetText( "0" )
-	frameTotalGoldGuildText:SetTextColor( r, g, b, a )
-	frameTotalGoldGuildText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTotalGoldGuildText:SetWidth( width )
-	frameTotalGoldGuildText:SetJustifyH( "RIGHT" )
-	frame.TotalGoldGuildText = frameTotalGoldGuildText
-
-	-- Set frame width.
-	frame:SetWidth( left + 10 )
-
-	-- Set transparency of the the frame (and all its children).
-	frame:SetAlpha( EMA.db.currencyFrameAlpha )
-
-	-- Set scale.
-	frame:SetScale( EMA.db.currencyScale )
-
-	-- Set the global frame reference for this frame.
-	EMAToonCurrencyListFrame = frame
-
-	-- Close.
-	local closeButton = CreateFrame( "Button", EMA.globalCurrencyFramePrefix.."ButtonClose", frame, "UIPanelCloseButton" )
-	closeButton:SetScript( "OnClick", function() EMAToonCurrencyListFrame:Hide() end )
-	closeButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", 0, 0 )
-	frame.closeButton = closeButton
-
-	-- Update.
-	local updateButton = CreateFrame( "Button", EMA.globalCurrencyFramePrefix.."ButtonUpdate", frame, "UIPanelButtonTemplate" )
-	updateButton:SetScript( "OnClick", function() EMA:EMAToonRequestCurrency() end )
-	updateButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -30, -4 )
-	updateButton:SetHeight( 22 )
-	updateButton:SetWidth( 55 )
-	updateButton:SetText( L["UPDATE"] )
-
-	frame.updateButton = updateButton
-
-	EMA:SettingsUpdateBorderStyle()
-	EMA:CurrencyUpdateWindowLock()
-	EMA:SettingsUpdateFontStyle()
-	EMAToonCurrencyListFrame:Hide()
-	EMA.currencyListFrameCreated = true
-	EMA:UpdateHendingText()
-	EMA:CurrencyListSetHeight()
-end
-
-function EMA:UpdateHendingText()
-	local parentFrame = EMAToonCurrencyListFrame
-	-- Type One
-	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeOne )
-	if icon ~= nil then
-		local iconTextureString = strconcat(" |T"..icon..":20|t")
-			parentFrame.TypeOneText:SetText( iconTextureString )
-	end
-	-- Type Two
-	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeTwo )
-	if icon ~= nil then
-		local iconTextureString = strconcat(" |T"..icon..":20|t")
-			parentFrame.TypeTwoText:SetText( iconTextureString )
-	end
-	-- Type Three
-	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeThree )
-	if icon ~= nil then
-		local iconTextureString = strconcat(" |T"..icon..":20|t")
-			parentFrame.TypeThreeText:SetText( iconTextureString )
-	end
-	-- Type Four
-	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeFour )
-	if icon ~= nil then
-		local iconTextureString = strconcat(" |T"..icon..":20|t")
-			parentFrame.TypeFourText:SetText( iconTextureString )
-	end
-	-- Type Five
-	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeFive )
-	if icon ~= nil then
-		local iconTextureString = strconcat(" |T"..icon..":20|t")
-			parentFrame.TypeFiveText:SetText( iconTextureString )
-	end
-	-- Type six
-	local name, amount, icon, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo( EMA.db.CcurrTypeSix )
-	if icon ~= nil then
-		local iconTextureString = strconcat(" |T"..icon..":20|t")
-			parentFrame.TypeSixText:SetText( iconTextureString )
-	end
-end
-
-function EMA:CurrencyUpdateWindowLock()
-	if EMA.db.currencyLockWindow == false then
-		EMAToonCurrencyListFrame:EnableMouse( true )
-	else
-		EMAToonCurrencyListFrame:EnableMouse( false )
-	end
-end
-
-function EMA:SettingsUpdateBorderStyle()
-	local borderStyle = EMA.SharedMedia:Fetch( "border", EMA.db.currencyBorderStyle )
-	local backgroundStyle = EMA.SharedMedia:Fetch( "background", EMA.db.currencyBackgroundStyle )
-	local frame = EMAToonCurrencyListFrame
-	frame:SetBackdrop( {
-		bgFile = backgroundStyle,
-		edgeFile = borderStyle,
-		tile = true, tileSize = frame:GetWidth(), edgeSize = 10,
-		insets = { left = 3, right = 3, top = 3, bottom = 3 }
-	} )
-	frame:SetBackdropColor( EMA.db.currencyFrameBackgroundColourR, EMA.db.currencyFrameBackgroundColourG, EMA.db.currencyFrameBackgroundColourB, EMA.db.currencyFrameBackgroundColourA )
-	frame:SetBackdropBorderColor( EMA.db.currencyFrameBorderColourR, EMA.db.currencyFrameBorderColourG, EMA.db.currencyFrameBorderColourB, EMA.db.currencyFrameBorderColourA )
-	--frame:ClearAllPoints()
-	frame:SetAlpha( EMA.db.currencyFrameAlpha )
-	frame:SetPoint( EMA.db.currencyFramePoint, UIParent, EMA.db.currencyFrameRelativePoint, EMA.db.currencyFrameXOffset, EMA.db.currencyFrameYOffset )
-end
-
-function EMA:SettingsUpdateFontStyle()
-	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.currencyFontStyle )
-	local textSize = EMA.db.currencyFontSize
-	local frame = EMAToonCurrencyListFrame
-	frame.titleName:SetFont( textFont , textSize , "OUTLINE")
-	frame.characterNameText:SetFont( textFont , textSize , "OUTLINE")
-	frame.GoldText:SetFont( textFont , textSize , "OUTLINE")
-	frame.TotalGoldGuildTitleText:SetFont( textFont , textSize , "OUTLINE")
-	frame.TotalGoldGuildText:SetFont( textFont , textSize , "OUTLINE")
-	frame.TotalGoldText:SetFont( textFont , textSize , "OUTLINE")
-	frame.TotalGoldTitleText:SetFont( textFont , textSize , "OUTLINE")
-	for characterName, currencyFrameCharacterInfo in pairs( EMA.currencyFrameCharacterInfo ) do
-		--EMA:Print("test", characterName)
-		--currencyFrameCharacterInfo.characterNameText:SetFont( textFont , textSize , "OUTLINE")
-		currencyFrameCharacterInfo.characterNameText:SetFont( textFont , textSize , "OUTLINE")
-		currencyFrameCharacterInfo.GoldText:SetFont( textFont , textSize , "OUTLINE")
-		currencyFrameCharacterInfo.TypeOneText:SetFont( textFont , textSize , "OUTLINE")
-		currencyFrameCharacterInfo.TypeTwoText:SetFont( textFont , textSize , "OUTLINE")
-		currencyFrameCharacterInfo.TypeThreeText:SetFont( textFont , textSize , "OUTLINE")
-		currencyFrameCharacterInfo.TypeFourText:SetFont( textFont , textSize , "OUTLINE")
-		currencyFrameCharacterInfo.TypeFiveText:SetFont( textFont , textSize , "OUTLINE")
-		currencyFrameCharacterInfo.TypeSixText:SetFont( textFont , textSize , "OUTLINE")
-	end
-end
-
-
-function EMA:CurrencyListSetHeight()
-	local additionalLines = 0
-	local addHeight = 0
-	if EMA.db.currGold == true then
-		if EMA.db.currGoldInGuildBank == true then
-			additionalLines = 2
-			addHeight = 7
-		else
-			additionalLines = 1
-			addHeight = 5
-		end
-	end
-	EMAToonCurrencyListFrame:SetHeight( 56 + (( EMAApi.GetTeamListMaximumOrderOnline() + additionalLines) * 15) + addHeight )
-end
-
-function EMA:CurrencyListSetColumnWidth()
-	local nameWidth = EMA.db.currencyNameWidth
-	local pointsWidth = EMA.db.currencyPointsWidth
-	local goldWidth = EMA.db.currencyGoldWidth
-	local spacingWidth = EMA.db.currencySpacingWidth
-	local frameHorizontalSpacing = 10
-	local numberOfPointsColumns = 0
-	local parentFrame = EMAToonCurrencyListFrame
-	local headingRowTopPoint = -30
-	local left = frameHorizontalSpacing
-	local haveGold = 0
-	-- Heading rows.
-	parentFrame.characterNameText:SetWidth( nameWidth )
-	parentFrame.characterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
-	left = left + nameWidth + spacingWidth
- 	if EMA.db.currGold == true then
-		parentFrame.GoldText:SetWidth( goldWidth )
-		parentFrame.GoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
-		left = left + goldWidth + (spacingWidth * 3)
-		parentFrame.GoldText:Show()
-		haveGold = 1
-	else
-		parentFrame.GoldText:Hide()
-		haveGold = 0
-	end
-	if EMA.db.CcurrTypeOneName == "" then
-		parentFrame.TypeOneText:Hide()
-	else
-		parentFrame.TypeOneText:SetWidth( pointsWidth )
-		parentFrame.TypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
-		left = left + pointsWidth + spacingWidth
-		numberOfPointsColumns = numberOfPointsColumns + 1
-		parentFrame.TypeOneText:Show()
-	end
-	if EMA.db.CcurrTypeTwoName == "" then
-		parentFrame.TypeTwoText:Hide()
-	else
-		parentFrame.TypeTwoText:SetWidth( pointsWidth )
-		parentFrame.TypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
-		left = left + pointsWidth + spacingWidth
-		numberOfPointsColumns = numberOfPointsColumns + 1
-		parentFrame.TypeTwoText:Show()
-	end
-	if EMA.db.CcurrTypeThreeName == "" then
-		parentFrame.TypeThreeText:Hide()
-	else
-		parentFrame.TypeThreeText:SetWidth( pointsWidth )
-		parentFrame.TypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
-		left = left + pointsWidth + spacingWidth
-		numberOfPointsColumns = numberOfPointsColumns + 1
-		parentFrame.TypeThreeText:Show()
-	end
-	if EMA.db.CcurrTypeFourName == "" then
-		parentFrame.TypeFourText:Hide()
-	else
-		parentFrame.TypeFourText:SetWidth( pointsWidth )
-		parentFrame.TypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
-		left = left + pointsWidth + spacingWidth
-		numberOfPointsColumns = numberOfPointsColumns + 1
-		parentFrame.TypeFourText:Show()
-	end
-	if EMA.db.CcurrTypeFiveName == "" then
-		parentFrame.TypeFiveText:Hide()
-	else
-		parentFrame.TypeFiveText:SetWidth( pointsWidth )
-		parentFrame.TypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
-		left = left + pointsWidth + spacingWidth
-		numberOfPointsColumns = numberOfPointsColumns + 1
-		parentFrame.TypeFiveText:Show()
-	end
-	if EMA.db.CcurrTypeSixName == "" then
-		parentFrame.TypeSixText:Hide()
-	else
-		parentFrame.TypeSixText:SetWidth( pointsWidth )
-		parentFrame.TypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, headingRowTopPoint )
-		left = left + pointsWidth + spacingWidth
-		numberOfPointsColumns = numberOfPointsColumns + 1
-		parentFrame.TypeSixText:Show()
-	end
-	-- Character rows.
-	for characterName, currencyFrameCharacterInfo in pairs( EMA.currencyFrameCharacterInfo ) do
-		if EMAPrivate.Team.GetCharacterOnlineStatus (characterName) == true then
-			local left = frameHorizontalSpacing
-			local characterRowTopPoint = currencyFrameCharacterInfo.characterRowTopPoint
-				currencyFrameCharacterInfo.characterNameText:SetWidth( nameWidth )
-				currencyFrameCharacterInfo.characterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
-				left = left + nameWidth + spacingWidth
-			if EMA.db.currGold == true then
-				currencyFrameCharacterInfo.GoldText:SetWidth( goldWidth )
-				currencyFrameCharacterInfo.GoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
-				left = left + goldWidth + (spacingWidth * 3)
-				currencyFrameCharacterInfo.GoldText:Show()
-			else
-				currencyFrameCharacterInfo.GoldText:Hide()
-			end
-			if EMA.db.CcurrTypeOneName == "" then
-				currencyFrameCharacterInfo.TypeOneText:Hide()
-			else
-				currencyFrameCharacterInfo.TypeOneText:SetWidth( pointsWidth )
-				currencyFrameCharacterInfo.TypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
-				left = left + pointsWidth + spacingWidth
-				currencyFrameCharacterInfo.TypeOneText:Show()
-			end
-			if EMA.db.CcurrTypeTwoName == "" then
-				currencyFrameCharacterInfo.TypeTwoText:Hide()
-			else
-				currencyFrameCharacterInfo.TypeTwoText:SetWidth( pointsWidth )
-				currencyFrameCharacterInfo.TypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
-				left = left + pointsWidth + spacingWidth
-				currencyFrameCharacterInfo.TypeTwoText:Show()
-			end
-			if EMA.db.CcurrTypeThreeName == "" then
-				currencyFrameCharacterInfo.TypeThreeText:Hide()
-			else
-				currencyFrameCharacterInfo.TypeThreeText:SetWidth( pointsWidth )
-				currencyFrameCharacterInfo.TypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
-				left = left + pointsWidth + spacingWidth
-				currencyFrameCharacterInfo.TypeThreeText:Show()
-			end
-			if EMA.db.CcurrTypeFourName == "" then
-				currencyFrameCharacterInfo.TypeFourText:Hide()
-			else
-				currencyFrameCharacterInfo.TypeFourText:SetWidth( pointsWidth )
-				currencyFrameCharacterInfo.TypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
-				left = left + pointsWidth + spacingWidth
-				currencyFrameCharacterInfo.TypeFourText:Show()
-			end
-			if EMA.db.CcurrTypeFiveName == "" then
-				currencyFrameCharacterInfo.TypeFiveText:Hide()
-			else
-				currencyFrameCharacterInfo.TypeFiveText:SetWidth( pointsWidth )
-				currencyFrameCharacterInfo.TypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
-				left = left + pointsWidth + spacingWidth
-				currencyFrameCharacterInfo.TypeFiveText:Show()
-
-			end
-			if EMA.db.CcurrTypeSixName == "" then
-				currencyFrameCharacterInfo.TypeSixText:Hide()
-			else
-				currencyFrameCharacterInfo.TypeSixText:SetWidth( pointsWidth )
-				currencyFrameCharacterInfo.TypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, characterRowTopPoint )
-				left = left + pointsWidth + spacingWidth
-				currencyFrameCharacterInfo.TypeSixText:Show()
-			end
-		end
-	end
-	-- Parent frame width and title.
-	local finalParentWidth = frameHorizontalSpacing + nameWidth + spacingWidth + (haveGold * (goldWidth + (spacingWidth * 3))) + (numberOfPointsColumns * (pointsWidth + spacingWidth)) + frameHorizontalSpacing
-	if finalParentWidth < 95 then
-		finalParentWidth = 95
-	end
-	local widthOfCloseAndUpdateButtons = 70
-	parentFrame.titleName:SetWidth( finalParentWidth - widthOfCloseAndUpdateButtons - frameHorizontalSpacing - frameHorizontalSpacing )
-	parentFrame.titleName:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", frameHorizontalSpacing, -9 )
-	if EMA.db.currGold == true then
-		if numberOfPointsColumns > 1 then
-			parentFrame.titleName:SetText( L["EMA_CURRENCY"] )
-		else
-			parentFrame.titleName:SetText( L["CURRENCY"] )
-		end
-	else
-		if numberOfPointsColumns < 2 then
-			parentFrame.titleName:SetText( "" )
-		end
-		if numberOfPointsColumns == 2 then
-			parentFrame.titleName:SetText( L["CURR"] )
-		end
-		if (numberOfPointsColumns >= 3) and (numberOfPointsColumns <= 4) then
-			parentFrame.titleName:SetText( L["CURRENCY"] )
-		end
-		if numberOfPointsColumns > 4 then
-			parentFrame.titleName:SetText( L["EMA_CURRENCY"] )
-		end
-	end
-	parentFrame:SetWidth( finalParentWidth )
-	-- Total Gold.
-	local nameLeft = frameHorizontalSpacing
-	local goldLeft = frameHorizontalSpacing + nameWidth + spacingWidth
-	--local guildTop = -35 - ((EMAApi.GetTeamListMaximumOrder() + 1) * 15) - 5
-	--local goldTop = -35 - ((EMAApi.GetTeamListMaximumOrder() + 1) * 15) - 7
-	local guildTop = -35 - ((EMAApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 5
-	local goldTop = -35 - ((EMAApi.GetTeamListMaximumOrderOnline() + 1) * 15) - 7
-	if EMA.db.currGold == true then
-		if EMA.db.currGoldInGuildBank == true then
-			parentFrame.TotalGoldGuildTitleText:SetWidth( nameWidth )
-			parentFrame.TotalGoldGuildTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", nameLeft, guildTop )
-			parentFrame.TotalGoldGuildTitleText:Show()
-			parentFrame.TotalGoldGuildText:SetWidth( goldWidth )
-			parentFrame.TotalGoldGuildText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", goldLeft, guildTop )
-			parentFrame.TotalGoldGuildText:Show()
-			--goldTop = -35 - ((EMAApi.GetTeamListMaximumOrder() + 2) * 15) - 5
-			goldTop = -35 - ((EMAApi.GetTeamListMaximumOrderOnline() + 2) * 15) - 5
-		else
-			parentFrame.TotalGoldGuildTitleText:Hide()
-			parentFrame.TotalGoldGuildText:Hide()
-		end
-		parentFrame.TotalGoldTitleText:SetWidth( nameWidth )
-		parentFrame.TotalGoldTitleText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", nameLeft, goldTop )
-		parentFrame.TotalGoldTitleText:Show()
-		parentFrame.TotalGoldText:SetWidth( goldWidth )
-		parentFrame.TotalGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", goldLeft, goldTop )
-		parentFrame.TotalGoldText:Show()
-	else
-		parentFrame.TotalGoldTitleText:Hide()
-		parentFrame.TotalGoldText:Hide()
-		parentFrame.TotalGoldGuildTitleText:Hide()
-		parentFrame.TotalGoldGuildText:Hide()
-	end
-end
-
-
-
-
-function EMA:CreateEMACurrencyFrameInfo( characterName, parentFrame )
-	--EMA.Print("makelist", characterName)
-	--if EMAPrivate.Team.GetCharacterOnlineStatus (characterName) == true then
-	local left = 10
-	local spacing = 50
-	local width = 50
-	local top = 0
-	--local top = -35 + (-15 * EMAApi.GetPositionForCharacterName( characterName ))
-	-- WHAT THE HELL IS GOING ON HERE! Ebony!
-		local height1 = -35 + ( -15 * EMAApi.GetPositionForCharacterName( characterName) )
-		local height2 = -35 + ( -15 * EMAApi.GetPositionForCharacterNameOnline( characterName) )
-		if height1 < height2 then
-			--EMA:Print("greater than ", characterName )
-			top = height2
-		elseif height1 > height2 then
-			top = height2
-		else
-			top = height2
-		end
-	--EMA:Print("Top", top)
-	-- Create the table to hold the status bars for this character.
-	EMA.currencyFrameCharacterInfo[characterName] = {}
-	-- Get the character info table.
-	local currencyFrameCharacterInfo = EMA.currencyFrameCharacterInfo[characterName]
-	currencyFrameCharacterInfo.characterRowTopPoint = top
-	-- Set the characters name font string.
-	local frameCharacterName = EMA.globalCurrencyFramePrefix.."CharacterName"
-	local frameCharacterNameText = parentFrame:CreateFontString( frameCharacterName.."Text", "OVERLAY", "GameFontNormal" )
-	frameCharacterNameText:SetText( Ambiguate( characterName , "none" ) )
-	frameCharacterNameText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	frameCharacterNameText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameCharacterNameText:SetWidth( width * 2.5 )
-	frameCharacterNameText:SetJustifyH( "LEFT" )
-	currencyFrameCharacterInfo.characterNameText = frameCharacterNameText
-	left = left + (spacing * 2)
-	-- Set the Gold font string.
-	local frameGold = EMA.globalCurrencyFramePrefix.."Gold"
-	local frameGoldText = parentFrame:CreateFontString( frameGold.."Text", "OVERLAY", "GameFontNormal" )
-	frameGoldText:SetText( "0" )
-	frameGoldText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	frameGoldText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameGoldText:SetWidth( width )
-	frameGoldText:SetJustifyH( "RIGHT" )
-	currencyFrameCharacterInfo.GoldText = frameGoldText
-	left = left + spacing
-	-- Set the TypeOne font string.
-	local frameTypeOne = EMA.globalCurrencyFramePrefix.."TypeOne"
-	local frameTypeOneText = parentFrame:CreateFontString( frameTypeOne.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeOneText:SetText( "0" )
-	frameTypeOneText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	frameTypeOneText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeOneText:SetWidth( width )
-	frameTypeOneText:SetJustifyH( "CENTER" )
-	currencyFrameCharacterInfo.TypeOneText = frameTypeOneText
-	left = left + spacing
-	-- Set the TypeTwo font string.
-	local frameTypeTwo = EMA.globalCurrencyFramePrefix.."TypeTwo"
-	local frameTypeTwoText = parentFrame:CreateFontString( frameTypeTwo.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeTwoText:SetText( "0" )
-	frameTypeTwoText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	frameTypeTwoText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeTwoText:SetWidth( width )
-	frameTypeTwoText:SetJustifyH( "CENTER" )
-	currencyFrameCharacterInfo.TypeTwoText = frameTypeTwoText
-	left = left + spacing
-		-- Set the TypeThree font string.
-	local frameTypeThree = EMA.globalCurrencyFramePrefix.."TypeThree"
-	local frameTypeThreeText = parentFrame:CreateFontString( frameTypeThree.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeThreeText:SetText( "0" )
-	frameTypeThreeText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	frameTypeThreeText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeThreeText:SetWidth( width )
-	frameTypeThreeText:SetJustifyH( "CENTER" )
-	currencyFrameCharacterInfo.TypeThreeText = frameTypeThreeText
-	left = left + spacing
-	-- Set the TypeFour font string.
-	local frameTypeFour = EMA.globalCurrencyFramePrefix.."TypeFour"
-	local frameTypeFourText = parentFrame:CreateFontString( frameTypeFour.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeFourText:SetText( "0" )
-	frameTypeFourText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	frameTypeFourText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeFourText:SetWidth( width )
-	frameTypeFourText:SetJustifyH( "CENTER" )
-	currencyFrameCharacterInfo.TypeFourText = frameTypeFourText
-	left = left + spacing
-	-- Set the TypeFive font string.
-	local frameTypeFive = EMA.globalCurrencyFramePrefix.."TypeFive"
-	local frameTypeFiveText = parentFrame:CreateFontString( frameTypeFive.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeFiveText:SetText( "0" )
-	frameTypeFiveText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	frameTypeFiveText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeFiveText:SetWidth( width )
-	frameTypeFiveText:SetJustifyH( "CENTER" )
-	currencyFrameCharacterInfo.TypeFiveText = frameTypeFiveText
-	left = left + spacing
-	-- Set the TypeSix font string.
-	local frameTypeSix = EMA.globalCurrencyFramePrefix.."TypeSix"
-	local frameTypeSixText = parentFrame:CreateFontString( frameTypeSix.."Text", "OVERLAY", "GameFontNormal" )
-	frameTypeSixText:SetText( "0" )
-	frameTypeSixText:SetTextColor( 1.00, 1.00, 1.00, 1.00 )
-	frameTypeSixText:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", left, top )
-	frameTypeSixText:SetWidth( width )
-	frameTypeSixText:SetJustifyH( "CENTER" )
-	currencyFrameCharacterInfo.TypeSixText = frameTypeSixText
-	left = left + spacing
-
-	EMA:SettingsUpdateFontStyle()
-end
-
-function EMA:EMAToonHideCurrency()
-	EMAToonCurrencyListFrame:Hide()
-end
-
-function EMA:EMAToonRequestCurrency()
-	-- Colour Light Red.
-	local r = 1.0
-	local g = 0.42
-	local b = 0.42
-	local a = 0.6
-	for characterName, currencyFrameCharacterInfo in pairs( EMA.currencyFrameCharacterInfo ) do
-		--EMA.Print("DoRequestCurrency", characterName)
-		-- Change Hight if a new member joins the team or leaves the team.
-		local height1 = currencyFrameCharacterInfo.characterRowTopPoint
-		local height2 = -35 + ( -15 * EMAApi.GetPositionForCharacterNameOnline( characterName) )
-			if height1 < height2 then
-				currencyFrameCharacterInfo.characterRowTopPoint = height2
-			elseif height1 > height2 then
-				currencyFrameCharacterInfo.characterRowTopPoint = height2
-			end
-		if EMAApi.GetCharacterOnlineStatus ( characterName ) == false then
-			-- Hides currency for offline members.
-			--EMA.Print("offlineRemove", characterName )
-			currencyFrameCharacterInfo.characterNameText:Hide()
-			currencyFrameCharacterInfo.GoldText:Hide()
-			currencyFrameCharacterInfo.TypeOneText:Hide()
-			currencyFrameCharacterInfo.TypeTwoText:Hide()
-			currencyFrameCharacterInfo.TypeThreeText:Hide()
-			currencyFrameCharacterInfo.TypeFourText:Hide()
-			currencyFrameCharacterInfo.TypeFiveText:Hide()
-			currencyFrameCharacterInfo.TypeSixText:Hide()
-		else
-			currencyFrameCharacterInfo.characterNameText:Show()
-			currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a )
-			currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a )
-			currencyFrameCharacterInfo.TypeOneText:SetTextColor( r, g, b, a )
-			currencyFrameCharacterInfo.TypeTwoText:SetTextColor( r, g, b, a )
-			currencyFrameCharacterInfo.TypeThreeText:SetTextColor( r, g, b, a )
-			currencyFrameCharacterInfo.TypeFourText:SetTextColor( r, g, b, a )
-			currencyFrameCharacterInfo.TypeFiveText:SetTextColor( r, g, b, a )
-			currencyFrameCharacterInfo.TypeSixText:SetTextColor( r, g, b, a )
-		end
-	end
-	EMA.currencyTotalGold = 0
-	if EMA.db.currGoldInGuildBank == true then
-		if IsInGuild() then
-			EMA.currencyTotalGold = GetGuildBankMoney()
-		end
-	end
-	EMA:EMASendCommandToTeam( EMA.COMMAND_REQUEST_CURRENCY, "" )
-	EMA.SettingsRefresh()
-
-end
-
-function EMA:DoSendCurrency( characterName, dummyValue )
-	--EMA:Print("Test2")
-	if EMAApi.GetCharacterOnlineStatus ( characterName ) == true then
-	table.wipe( EMA.currentCurrencyValues )
-	EMA.currentCurrencyValues.currGold = GetMoney()
-	-- CurrencyValues
-	EMA.currentCurrencyValues.currTypeOne = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeOne ) )
-	EMA.currentCurrencyValues.currTypeTwo = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeTwo ) )
-	EMA.currentCurrencyValues.currTypeThree = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeThree ) )
-	EMA.currentCurrencyValues.currTypeFour	= select( 2, GetCurrencyInfo( EMA.db.CcurrTypeFour ) )
-	EMA.currentCurrencyValues.currTypeFive = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeFive ) )
-	EMA.currentCurrencyValues.currTypeSix = select( 2, GetCurrencyInfo( EMA.db.CcurrTypeSix ) )
-	-- Max CurrencyValues
-	EMA.currentCurrencyValues.currMaxTypeOne = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeOne ) )
-	EMA.currentCurrencyValues.currMaxTypeTwo = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeTwo ) )
-	EMA.currentCurrencyValues.currMaxTypeThree = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeThree ) )
-	EMA.currentCurrencyValues.currMaxTypeFour	= select( 6, GetCurrencyInfo( EMA.db.CcurrTypeFour ) )
-	EMA.currentCurrencyValues.currMaxTypeFive = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeFive ) )
-	EMA.currentCurrencyValues.currMaxTypeSix = select( 6, GetCurrencyInfo( EMA.db.CcurrTypeSix ) )
-	EMA:EMASendCommandToToon( characterName, EMA.COMMAND_HERE_IS_CURRENCY, EMA.currentCurrencyValues )
-	else
-		return
-	end
-end
-
-function EMA:DoShowToonsCurrency( characterName, currencyValues )
-	--EMA.Print("DoShowCurrency", characterName, currencyValues.currTypeOne, currencyValues.currMaxTypeOne )
-	local parentFrame = EMAToonCurrencyListFrame
-	-- Get (or create and get) the character information.
-	local currencyFrameCharacterInfo = EMA.currencyFrameCharacterInfo[characterName]
-		--EMA.Print("Frame", characterName)
-	if currencyFrameCharacterInfo == nil then
-		EMA:CreateEMACurrencyFrameInfo( characterName, parentFrame )
-		currencyFrameCharacterInfo = EMA.currencyFrameCharacterInfo[characterName]
-	end
-	-- Colour white.
-	local r = 1.0
-	local g = 1.0
-	local b = 1.0
-	local a = 1.0
-	local v = 0
-
-	currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a )
-	currencyFrameCharacterInfo.characterNameText:SetTextColor( r, g, b, a )
-	currencyFrameCharacterInfo.GoldText:SetTextColor( r, g, b, a )
-	if currencyValues.currTypeOne == currencyValues.currMaxTypeOne and currencyValues.currTypeOne > 0 then
-		--EMA:Print("SetRed")
-		currencyFrameCharacterInfo.TypeOneText:SetTextColor( r, v, v, a )
-	else
-		--EMA:Print("SetWhite")
-		currencyFrameCharacterInfo.TypeOneText:SetTextColor( r, g, b, a )
-	end
-
-	if currencyValues.currTypeTwo == currencyValues.currMaxTypeTwo and currencyValues.currTypeTwo > 0 then
-		currencyFrameCharacterInfo.TypeTwoText:SetTextColor( r, v, v, a )
-	else
-		currencyFrameCharacterInfo.TypeTwoText:SetTextColor( r, g, b, a )
-	end
-	if currencyValues.currTypeThree == currencyValues.currMaxTypeThree and currencyValues.currTypeThree > 0 then
-		currencyFrameCharacterInfo.TypeThreeText:SetTextColor( r, v, v, a )
-	else
-		currencyFrameCharacterInfo.TypeThreeText:SetTextColor( r, g, b, a )
-	end
-
-	if currencyValues.currTypeFour == currencyValues.currMaxTypeFour and currencyValues.currTypeFour > 0 then
-		currencyFrameCharacterInfo.TypeFourText:SetTextColor( r, v, v, a )
-	else
-		currencyFrameCharacterInfo.TypeFourText:SetTextColor( r, g, b, a )
-	end
-
-	if currencyValues.currTypeFive == currencyValues.currMaxTypeFive and currencyValues.currTypeFive > 0 then
-		currencyFrameCharacterInfo.TypeFiveText:SetTextColor( r, v, v, a )
-	else
-		currencyFrameCharacterInfo.TypeFiveText:SetTextColor( r, g, b, a )
-	end
-
-	if currencyValues.currTypeSix == currencyValues.currMaxTypeSix and currencyValues.currTypeSix > 0 then
-		currencyFrameCharacterInfo.TypeSixText:SetTextColor( r, v, v, a )
-	else
-		currencyFrameCharacterInfo.TypeSixText:SetTextColor( r, g, b, a )
-	end
-	currencyFrameCharacterInfo.GoldText:SetText( EMAUtilities:FormatMoneyString( currencyValues.currGold ) )
-	--currencyFrameCharacterInfo.GoldText:SetText( GetCoinTextureString( currencyValues.currGold ) )
-	currencyFrameCharacterInfo.TypeOneText:SetText( currencyValues.currTypeOne )
-	currencyFrameCharacterInfo.TypeTwoText:SetText( currencyValues.currTypeTwo )
-	currencyFrameCharacterInfo.TypeThreeText:SetText( currencyValues.currTypeThree )
-	currencyFrameCharacterInfo.TypeFourText:SetText( currencyValues.currTypeFour )
-	currencyFrameCharacterInfo.TypeFiveText:SetText( currencyValues.currTypeFive )
-	currencyFrameCharacterInfo.TypeSixText:SetText( currencyValues.currTypeSix )
-	-- Total gold.
-	EMA.currencyTotalGold = EMA.currencyTotalGold + currencyValues.currGold
-	parentFrame.TotalGoldText:SetText( EMAUtilities:FormatMoneyString( EMA.currencyTotalGold ) )
-	--parentFrame.TotalGoldText:SetText( GetCoinTextureString( EMA.currencyTotalGold ) )
-	if IsInGuild() then
-		parentFrame.TotalGoldGuildText:SetText( EMAUtilities:FormatMoneyString( GetGuildBankMoney() ) )
-		--parentFrame.TotalGoldGuildText:SetText( GetCoinTextureString( GetGuildBankMoney() ) )
-	end
-	-- Update width of currency list.
-	EMA:CurrencyListSetColumnWidth()
-	EMAToonCurrencyListFrame:Show()
-end
-
--- A EMA command has been received.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if commandName == EMA.COMMAND_REQUEST_CURRENCY then
-		EMA:DoSendCurrency( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_HERE_IS_CURRENCY then
-		EMA:DoShowToonsCurrency( characterName, ... )
-	end
-end
diff --git a/Modules/Interaction.lua b/Modules/Interaction.lua
deleted file mode 100644
index dc64dd8..0000000
--- a/Modules/Interaction.lua
+++ /dev/null
@@ -1,815 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "EMA" that is 								--
---				Released under the MIT License 										--
---				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Interaction",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Get the EMA Utilities Library.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local LibAuras = LibStub:GetLibrary("LibAuras")
-
---  Constants and Locale for this module.
-EMA.moduleName = "Interaction"
-EMA.settingsDatabaseName = "InteractionProfileDB"
-EMA.chatCommand = "ema-Interaction"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["INTERACTION"]
-EMA.moduleDisplayName = L["INTERACTION"]
--- Icon
- EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\InteractionIcon.tga"
--- order
-EMA.moduleOrder = 60
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		takeMastersTaxi = true,
-		requestTaxiStop = true,
-		changeTexiTime = 2,
-		--Mount
-		mountWithTeam = false,
-		dismountWithTeam = false,
-		dismountWithMaster = false,
-		mountInRange = false,
-		--Loot
-		autoLoot = false,
-		tellBoERare = false,
-		tellBoEEpic = false,
-		messageArea = EMAApi.DefaultMessageArea(),
-		warningArea = EMAApi.DefaultWarningArea()
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-interaction push",
-				get = false,
-				set = "EMASendSettings",
-				order = 4,
-				guiHidden = true,
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_TAKE_TAXI = "EMATaxiTakeTaxi"
-EMA.COMMAND_EXIT_TAXI = "EMATaxiExitTaxi"
-EMA.COMMAND_CLOSE_TAXI = "EMACloseTaxi"
-EMA.COMMAND_MOUNT_ME = "EMAMountMe"
-EMA.COMMAND_MOUNT_DISMOUNT = "EMAMountDisMount"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--- Taxi has been taken, no parameters.
-EMA.MESSAGE_TAXI_TAKEN = "EMATaxiTaxiTaken"
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	-- Taxi
-	EMA.EMATakesTaxi = false
-	EMA.EMALeavsTaxi = false
-	EMA.TaxiFrameName = TaxiFrame
-	-- Mount
-	EMA.castingMount = nil
-	EMA.isMounted = nil
-	EMA.responding = false
-	--7.3.5 code Remove!
-	EMA.mountName = nil
-	-- Create the settings control.
-	EMA:SettingsCreate()
-	-- Initialse the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	--EMA:DisableAutoLoot()
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	-- Hook the TaketaxiNode function.
-	EMA:SecureHook( "TakeTaxiNode" )
-	EMA:SecureHook( "TaxiRequestEarlyLanding" )
-	EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" )
-	EMA:RegisterEvent( "UNIT_SPELLCAST_START" )
-	EMA:RegisterEvent( "UNIT_SPELLCAST_SUCCEEDED" )
-	EMA:RegisterEvent( "LOOT_READY" )
-	EMA:RegisterEvent( "TAXIMAP_OPENED" )
-	EMA:RegisterEvent("TAXIMAP_CLOSED")
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-	-- AceHook-3.0 will tidy up the hooks for us.
-end
-
-function EMA:SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfInfo = EMA:SettingsCreateTaxi( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsCreateTaxi( top )
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local iconSize = EMAHelperSettings:GetIconHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local sliderHeight = EMAHelperSettings:GetSliderHeight()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local halfWidthSlider = (headingWidth - horizontalSpacing) / 2
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local leftIcon = left + iconSize
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["TAXI_OPTIONS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxTakeMastersTaxi = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TAKE_TEAMS_TAXI"],
-		EMA.SettingsToggleTakeTaxi,
-		L["TAKE_TEAMS_TAXI_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxrequestStop = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["REQUEST_TAXI_STOP"],
-		EMA.SettingsTogglerequestStop,
-		L["REQUEST_TAXI_STOP_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.changeTexiTime = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["CLONES_TO_TAKE_TAXI_AFTER"]
-	)
-	EMA.settingsControl.changeTexiTime:SetSliderValues( 0, 5, 0.5 )
-	EMA.settingsControl.changeTexiTime:SetCallback( "OnValueChanged", EMA.SettingsChangeTaxiTimer )
-	-- Mount
-	movingTop = movingTop - sliderHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MOUNT_OPTIONS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxMountWithTeam = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["MOUNT_WITH_TEAM"],
-		EMA.SettingsToggleMountWithTeam,
-		L["MOUNT_WITH_TEAM_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxDismountWithTeam = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["DISMOUNT_WITH_TEAM"],
-		EMA.SettingsToggleDisMountWithTeam,
-		L["DISMOUNT_WITH_TEAM_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxDismountWithMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ONLY_DISMOUNT_WITH_MASTER"],
-		EMA.SettingsToggleDisMountWithMaster,
-		L["ONLY_DISMOUNT_WITH_MASTER_HELP"]
-	)
-	--[[
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxMountInRange = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ONLY_MOUNT_WHEN_IN_RANGE"],
-		EMA.SettingsToggleMountInRange,
-		L["ONLY_MOUNT_WHEN_IN_RANGE_HELP"]
-	)
-	]]
-	-- Loot
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["LOOT_OPTIONS"] , movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxAutoLoot = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ENABLE_AUTO_LOOT"],
-		EMA.SettingsToggleAutoLoot,
-		L["ENABLE_AUTO_LOOT_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxTellBoERare = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TELL_TEAM_BOE_RARE"],
-		EMA.SettingsToggleTellBoERare,
-		L["TELL_TEAM_BOE_RARE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxTellBoEEpic = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TELL_TEAM_BOE_EPIC"] ,
-		EMA.SettingsToggleTellBoEEpic,
-		L["TELL_TEAM_BOE_EPIC_HELP"]
-	)
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SEND_WARNING_AREA"]
-	)
-	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	return movingTop
-end
-
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-end
-
-function EMA:SettingsSetMessageArea( event, value )
-	EMA.db.messageArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetWarningArea( event, value )
-	EMA.db.warningArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleTakeTaxi( event, checked )
-	EMA.db.takeMastersTaxi = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsTogglerequestStop( event, checked )
-	EMA.db.requestTaxiStop = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeTaxiTimer( event, value )
-	EMA.db.changeTexiTime = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
--- Mount
-function EMA:SettingsToggleMountWithTeam( event, checked )
-	EMA.db.mountWithTeam = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDisMountWithTeam( event, checked )
-	EMA.db.dismountWithTeam = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDisMountWithMaster( event, checked )
-	EMA.db.dismountWithMaster = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleMountInRange( event, checked )
-	EMA.db.mountInRange = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoLoot( event, checked )
-	EMA.db.autoLoot = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleTellBoERare( event, checked )
-	EMA.db.tellBoERare = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleTellBoEEpic( event, checked )
-	EMA.db.tellBoEEpic = checked
-	EMA:SettingsRefresh()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.takeMastersTaxi = settings.takeMastersTaxi
-		EMA.db.requestTaxiStop = settings.requestTaxiStop
-		EMA.db.changeTexiTime = settings.changeTexiTime
-
-		EMA.db.mountWithTeam = settings.mountWithTeam
-		EMA.db.dismountWithTeam = settings.dismountWithTeam
-		EMA.db.dismountWithMaster = settings.dismountWithMaster
-		--EMA.db.mountInRange = settings.mountInRange
-
-		EMA.db.autoLoot = settings.autoLoot
-		EMA.db.tellBoERare = settings.tellBoERare
-		EMA.db.tellBoEEpic = settings.tellBoEEpic
-
-		EMA.db.messageArea = settings.messageArea
-		EMA.db.warningArea = settings.warningArea
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	EMA.settingsControl.checkBoxTakeMastersTaxi:SetValue( EMA.db.takeMastersTaxi )
-	EMA.settingsControl.checkBoxrequestStop:SetValue( EMA.db.requestTaxiStop )
-	EMA.settingsControl.changeTexiTime:SetValue( EMA.db.changeTexiTime )
-	EMA.settingsControl.checkBoxMountWithTeam:SetValue( EMA.db.mountWithTeam )
-	EMA.settingsControl.checkBoxDismountWithTeam:SetValue( EMA.db.dismountWithTeam )
-	EMA.settingsControl.checkBoxDismountWithMaster:SetValue( EMA.db.dismountWithMaster )
-	--EMA.settingsControl.checkBoxMountInRange:SetValue( EMA.db.mountInRange )
-	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
-	EMA.settingsControl.dropdownWarningArea:SetValue( EMA.db.warningArea )
-	EMA.settingsControl.checkBoxAutoLoot:SetValue( EMA.db.autoLoot )
-	EMA.settingsControl.checkBoxTellBoERare:SetValue( EMA.db.tellBoERare )
-	EMA.settingsControl.checkBoxTellBoEEpic:SetValue( EMA.db.tellBoEEpic )
-	-- Set state.
-	EMA.settingsControl.checkBoxDismountWithTeam:SetDisabled( not EMA.db.mountWithTeam )
-	EMA.settingsControl.checkBoxDismountWithMaster:SetDisabled( not EMA.db.dismountWithTeam or not EMA.db.mountWithTeam )
-	--EMA.settingsControl.checkBoxMountInRange:SetDisabled( not EMA.db.mountWithTeam )
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMATaxi Functionality.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:TAXIMAP_OPENED(event, ...)
-	local uiMapSystem = ...
-	if (uiMapSystem == Enum.UIMapSystem.Taxi) then
-		EMA.TaxiFrameName = TaxiFrame
-	else
-		EMA.TaxiFrameName = FlightMapFrame
-	end
-end
-
--- Take a taxi.
-local function TakeTaxi( sender, nodeName )
-	-- If the take masters taxi option is on.
-	if EMA.db.takeMastersTaxi == true then
-		-- If the sender was not this character and is the master then...
-		if sender ~= EMA.characterName then
-			-- Find the index of the taxi node to fly to.
-			local nodeIndex = nil
-			for iterateNodes = 1, NumTaxiNodes() do
-				if TaxiNodeName( iterateNodes ) == nodeName then
-					nodeIndex = iterateNodes
-					break
-				end
-			end
-			-- If a node index was found...
-			if nodeIndex ~= nil then
-				-- Send a message to any listeners that a taxi is being taken.
-				EMA:SendMessage( EMA.MESSAGE_TAXI_TAKEN )
-				-- Take a taxi.
-				EMA.EMATakesTaxi = true
-				EMA:ScheduleTimer( "TakeTimedTaxi", EMA.db.changeTexiTime , nodeIndex )
-				--GetNumRoutes( nodeIndex )
-				--TakeTaxiNode( nodeIndex )
-			else
-				-- Tell the master that this character could not take the same flight.
-				EMA:EMASendMessageToTeam( EMA.db.messageArea,  L["I_AM_UNABLE_TO_FLY_TO_A"]( nodeName ), false )
-			end
-		end
-	end
-end
-
-function EMA.TakeTimedTaxi( event, nodeIndex, ...)
-	if nodeIndex ~= nil then
-		GetNumRoutes( nodeIndex )
-		TakeTaxiNode( nodeIndex )
-	end
-end
-
--- Called after the character has just taken a flight (hooked function).
-function EMA:TakeTaxiNode( taxiNodeIndex )
-	-- If the take masters taxi option is on.
-	if EMA.db.takeMastersTaxi == true then
-		-- Get the name of the node flown to.
-		local nodeName = TaxiNodeName( taxiNodeIndex )
-		if EMA.EMATakesTaxi == false then
-			-- Tell the other characters about the taxi.
-			EMA:EMASendCommandToTeam( EMA.COMMAND_TAKE_TAXI, nodeName )
-		end
-		EMA.EMATakesTaxi = false
-	end
-end
-
-local function LeaveTaxi ( sender )
-	if EMA.db.requestTaxiStop == true then
-		if sender ~= EMA.characterName then
-			EMA.EMALeavsTaxi = true
-			TaxiRequestEarlyLanding()
-			EMA:EMASendMessageToTeam( EMA.db.messageArea,  L["REQUESTED_STOP_X"]( sender ), false )
-		end
-	end
-end
-
-function EMA.TaxiRequestEarlyLanding( sender )
-	-- If the take masters taxi option is on.
-	--EMA:Print("test")
-	if EMA.db.requestTaxiStop == true then
-		if UnitOnTaxi( "player" ) and CanExitVehicle() == true then
-			if EMA.EMALeavsTaxi == false then
-				-- Send a message to any listeners that a taxi is being taken.
-				EMA:EMASendCommandToTeam ( EMA.COMMAND_EXIT_TAXI )
-			end
-		end
-		EMA.EMALeavsTaxi = false
-	end
-end
-
-function EMA:TAXIMAP_CLOSED( event, ... )
-	local EMATaxiFrame = EMA.TaxiFrameName
-	if EMATaxiFrame:IsVisible() then
-		EMA:EMASendCommandToTeam ( EMA.COMMAND_CLOSE_TAXI )
-	end
-end
-
-local function CloseTaxiMapFrame()
-	if EMA.EMATakesTaxi == false then
-		CloseTaxiMap()
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Mount Functionality.
--------------------------------------------------------------------------------------------------------------
--- Pre 8.0 used to give spall Name. --  UNIT_SPELLCAST_START - no longer provide spell name and rank.
---EMA:UNIT_SPELLCAST_START(event, unitID, spell, rank, lineID, spellID, ...  )
-
-function EMA:PLAYER_ENTERING_WORLD(event, ... )
-	if IsMounted() then
-		local mountIDs = C_MountJournal.GetMountIDs()
-		for i = 1, #mountIDs do
-			local creatureName, spellID, icon, active = C_MountJournal.GetMountInfoByID(mountIDs[i])
-			if active then
-				--EMA:Print("alreadyMounted", spellID )
-				EMA.isMounted = spellID
-				EMA:RegisterEvent("UNIT_AURA")
-			end
-		end
-	end
-end
-
-function EMA:UNIT_SPELLCAST_START(event, unitID, lineID, spellID,  ...  )
-	--EMA:Print("Looking for Spells.", unitID, spellID)
-	if unitID == "player" then
-	local mountIDs = C_MountJournal.GetMountIDs()
-		for i = 1, #mountIDs do
-			--local name , id, icon, active = C_MountJournal.GetMountInfoByID(i)
-			local creatureName,mountSpellID,_,_,_,_,_,_,_,_,_,mountID = C_MountJournal.GetMountInfoByID(mountIDs[i])
-			--EMA:Print("Test", spellID, "vs", mountSpellID, "name", creatureName)
-			if spellID == mountSpellID then
-				--EMA:Print("SendtoTeam", "name", creatureName, "id", mountID)
-				if IsShiftKeyDown() == false then
-					if EMA.responding == false then
-						EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_ME, creatureName, mountID )
-						EMA.castingMount = spellID
-						break
-					end
-				end
-			end
-		end
-	end
-end
-
-
-function EMA:UNIT_SPELLCAST_SUCCEEDED(event, unitID, lineID, spellID, ... )
-	if EMA.db.mountWithTeam == false  or EMA.castingMount == nil or unitID ~= "player" then
-		return
-	end
-	--EMA:Print("Looking for Spells Done", spellID, EMA.castingMount)
-	if spellID == EMA.castingMount then
-		--EMA:Print("Mounted!", EMA.isMounted)
-		EMA.isMounted = spellID
-		EMA.mountName = spell
-		EMA:RegisterEvent("UNIT_AURA")
-	end
-end
-
-
-function EMA:UNIT_AURA(event, unitID, ... )
-	--EMA:Print("tester", unitID, EMA.isMounted)
-	if unitID ~= "player" or EMA.isMounted == nil or EMA.db.dismountWithTeam == false then
-        return
-    end
-	--EMA:Print("auraTrack", unitID, EMA.isMounted, EMA.mountName )
-	if not LibAuras:UnitAura(unitID, EMA.isMounted ) then
-		--EMA:Print("I have Dismounted - Send to team!")
-		if EMA.db.dismountWithMaster == true then
-			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-				if IsShiftKeyDown() == false then
-						--EMA:Print("test")
-					EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_DISMOUNT )
-					EMA:UnregisterEvent("UNIT_AURA")
-				end
-			end
-		else
-			if IsShiftKeyDown() == false then
-				EMA:EMASendCommandToTeam( EMA.COMMAND_MOUNT_DISMOUNT )
-				EMA:UnregisterEvent("UNIT_AURA")
-			end
-		end
-	end
-end
-
-function EMA:TeamMount(characterName, name, mountID)
-	--EMA:Print("testTeamMount", characterName, name, mountID )
-	EMA.responding = true
-	--mount with team truned off.
-	if EMA.db.mountWithTeam == false then
-		return
-	end
-	-- already mounted.
-	if IsMounted() then
-		return
-	end
-	-- Checks if character is in range.
-	if EMA.db.mountInRange == true then
-		if UnitIsVisible(Ambiguate(characterName, "none") ) == false then
-			--EMA:Print("UnitIsNotVisible", characterName)
-			return
-		end
-	end
-	-- Checks done now the fun stuff!
-	--Do i have the same mount as master?
-	hasMount = false
-	local creatureName, spellID, icon, active, isUsable, sourceType, isFavorite, isFactionSpecific, faction, hideOnChar, isCollected, mountID = C_MountJournal.GetMountInfoByID(mountID)
-	local x_creatureDisplayID, x_descriptionText, x_sourceText, x_isSelfMount, x_mountTypeID, x_uiModelSceneID = C_MountJournal.GetMountInfoExtraByID(mountID)
-	if isUsable == true then
-		--EMA:Print("i have this Mount", creatureName)
-		hasMount = true
-		mount = mountID
-	else
-		--EMA:Print("i DO NOT have Mount", creatureName)
-		for i = 1, C_MountJournal.GetNumMounts() do
-			local creatureName, spellID, icon, active, isUsable, sourceType, isFavorite, isFactionSpecific, faction, hideOnChar, isCollected,   mountID = C_MountJournal.GetMountInfoByID(i)
-			--EMA:Print("looking for a mount i can use", i)
-			if isUsable == true then
-				local creatureDisplayID, descriptionText, sourceText, isSelfMount, mountTypeID, uiModelSceneID = C_MountJournal.GetMountInfoExtraByID(mountID)
-				-- EMA:Print("looking for a mount i can use of type", x_mountTypeID, mountTypeID, i, creatureName, spellID)
-				-- mount a similar type of mount, e.g. if mounting a flying mount, also mount a flying mount
-				if x_mountTypeID == mountTypeID then
-					mount = mountID
-					hasMount = true
-					break
-				end
-			end
-		end
-	end
-
-	--EMA:Print("test1420", mount, name)
-	-- for unsupported mounts.
-	if hasMount == true then
-		--EMA:Print("test14550", mount, name )
-		if name == "Random" then  -- name doesn't seem to be set anywhere...
-			C_MountJournal.SummonByID(0)
-			EMA.responding = false
-		else
-			--EMA:Print("test1054" )
-			C_MountJournal.SummonByID( mount )
-			EMA.responding = false
-		end
-		if IsMounted() == false then
-			EMA:ScheduleTimer( "AmNotMounted", 2 )
-		end
-	end
-end
-
-function EMA:AmNotMounted()
-	if IsMounted() == false then
-		--EMA:Print("test")
-		EMA:EMASendMessageToTeam( EMA.db.warningArea, L["I_AM_UNABLE_TO_MOUNT"], false )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMALoot Functionality.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:LOOT_READY( event, ... )
-	if EMA.db.autoLoot == true then
-		EMA:doLoot()
-	end
-end
-
-function EMA:doLoot( tries )
-	--EMA:DisableAutoLoot()
-	if tries == nil then
-		tries = 0
-	end
-	local numloot = GetNumLootItems()
-	if numloot ~= 0 then
-		for slot = 1, numloot do
-			_, name, _, _, lootQuality, locked = GetLootSlotInfo(slot)
-			--EMA:Print("items", slot, locked, name, tries)
-			if locked ~= nil and not locked then
-				if EMA.db.tellBoERare == true then
-					if lootQuality == 3 then
-						EMA:ScheduleTimer( "TellTeamEpicBoE", 1 , name)
-					end
-				end
-				if EMA.db.tellBoEEpic == true then
-					if lootQuality == 4 then
-						EMA:ScheduleTimer( "TellTeamEpicBoE", 1 , name)
-					end
-				end
-				---EMA:Print("canLoot", "slot", slot, "name", name )
-				LootSlot(slot)
-
-				numloot = GetNumLootItems()
-			end
-		end
-		tries = tries + 1
-		if tries < 8 then
-			EMA:doLootLoop( tries )
-		else
-			CloseLoot()
-		end
-	end
-end
-
-function EMA:doLootLoop( tries )
-	--EMA:Print("loop", tries)
-	EMA:ScheduleTimer("doLoot", 0.8, tries )
-end
-
-function EMA:DisableAutoLoot()
-	if EMA.db.autoLoot == true then
-		if GetCVar("autoLootDefault") == "1" then
-			--EMA:Print("testSetOFF")
-			SetCVar( "autoLootDefault", 0 )
-		end
-	end
-end
-
-
-function EMA:TellTeamEpicBoE( name )
-	local _, itemName, itemRarity, _, _, itemType, itemSubType = GetItemInfo( name )
-	--EMA:Print("loottest", itemName, itemRarity , itemType , itemSubType )
-	if itemName ~= nil then
-		if itemType == WEAPON or itemType == ARMOR or itemSubType == EJ_LOOT_SLOT_FILTER_ARTIFACT_RELIC then
-			local _, isBop = EMAUtilities:TooltipScaner(itemName)
-			if isBop == ITEM_BIND_ON_EQUIP then
-				EMA:Print("test", isBop )
-				local rarity = nil
-				if itemRarity == 4 then
-					rarity = L["EPIC"]
-				else
-					rarity = L["RARE"]
-				end
-				--EMA:Print("I have looted a Epic BOE Item: ", rarity, itemName )
-				EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_LOOTED_X_Y_ITEM"]( rarity, itemName ), false )
-			end
-		end
-	end
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- EMA Commands functionality.
--------------------------------------------------------------------------------------------------------------
-
-
--- A EMA command has been received.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if characterName ~= self.characterName then
-		-- If the command was to take a taxi...
-		if commandName == EMA.COMMAND_TAKE_TAXI then
-			-- If not already on a taxi...
-			if not UnitOnTaxi( "player" ) then
-				-- And if the taxi frame is open...
-				local EMATaxiFrame = EMA.TaxiFrameName
-				if EMATaxiFrame:IsVisible() then
-					TakeTaxi( characterName, ... )
-				end
-			end
-		end
-		if commandName == EMA.COMMAND_EXIT_TAXI then
-			if UnitOnTaxi ( "player") then
-				LeaveTaxi ( characterName, ... )
-			end
-		end
-		if commandName == EMA.COMMAND_CLOSE_TAXI then
-			CloseTaxiMapFrame()
-		end
-
-		if commandName == EMA.COMMAND_MOUNT_ME then
-			--EMA:Print("command")
-			EMA:TeamMount( characterName, ... )
-		end
-		-- Dismount if mounted!
-		if commandName == EMA.COMMAND_MOUNT_DISMOUNT then
-			--EMA:Print("time to Dismount")
-			if IsMounted() then
-				Dismount()
-			end
-		end
-	end
-end
-
-EMAApi.Taxi = {}
-EMAApi.Taxi.MESSAGE_TAXI_TAKEN = EMA.MESSAGE_TAXI_TAKEN
diff --git a/Modules/ItemUse.lua b/Modules/ItemUse.lua
deleted file mode 100644
index 5479847..0000000
--- a/Modules/ItemUse.lua
+++ /dev/null
@@ -1,1453 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "EMA" that is 								--
---				Released under the MIT License 										--
---				"EMA" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"ItemUse",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Get the EMA Utilities Library.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local LibActionButton = LibStub( "EMALibActionButton-1.0" )
-local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
-EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "ItemUse"
-EMA.settingsDatabaseName = "ItemUseProfileDB"
-EMA.chatCommand = "ema-itemuse"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core"  )
-EMA.parentDisplayName = L["DISPLAY"]
-EMA.moduleDisplayName = L["ITEM_USE"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\ItemUseIcon.tga"
--- order
-EMA.moduleOrder = 1
-
-
--- EMA key bindings.
-BINDING_HEADER_EMAITEMUSE = L["ITEM-USE"]
-BINDING_NAME_ITEMUSE1 = L["ITEM"]..L[" "]..L["1"]
-BINDING_NAME_ITEMUSE2 = L["ITEM"]..L[" "]..L["2"]
-BINDING_NAME_ITEMUSE3 = L["ITEM"]..L[" "]..L["3"]
-BINDING_NAME_ITEMUSE4 = L["ITEM"]..L[" "]..L["4"]
-BINDING_NAME_ITEMUSE5 = L["ITEM"]..L[" "]..L["5"]
-BINDING_NAME_ITEMUSE6 = L["ITEM"]..L[" "]..L["6"]
-BINDING_NAME_ITEMUSE7 = L["ITEM"]..L[" "]..L["7"]
-BINDING_NAME_ITEMUSE8 = L["ITEM"]..L[" "]..L["8"]
-BINDING_NAME_ITEMUSE9 = L["ITEM"]..L[" "]..L["9"]
-BINDING_NAME_ITEMUSE10 = L["ITEM"]..L[" "]..L["10"]
-BINDING_NAME_ITEMUSE11 = L["ITEM"]..L[" "]..L["11"]
-BINDING_NAME_ITEMUSE12 = L["ITEM"]..L[" "]..L["12"]
-BINDING_NAME_ITEMUSE13 = L["ITEM"]..L[" "]..L["13"]
-BINDING_NAME_ITEMUSE14 = L["ITEM"]..L[" "]..L["14"]
-BINDING_NAME_ITEMUSE15 = L["ITEM"]..L[" "]..L["15"]
-BINDING_NAME_ITEMUSE16 = L["ITEM"]..L[" "]..L["16"]
-BINDING_NAME_ITEMUSE17 = L["ITEM"]..L[" "]..L["17"]
-BINDING_NAME_ITEMUSE18 = L["ITEM"]..L[" "]..L["18"]
-BINDING_NAME_ITEMUSE19 = L["ITEM"]..L[" "]..L["19"]
-BINDING_NAME_ITEMUSE20 = L["ITEM"]..L[" "]..L["20"]
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		showItemUse = true,
-		showItemUseOnMasterOnly = false,
-		hideItemUseInCombat = false,
-		showItemCount = true,
-		borderStyle = L["BLIZZARD_TOOLTIP"],
-		backgroundStyle = L["BLIZZARD_DIALOG_BACKGROUND"],
-		itemUseScale = 1,
-		itemUseTitleHeight = 3,
-		itemUseVerticalSpacing = 3,
-		itemUseHorizontalSpacing = 2,
-		autoAddQuestItemsToBar = false,
-		autoAddArtifactItemsToBar = false,
-		autoAddSatchelsItemsToBar = false,
-		hideClearButton = false,
-		itemBarsSynchronized = true,
-		numberOfItems = 10,
-		numberOfRows = 2,
-		messageArea = EMAApi.DefaultWarningArea(),
-		itemsAdvanced = {},
-		itemsSoted = {},
-		framePoint = "BOTTOMRIGHT",
-		frameRelativePoint = "BOTTOMRIGHT",
-		frameXOffset = 0,
-		frameYOffset = 70,
-		frameAlpha = 1.0,
-		frameBackgroundColourR = 1.0,
-		frameBackgroundColourG = 1.0,
-		frameBackgroundColourB = 1.0,
-		frameBackgroundColourA = 1.0,
-		frameBorderColourR = 1.0,
-		frameBorderColourG = 1.0,
-		frameBorderColourB = 1.0,
-		frameBorderColourA = 1.0,
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-item-use push",
-				get = false,
-				set = "EMASendSettings",
-			},
-			hide = {
-				type = "input",
-				name = L["HIDE_ITEM_BAR"],
-				desc = L["HIDE_ITEM_BAR_HELP"],
-				usage = "/EMA-item-use hide",
-				get = false,
-				set = "HideItemUseCommand",
-			},
-			show = {
-				type = "input",
-				name = L["SHOW_ITEM_BAR"],
-				desc = L["SHOW_ITEM_BAR_HELP"],
-				usage = "/EMA-item-use show",
-				get = false,
-				set = "ShowItemUseCommand",
-			},
-			clear = {
-				type = "input",
-				name = L["CLEAR_ITEM_BAR"],
-				desc = L["CLEAR_ITEM_BAR_HELP"],
-				usage = "/EMA-item-use clear",
-				get = false,
-				set = "ClearItemUseCommand",
-			},
-		},
-	}
-	return configuration
-end
-
-local function DebugMessage( ... )
-	--EMA:Print( ... )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_ITEMBAR_BUTTON = "EMACommandItemBarButton"
-EMA.COMMAND_ITEMUSE_SYNC = "EMACommandItemBarSync"
-EMA.COMMAND_ITEM_COUNT = "EMACommandItemBarCount"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Variables used by module.
--------------------------------------------------------------------------------------------------------------
-
-EMA.globalFramePrefix = "EMAItemUse"
-EMA.itemContainer = {}
-EMA.itemUseCreated = false
-EMA.itemSize = 40
-EMA.refreshItemUseControlsPending = false
-EMA.refreshUpdateItemsInBarPending = false
-EMA.refreshUpdateBindingsPending = false
-EMA.updateSettingsAfterCombat = false
-EMA.maximumNumberOfItems = 20
-EMA.maximumNumberOfRows = 20
-
-
--------------------------------------------------------------------------------------------------------------
--- Item Bar.
--------------------------------------------------------------------------------------------------------------
-
-local function CanDisplayItemUse()
-	local canShow = false
-	if EMA.db.showItemUse == true then
-		if EMA.db.showItemUseOnMasterOnly == true then
-			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-				canShow = true
-			end
-		else
-			canShow = true
-		end
-	end
-	return canShow
-end
-
-local function CreateEMAItemUseFrame()
-	-- The frame.	EMAItemUseWindowFrame
-	local frame = CreateFrame( "Frame", "EMAItemUseWindowFrame" , UIParent, "SecureHandlerStateTemplate" )
-
-	frame:SetAttribute("_onstate-page", [[
-		self:SetAttribute("state", newstate)
-		control:ChildUpdate("state", newstate)
-	]])
-	RegisterStateDriver(frame, "page", "[mod:alt]0;0")
-	frame.parentObject = EMA
-	frame:SetFrameStrata( "LOW" )
-	frame:SetToplevel( true )
-	frame:SetClampedToScreen( true )
-	frame:EnableMouse( true )
-	frame:SetMovable( true )
-
-	frame:RegisterForDrag( "LeftButton" )
-	frame:SetScript( "OnDragStart",
-			--function( this )
-		function( self,button )
-			if IsAltKeyDown() then
-				self:StartMoving()
-			end
-		end )
-	frame:SetScript( "OnDragStop",
-		--function( this )
-		function(self,button)
-			self:StopMovingOrSizing()
-			local point, relativeTo, relativePoint, xOffset, yOffset = self:GetPoint()
-			EMA.db.framePoint = point
-			EMA.db.frameRelativePoint = relativePoint
-			EMA.db.frameXOffset = xOffset
-			EMA.db.frameYOffset = yOffset
-		end	)
-	frame:SetBackdrop( {
-		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
-		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-		tile = true, tileSize = 10, edgeSize = 10,
-		insets = { left = 3, right = 3, top = 3, bottom = 3 }
-	} )
-	frame:SetPoint( EMA.db.framePoint, nil, EMA.db.frameRelativePoint, EMA.db.frameXOffset, EMA.db.frameYOffset )
-	frame:ClearAllPoints()
-	-- Clear Button
-		local updateButton = CreateFrame( "Button", "ButtonUpdate", frame, "UIPanelButtonTemplate" )
-		updateButton:SetScript( "OnClick", function() EMA.ClearButton() end )
-		updateButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -4, -3 )
-		updateButton:SetHeight( 20 )
-		updateButton:SetWidth( 65 )
-		updateButton:SetText( L["CLEAR_BUTT"] )
-		updateButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(updateButton, "clear", true) end)
-		updateButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
-		ClearUpdateButton = updateButton
-	-- Sync Button
-		local syncButton = CreateFrame( "Button", "ButtonSync", frame, "UIPanelButtonTemplate" )
-		syncButton:SetScript( "OnClick", function() EMA.SyncButton() end )
-		syncButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -71, -3 )
-		syncButton:SetHeight( 20 )
-		syncButton:SetWidth( 65 )
-		syncButton:SetText( L["SYNC_BUTT"] )
-		syncButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(updateButton, "sync", true) end)
-		syncButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
-		SyncUpdateButton = syncButton
-
-
-	-- Set transparency of the the frame (and all its children).
-	frame:SetAlpha(EMA.db.frameAlpha)
-	-- Set the global frame reference for this frame.
-	EMAItemUseFrame = frame
-	-- Remove unsued items --test
-	EMA:SettingsUpdateBorderStyle()
-	EMA.itemUseCreated = true
-	EMA.UpdateHeight()
-end
-
-function EMA:ShowTooltip(frame, info, show)
-	if show then
-		GameTooltip:SetOwner(frame, "ANCHOR_TOP")
-		GameTooltip:SetPoint("TOPLEFT", frame, "TOPRIGHT", 16, 0)
-		GameTooltip:ClearLines()
-		if info == "clear" then
-			GameTooltip:AddLine(L["TOOLTIP_NOLONGER_IN_BAGS"], 1, 0.82, 0, 1)
-		elseif info == "sync" then
-			GameTooltip:AddLine(L["TOOLTIP_SYNCHRONISE"], 1, 0.82, 0, 1)
-		end
-		GameTooltip:Show()
-	else
-	GameTooltip:Hide()
-	end
-end
-
-
-function EMA:UpdateHeight()
-	if EMA.db.hideClearButton == false then
-		EMA.db.itemUseTitleHeight = 2
-		local newHeight = EMA.db.itemUseTitleHeight + 20
-		ClearUpdateButton:Show()
-		SyncUpdateButton:Show()
-		return newHeight
-	else
-		EMA.db.itemUseTitleHeight = 2
-		oldHeight = EMA.db.itemUseTitleHeight
-		ClearUpdateButton:Hide()
-		SyncUpdateButton:Hide()
-		return oldHeight
-	end
-end
-
-
-function EMA:ShowItemUseCommand()
-	EMA.db.showItemUse = true
-	EMA:SetItemUseVisibility()
-	EMA:SettingsRefresh()
-end
-
-function EMA:HideItemUseCommand()
-	EMA.db.showItemUse = false
-	EMA:SetItemUseVisibility()
-	EMA:SettingsRefresh()
-end
-
-function EMA:ClearItemUseCommand()
-	EMAUtilities:ClearTable(EMA.db.itemsAdvanced)
-	EMA:SettingsRefresh()
-	EMA:Print(L["ITEM_BAR_CLEARED"])
-end
-
-function EMA:SetItemUseVisibility()
-	local frame = EMAItemUseFrame
-	if CanDisplayItemUse() == true then
-		frame:ClearAllPoints()
-		frame:SetPoint( EMA.db.framePoint, UIParent, EMA.db.frameRelativePoint, EMA.db.frameXOffset, EMA.db.frameYOffset )
-		frame:SetAlpha( EMA.db.frameAlpha )
-		frame:Show()
-	else
-		frame:Hide()
-	end
-end
-
-function EMA:SettingsUpdateBorderStyle()
-	local borderStyle = EMA.SharedMedia:Fetch( "border", EMA.db.borderStyle )
-	local backgroundStyle = EMA.SharedMedia:Fetch( "background", EMA.db.backgroundStyle )
-	local frame = EMAItemUseFrame
-	frame:SetBackdrop( {
-		bgFile = backgroundStyle,
-		edgeFile = borderStyle,
-		tile = true, tileSize = frame:GetWidth(), edgeSize = 10,
-		insets = { left = 3, right = 3, top = 3, bottom = 3 }
-	} )
-	frame:SetBackdropColor( EMA.db.frameBackgroundColourR, EMA.db.frameBackgroundColourG, EMA.db.frameBackgroundColourB, EMA.db.frameBackgroundColourA )
-	frame:SetBackdropBorderColor( EMA.db.frameBorderColourR, EMA.db.frameBorderColourG, EMA.db.frameBorderColourB, EMA.db.frameBorderColourA )
-end
-
--- updates after the quest has been handed in,
-function EMA:UpdateQuestItemsInBar()
-	local state = "0"
-	for iterateItems = 1, EMA.maximumNumberOfItems, 1 do
-		local itemContainer = EMA.itemContainer[iterateItems]
-		if itemContainer == nil then
-			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
-			itemContainer = EMA.itemContainer[iterateItems]
-		end
-		local containerButton = itemContainer["container"]
-		local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
-		local kind = itemInfo.kind
-		local action = itemInfo.action
-		if kind == "item" then
-			local itemLink,_,_,_,_,questItem = GetItemInfo( action )
-			--EMA:Print("Checking Item...", itemLink, action)
-			if questItem == "Quest" then
-				if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-					if EMA:IsInInventory( itemLink ) == false then
-					--EMA:Print("NOT IN BAGS", itemLink)
-						EMA.db.itemsAdvanced[iterateItems] = nil
-						EMA:EMASendUpdate( iterateItems, "empty", nil )
-					end
-				end
-			end
-		end
-	end
-end
-
-function EMA:UpdateItemsInBar()
-	local state = "0"
-    local parentFrame = EMAItemUseFrame
-	for iterateItems = 1, EMA.maximumNumberOfItems, 1 do
-		local itemContainer = EMA.itemContainer[iterateItems]
-		if itemContainer == nil then
-			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
-			itemContainer = EMA.itemContainer[iterateItems]
-		end
-		local containerButton = itemContainer["container"]
-		local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
-		local kind = itemInfo.kind
-		local action = itemInfo.action
-		if kind == "item" and not tonumber( action ) then
-			action = action:sub(6)
-		end
-        --EMA:Print(state, kind, action)
-		if kind == "mount" or kind == "battlepet" then
-            containerButton:ClearStates()
-		else
-		containerButton:SetState(state, kind, action)
-        end
-	end
-end
-
-function EMA:AddItemToItemDatabase( itemNumber, kind, action )
-    if kind == "mount" or kind == "battlepet" then
-        return
-    end
-	if EMA.db.itemsAdvanced[itemNumber] == nil then
-		EMA.db.itemsAdvanced[itemNumber] = {}
-	end
-	EMA.db.itemsAdvanced[itemNumber].kind = kind
-	EMA.db.itemsAdvanced[itemNumber].action = action
-end
-
-function EMA:GetItemFromItemDatabase( itemNumber )
-	if EMA.db.itemsAdvanced[itemNumber] == nil then
-		EMA.db.itemsAdvanced[itemNumber] = {}
-		EMA.db.itemsAdvanced[itemNumber].kind = "empty"
-		EMA.db.itemsAdvanced[itemNumber].action = "empty"
-	end
-	return EMA.db.itemsAdvanced[itemNumber]
-end
-
-function EMA:OnButtonContentsChanged( event, button, state, type, value, ... )
-    if type == "mount" or type == "battlepet" then
-		return
-    end
-    EMA:AddItemToItemDatabase( button.itemNumber, type, value )
-    EMA:EMASendUpdate(button.itemNumber, type, value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:OnButtonUpdate( event, button, ... )
-	--EMA:Print( event, button, ...)
-end
-
-function EMA:OnButtonState( event, button, ... )
-	--EMA:Print( event, button, ...)
-end
-
-function EMA:OnButtonUsable( event, button, ... )
-	--EMA:Print( event, button, ...)
-end
-
-function EMA:CreateEMAItemUseItemContainer( itemNumber, parentFrame )
-	EMA.itemContainer[itemNumber] = {}
-	local itemContainer = EMA.itemContainer[itemNumber]
-	local containerButtonName = EMA.globalFramePrefix.."ContainerButton"..itemNumber
-    local buttonConfig = {
-        outOfRangeColoring = "button",
-        tooltip = "enabled",
-        showGrid = true,
-        colors = {
-            range = { 0.8, 0.1, 0.1 },
-            mana = { 0.5, 0.5, 1.0 }
-        },
-        hideElements = {
-            macro = false,
-            hotkey = false,
-            equipped = false,
-        },
-        keyBoundTarget = false,
-        clickOnDown = false,
-        flyoutDirection = "UP",
-    }
-	local containerButton = LibActionButton:CreateButton( itemNumber, containerButtonName, EMAItemUseWindowFrame, buttonConfig )
-	containerButton:SetState( "0", "empty", nil)
-	containerButton.itemNumber = itemNumber
-	itemContainer["container"] = containerButton
-end
-
---ebony test Using the wowapi and not the scanning of tooltips
-function EMA:CheckForQuestItemAndAddToBar()
-	for iterateQuests = 1, GetNumQuestLogEntries() do
-		--EMA:AddQuestUseableItems() -- Adds Special Quest Useable Items
-		local questLogTitleText,_,_,isHeader, _, _, _, questID = GetQuestLogTitle(iterateQuests)
-		  	if not isHeader then
-			--EMA:Print("test", questItemLink, iterateQuests, questLogTitleText, questID )
-			local questItemLink, questItemIcon, questItemCharges = GetQuestLogSpecialItemInfo( iterateQuests )
-			if questItemLink ~= nil then
-				local itemName = GetItemInfo(questItemLink)
-				local questname, rank = GetItemSpell(questItemLink) -- Only means to detect if the item is usable
-				if questname then
-					if EMAUtilities:DoItemLinksContainTheSameItem( questItemLink, questItemLink ) == true then
-						--EMA:Print("addItem", questItemLink )
-						EMA:AddAnItemToTheBarIfNotExists( questItemLink, false)
-					end
-				end
-			end
-		end
-	end
-end
-
-
-function EMA:AddQuestUseableItems()
-	for bag = 0, NUM_BAG_SLOTS do
-		for slot = 1, GetContainerNumSlots(bag) do
-			local texture, count, locked, quality, readable, lootable, link, isFiltered, hasNoValue, itemID = GetContainerItemInfo(bag, slot)
-			if link then
-				local tooltipText = EMAUtilities:TooltipScaner( link )
-				if tooltipText == ITEM_BIND_QUEST then
-					local questname, rank = GetItemSpell( link ) -- Only means to detect if the item is usable
-					if questname then
-						EMA:AddAnItemToTheBarIfNotExists( link, false)
-					end
-				end
-			end
-		end
-	end
-end
-
-
-
-
-
-
-
-
--- Add satchels to item bar.
-function EMA:CheckForSatchelsItemAndAddToBar()
-	for bag = 0, NUM_BAG_SLOTS do
-		for slot = 1, GetContainerNumSlots(bag) do
-			local texture, count, locked, quality, readable, lootable, link, isFiltered, hasNoValue, itemID = GetContainerItemInfo(bag, slot)
-			if link then
-				local tooltipText = EMAUtilities:TooltipScaner( link )
-				if tooltipText == LOCKED then
-					EMA:AddAnItemToTheBarIfNotExists( link, false )
-				end
-			end
-		end
-	end
-end
-
--- Removes unused items.
-function EMA:ClearButton()
-	local state = "0"
-	for iterateItems = 1, EMA.db.numberOfItems, 1 do
-		local itemContainer = EMA.itemContainer[iterateItems]
-		if itemContainer == nil then
-			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
-			itemContainer = EMA.itemContainer[iterateItems]
-		end
-		local containerButton = itemContainer["container"]
-		local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
-		local kind = itemInfo.kind
-		local action = itemInfo.action
-		if kind == "item" then
-			local name, itemLink,_,_,_,itemType,questItem = GetItemInfo( action )
-			if itemLink and itemLink:match("item:%d") then
-				local _ , tooltipTextTwo = EMAUtilities:TooltipScaner( itemLink )
-				if tooltipTextTwo == nil or tooltipTextTwo ~= "Unique" then
-					if EMA:IsInInventory( name ) == false then
-						EMA.db.itemsAdvanced[iterateItems] = nil
-						EMA:EMASendUpdate( iterateItems, "empty", nil	)
-						EMA:SettingsRefresh()
-					end
-				end
-			end
-		end
-	end
-end
-
--- Sync Buttion
-function EMA:SyncButton()
-	local dataTable = {}
-	for iterateItems = 1, EMA.db.numberOfItems, 1 do
-	local itemContainer = EMA.itemContainer[iterateItems]
-		if itemContainer == nil then
-			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
-			itemContainer = EMA.itemContainer[iterateItems]
-		end
-			local containerButton = itemContainer["container"]
-			local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
-			local kind = itemInfo.kind
-			local action = itemInfo.action
-			data = {}
-			data.button = iterateItems
-			data.type = kind
-			data.action = action
-			table.insert( dataTable, data )
-	end
-	EMA:EMASendCommandToTeam( EMA.COMMAND_ITEMUSE_SYNC, dataTable)
-	if EMA.db.showItemCount == true then
-		EMA:GetEMAItemCount()
-	end
-end
-
-
--- Adds artifact power items to item bar.
-function EMA:CheckForArtifactItemAndAddToBar()
-	for bag = 0, NUM_BAG_SLOTS do
-		for slot = 1, GetContainerNumSlots(bag) do
-			local itemLink = GetContainerItemLink(bag, slot)
-			if itemLink and itemLink:match("item:%d") then
-				local tooltipText = EMAUtilities:TooltipScaner(itemLink)
-				if tooltipText and tooltipText:match(ARTIFACT_POWER) then
-					EMA:AddAnItemToTheBarIfNotExists( itemLink, false )
-				end
-			end
-		end
-	end
-end
-
---Checks the item is in the Toon players bag
-function EMA:IsInInventory(itemLink)
-	for bag = 0,4,1 do
-		for slot = 1,GetContainerNumSlots(bag),1 do
-			--EMA:Debug( "Bags OK. checking", itemLink )
-			local _,_,_,_,_,_,_,_,_,Link = GetContainerItemInfo(bag,slot)
-			if Link then
-				--EMA:Debug( "Bags OK. checking", itemLink, Link )
-				local itemString = GetItemInfo( Link )
-				--EMA:Debug( "Bags OK. checking", itemLink, itemString )
-				if itemLink == itemString then
-					--EMA:Print( "True" )
-					return true
-				end
-			end
-		end
-	end
-	return false
-end
-
-
-function EMA:AddAnItemToTheBarIfNotExists( itemLink, startsQuest)
-	local itemInfo
-	local barItemId
-	local iterateItems
-	local alreadyExists = false
-	local itemId = EMAUtilities:GetItemIdFromItemLink( itemLink )
-	for iterateItems = 1, EMA.db.numberOfItems, 1 do
-		local itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
-			--EMA:Print("check", itemLink, itemInfo.action)
-		if itemInfo.kind == "item" and itemInfo.action == itemId then
-			alreadyExists = true
-		--	EMA:Print("test", itemLink )
-			return
-		end
-	end
-	if alreadyExists == false then
-		--EMA:Print("test2", itemLink )
-		for iterateItems = 1, EMA.db.numberOfItems, 1 do
-			itemInfo = EMA:GetItemFromItemDatabase( iterateItems )
-			--Checks the items we talking about is in the bags of the player.
-			if itemInfo.kind == "empty" then
-				EMA:AddItemToItemDatabase( iterateItems, "item", itemId )
-				EMA:EMASendUpdate( iterateItems, "item", itemId )
-				EMA:SettingsRefresh()
-					-- TODO: to we need this?
-					if startsQuest then
-						EMA:EMASendMessageToTeam( EMA.db.messageArea, L["NEW_QUEST_ITEM"], false )
-					end
-				return
-			end
-		end
-	end
-end
-
-function EMA:RefreshItemUseControls()
-	if InCombatLockdown() then
-		EMA.refreshItemUseControlsPending = true
-		return
-	end
-	local parentFrame = EMAItemUseFrame
-	local positionLeft
-	local positionTop
-	local itemsPerRow = EMA.db.numberOfItems / EMA.db.numberOfRows
-	local row
-	local rowLeftModifier
-	for iterateItems = 1, EMA.maximumNumberOfItems, 1 do
-		local itemContainer = EMA.itemContainer[iterateItems]
-		if itemContainer ~= nil then
-			local containerButton = itemContainer["container"]
-			containerButton:Hide()
-		end
-	end
-	for iterateItems = 1, EMA.db.numberOfItems, 1 do
-		local itemContainer = EMA.itemContainer[iterateItems]
-		if itemContainer == nil then
-			EMA:CreateEMAItemUseItemContainer( iterateItems, parentFrame )
-			itemContainer = EMA.itemContainer[iterateItems]
-		end
-		local containerButton = itemContainer["container"]
-		row = math.floor((iterateItems - 1) / itemsPerRow)
-		rowLeftModifier = math.floor((iterateItems-1) % itemsPerRow)
-		positionLeft = 6 + (EMA.itemSize * rowLeftModifier) + (EMA.db.itemUseHorizontalSpacing * rowLeftModifier)
-		local getHeight = EMA.UpdateHeight()
-		positionTop = -getHeight - (EMA.db.itemUseVerticalSpacing * 2) - (row * EMA.itemSize) - (row * EMA.db.itemUseVerticalSpacing)
-		containerButton:SetWidth( EMA.itemSize )
-		containerButton:SetHeight( EMA.itemSize )
-		containerButton:SetPoint( "TOPLEFT", parentFrame, "TOPLEFT", positionLeft, positionTop )
-		containerButton:Show()
-	end
-	EMA:UpdateEMAItemUseDimensions()
-end
-
-function EMA:UpdateEMAItemUseDimensions()
-	local frame = EMAItemUseFrame
-	local itemsPerRow = EMA.db.numberOfItems / EMA.db.numberOfRows
-	frame:SetWidth( 5 + (EMA.db.itemUseHorizontalSpacing * (3 + itemsPerRow-1)) + (EMA.itemSize * itemsPerRow) )
-	local getHeight = EMA.UpdateHeight()
-	frame:SetHeight( getHeight + (EMA.itemSize * EMA.db.numberOfRows) + (EMA.db.itemUseVerticalSpacing * EMA.db.numberOfRows) + (EMA.db.itemUseVerticalSpacing * 3))
-	frame:SetScale( EMA.db.itemUseScale )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Communications
--------------------------------------------------------------------------------------------------------------
-
-function EMA:EMASendUpdate( button, type, action )
-	--EMA:Print("testDataDebug", button, type, action )
-	EMA:EMASendCommandToTeam( EMA.COMMAND_ITEMBAR_BUTTON, button, type, action )
-end
-
-function EMA:ReceiveButtonData(characterName, button, type, action)
-	--EMA:Print("ReceiveButtonDataDebug", button, type, action )
-	EMA:AddItemToItemDatabase( button, type, action )
-	EMA:SettingsRefresh()
-end
-
-function EMA:ReceiveSync(characterName, data)
-	--EMA:Print("ReceiveSync", data)
-	for id, data in pairs( data ) do
-		--EMA:Print("ID", id, data.button, data.type, data.action )
-		EMA:AddItemToItemDatabase( data.button, data.type, data.action )
-		EMA:SettingsRefresh()
-	end
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreateOptions( top )
-	-- Get positions.
-    local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local mediaHeight = EMAHelperSettings:GetMediaHeight()
-	local sliderHeight = EMAHelperSettings:GetSliderHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
-	local column2left = left + halfWidth
-	local left2 = left + thirdWidth
-	local left3 = left + (thirdWidth * 2)
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ITEM_USE_OPTIONS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsCheckBoxShowItemUse = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SHOW_ITEM_BAR"],
-		EMA.SettingsToggleShowItemUse,
-		L["SHOW_ITEM_BAR_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxShowItemUseOnlyOnMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ONLY_ON_MASTER"],
-		EMA.SettingsToggleShowItemUseOnlyOnMaster,
-		L["ONLY_ON_MASTER_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxShowItemCount = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SHOW_ITEM_COUNT"],
-		EMA.SettingsToggleShowItemCount,
-		L["SHOW_ITEM_COUNT_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxItemBarsSynchronized = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["KEEP_BARS_SYNCHRONIZED"],
-		EMA.SettingsToggleItemBarsSynchronized,
-		L["KEEP_BARS_SYNCHRONIZED_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxAutoAddQuestItem = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ADD_QUEST_ITEMS_TO_BAR"],
-		EMA.SettingsToggleAutoAddQuestItem,
-		L["ADD_QUEST_ITEMS_TO_BAR_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxAutoAddArtifactItem = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ADD_ARTIFACT_ITEMS"],
-		EMA.SettingsToggleAutoAddArtifactItem,
-		L["ADD_ARTIFACT_ITEMS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ADD_SATCHEL_ITEMS"],
-		EMA.SettingsToggleAutoAddSatchelsItem,
-		L["ADD_SATCHEL_ITEMS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxHideClearButton = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["HIDE_BUTTONS"],
-		EMA.SettingsToggleHideClearButton,
-		L["HIDE_BUTTONS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsCheckBoxHideItemUseInCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["HIDE_IN_COMBAT"],
-		EMA.SettingsToggleHideItemUseInCombat,
-		L["HIDE_IN_COMBAT_HELP_IU"]
-	)
-	movingTop = movingTop - checkBoxHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsItemUseNumberOfItems = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["NUMBER_OF_ITEMS"]
-	)
-	EMA.settingsControl.displayOptionsItemUseNumberOfItems:SetSliderValues( 1, EMA.maximumNumberOfItems, 1 )
-	EMA.settingsControl.displayOptionsItemUseNumberOfItems:SetCallback( "OnValueChanged", EMA.SettingsChangeNumberOfItems )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsItemUseNumberOfRows = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["NUMBER_OF_ROWS"]
-	)
-	EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetSliderValues( 1, EMA.maximumNumberOfRows, 1 )
-	EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetCallback( "OnValueChanged", EMA.SettingsChangeNumberOfRows )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["APPEARANCE_LAYOUT_HEALDER"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.displayOptionsItemUseScaleSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SCALE"]
-	)
-	EMA.settingsControl.displayOptionsItemUseScaleSlider:SetSliderValues( 0.5, 2, 0.01 )
-	EMA.settingsControl.displayOptionsItemUseScaleSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeScale )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsItemUseTransparencySlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TRANSPARENCY"]
-	)
-	EMA.settingsControl.displayOptionsItemUseTransparencySlider:SetSliderValues( 0, 1, 0.01 )
-	EMA.settingsControl.displayOptionsItemUseTransparencySlider:SetCallback( "OnValueChanged", EMA.SettingsChangeTransparency )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsItemUseMediaBorder = EMAHelperSettings:CreateMediaBorder(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["BORDER_STYLE"]
-	)
-	EMA.settingsControl.displayOptionsItemUseMediaBorder:SetCallback( "OnValueChanged", EMA.SettingsChangeBorderStyle )
-	EMA.settingsControl.displayOptionsBorderColourPicker = EMAHelperSettings:CreateColourPicker(
-		EMA.settingsControl,
-		halfWidth,
-		column2left + 15,
-		movingTop - 15,
-		L["BORDER COLOUR"]
-	)
-	EMA.settingsControl.displayOptionsBorderColourPicker:SetHasAlpha( true )
-	EMA.settingsControl.displayOptionsBorderColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBorderColourPickerChanged )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMA.settingsControl.displayOptionsItemUseMediaBackground = EMAHelperSettings:CreateMediaBackground(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["BACKGROUND"]
-	)
-	EMA.settingsControl.displayOptionsItemUseMediaBackground:SetCallback( "OnValueChanged", EMA.SettingsChangeBackgroundStyle )
-	EMA.settingsControl.displayOptionsBackgroundColourPicker = EMAHelperSettings:CreateColourPicker(
-		EMA.settingsControl,
-		halfWidth,
-		column2left + 15,
-		movingTop - 15,
-		L["BG_COLOUR"]
-	)
-	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetHasAlpha( true )
-	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsBackgroundColourPickerChanged )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["MESSAGES_HEADER"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-    EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CLEAR_ITEM_BAR"], movingTop, false )
-    movingTop = movingTop - headingHeight
-    EMA.settingsControl.buttonClearItemBar = EMAHelperSettings:CreateButton(
-        EMA.settingsControl,
-        headingWidth,
-        left,
-        movingTop,
-        L["CLEAR_ITEM_BAR"],
-        EMA.ClearItemUseCommand,
-		L["CLEAR_ITEM_BAR_HELP"]
-    )
-    movingTop = movingTop - buttonHeight - verticalSpacing
-	return movingTop
-end
-
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-end
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfOptions = SettingsCreateOptions( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfOptions )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	-- Values.
-	EMA.settingsControl.displayOptionsCheckBoxShowItemUse:SetValue( EMA.db.showItemUse )
-	EMA.settingsControl.displayOptionsCheckBoxShowItemUseOnlyOnMaster:SetValue( EMA.db.showItemUseOnMasterOnly )
-	EMA.settingsControl.displayOptionsCheckBoxHideItemUseInCombat:SetValue( EMA.db.hideItemUseInCombat )
-	EMA.settingsControl.displayOptionsCheckBoxShowItemCount:SetValue( EMA.db.showItemCount )
-	EMA.settingsControl.displayOptionsItemUseNumberOfItems:SetValue( EMA.db.numberOfItems )
-	EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetValue( EMA.db.numberOfRows )
-	EMA.settingsControl.displayOptionsCheckBoxAutoAddQuestItem:SetValue( EMA.db.autoAddQuestItemsToBar )
-	EMA.settingsControl.displayOptionsCheckBoxAutoAddArtifactItem:SetValue( EMA.db.autoAddArtifactItemsToBar )
-	EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem:SetValue( EMA.db.autoAddSatchelsItemsToBar )
-	EMA.settingsControl.displayOptionsCheckBoxHideClearButton:SetValue( EMA.db.hideClearButton )
-	EMA.settingsControl.displayOptionsCheckBoxItemBarsSynchronized:SetValue( EMA.db.itemBarsSynchronized )
-	EMA.settingsControl.displayOptionsItemUseScaleSlider:SetValue( EMA.db.itemUseScale )
-	EMA.settingsControl.displayOptionsItemUseTransparencySlider:SetValue( EMA.db.frameAlpha )
-	EMA.settingsControl.displayOptionsItemUseMediaBorder:SetValue( EMA.db.borderStyle )
-	EMA.settingsControl.displayOptionsItemUseMediaBackground:SetValue( EMA.db.backgroundStyle )
-	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
-	EMA.settingsControl.displayOptionsBackgroundColourPicker:SetColor( EMA.db.frameBackgroundColourR, EMA.db.frameBackgroundColourG, EMA.db.frameBackgroundColourB, EMA.db.frameBackgroundColourA )
-	EMA.settingsControl.displayOptionsBorderColourPicker:SetColor( EMA.db.frameBorderColourR, EMA.db.frameBorderColourG, EMA.db.frameBorderColourB, EMA.db.frameBorderColourA )
-	-- State.
-	-- Trying to change state in combat lockdown causes taint. Let's not do that. Eventually it would be nice to have a "proper state driven item list",
-	-- but this workaround is enough for now.
-	if not InCombatLockdown() then
-		EMA.settingsControl.displayOptionsCheckBoxShowItemUseOnlyOnMaster:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsCheckBoxHideItemUseInCombat:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsCheckBoxShowItemCount:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsItemUseNumberOfItems:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsItemUseNumberOfRows:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsCheckBoxAutoAddQuestItem:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsCheckBoxAutoAddArtifactItem:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsCheckBoxAutoAddSatchelsItem:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsCheckBoxHideClearButton:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsCheckBoxItemBarsSynchronized:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsItemUseScaleSlider:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsItemUseTransparencySlider:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsItemUseMediaBorder:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsItemUseMediaBackground:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.dropdownMessageArea:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsBackgroundColourPicker:SetDisabled( not EMA.db.showItemUse )
-		EMA.settingsControl.displayOptionsBorderColourPicker:SetDisabled( not EMA.db.showItemUse )
-		if EMA.itemUseCreated == true then
-			EMA:RefreshItemUseControls()
-			EMA:SettingsUpdateBorderStyle()
-			EMA:SetItemUseVisibility()
-			EMA:UpdateItemsInBar()
-			EMA:UpdateHeight()
-		end
-	else
-		EMA.updateSettingsAfterCombat = true
-	end
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsToggleShowItemUse( event, checked )
-	EMA.db.showItemUse = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHideItemUseInCombat( event, checked )
-	EMA.db.hideItemUseInCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowItemCount( event, checked )
-	EMA.db.showItemCount = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowItemUseOnlyOnMaster( event, checked )
-	EMA.db.showItemUseOnMasterOnly = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoAddQuestItem( event, checked )
-	EMA.db.autoAddQuestItemsToBar = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoAddArtifactItem( event, checked )
-	EMA.db.autoAddArtifactItemsToBar = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoAddSatchelsItem( event, checked )
-	EMA.db.autoAddSatchelsItemsToBar = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHideClearButton(event, checked )
-	EMA.db.hideClearButton = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleItemBarsSynchronized( event, checked )
-	EMA.db.itemBarsSynchronized = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeNumberOfItems( event, value )
-	EMA.db.numberOfItems = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeNumberOfRows( event, value )
-	EMA.db.numberOfRows= tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeScale( event, value )
-	EMA.db.itemUseScale = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeTransparency( event, value )
-	EMA.db.frameAlpha = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeBorderStyle( event, value )
-	EMA.db.borderStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeBackgroundStyle( event, value )
-	EMA.db.backgroundStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetMessageArea( event, value )
-	EMA.db.messageArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:OnMasterChanged( message, characterName )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsBackgroundColourPickerChanged( event, r, g, b, a )
-	EMA.db.frameBackgroundColourR = r
-	EMA.db.frameBackgroundColourG = g
-	EMA.db.frameBackgroundColourB = b
-	EMA.db.frameBackgroundColourA = a
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsBorderColourPickerChanged( event, r, g, b, a )
-	EMA.db.frameBorderColourR = r
-	EMA.db.frameBorderColourG = g
-	EMA.db.frameBorderColourB = b
-	EMA.db.frameBorderColourA = a
-	EMA:SettingsRefresh()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Create the item use frame.
-	CreateEMAItemUseFrame()
-	EMA:RefreshItemUseControls()
-	EMA:SettingsUpdateBorderStyle()
-	EMA:SetItemUseVisibility()
-	EMA:UpdateItemsInBar()
-	EMA.sharedInvData = {}
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
-	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
-	EMA:RegisterEvent( "BAG_UPDATE_DELAYED" )
-	EMA:RegisterEvent( "ITEM_PUSH" )
-	EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" )
-	EMA:RegisterEvent( "UNIT_QUEST_LOG_CHANGED", "QUEST_UPDATE" )
-	EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_Registered" )
-    EMA.SharedMedia.RegisterCallback( EMA, "LibSharedMedia_SetGlobal" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-	EMA:RefreshItemUseControls()
-	EMA:UpdateItemsInBar()
-	EMA.keyBindingFrame = CreateFrame( "Frame", nil, UIParent )
-	EMA:RegisterEvent( "UPDATE_BINDINGS" )
-	EMA:UPDATE_BINDINGS()
-	LibActionButton.RegisterCallback( EMA, "OnButtonContentsChanged", "OnButtonContentsChanged" )
-	LibActionButton.RegisterCallback( EMA, "OnButtonUpdate", "OnButtonUpdate" )
-	LibActionButton.RegisterCallback( EMA, "OnButtonState", "OnButtonState" )
-	LibActionButton.RegisterCallback( EMA, "OnButtonUsable", "OnButtonUsable" )
-	EMA:SecureHook( GameTooltip , "SetHyperlink", "AddTooltipInfo" )
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.showItemUse = settings.showItemUse
-		EMA.db.showItemUseOnMasterOnly = settings.showItemUseOnMasterOnly
-		EMA.db.hideItemUseInCombat = settings.hideItemUseInCombat
-		EMA.db.showItemCount = settings.showItemCount
-		EMA.db.borderStyle = settings.borderStyle
-		EMA.db.backgroundStyle = settings.backgroundStyle
-		EMA.db.itemUseScale = settings.itemUseScale
-		EMA.db.itemUseTitleHeight = settings.itemUseTitleHeight
-		EMA.db.itemUseVerticalSpacing = settings.itemUseVerticalSpacing
-		EMA.db.itemUseHorizontalSpacing = settings.itemUseHorizontalSpacing
-		EMA.db.autoAddQuestItemsToBar = settings.autoAddQuestItemsToBar
-		EMA.db.autoAddArtifactItemsToBar = settings.autoAddArtifactItemsToBar
-		EMA.db.autoAddSatchelsItemsToBar = settings.autoAddSatchelsItemsToBar
-		EMA.db.hideClearButton = settings.hideClearButton
-		EMA.db.itemBarsSynchronized = settings.itemBarsSynchronized
-		EMA.db.numberOfItems = settings.numberOfItems
-		EMA.db.numberOfRows = settings.numberOfRows
-		EMA.db.messageArea = settings.messageArea
-		if EMA.db.itemBarsSynchronized == true then
-		 EMA.db.itemsAdvanced = EMAUtilities:CopyTable( settings.itemsAdvanced )
-		end
-		EMA.db.frameAlpha = settings.frameAlpha
-		EMA.db.framePoint = settings.framePoint
-		EMA.db.frameRelativePoint = settings.frameRelativePoint
-		EMA.db.frameXOffset = settings.frameXOffset
-		EMA.db.frameYOffset = settings.frameYOffset
-		EMA.db.frameBackgroundColourR = settings.frameBackgroundColourR
-		EMA.db.frameBackgroundColourG = settings.frameBackgroundColourG
-		EMA.db.frameBackgroundColourB = settings.frameBackgroundColourB
-		EMA.db.frameBackgroundColourA = settings.frameBackgroundColourA
-		EMA.db.frameBorderColourR = settings.frameBorderColourR
-		EMA.db.frameBorderColourG = settings.frameBorderColourG
-		EMA.db.frameBorderColourB = settings.frameBorderColourB
-		EMA.db.frameBorderColourA = settings.frameBorderColourA
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
-function EMA:PLAYER_REGEN_ENABLED()
-	if EMA.db.hideItemUseInCombat == true then
-		EMA:SetItemUseVisibility()
-	end
-	if EMA.refreshItemUseControlsPending == true then
-		EMA:RefreshItemUseControls()
-		EMA.refreshItemUseControlsPending = false
-	end
-	if EMA.refreshUpdateItemsInBarPending == true then
-		EMA:UpdateItemsInBar()
-		EMA.refreshUpdateItemsInBarPending = false
-	end
-	if EMA.refreshUpdateBindingsPending == true then
-		EMA:UPDATE_BINDINGS()
-		EMA.refreshUpdateBindingsPending = false
-	end
-	if EMA.updateSettingsAfterCombat == true then
-		EMA:SettingsRefresh()
-		EMA.updateSettingsAfterCombat = false
-	end
-end
-
-function EMA:PLAYER_REGEN_DISABLED()
-	if EMA.db.hideItemUseInCombat == true then
-		EMAItemUseFrame:Hide()
-	end
-end
-
-function EMA:BAG_UPDATE_DELAYED()
-	if not InCombatLockdown() then
-	--	EMA:UpdateItemsInBar()
-	--	EMA:UpdateQuestItemsInBar()
-		-- ItemCount
-		EMA:GetEMAItemCount()
-	end
-end
-function EMA:QUEST_UPDATE()
-	if not InCombatLockdown() then
-		EMA:UpdateQuestItemsInBar()
-	end
-end
-
-function EMA:ITEM_PUSH()
-	if EMA.db.showItemUse == false then
-		return
-	end
-	if EMA.db.autoAddQuestItemsToBar == true then
-		EMA:ScheduleTimer( "CheckForQuestItemAndAddToBar", 1 )
-	end
-	if EMA.db.autoAddArtifactItemsToBar == true then
-		EMA:ScheduleTimer( "CheckForArtifactItemAndAddToBar", 1 )
-	end
-	if EMA.db.autoAddSatchelsItemsToBar == true then
-		EMA:ScheduleTimer( "CheckForSatchelsItemAndAddToBar", 1 )
-	end
-
-end
-
-function EMA:PLAYER_ENTERING_WORLD( event, ... )
-	EMA:ScheduleTimer( "GetEMAItemCount", 0.5 )
-end
-
-local function GetMaxItemCountFromItemID(itemID)
-	if itemID == nil then
-		return 0
-	end
-	if EMA.sharedInvData == nil then
-		return 0
-	end
-	local count = 0
-	for itemName, data in pairs( EMA.sharedInvData ) do
-		for id, itemData in pairs( data ) do
-			if itemID == itemData.item then
-				count = count + itemData.itemCount
-			end
-		end
-	end
-	return count
-end
-
-
-function EMA:AddTooltipInfo( toolTip, itemID )
-	if EMA.db.showItemUse == false or EMA.db.showItemCount == false then
-		return
-	end
-	EMA:AddToTooltip( toolTip, itemID )
-	toolTip:Show()
-end
-
-function EMA:AddToTooltip(toolTip, itemID)
-	local totalCount = 0
-	if itemID ~= nil then
-		local count = GetMaxItemCountFromItemID(itemID)
-		if count > 0 then
-			toolTip:AddLine(" ")
-			toolTip:AddDoubleLine(L["TEAM_BAGS"], L["BAG_BANK"], 1,0.82,0,1,0.82,0)
-			for characterName, position in EMAApi.TeamList() do
-				local count, bankCount = EMA:GetItemCountFromItemID( characterName, itemID )
-				if count ~= nil then
-				toolTip:AddDoubleLine(Ambiguate(characterName, "none"), count..L[" "]..L["("]..bankCount..L[")"], 1,1,1,1,1,1)
-					totalCount = totalCount + count
-				end
-			end
-		end
-	end
-	if totalCount > 1 then
-		toolTip:AddLine(" ")
-		toolTip:AddDoubleLine(L["TOTAL"], totalCount, 1,0.82,0,1,1,1,1)
-	end
-end
-
-function EMA:GetEMAItemCount()
-	if EMA.db.showItemUse == false or EMA.db.showItemCount == false then
-		return
-	end
-	local iteminfo = {}
-	for iterateItems , itemInfo in pairs( EMA.db.itemsAdvanced ) do
-		local itemID = itemInfo.action
-		if itemID ~= nil then
-			local itemName = GetItemInfo( itemID )
-			local countBags = GetItemCount( itemID )
-			local countTotal = GetItemCount( itemID , true)
-			local countBank = ( countTotal - countBags )
-			if itemName ~= nil then
-				iteminfo[itemName] = {}
-				table.insert( iteminfo[itemName], { itemID = itemID, countBags = countBags, countBank = countBank } )
-			end
-		end
-	end
-	EMA:EMASendCommandToTeam( EMA.COMMAND_ITEM_COUNT, iteminfo )
-end
-
-function EMA:ReceiveItemCount( characterName, dataTable )
-	if InCombatLockdown() then
-		return
-    end
-	--EMA:Print("ReceiveItemCount", characterName )
-	for itemName, info in pairs( dataTable ) do
-		for i, data in pairs( info ) do
-		if EMA.sharedInvData[characterName..itemName] == nil then
-			EMA.sharedInvData[characterName..itemName] = {}
-		else
-			EMAUtilities:ClearTable( EMA.sharedInvData[characterName..itemName] )
-
-		end
-		table.insert(EMA.sharedInvData[characterName..itemName], {name = characterName, item = data.itemID, itemCount = data.countBags, bankCount = data.countBank } )
-		end
-	end
-	LibActionButton:UpdateAllButtons()
-end
-
-function EMA:GetItemCountFromItemID( characterName, itemID )
-	if EMA.db.showItemUse == false or EMA.db.showItemCount == false then
-		return
-	end
-	local count = nil
-	local countBank = nil
-	for itemName, data in pairs( EMA.sharedInvData ) do
-		for id, itemData in pairs( data ) do
-			--EMA:Print("testaaa", itemID, "vs", itemData.item)
-			if itemID == itemData.item and characterName == itemData.name then
-				--EMA:Print("Found", characterName, itemData.itemCount )
-				count = itemData.itemCount
-				countBank = itemData.bankCount
-			end
-		end
-	end
-	return count, countBank
-
-end
-
-function EMA:UPDATE_BINDINGS()
-	if InCombatLockdown() then
-		EMA.refreshUpdateBindingsPending = true
-		return
-    end
-	ClearOverrideBindings( EMA.keyBindingFrame )
-	for iterateItems = 1, EMA.maximumNumberOfItems, 1 do
-		local containerButtonName = EMA.globalFramePrefix.."ContainerButton"..iterateItems
-		local key1, key2 = GetBindingKey( "ITEMUSE"..iterateItems )
-		if key1 then
-			SetOverrideBindingClick( EMA.keyBindingFrame, false, key1, containerButtonName )
-		end
-		if key2 then
-			SetOverrideBindingClick( EMA.keyBindingFrame, false, key2, containerButtonName )
-		end
-	end
-end
-
-
-
-function EMA:LibSharedMedia_Registered()
-end
-
-function EMA:LibSharedMedia_SetGlobal()
-end
-
--- A EMA command has been recieved.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if EMAApi.IsCharacterInTeam(characterName) == true then
-		if commandName == EMA.COMMAND_ITEMBAR_BUTTON then
-			EMA:ReceiveButtonData( characterName, ... )
-		end
-		if commandName == EMA.COMMAND_ITEMUSE_SYNC then
-			EMA:ReceiveSync( characterName, ... )
-		end
-		if commandName == EMA.COMMAND_ITEM_COUNT then
-			EMA:ReceiveItemCount( characterName, ... )
-		end
-	end
-end
-
---EMA QUEST API
-EMAApi.GetMaxItemCountFromItemID = GetMaxItemCountFromItemID
-EMAApi.QuestTest = EMA.CheckForQuestItemAndAddToBar
\ No newline at end of file
diff --git a/Modules/Modules.xml b/Modules/Modules.xml
deleted file mode 100644
index 893efba..0000000
--- a/Modules/Modules.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-				EMA - ( Ebony's MultiBoxing Assistant )
-				Current Author: Jennifer Cally (Ebony)
-				License: MIT License 2018 Jennifer Cally
-
-				Some Code Used from 'Jamba' that is
-				Released under 	the MIT License
-				'Jamba' Copyright 2008-2015  Michael "Jafula" Miller
--->
-
-<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd" xmlns="http://www.blizzard.com/wow/ui/">
-	<Script file="Sell.lua" />
-	<Script file="Purchase.lua" />
-
-	<Script file="Toon.lua" />
-	<Script file="Talk.lua" />
-
-	<Script file="Follow.lua" />
-
-	<Script file="Interaction.lua" />
-	<Script file="Trade.lua" />
-	<Script file="Guild.lua" />
-
-	<Script file="Quest.lua" />
-	<Script file="QuestWatcher.lua" />
-
-	<Script file="DisplayTeam.lua" />
-	<Script file="Information.lua" />
-	<Script file="ItemUse.lua" />
-</Ui>
diff --git a/Modules/Purchase.lua b/Modules/Purchase.lua
deleted file mode 100644
index 6cde9fa..0000000
--- a/Modules/Purchase.lua
+++ /dev/null
@@ -1,627 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Purchase",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0"
-)
-
--- Load libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
-local AceGUI = LibStub:GetLibrary( "AceGUI-3.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "Purchase"
-EMA.settingsDatabaseName = "PurchaseProfileDB"
-EMA.chatCommand = "ema-purchase"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["VENDER"]
-EMA.moduleDisplayName = L["PURCHASE"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\SellIcon.tga"
--- order
-EMA.moduleOrder = 60
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		autoBuy = false,
-		autoBuyOverflow = true,
-		messageArea = EMAApi.DefaultMessageArea(),
-		autoBuyItems = {}
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_ALL_SETTINGS"],
-				usage = "/EMA-purchase push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Purchase Management.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	EMA.settingsControl.checkBoxAutoBuy:SetValue( EMA.db.autoBuy )
-	EMA.settingsControl.checkBoxAutoBuyOverflow:SetValue( EMA.db.autoBuyOverflow )
-	EMA.settingsControl.editBoxTag:SetText( EMA.autoBuyItemTag )
-	EMA.settingsControl.editBoxAmount:SetText( EMA.autoBuyAmount )
-	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
-	EMA.settingsControl.checkBoxAutoBuyOverflow:SetDisabled( not EMA.db.autoBuy )
-	EMA.settingsControl.editBoxItem:SetDisabled( not EMA.db.autoBuy )
-	EMA.settingsControl.editBoxTag:SetDisabled( not EMA.db.autoBuy )
-	EMA.settingsControl.editBoxAmount:SetDisabled( not EMA.db.autoBuy )
-	EMA.settingsControl.buttonRemove:SetDisabled( not EMA.db.autoBuy )
-	EMA.settingsControl.buttonAdd:SetDisabled( not EMA.db.autoBuy )
-	EMA:SettingsScrollRefresh()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.autoBuy = settings.autoBuy
-		EMA.db.autoBuyOverflow = settings.autoBuyOverflow
-		EMA.db.messageArea = settings.messageArea
-		EMA.db.autoBuyItems = EMAUtilities:CopyTable( settings.autoBuyItems )
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreateOptions( top )
-	-- Position and size constants.
-	local buttonControlWidth = 105
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local left2 = left + halfWidth + horizontalSpacing
-	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PURCHASE_ITEMS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxAutoBuy = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["AUTO_BUY_ITEMS"],
-		EMA.SettingsToggleAutoBuyItems
-	)
-	EMA.settingsControl.checkBoxAutoBuyOverflow = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left2,
-		movingTop,
-		L["OVERFLOW"],
-		EMA.SettingsToggleAutoBuyItemsOverflow
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.highlightRow = 1
-	EMA.settingsControl.offset = 1
-	local list = {}
-	list.listFrameName = "EMAPurchaseSettingsFrame"
-	list.parentFrame = EMA.settingsControl.widgetSettings.content
-	list.listTop = movingTop
-	list.listLeft = left
-	list.listWidth = headingWidth
-	list.rowHeight = 20
-	list.rowsToDisplay = 8
-	list.columnsToDisplay = 3
-	list.columnInformation = {}
-	list.columnInformation[1] = {}
-	list.columnInformation[1].width = 60
-	list.columnInformation[1].alignment = "LEFT"
-	list.columnInformation[2] = {}
-	list.columnInformation[2].width = 10
-	list.columnInformation[2].alignment = "RIGHT"
-	list.columnInformation[3] = {}
-	list.columnInformation[3].width = 30
-	list.columnInformation[3].alignment = "LEFT"
-	list.scrollRefreshCallback = EMA.SettingsScrollRefresh
-	list.rowClickCallback = EMA.SettingsRowClick
-	EMA.settingsControl.list = list
-	EMAHelperSettings:CreateScrollList( EMA.settingsControl.list )
-	movingTop = movingTop - list.listHeight - verticalSpacing
-	EMA.settingsControl.buttonRemove = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		buttonControlWidth,
-		left,
-		movingTop,
-		L["REMOVE"],
-		EMA.SettingsRemoveClick,
-		L["REMOVE_VENDER_LIST"]
-	)
-	movingTop = movingTop -	buttonHeight - verticalSpacing
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ADD_ITEM"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.editBoxItem = EMAHelperSettings:CreateEditBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ITEM_DROP"]
-	)
-	EMA.settingsControl.editBoxItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedItem )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.editBoxTag = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		dropBoxWidth,
-		left,
-		movingTop,
-		L["GROUP_LIST"]
-	)
-	EMA.settingsControl.editBoxTag:SetList( EMAApi.GroupList() )
-	EMA.settingsControl.editBoxTag:SetCallback( "OnValueChanged",  EMA.GroupDropDownList )
-	EMA.settingsControl.editBoxAmount = EMAHelperSettings:CreateEditBox(
-		EMA.settingsControl,
-		dropBoxWidth,
-		left + dropBoxWidth + horizontalSpacing,
-		movingTop,
-		L["AMOUNT"]
-	)
-	EMA.settingsControl.editBoxAmount:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedAmount )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.buttonAdd = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		buttonControlWidth,
-		left,
-		movingTop,
-		L["ADD"],
-		EMA.SettingsAddClick
-	)
-	movingTop = movingTop -	buttonHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PURCHASE_MSG"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	return movingTop
-end
-
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-end
-
-function EMA:OnGroupAreasChanged( message )
-	EMA.settingsControl.editBoxTag:SetList( EMAApi.GroupList() )
-end
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfSettings = SettingsCreateOptions( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfSettings )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Callbacks.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsScrollRefresh()
-	FauxScrollFrame_Update(
-		EMA.settingsControl.list.listScrollFrame,
-		EMA:GetItemsMaxPosition(),
-		EMA.settingsControl.list.rowsToDisplay,
-		EMA.settingsControl.list.rowHeight
-	)
-	EMA.settingsControl.offset = FauxScrollFrame_GetOffset( EMA.settingsControl.list.listScrollFrame )
-	for iterateDisplayRows = 1, EMA.settingsControl.list.rowsToDisplay do
-		-- Reset.
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetText( "" )
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
-		-- Get data.
-		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.offset
-		if dataRowNumber <= EMA:GetItemsMaxPosition() then
-			-- Put data information into columns.
-			local itemInformation = EMA:GetItemAtPosition( dataRowNumber )
-			EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetText( itemInformation.name )
-			EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( itemInformation.amount )
-			EMA.settingsControl.list.rows[iterateDisplayRows].columns[3].textString:SetText( itemInformation.tag )
-			-- Highlight the selected row.
-			if dataRowNumber == EMA.settingsControl.highlightRow then
-				EMA.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
-			end
-		end
-	end
-end
-
-function EMA:SettingsRowClick( rowNumber, columnNumber )
-	if EMA.settingsControl.offset + rowNumber <= EMA:GetItemsMaxPosition() then
-		EMA.settingsControl.highlightRow = EMA.settingsControl.offset + rowNumber
-		EMA:SettingsScrollRefresh()
-	end
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsSetMessageArea( event, value )
-	EMA.db.messageArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoBuyItems( event, checked )
-	EMA.db.autoBuy = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoBuyItemsOverflow( event, checked )
-	EMA.db.autoBuyOverflow = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRemoveClick( event )
-	StaticPopup_Show( "EMAPURCHASE_CONFIRM_REMOVE_AUTO_BUY_ITEM" )
-end
-
-function EMA:SettingsEditBoxChangedItem( event, text )
-	EMA.autoBuyItemLink = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:GroupDropDownList (event, value )
-	-- if nil or the blank group then don't get Name.
-	if value == " " or value == nil then
-		return
-	end
-	for index, groupName in ipairs( EMAApi.GroupList() ) do
-		if index == value then
-			EMA.autoBuyItemTag = groupName
-			break
-		end
-	end
-	EMA:SettingsRefresh()
-end
-
-
-
-
-
-function EMA:SettingsEditBoxChangedAmount( event, text )
-	if not text or text:trim() == "" or text:find( "^(%d+)$" ) == nil then
-		EMA:Print( L["NUM_ERROR"] )
-		return
-	end
-	EMA.autoBuyAmount = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsAddClick( event )
-	if EMA.autoBuyItemLink ~= nil and EMA.autoBuyItemTag ~= nil then
-		EMA:AddItem( EMA.autoBuyItemLink, EMA.autoBuyItemTag, EMA.autoBuyAmount )
-		EMA.autoBuyItemLink = nil
-		EMA.settingsControl.editBoxItem:SetText( "" )
-		EMA:SettingsRefresh()
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Popup Dialogs.
--------------------------------------------------------------------------------------------------------------
-
--- Initialize Popup Dialogs.
-local function InitializePopupDialogs()
-	StaticPopupDialogs["EMAPURCHASE_CONFIRM_REMOVE_AUTO_BUY_ITEM"] = {
-        text = L["BUY_POPUP_ACCEPT"],
-        button1 = YES,
-        button2 = NO,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function()
-			EMA:RemoveItem()
-		end,
-    }
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	EMA.autoBuyItemTag = EMAApi.AllTag()
-	EMA.autoBuyItemLink = nil
-	EMA.autoBuyAmount = 20
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	EMA:RegisterEvent( "MERCHANT_SHOW" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMAPurchase functionality.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:GetItemsMaxPosition()
-	return #EMA.db.autoBuyItems
-end
-
-function EMA:GetItemAtPosition( position )
-	return EMA.db.autoBuyItems[position]
-end
-
-function EMA:AddItem( itemLink, itemTag, amountToBuy )
-	-- Get some more information about the item.
-	local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo( itemLink )
-	-- If the item could be found.
-	if name ~= nil then
-		local itemInformation = {}
-		itemInformation.link = itemLink
-		itemInformation.name = name
-		itemInformation.tag = itemTag
-		itemInformation.amount = amountToBuy
-		table.insert( EMA.db.autoBuyItems, itemInformation )
-		EMA:SettingsRefresh()
-		EMA:SettingsRowClick( 1, 1 )
-	end
-end
-
-function EMA:RemoveItem()
-	table.remove( EMA.db.autoBuyItems, EMA.settingsControl.highlightRow )
-	EMA:SettingsRefresh()
-	EMA:SettingsRowClick( 1, 1 )
-end
-
-function EMA:MERCHANT_SHOW()
-	if EMA.db.autoBuy == true then
-		EMA:DoMerchantAutoBuy()
-	end
-end
-
--- A EMA command has been recieved.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-end
-
-function EMA:DoMerchantAutoBuy()
-	-- Flags will be set if the character does not have enough bag space or money.
-	local outOfBagSpace = false
-	local outOfMoney = false
-	local outOfOtherCurrency = false
-	-- Iterate all the wanted items...
-	for position, itemInfoTable in pairs( EMA.db.autoBuyItems ) do
-		local maxItemAmount = tonumber( itemInfoTable.amount )
-		local itemTag = itemInfoTable.tag
-		local itemLink = itemInfoTable.link
-		-- Does this character have the item tag?  No, don't buy.
-		if EMAApi.IsCharacterInGroup( EMA.characterName, itemTag ) then
-			-- Does the merchant have the item in stock?
-			local itemIndexMerchant = EMA:DoesMerchantHaveItemInStock( itemLink )
-			if itemIndexMerchant ~= nil then
-				-- Yes, item is in stock, how many does the character need?
-				local amountNeeded = EMA:GetAmountNeededForItemTopUp( itemLink, maxItemAmount )
-				-- Need more than 0 items, buy them.
-				if amountNeeded > 0 then
-					-- Attempt to buy the items.
-					local noFreeBagSpace, notEnoughMoney, notEnoughOtherCurrency = EMA:BuyItemFromMerchant( itemIndexMerchant, amountNeeded )
-					-- Set flags if problems occurred.
-					if noFreeBagSpace then
-						outOfBagSpace = true
-					end
-					if notEnoughMoney then
-						outOfMoney = true
-					end
-					if notEnoughOtherCurrency then
-						outOfOtherCurrency = true
-					end
-				end
-			end
-		end
-	end
-	-- If there was a problem, tell the master.
-	if outOfBagSpace then
-		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ERROR_BAGS_FULL"], false )
-	end
-	if outOfMoney then
-		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ERROR_GOLD"], false )
-	end
-	if outOfOtherCurrency then
-		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ERROR_CURR"], false )
-	end
-end
-
-function EMA:DoesMerchantHaveItemInStock( itemLink )
-	-- The index of the item to be found in the merchants inventory; initially nil, not found.
-	local indexOfItemToFind = nil
-	-- Get the name of the item to find from the item link.
-	local itemNameToFind = GetItemInfo( itemLink )
-	-- How many items does the merchant have?
-	local numberMerchantItems = GetMerchantNumItems()
-	-- Iterate all the merchants items...
-	for merchantIndex = 1, numberMerchantItems do
-		-- Is there an item link for this item.
-		local merchantItemLink = GetMerchantItemLink( merchantIndex )
-		if merchantItemLink then
-			-- Yes, get the item name.
-			local itemNameMerchant = GetItemInfo( merchantItemLink )
-			if itemNameMerchant == itemNameToFind then
-				indexOfItemToFind = merchantIndex
-				break
-			end
-		end
-	end
-	-- Return the index into the merchants inventory of the item.
-	return indexOfItemToFind
-end
-
-function EMA:GetAmountNeededForItemTopUp( itemLink, maxItemAmount )
-	-- The amount of the item needed to top up the item.
-	local amountNeeded = 0
-	-- How much of this item does the character have in it's bags?
-	local amountInBags = GetItemCount( itemLink )
-	-- Does the character need more?
-	if amountInBags < maxItemAmount then
-		-- Yes, how much more?
-		amountNeeded = maxItemAmount - amountInBags
-	end
-	-- Return the amount needed.
-	return amountNeeded
-end
-
-function EMA:BuyItemFromMerchant( itemIndexMerchant, amountToBuy )
-	-- Flags will be set if the character does not have enough bag space or money.
-	local noFreeBagSpace = false
-	local notEnoughMoney = false
-	local notEnoughOtherCurrency = false
-	-- Processing variables.
-	local buyThisAmount = 0
-	local amountLeftToBuy = amountToBuy
-	local actualAmountToBuy = 0
-	local costToBuy = 0
-	local moneyAvailable = 0
-	-- Get information about the item from the merchant.
-	local name, texture, price, itemsPerStack, numberAvailable, isUsable, extendedCost = GetMerchantItemInfo( itemIndexMerchant )
-	local maximumCanBuyAtATime = GetMerchantItemMaxStack( itemIndexMerchant )
-	-- Loop buying stacks from the merchant until the required number has been purchased.
-	repeat
-		-- Still need to buy more than the maximum?
-		if amountLeftToBuy >= maximumCanBuyAtATime then
-			-- Yes, buy the maximum amount.
-			buyThisAmount = maximumCanBuyAtATime
-		else
-			-- No, just buy the amount left.
-			buyThisAmount = amountLeftToBuy
-		end
-		-- Attempt to buy this amount from the merchant; although actual amount bought may differ,
-		-- depending on merchant stock and over buy flag.
-		-- How many does the merchant have left?
-		numberAvailable = select( 5, GetMerchantItemInfo( itemIndexMerchant ) )
-		-- Calculate how many to buy depending on the stacksize and whether over buying is allowed.
-		actualAmountToBuy = buyThisAmount
-		if EMA.db.autoBuyOverflow == true then
-			actualAmountToBuy = ceil(actualAmountToBuy)
-		else
-			actualAmountToBuy = floor(actualAmountToBuy)
-		end
-		-- If requesting more than the number available, then just buy as much as possible.
-		-- If numberAvailable is -1 then there is unlimited stock available.
-		if numberAvailable ~= -1 then
-			if actualAmountToBuy > numberAvailable then
-				actualAmountToBuy = numberAvailable
-			end
-		end
-		-- Does the character have enough money?
-		costToBuy = actualAmountToBuy * price
-		moneyAvailable = GetMoney()
-		if moneyAvailable < costToBuy then
-			notEnoughMoney = true
-		end
-		-- Is there enough free space for this item in the characters bags?
-		--TODO - need to find items family type and compare to each container.
-		local numFreeSlots, numTotalSlots = LibBagUtils:CountSlots("BAGS", 0)
-        if numFreeSlots == 0 then
-            noFreeBagSpace = true
-        end
-		-- Buy from the merchant, if there is a valid amount to buy and the character has enough money.
-		if (actualAmountToBuy > 0) and (not notEnoughMoney) then
-			BuyMerchantItem( itemIndexMerchant, actualAmountToBuy )
-		end
-		-- How much left to buy?
-		amountLeftToBuy = amountLeftToBuy - buyThisAmount
-	until (amountLeftToBuy == 0 or noFreeBagSpace == true)
-	-- TODO
-	-- Return the success flags.
-	return noFreeBagSpace, notEnoughMoney, notEnoughOtherCurrency
-end
diff --git a/Modules/Quest.lua b/Modules/Quest.lua
deleted file mode 100644
index b636e81..0000000
--- a/Modules/Quest.lua
+++ /dev/null
@@ -1,2083 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Quest",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Load libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local AceGUI = LibStub( "AceGUI-3.0" )
-EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
-
-
---  Constants and Locale for this module.
-EMA.moduleName = "Quest"
-EMA.settingsDatabaseName = "QuestProfileDB"
-EMA.chatCommand = "ema-quest"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["QUEST"]
-EMA.moduleDisplayName = L["QUEST"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\QuestIcon.tga"
-EMA.moduleCompletionIcon = "Interface\\Addons\\EMA\\Media\\QuestCompletionIcon.tga"
--- order
-EMA.moduleOrder = 50
-EMA.moduleCompletionOrder = 1
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		mirrorMasterQuestSelectionAndDeclining = true,
-		acceptQuests = true,
-		slaveMirrorMasterAccept = true,
-		allAutoSelectQuests = false,
-		doNotAutoAccept = true,
-		allAcceptAnyQuest = false,
-		onlyAcceptQuestsFrom = false,
-		hideStaticPopup = false,
-		acceptFromTeam = false,
-		acceptFromNpc = false,
-		acceptFromFriends = false,
-		acceptFromParty = false,
-		acceptFromRaid = false,
-		acceptFromGuild = false,
-		masterAutoShareQuestOnAccept = false,
-		slaveAutoAcceptEscortQuest = true,
-		showEMAQuestLogWithWoWQuestLog = true,
-		enableAutoQuestCompletion = true,
-		noChoiceAllDoNothing = false,
-		noChoiceSlaveCompleteQuestWithMaster = true,
-		noChoiceAllAutoCompleteQuest = false,
-		hasChoiceSlaveDoNothing = false,
-		hasChoiceSlaveCompleteQuestWithMaster = true,
-		hasChoiceSlaveChooseSameRewardAsMaster = false,
-		hasChoiceSlaveMustChooseOwnReward = true,
-		hasChoiceSlaveRewardChoiceModifierConditional = false,
-		hasChoiceCtrlKeyModifier = false,
-		hasChoiceShiftKeyModifier = false,
-		hasChoiceAltKeyModifier = false,
-		hasChoiceOverrideUseSlaveRewardSelected = true,
-		messageArea = EMAApi.DefaultMessageArea(),
-		warningArea = EMAApi.DefaultWarningArea(),
-		framePoint = "CENTER",
-		frameRelativePoint = "CENTER",
-		frameXOffset = 0,
-		frameYOffset = 0,
-		overrideQuestAutoSelectAndComplete = false,
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = "group",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-quest push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_SELECT_GOSSIP_OPTION = "EMASelectGossipOption"
-EMA.COMMAND_SELECT_GOSSIP_ACTIVE_QUEST = "EMASelectGossipActiveQuest"
-EMA.COMMAND_SELECT_GOSSIP_AVAILABLE_QUEST = "EMASelectGossipAvailableQuest"
-EMA.COMMAND_SELECT_ACTIVE_QUEST = "EMASelectActiveQuest"
-EMA.COMMAND_SELECT_AVAILABLE_QUEST = "EMASelectAvailableQuest"
-EMA.COMMAND_ACCEPT_QUEST = "EMAAcceptQuest"
-EMA.COMMAND_COMPLETE_QUEST = "EMACompleteQuest"
-EMA.COMMAND_CHOOSE_QUEST_REWARD = "EMAChooseQuestReward"
-EMA.COMMAND_DECLINE_QUEST = "EMADeclineQuest"
-EMA.COMMAND_SELECT_QUEST_LOG_ENTRY = "EMASelectQuestLogEntry"
-EMA.COMMAND_QUEST_TRACK = "EMAQuestTrack"
-EMA.COMMAND_ABANDON_QUEST = "EMAAbandonQuest"
-EMA.COMMAND_ABANDON_ALL_QUESTS = "EMAAbandonAllQuests"
-EMA.COMMAND_TRACK_ALL_QUESTS = "EMATrackAllQuests"
-EMA.COMMAND_UNTRACK_ALL_QUESTS = "EMAUnTrackAllQuests"
-EMA.COMMAND_SHARE_ALL_QUESTS = "EMAShareAllQuests"
-EMA.COMMAND_TOGGLE_AUTO_SELECT = "EMAToggleAutoSelect"
-EMA.COMMAND_LOG_COMPLETE_QUEST = "EMALogCompleteQuest"
-EMA.COMMAND_ACCEPT_QUEST_FAKE = "EMAAcceptQuestFake"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
-
--------------------------------------------------------------------------------------------------------------
--- Popup Dialogs.
--------------------------------------------------------------------------------------------------------------
-
--- Initialize Popup Dialogs.
-local function InitializePopupDialogs()
-   -- Asks If you like to Abandon on all toons
-   StaticPopupDialogs["EMAQUEST_ABANDON_ALL_TOONS"] = {
-        text = L["ABANDON_QUESTS_TEAM"],
-        button1 = L["JUST_ME"],
-        button2 = L["ALL_TEAM"],
-        button3 = NO,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function( self )
-			--EMA:Print("Button1")
-			AbandonQuest()
-		end,
-		OnAlt = function ( self )
-			--EMA:Print("Button3")
-
-		end,
-		OnCancel = function( self, data )
-			--EMA:Print("Button2")
-			EMA:EMASendCommandToTeam( EMA.COMMAND_ABANDON_QUEST, data.questID, data.title)
-		end,
-    }
-   -- Asks If you like to Track on all toons
-   StaticPopupDialogs["EMA_QUEST_TRACK_ALL_TOONS"] = {
-        text = L["TRACK_QUEST_ON_TEAM"],
-        button1 = YES,
-        button2 = NO,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function( self, data )
-			EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, data.questID, data.title, true )
-		end,
-		OnCancel = function( self )
-		end,
-    }
-	StaticPopupDialogs["EMA_QUEST_UNTRACK_ALL_TOONS"] = {
-        text = L["UNTRACK_QUEST_ON_TEAM"],
-        button1 = YES,
-        button2 = NO,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function( self, data )
-			EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, data.questID, data.title, false )
-		end,
-		OnCancel = function( self )
-		end,
-    }
-	StaticPopupDialogs["EMA_ABANDON_ALL_TOON_QUEST"] = {
-        text = L["ABANDON_ALL_QUESTS"],
-        button1 = L["YES_IAM_SURE"],
-        button2 = NO,
-        timeout = 0,
-		showAlert = 1,
-		whileDead = true,
-		hideOnEscape = true,
-		OnAccept = function()
-			EMA:DoAbandonAllQuestsFromAllToons()
-		end,
-    }
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:DebugMessage( ... )
-	--EMA:Print( ... )
-end
-
--- Initialise the module.
-function EMA:OnInitialize()
-	-- Create the settings control.
-	EMA:SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-	-- Create the EMA Quest Log frame.
-	EMA:CreateEMAMiniQuestLogFrame()
-	-- An empty table to hold the available and active quests at an npc.
-	EMA.gossipQuests = {}
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	-- No internal commands active.
-	EMA.isInternalCommand = false
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-    -- Quest events.
-	EMA:RegisterEvent( "QUEST_ACCEPTED" )
-    EMA:RegisterEvent( "QUEST_DETAIL" )
-    EMA:RegisterEvent( "QUEST_COMPLETE" )
-    EMA:RegisterEvent( "QUEST_ACCEPT_CONFIRM" )
-	EMA:RegisterEvent( "GOSSIP_SHOW" )
-	EMA:RegisterEvent( "QUEST_GREETING" )
-	EMA:RegisterEvent( "QUEST_PROGRESS" )
-	EMA:RegisterEvent( "CHAT_MSG_SYSTEM", "QUEST_FAIL" )
-   -- Quest post hooks.
-    EMA:SecureHook( "SelectGossipOption" )
-    EMA:SecureHook( "SelectGossipActiveQuest" )
-    EMA:SecureHook( "SelectGossipAvailableQuest" )
-    EMA:SecureHook( "SelectActiveQuest" )
-    EMA:SecureHook( "SelectAvailableQuest" )
-    EMA:SecureHook( "AcceptQuest" )
-	EMA:SecureHook( "AcknowledgeAutoAcceptQuest" )
-    EMA:SecureHook( "CompleteQuest" )
-	EMA:SecureHook( "GetQuestReward" )
-	EMA:SecureHook( "ToggleFrame" )
-	EMA:SecureHook( "ToggleQuestLog" )
-	EMA:SecureHook( WorldMapFrame, "Hide", "QuestLogFrameHide" )
-	EMA:SecureHook( "ShowQuestComplete" )
-	EMA:SecureHook( "QuestMapQuestOptions_AbandonQuest" )
-	EMA:SecureHook( "QuestMapQuestOptions_TrackQuest" )
-
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-	-- AceHook-3.0 will tidy up the hooks for us.
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsCreate()
-	EMA.settingsControl = {}
-	EMA.settingsControlCompletion = {}
-	-- Create the settings panels.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControlCompletion,
-		L["COMPLETION"],
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleCompletionIcon,
-		EMA.moduleCompletionOrder
-	)
-	-- Create the quest controls.
-	local bottomOfQuestOptions = EMA:SettingsCreateQuestControl( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfQuestOptions )
-	local bottomOfQuestCompletionOptions = EMA:SettingsCreateQuestCompletionControl( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControlCompletion.widgetSettings.content:SetHeight( -bottomOfQuestCompletionOptions )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
-function EMA:SettingsCreateQuestControl( top )
-	-- Get positions and dimensions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local radioBoxHeight = EMAHelperSettings:GetRadioBoxHeight()
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local indent = horizontalSpacing * 10
-	local indentContinueLabel = horizontalSpacing * 22
-	local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local middle = left + halfWidth
-	local column1Left = left
-	local column1LeftIndent = left + indentContinueLabel
-	local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing
-	local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, "", movingTop, false )
-	movingTop = movingTop - headingHeight
-	-- Create a heading for information.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, EMA.moduleDisplayName..L[" "]..L["INFORMATION"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	-- Information line 1.
-	EMA.settingsControl.labelQuestInformation1 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["QUESTINFORMATIONONE"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	-- Information line 2.
-	EMA.settingsControl.labelQuestInformation2 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["QUESTINFORMATIONTWO"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	-- Information line 3.
-	EMA.settingsControl.labelQuestInformation3 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["QUESTINFORMATIONTHREE"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	-- Create a heading for quest selection.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["QUEST_HEADER"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	-- Radio box: Minion select, accept and decline quest with master.
-	EMA.settingsControl.checkBoxMirrorMasterQuestSelectionAndDeclining = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["MIRROR_QUEST"],
-		EMA.SettingsToggleMirrorMasterQuestSelectionAndDeclining,
-		L["MIRROR_QUEST_HELP"]
-	)
-	EMA.settingsControl.checkBoxMirrorMasterQuestSelectionAndDeclining:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Radio box: All auto select quests.
-	EMA.settingsControl.checkBoxAllAutoSelectQuests = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["AUTO_SELECT_QUESTS"],
-		EMA.SettingsToggleAllAutoSelectQuests,
-		L["AUTO_SELECT_QUESTS_HELP"]
-	)
-	EMA.settingsControl.checkBoxAllAutoSelectQuests:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Check box: Accept quests.
-	EMA.settingsControl.checkBoxAcceptQuests = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["ACCEPT_QUESTS"],
-		EMA.SettingsToggleAcceptQuests,
-		L["ACCEPT_QUESTS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Radio box: Minion accept quest with master.
-	EMA.settingsControl.checkBoxMinionMirrorMasterAccept = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left + indent,
-		movingTop,
-		L["ACCEPT_QUEST_WITH_TEAM"],
-		EMA.SettingsToggleMinionMirrorMasterAccept,
-		L["ACCEPT_QUEST_WITH_TEAM_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Information line 3.
-	EMA.settingsControl.labelQuestInformationAuto = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["QUEST_INFORMATION_AUTO"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	-- Radio box: All auto accept any quest.
-	EMA.settingsControl.checkBoxDoNotAutoAccept = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left + indent,
-		movingTop,
-		L["DONOT_AUTO_ACCEPT_QUESTS"],
-		EMA.SettingsToggleDoNotAutoAccept
-	)
-	EMA.settingsControl.checkBoxDoNotAutoAccept:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Radio box: All auto accept any quest.
-	EMA.settingsControl.checkBoxAllAcceptAnyQuest = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left + indent,
-		movingTop,
-		L["AUTO_ACCEPT_QUESTS"],
-		EMA.SettingsToggleAllAcceptAnyQuest,
-		L["AUTO_ACCEPT_QUESTS_HELP"]
-	)
-	EMA.settingsControl.checkBoxAllAcceptAnyQuest:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Radio box: Choose who to auto accept quests from.
-	EMA.settingsControl.checkBoxOnlyAcceptQuestsFrom = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left + indent,
-		movingTop,
-		L["AUTO_ACCEPT_QUESTS_LIST"],
-		EMA.SettingsToggleOnlyAcceptQuestsFrom,
-		L["AUTO_ACCEPT_QUESTS_LIST_HELP"]
-	)
-	EMA.settingsControl.checkBoxOnlyAcceptQuestsFrom:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Check box: Team.
-	EMA.settingsControl.checkBoxAcceptFromTeam = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxThirdWidth,
-		column1LeftIndent,
-		movingTop,
-		L["TEAM"],
-		EMA.SettingsToggleAcceptFromTeam,
-		L["TEAM_QUEST_HELP"]
-	)
-	-- Check box: NPC.
-	EMA.settingsControl.checkBoxAcceptFromNpc = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxThirdWidth,
-		column2LeftIndent,
-		movingTop,
-		L["NPC"],
-		EMA.SettingsToggleAcceptFromNpc,
-		L["NPC_HELP"]
-	)
-	-- Check box: Friends.
-	EMA.settingsControl.checkBoxAcceptFromFriends = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxThirdWidth,
-		column3LeftIndent,
-		movingTop,
-		L["FRIENDS"],
-		EMA.SettingsToggleAcceptFromFriends,
-		L["FRIENDS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Check box: Party.
-	EMA.settingsControl.checkBoxAcceptFromParty = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxThirdWidth,
-		column1LeftIndent,
-		movingTop,
-		L["PARTY"],
-		EMA.SettingsToggleAcceptFromParty,
-		L["QUEST_GROUP_HELP"]
-
-	)
-	-- Check box: Guild.
-	--movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxAcceptFromGuild = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxThirdWidth,
-		column2LeftIndent,
-		movingTop,
-		L["GUILD"],
-		EMA.SettingsToggleAcceptFromGuild,
-		L["GUILD_HELP"]
-	)
--- TODO Change To Community's
-	-- Check box: Raid.
-	EMA.settingsControl.checkBoxAcceptFromRaid = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		checkBoxThirdWidth,
-		column3LeftIndent,
-		movingTop,
-		L["PH_RAID"],
-		EMA.SettingsToggleAcceptFromRaid,
-		L["PH_RAID_HELP"]
-	)
-	-- Check box: Master auto share quest on accept.
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxMasterAutoShareQuestOnAccept = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["MASTER_SHARE_QUESTS"],
-		EMA.SettingsToggleMasterAutoShareQuestOnAccept,
-		L["MASTER_SHARE_QUESTS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Check box: Minion auto accept escort quest from master.
-	EMA.settingsControl.checkBoxMinionAutoAcceptEscortQuest = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["ACCEPT_ESCORT_QUEST"],
-		EMA.SettingsToggleMinionAutoAcceptEscortQuest,
-		L["ACCEPT_ESCORT_QUEST_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Create a heading for other options.
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["OTHER"]..L[" "]..L["OPTIONS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	-- Check box: Override quest auto select and auto complete.
-	EMA.settingsControl.checkBoxOverrideQuestAutoSelectAndComplete = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["HOLD_SHIFT_TO_OVERRIDE"],
-		EMA.SettingsToggleOverrideQuestAutoSelectAndComplete,
-		L["HOLD_SHIFT_TO_OVERRIDE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Check box: Show EMA quest log with WoW quest log.
-	EMA.settingsControl.checkBoxShowEMAQuestLogWithWoWQuestLog = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["SHOW_PANEL_UNDER_QUESTLOG"],
-		EMA.SettingsToggleShowEMAQuestLogWithWoWQuestLog,
-		L["SHOW_PANEL_UNDER_QUESTLOG_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Message area.
-	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-	movingTop = movingTop - dropdownHeight
-	-- Warning area.
-	EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["SEND_WARNING_AREA"]
-	)
-	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
-	movingTop = movingTop - dropdownHeight
-	return movingTop
-end
-
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-end
-
-function EMA:SettingsCreateQuestCompletionControl( top )
-	-- Get positions and dimensions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local radioBoxHeight = EMAHelperSettings:GetRadioBoxHeight()
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local indent = horizontalSpacing * 10
-	local indentContinueLabel = horizontalSpacing * 18
-	local indentSpecial = indentContinueLabel + 9
-	local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3
-	local column1Left = left
-	local column1LeftIndent = left + indentContinueLabel
-	local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing
-	local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControlCompletion, "", movingTop, false )
-	movingTop = movingTop - headingHeight
-	-- Create a heading for quest completion.
-	EMAHelperSettings:CreateHeading( EMA.settingsControlCompletion, L["QUEST_COMPLETION"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	-- Check box: Enable auto quest completion.
-	EMA.settingsControlCompletion.checkBoxEnableAutoQuestCompletion = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["ENABLE_QUEST_COMPLETION"],
-		EMA.SettingsToggleEnableAutoQuestCompletion,
-		L["ENABLE_QUEST_COMPLETION_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControlCompletion, L["NOREWARDS_OR_ONEREWARD"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	-- Radio box: No choice, minion do nothing.
-	EMA.settingsControlCompletion.checkBoxNoChoiceAllDoNothing = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["QUEST_DO_NOTHING"],
-		EMA.SettingsToggleNoChoiceAllDoNothing,
-		L["QUEST_DO_NOTHING_HELP"]
-	)
-	EMA.settingsControlCompletion.checkBoxNoChoiceAllDoNothing:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Radio box: No choice, minion complete quest with master.
-	EMA.settingsControlCompletion.checkBoxNoChoiceMinionCompleteQuestWithMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["COMPLETE_QUEST_WITH_TEAM"],
-		EMA.SettingsToggleNoChoiceMinionCompleteQuestWithMaster,
-		L["COMPLETE_QUEST_WITH_TEAM_HELP"]
-	)
-	EMA.settingsControlCompletion.checkBoxNoChoiceMinionCompleteQuestWithMaster:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Radio box: No Choice, all automatically complete quest.
-	EMA.settingsControlCompletion.checkBoxNoChoiceAllAutoCompleteQuest = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["AUTO_COMPLETE_QUEST"],
-		EMA.SettingsToggleNoChoiceAllAutoCompleteQuest,
-		L["AUTO_COMPLETE_QUEST_HELP"]
-	)
-	EMA.settingsControlCompletion.checkBoxNoChoiceAllAutoCompleteQuest:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControlCompletion, L["MORE_THEN_ONE_REWARD"], movingTop, false )
-	movingTop = movingTop - headingHeight
-
-	-- Radio box: Has choice, minion do nothing.
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionDoNothing = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["QUEST_DO_NOTHING"] ,
-		EMA.SettingsToggleHasChoiceMinionDoNothing,
-		L["QUEST_DO_NOTHING_HELP"]
-	)
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionDoNothing:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Radio box: Has choice, minion complete quest with master.
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionCompleteQuestWithMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["COMPLETE_QUEST_WITH_TEAM"],
-		EMA.SettingsToggleHasChoiceMinionCompleteQuestWithMaster,
-		L["COMPLETE_QUEST_WITH_TEAM_HELP"]
-	)
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionCompleteQuestWithMaster:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Radio box: Has choice, minion must choose own reward.
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionMustChooseOwnReward = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left + indent,
-		movingTop,
-		L["MUST_CHOOSE_OWN_REWARD"],
-		EMA.SettingsToggleHasChoiceMinionMustChooseOwnReward,
-		L["MUST_CHOOSE_OWN_REWARD_HELP"]
-	)
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionMustChooseOwnReward:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Radio box: Has choice, minion choose same reward as master.
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionChooseSameRewardAsMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left + indent,
-		movingTop,
-		L["CHOOSE_SAME_REWARD"],
-		EMA.SettingsToggleHasChoiceMinionChooseSameRewardAsMaster,
-		L["CHOOSE_SAME_REWARD_HELP"]
-	)
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionChooseSameRewardAsMaster:SetType( "radio" )
-	movingTop = movingTop - radioBoxHeight
-	-- Radio box: Has choice, minion reward choice depends on modifier key pressed down.
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionRewardChoiceModifierConditional = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left + indent,
-		movingTop,
-		L["MODIFIER_CHOOSE_SAME_REWARD"],
-		EMA.SettingsToggleHasChoiceMinionRewardChoiceModifierConditional,
-		L["MODIFIER_CHOOSE_SAME_REWARD_HELP"]
-	)
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionRewardChoiceModifierConditional:SetType( "radio" )
-
-	movingTop = movingTop - radioBoxHeight
-	-- Check box: Ctrl modifier key.
-	EMA.settingsControlCompletion.checkBoxHasChoiceCtrlKeyModifier = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		checkBoxThirdWidth,
-		column1LeftIndent,
-		movingTop,
-		L["CTRL"],
-		EMA.SettingsToggleHasChoiceCtrlKeyModifier
-	)
-	-- Check box: Shift modifier key.
-	EMA.settingsControlCompletion.checkBoxHasChoiceShiftKeyModifier = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		checkBoxThirdWidth,
-		column2LeftIndent,
-		movingTop,
-		L["SHIFT"],
-		EMA.SettingsToggleHasChoiceShiftKeyModifier
-	)
-	-- Check box: Alt modifier key.
-	EMA.settingsControlCompletion.checkBoxHasChoiceAltKeyModifier = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		checkBoxThirdWidth,
-		column3LeftIndent,
-		movingTop,
-		L["ALT"],
-		EMA.SettingsToggleHasChoiceAltKeyModifier
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Check box: Has choice, override, if minion already has reward selected, choose that reward.
-	EMA.settingsControlCompletion.checkBoxHasChoiceOverrideUseMinionRewardSelected = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlCompletion,
-		headingWidth,
-		column1Left + indent,
-		movingTop,
-		L["OVERRIDE_REWARD_SELECTED"],
-		EMA.SettingsToggleHasChoiceOverrideUseMinionRewardSelected,
-		L["OVERRIDE_REWARD_SELECTED_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	return movingTop
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings functionality.
--------------------------------------------------------------------------------------------------------------
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.mirrorMasterQuestSelectionAndDeclining = settings.mirrorMasterQuestSelectionAndDeclining
-		EMA.db.allAutoSelectQuests = settings.allAutoSelectQuests
-		EMA.db.acceptQuests = settings.acceptQuests
-		EMA.db.slaveMirrorMasterAccept = settings.slaveMirrorMasterAccept
-		EMA.db.doNotAutoAccept = settings.doNotAutoAccept
-		EMA.db.allAcceptAnyQuest = settings.allAcceptAnyQuest
-		EMA.db.onlyAcceptQuestsFrom = settings.onlyAcceptQuestsFrom
-		EMA.db.acceptFromTeam = settings.acceptFromTeam
-		EMA.db.acceptFromNpc = settings.acceptFromNpc
-		EMA.db.acceptFromFriends = settings.acceptFromFriends
-		EMA.db.acceptFromParty = settings.acceptFromParty
-		EMA.db.acceptFromRaid = settings.acceptFromRaid
-		EMA.db.acceptFromGuild = settings.acceptFromGuild
-		EMA.db.masterAutoShareQuestOnAccept = settings.masterAutoShareQuestOnAccept
-		EMA.db.slaveAutoAcceptEscortQuest = settings.slaveAutoAcceptEscortQuest
-		EMA.db.showEMAQuestLogWithWoWQuestLog = settings.showEMAQuestLogWithWoWQuestLog
-		EMA.db.enableAutoQuestCompletion = settings.enableAutoQuestCompletion
-		EMA.db.noChoiceAllDoNothing = settings.noChoiceAllDoNothing
-		EMA.db.noChoiceSlaveCompleteQuestWithMaster = settings.noChoiceSlaveCompleteQuestWithMaster
-		EMA.db.noChoiceAllAutoCompleteQuest = settings.noChoiceAllAutoCompleteQuest
-		EMA.db.hasChoiceSlaveDoNothing = settings.hasChoiceSlaveDoNothing
-		EMA.db.hasChoiceSlaveCompleteQuestWithMaster = settings.hasChoiceSlaveCompleteQuestWithMaster
-		EMA.db.hasChoiceSlaveChooseSameRewardAsMaster = settings.hasChoiceSlaveChooseSameRewardAsMaster
-		EMA.db.hasChoiceSlaveMustChooseOwnReward = settings.hasChoiceSlaveMustChooseOwnReward
-		EMA.db.hasChoiceSlaveRewardChoiceModifierConditional = settings.hasChoiceSlaveRewardChoiceModifierConditional
-		EMA.db.hasChoiceCtrlKeyModifier = settings.hasChoiceCtrlKeyModifier
-		EMA.db.hasChoiceShiftKeyModifier = settings.hasChoiceShiftKeyModifier
-		EMA.db.hasChoiceAltKeyModifier = settings.hasChoiceAltKeyModifier
-		EMA.db.hasChoiceOverrideUseSlaveRewardSelected = settings.hasChoiceOverrideUseSlaveRewardSelected
-		EMA.db.messageArea = settings.messageArea
-		EMA.db.warningArea = settings.warningArea
-		EMA.db.overrideQuestAutoSelectAndComplete = settings.overrideQuestAutoSelectAndComplete
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	-- Quest general and acceptance options.
-	EMA.settingsControl.checkBoxMirrorMasterQuestSelectionAndDeclining:SetValue( EMA.db.mirrorMasterQuestSelectionAndDeclining )
-	EMA.settingsControl.checkBoxAllAutoSelectQuests:SetValue( EMA.db.allAutoSelectQuests )
-	EMA.settingsControl.checkBoxAcceptQuests:SetValue( EMA.db.acceptQuests )
-	EMA.settingsControl.checkBoxMinionMirrorMasterAccept:SetValue( EMA.db.slaveMirrorMasterAccept )
-	EMA.settingsControl.checkBoxDoNotAutoAccept:SetValue( EMA.db.doNotAutoAccept )
-	EMA.settingsControl.checkBoxAllAcceptAnyQuest:SetValue( EMA.db.allAcceptAnyQuest )
-	EMA.settingsControl.checkBoxOnlyAcceptQuestsFrom:SetValue( EMA.db.onlyAcceptQuestsFrom )
-	EMA.settingsControl.checkBoxAcceptFromTeam:SetValue( EMA.db.acceptFromTeam )
-	EMA.settingsControl.checkBoxAcceptFromNpc:SetValue( EMA.db.acceptFromNpc )
-	EMA.settingsControl.checkBoxAcceptFromFriends:SetValue( EMA.db.acceptFromFriends )
-	EMA.settingsControl.checkBoxAcceptFromParty:SetValue( EMA.db.acceptFromParty )
-	EMA.settingsControl.checkBoxAcceptFromRaid:SetValue( EMA.db.acceptFromRaid )
-	EMA.settingsControl.checkBoxAcceptFromGuild:SetValue( EMA.db.acceptFromGuild )
-	EMA.settingsControl.checkBoxMasterAutoShareQuestOnAccept:SetValue( EMA.db.masterAutoShareQuestOnAccept )
-	EMA.settingsControl.checkBoxMinionAutoAcceptEscortQuest:SetValue( EMA.db.slaveAutoAcceptEscortQuest )
-	EMA.settingsControl.checkBoxShowEMAQuestLogWithWoWQuestLog:SetValue( EMA.db.showEMAQuestLogWithWoWQuestLog )
-	EMA.settingsControl.checkBoxOverrideQuestAutoSelectAndComplete:SetValue( EMA.db.overrideQuestAutoSelectAndComplete )
-	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
-	EMA.settingsControl.dropdownWarningArea:SetValue( EMA.db.warningArea )
-	-- Quest completion options.
-	EMA.settingsControlCompletion.checkBoxEnableAutoQuestCompletion:SetValue( EMA.db.enableAutoQuestCompletion )
-	EMA.settingsControlCompletion.checkBoxNoChoiceAllDoNothing:SetValue( EMA.db.noChoiceAllDoNothing )
-	EMA.settingsControlCompletion.checkBoxNoChoiceMinionCompleteQuestWithMaster:SetValue( EMA.db.noChoiceSlaveCompleteQuestWithMaster )
-	EMA.settingsControlCompletion.checkBoxNoChoiceAllAutoCompleteQuest:SetValue( EMA.db.noChoiceAllAutoCompleteQuest )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionDoNothing:SetValue( EMA.db.hasChoiceSlaveDoNothing )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionCompleteQuestWithMaster:SetValue( EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionChooseSameRewardAsMaster:SetValue( EMA.db.hasChoiceSlaveChooseSameRewardAsMaster )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionMustChooseOwnReward:SetValue( EMA.db.hasChoiceSlaveMustChooseOwnReward )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionRewardChoiceModifierConditional:SetValue( EMA.db.hasChoiceSlaveRewardChoiceModifierConditional )
-	EMA.settingsControlCompletion.checkBoxHasChoiceCtrlKeyModifier:SetValue( EMA.db.hasChoiceCtrlKeyModifier )
-	EMA.settingsControlCompletion.checkBoxHasChoiceShiftKeyModifier:SetValue( EMA.db.hasChoiceShiftKeyModifier )
-	EMA.settingsControlCompletion.checkBoxHasChoiceAltKeyModifier:SetValue( EMA.db.hasChoiceAltKeyModifier )
-	EMA.settingsControlCompletion.checkBoxHasChoiceOverrideUseMinionRewardSelected:SetValue( EMA.db.hasChoiceOverrideUseSlaveRewardSelected )
-	-- Ensure correct state (general and acceptance options).
-	EMA.settingsControl.checkBoxMinionMirrorMasterAccept:SetDisabled( not EMA.db.acceptQuests )
-	EMA.settingsControl.checkBoxDoNotAutoAccept:SetDisabled( not EMA.db.acceptQuests )
-	EMA.settingsControl.checkBoxAllAcceptAnyQuest:SetDisabled( not EMA.db.acceptQuests )
-	EMA.settingsControl.checkBoxOnlyAcceptQuestsFrom:SetDisabled( not EMA.db.acceptQuests )
-	EMA.settingsControl.checkBoxAcceptFromTeam:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
-	EMA.settingsControl.checkBoxAcceptFromNpc:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
-	EMA.settingsControl.checkBoxAcceptFromFriends:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
-	EMA.settingsControl.checkBoxAcceptFromParty:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
-	EMA.settingsControl.checkBoxAcceptFromRaid:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
-	EMA.settingsControl.checkBoxAcceptFromGuild:SetDisabled( not EMA.db.acceptQuests or not EMA.db.onlyAcceptQuestsFrom )
-	-- Ensure correct state (completion options).
-	EMA.settingsControlCompletion.checkBoxNoChoiceAllDoNothing:SetDisabled( not EMA.db.enableAutoQuestCompletion )
-	EMA.settingsControlCompletion.checkBoxNoChoiceMinionCompleteQuestWithMaster:SetDisabled( not EMA.db.enableAutoQuestCompletion )
-	EMA.settingsControlCompletion.checkBoxNoChoiceAllAutoCompleteQuest:SetDisabled( not EMA.db.enableAutoQuestCompletion )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionDoNothing:SetDisabled( not EMA.db.enableAutoQuestCompletion )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionCompleteQuestWithMaster:SetDisabled( not EMA.db.enableAutoQuestCompletion )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionChooseSameRewardAsMaster:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionMustChooseOwnReward:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
-	EMA.settingsControlCompletion.checkBoxHasChoiceMinionRewardChoiceModifierConditional:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
-	EMA.settingsControlCompletion.checkBoxHasChoiceCtrlKeyModifier:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster or not EMA.db.hasChoiceSlaveRewardChoiceModifierConditional )
-	EMA.settingsControlCompletion.checkBoxHasChoiceShiftKeyModifier:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster or not EMA.db.hasChoiceSlaveRewardChoiceModifierConditional )
-	EMA.settingsControlCompletion.checkBoxHasChoiceAltKeyModifier:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster or not EMA.db.hasChoiceSlaveRewardChoiceModifierConditional )
-	EMA.settingsControlCompletion.checkBoxHasChoiceOverrideUseMinionRewardSelected:SetDisabled( not EMA.db.enableAutoQuestCompletion or not EMA.db.hasChoiceSlaveCompleteQuestWithMaster )
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsToggleMirrorMasterQuestSelectionAndDeclining( event, checked )
-	EMA.db.mirrorMasterQuestSelectionAndDeclining = checked
-	EMA.db.allAutoSelectQuests = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAllAutoSelectQuests( event, checked )
-	EMA.db.allAutoSelectQuests = checked
-	EMA.db.mirrorMasterQuestSelectionAndDeclining = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAcceptQuests( event, checked )
-	EMA.db.acceptQuests = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleMinionMirrorMasterAccept( event, checked )
-	EMA.db.slaveMirrorMasterAccept = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleOverrideQuestAutoSelectAndComplete( event, checked )
-	EMA.db.overrideQuestAutoSelectAndComplete = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDoNotAutoAccept( event, checked )
-	EMA.db.doNotAutoAccept = checked
-	EMA.db.allAcceptAnyQuest = not checked
-	EMA.db.onlyAcceptQuestsFrom = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAllAcceptAnyQuest( event, checked )
-	EMA.db.allAcceptAnyQuest = checked
-	EMA.db.onlyAcceptQuestsFrom = not checked
-	EMA.db.doNotAutoAccept = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleOnlyAcceptQuestsFrom( event, checked )
-	EMA.db.onlyAcceptQuestsFrom = checked
-	EMA.db.allAcceptAnyQuest = not checked
-	EMA.db.doNotAutoAccept = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAcceptFromTeam( event, checked )
-	EMA.db.acceptFromTeam = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAcceptFromNpc( event, checked )
-	EMA.db.acceptFromNpc = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAcceptFromFriends( event, checked )
-	EMA.db.acceptFromFriends = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAcceptFromParty( event, checked )
-	EMA.db.acceptFromParty = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAcceptFromRaid( event, checked )
-	EMA.db.acceptFromRaid = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAcceptFromGuild( event, checked )
-	EMA.db.acceptFromGuild = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleMasterAutoShareQuestOnAccept( event, checked )
-	EMA.db.masterAutoShareQuestOnAccept = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleMinionAutoAcceptEscortQuest( event, checked )
-	EMA.db.slaveAutoAcceptEscortQuest = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowEMAQuestLogWithWoWQuestLog( event, checked )
-	EMA.db.showEMAQuestLogWithWoWQuestLog = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleEnableAutoQuestCompletion( event, checked )
-	EMA.db.enableAutoQuestCompletion = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleNoChoiceAllDoNothing( event, checked )
-	EMA.db.noChoiceAllDoNothing = checked
-	EMA.db.noChoiceSlaveCompleteQuestWithMaster = not checked
-	EMA.db.noChoiceAllAutoCompleteQuest = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleNoChoiceMinionCompleteQuestWithMaster( event, checked )
-	EMA.db.noChoiceSlaveCompleteQuestWithMaster = checked
-	EMA.db.noChoiceAllDoNothing = not checked
-	EMA.db.noChoiceAllAutoCompleteQuest = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleNoChoiceAllAutoCompleteQuest( event, checked )
-	EMA.db.noChoiceAllAutoCompleteQuest = checked
-	EMA.db.noChoiceAllDoNothing = not checked
-	EMA.db.noChoiceSlaveCompleteQuestWithMaster = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceMinionDoNothing( event, checked )
-	EMA.db.hasChoiceSlaveDoNothing = checked
-	EMA.db.hasChoiceAquireBestQuestRewardForCharacter = not checked
-	EMA.db.hasChoiceSlaveCompleteQuestWithMaster = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceMinionCompleteQuestWithMaster( event, checked )
-	EMA.db.hasChoiceSlaveCompleteQuestWithMaster = checked
-	EMA.db.hasChoiceAquireBestQuestRewardForCharacter = not checked
-	EMA.db.hasChoiceSlaveDoNothing = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceAquireBestQuestRewardForCharacter( event, checked )
-	EMA.db.hasChoiceAquireBestQuestRewardForCharacter = checked
-	EMA.db.hasChoiceSlaveCompleteQuestWithMaster = not checked
-	EMA.db.hasChoiceSlaveDoNothing = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceMinionChooseSameRewardAsMaster( event, checked )
-	EMA.db.hasChoiceSlaveChooseSameRewardAsMaster = checked
-	EMA.db.hasChoiceSlaveMustChooseOwnReward = not checked
-	EMA.db.hasChoiceSlaveRewardChoiceModifierConditional = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceMinionMustChooseOwnReward( event, checked )
-	EMA.db.hasChoiceSlaveMustChooseOwnReward = checked
-	EMA.db.hasChoiceSlaveChooseSameRewardAsMaster = not checked
-	EMA.db.hasChoiceSlaveRewardChoiceModifierConditional = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceMinionRewardChoiceModifierConditional( event, checked )
-	EMA.db.hasChoiceSlaveRewardChoiceModifierConditional = checked
-	EMA.db.hasChoiceSlaveChooseSameRewardAsMaster = not checked
-	EMA.db.hasChoiceSlaveMustChooseOwnReward = not checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceCtrlKeyModifier( event, checked )
-	EMA.db.hasChoiceCtrlKeyModifier = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceShiftKeyModifier( event, checked )
-	EMA.db.hasChoiceShiftKeyModifier = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceAltKeyModifier( event, checked )
-	EMA.db.hasChoiceAltKeyModifier = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHasChoiceOverrideUseMinionRewardSelected( event, checked )
-	EMA.db.hasChoiceOverrideUseSlaveRewardSelected = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetMessageArea( event, messageAreaValue )
-	EMA:DebugMessage( event, messageAreaValue )
-	EMA.db.messageArea = messageAreaValue
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetWarningArea( event, messageAreaValue )
-	EMA.db.warningArea = messageAreaValue
-	EMA:SettingsRefresh()
-end
-
--------------------------------------------------------------------------------------------------------------
--- NPC QUEST PROCESSING - SELECTING AND DECLINING
--------------------------------------------------------------------------------------------------------------
-
-function EMA:ChurnNpcGossip()
-    EMA:DebugMessage( "ChurnNpcGossip" )
-	-- GetGossipAvailableQuests and GetGossipActiveQuests are returning nil in some cases, so do this as well.
-	-- GetGossipAvailableQuests() now returns 6 elements per quest and GetGossipActiveQuests() returns 4. title, level, isTrivial, isDaily, ...
-	-- Patch 5.0.4 added isLegendary.
-	-- title1, level1, isLowLevel1, isDaily1, isRepeatable1, isLegendary1, title2, level2, isLowLevel2, isDaily2, isRepeatable2, isLegendary2 = GetGossipAvailableQuests()
-	-- title1, level1, isLowLevel1, isComplete1, isLegendary1, title2, level2, isLowLevel2, isComplete2, isLegendary2 = GetGossipActiveQuests()
-	local numberAvailableQuestInfo = 6
-	local numberActiveQuestInfo = 5
-    local index
-    EMA:DebugMessage( "GetNumAvailableQuests", GetNumAvailableQuests() )
-    EMA:DebugMessage( "GetNumActiveQuests", GetNumActiveQuests() )
-    EMA:DebugMessage( "GetGossipAvailableQuests", GetGossipAvailableQuests() )
-    EMA:DebugMessage( "GetGossipActiveQuests", GetGossipActiveQuests() )
-    for index = 0, GetNumAvailableQuests() do
-		SelectAvailableQuest( index )
-	end
-    for index = 0, GetNumActiveQuests() do
-		SelectActiveQuest( index )
-	end
-	EMAUtilities:ClearTable( EMA.gossipQuests )
-	local availableQuestsData = { GetGossipAvailableQuests() }
-	local iterateQuests = 1
-	local questIndex = 1
-	while( availableQuestsData[iterateQuests] ) do
-		local questInformation = {}
-		questInformation.type = "available"
-		questInformation.index = questIndex
-		questInformation.name = availableQuestsData[iterateQuests]
-		questInformation.level = availableQuestsData[iterateQuests + 1]
-		table.insert( EMA.gossipQuests, questInformation )
-		iterateQuests = iterateQuests + numberAvailableQuestInfo
-		questIndex = questIndex + 1
-	end
-	local activeQuestsData = { GetGossipActiveQuests() }
-	iterateQuests = 1
-	while( activeQuestsData[iterateQuests] ) do
-		local questInformation = {}
-		questInformation.type = "active"
-		questInformation.index = questIndex
-		questInformation.name = activeQuestsData[iterateQuests]
-		questInformation.level = activeQuestsData[iterateQuests + 1]
-		questInformation.isComplete = activeQuestsData[iterateQuests + 3]
-		table.insert( EMA.gossipQuests, questInformation )
-		iterateQuests = iterateQuests + numberActiveQuestInfo
-		questIndex = questIndex + 1
-	end
-	for index, questInformation in ipairs( EMA.gossipQuests ) do
-		if questInformation.type == "available" then
-			SelectGossipAvailableQuest( questInformation.index )
-		end
-		-- If this is an active quest...
-		if questInformation.type == "active" then
-			-- If this quest has been completed...
-			if questInformation.isComplete then
-				-- Complete it.
-				SelectGossipActiveQuest( questInformation.index )
-			end
-		end
-	end
-
-end
-
-function EMA:CanAutomateAutoSelectAndComplete()
-	if EMA.db.overrideQuestAutoSelectAndComplete == true then
-		if IsShiftKeyDown() then
-		   return false
-		else
-		   return true
-		end
-	end
-	return true
- end
-
-function EMA:GOSSIP_SHOW()
-	if EMA.db.allAutoSelectQuests == true and EMA:CanAutomateAutoSelectAndComplete() == true then
-        EMA:ChurnNpcGossip()
-	end
-end
-
-function EMA:QUEST_GREETING()
-	if EMA.db.allAutoSelectQuests == true and EMA:CanAutomateAutoSelectAndComplete() == true then
-		EMA:ChurnNpcGossip()
-	end
-end
-
-function EMA:QUEST_PROGRESS()
-	if EMA.db.allAutoSelectQuests == true and EMA:CanAutomateAutoSelectAndComplete() == true then
-		if IsQuestCompletable() then
-
-			if QuestFrame:IsShown() == true then
-				EMA.isInternalCommand = true
-				CompleteQuest()
-				EMA.isInternalCommand = false
-			else
-				EMA:Print( "NO QUEST PAGE CAN NOT HAND IN" )
-			end
-		end
-	end
-end
-
-function EMA:SelectGossipOption( gossipIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		if EMA.isInternalCommand == false then
-            EMA:DebugMessage( "SelectGossipOption" )
-			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_GOSSIP_OPTION, gossipIndex )
-		end
-	end
-end
-
-function EMA:DoSelectGossipOption( sender, gossipIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		EMA.isInternalCommand = true
-        EMA:DebugMessage( "DoSelectGossipOption" )
-		SelectGossipOption( gossipIndex )
-		EMA.isInternalCommand = false
-	end
-end
-
-function EMA:SelectGossipActiveQuest( gossipIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		if EMA.isInternalCommand == false then
-            EMA:DebugMessage( "SelectGossipActiveQuest" )
-			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_GOSSIP_ACTIVE_QUEST, gossipIndex )
-		end
-	end
-end
-
-function EMA:DoSelectGossipActiveQuest( sender, gossipIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		EMA.isInternalCommand = true
-        EMA:DebugMessage( "DoSelectGossipActiveQuest" )
-		SelectGossipActiveQuest( gossipIndex )
-		EMA.isInternalCommand = false
-	end
-end
-
-function EMA:SelectGossipAvailableQuest( gossipIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		if EMA.isInternalCommand == false then
-            EMA:DebugMessage( "SelectGossipAvailableQuest" )
-			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_GOSSIP_AVAILABLE_QUEST, gossipIndex )
-		end
-	end
-end
-
-function EMA:DoSelectGossipAvailableQuest( sender, gossipIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		EMA.isInternalCommand = true
-        EMA:DebugMessage( "DoSelectGossipAvailableQuest" )
-		SelectGossipAvailableQuest( gossipIndex )
-		EMA.isInternalCommand = false
-	end
-end
-
-function EMA:SelectActiveQuest( questIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		if EMA.isInternalCommand == false then
-            EMA:DebugMessage( "SelectActiveQuest" )
-			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_ACTIVE_QUEST, questIndex )
-		end
-	end
-end
-
-function EMA:DoSelectActiveQuest( sender, questIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		EMA.isInternalCommand = true
-        EMA:DebugMessage( "DoSelectActiveQuest" )
-		SelectActiveQuest( questIndex )
-		EMA.isInternalCommand = false
-	end
-end
-
-function EMA:SelectAvailableQuest( questIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		if EMA.isInternalCommand == false then
-            EMA:DebugMessage( "SelectAvailableQuest" )
-			EMA:EMASendCommandToTeam( EMA.COMMAND_SELECT_AVAILABLE_QUEST, questIndex )
-		end
-	end
-end
-
-function EMA:DoSelectAvailableQuest( sender, questIndex )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		EMA.isInternalCommand = true
-        EMA:DebugMessage( "DoSelectAvailableQuest" )
-		SelectAvailableQuest( questIndex )
-		EMA.isInternalCommand = false
-	end
-end
-
-function EMA:QUEST_FINISHED(...)
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		if EMA.isInternalCommand == false then
-			--EMA:Print( "DeclineQuest" )
-			EMA:DebugMessage( "DeclineQuest" )
-			EMA:ScheduleTimer("EMASendCommandToTeam", 0.5, EMA.COMMAND_DECLINE_QUEST )
-		end
-	end
-end
-
-function EMA:DoDeclineQuest( sender )
-	if EMA.db.mirrorMasterQuestSelectionAndDeclining == true then
-		--EMA:Print("DoDeclineQuest", sender )
-		EMA.isInternalCommand = true
-        EMA:DebugMessage( "DoDeclineQuest" )
-		HideUIPanel(QuestFrame)
-		EMA.isInternalCommand = false
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- NPC QUEST PROCESSING - COMPLETING
--------------------------------------------------------------------------------------------------------------
-
-function EMA:CompleteQuest()
-	if EMA.db.enableAutoQuestCompletion == true then
-		if EMA.isInternalCommand == false then
-            EMA:DebugMessage( "CompleteQuest" )
-			EMA:EMASendCommandToTeam( EMA.COMMAND_COMPLETE_QUEST )
-		end
-	end
-end
-
-function EMA:DoCompleteQuest( sender )
-	if EMA.db.enableAutoQuestCompletion == true then
-		EMA.isInternalCommand = true
-        EMA:DebugMessage( "DoCompleteQuest" )
-		CompleteQuest()
-		EMA.isInternalCommand = false
-	end
-end
-
-function EMA:QUEST_COMPLETE()
-    EMA:DebugMessage( "QUEST_COMPLETE" )
-	if EMA.db.enableAutoQuestCompletion == true then
-		if (EMA.db.hasChoiceAquireBestQuestRewardForCharacter == true) and (GetNumQuestChoices() > 1) then
-			local bestQuestItemIndex = nil
-			if bestQuestItemIndex ~= nil and bestQuestItemIndex > 0 then
-				local questItemChoice = _G["QuestInfoItem"..bestQuestItemIndex]
-				QuestInfoItem_OnClick( questItemChoice )
-				QuestInfoFrame.itemChoice = bestQuestItemIndex
-				if EMA.db.hasChoiceAquireBestQuestRewardForCharacterAndGet == true then
-					GetQuestReward( bestQuestItemIndex )
-				end
-			end
-		elseif (EMA.db.noChoiceAllAutoCompleteQuest == true) and (GetNumQuestChoices() <= 1) then
-			GetQuestReward( GetNumQuestChoices() )
-		end
-	end
-end
-
-
-function EMA:QUEST_FAIL( event, message, ... )
-	--EMA:Print("QUEST_FAIL", message )
-	local questName = GetTitleText()
-	if questName ~= nil then
-		local questInvFull = string.format( ERR_QUEST_FAILED_BAG_FULL_S, questName )
-		--EMA:Print("A", questInvFull )
-		if  message == questInvFull  then
-			--EMA:Print("test")
-			EMA:EMASendMessageToTeam( EMA.db.warningArea, L["INVENTORY_IS_FULL_CAN_NOT_HAND_IN_QUEST"]( questName ), false )
-		end
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- IN THE FIELD QUEST PROCESSING - COMPLETING
--------------------------------------------------------------------------------------------------------------
-
-function EMA:ShowQuestComplete( questIndex )
-    EMA:DebugMessage( "ShowQuestComplete" )
-	if EMA.db.enableAutoQuestCompletion == false then
-		return
-	end
-	if EMA.isInternalCommand == true then
-		return
-	end
-	local questName = select( 1, GetQuestLogTitle( questIndex ) )
-	EMA:EMASendCommandToTeam( EMA.COMMAND_LOG_COMPLETE_QUEST, questName )
-end
-
-function EMA:DoShowQuestComplete( sender, questName )
-    EMA:DebugMessage( "DoShowQuestComplete" )
-	if EMA.db.enableAutoQuestCompletion == false then
-		return
-	end
-	EMA.isInternalCommand = true
-	local questIndex = EMA:GetQuestLogIndexByName( questName )
-	if questIndex ~= 0 then
-		ShowQuestComplete( questIndex )
-	end
-	EMA.isInternalCommand = false
-end
-
--------------------------------------------------------------------------------------------------------------
--- NPC QUEST PROCESSING - REWARDS
--------------------------------------------------------------------------------------------------------------
-
-function EMA:CheckForOverrideAndChooseQuestReward( questIndex )
-	-- Yes, override if minion has reward selected?
-	if (EMA.db.hasChoiceOverrideUseSlaveRewardSelected == true) and (QuestInfoFrame.itemChoice > 0) then
-		-- Yes, choose minions reward.
-		GetQuestReward( QuestInfoFrame.itemChoice )
-	else
-		-- No, choose masters reward.
-		GetQuestReward( questIndex )
-	end
-end
-
-function EMA:CheckForOverrideAndDoNotChooseQuestReward( questIndex )
-	-- Yes, override if minion has reward selected?
-	if QuestInfoFrame.itemChoice ~= nil then
-		if (EMA.db.hasChoiceOverrideUseSlaveRewardSelected == true) and (QuestInfoFrame.itemChoice > 0) then
-			-- Yes, choose minions reward.
-			GetQuestReward( QuestInfoFrame.itemChoice )
-		end
-	end
-end
-
-function EMA:AreCorrectConditionalKeysPressed()
-	local failTest = false
-	if EMA.db.hasChoiceCtrlKeyModifier == true and not IsControlKeyDown() then
-		failTest = true
-	end
-	if EMA.db.hasChoiceShiftKeyModifier == true and not IsShiftKeyDown() then
-		failTest = true
-	end
-	if EMA.db.hasChoiceAltKeyModifier == true and not IsAltKeyDown() then
-		failTest = true
-	end
-	return not failTest
-end
-
-function EMA:GetQuestReward( questIndex )
-	if EMA.db.enableAutoQuestCompletion == true then
-		if (EMA.db.noChoiceSlaveCompleteQuestWithMaster == true) or (EMA.db.hasChoiceSlaveCompleteQuestWithMaster == true) or (EMA.db.hasChoiceAquireBestQuestRewardForCharacter == true) then
-			if EMA.isInternalCommand == false then
-                EMA:DebugMessage( "GetQuestReward" )
-				EMA:EMASendCommandToTeam( EMA.COMMAND_CHOOSE_QUEST_REWARD, questIndex, EMA:AreCorrectConditionalKeysPressed(), EMA.db.hasChoiceAquireBestQuestRewardForCharacter )
-			end
-		end
-	end
-end
-
-function EMA:DoChooseQuestReward( sender, questIndex, modifierKeysPressed, rewardPickedAlready )
-	local numberOfQuestRewards = GetNumQuestChoices()
-	if EMA.db.enableAutoQuestCompletion == true then
-		if (EMA.db.noChoiceSlaveCompleteQuestWithMaster == true) or (EMA.db.hasChoiceSlaveCompleteQuestWithMaster == true) or (EMA.db.hasChoiceAquireBestQuestRewardForCharacter == true) then
-			EMA.isInternalCommand = true
-            EMA:DebugMessage( "DoChooseQuestReward" )
-            EMA:DebugMessage( "Quest has ", numberOfQuestRewards, " reward choices." )
-			-- How many reward choices does this quest have?
-			if numberOfQuestRewards <= 1 then
-				-- One or less.
-				if EMA.db.noChoiceSlaveCompleteQuestWithMaster == true then
-					GetQuestReward( questIndex )
-				end
-			else
-				-- More than one.
-				if EMA.db.hasChoiceSlaveCompleteQuestWithMaster == true then
-					-- Choose same as master?
-					if EMA.db.hasChoiceSlaveChooseSameRewardAsMaster == true then
-						EMA:CheckForOverrideAndChooseQuestReward( questIndex )
-					-- Choose same as master, conditional keys?
-					elseif EMA.db.hasChoiceSlaveRewardChoiceModifierConditional == true then
-						if modifierKeysPressed == true then
-							EMA:CheckForOverrideAndChooseQuestReward( questIndex )
-						else
-							EMA:CheckForOverrideAndDoNotChooseQuestReward( questIndex )
-						end
-					end
-				end
-				if (EMA.db.hasChoiceAquireBestQuestRewardForCharacter == true) and (rewardPickedAlready == true) then
-					if QuestInfoFrame.itemChoice > 0 then
-						-- Yes, choose minions reward.
-						GetQuestReward( QuestInfoFrame.itemChoice )
-					end
-				end
-			end
-			EMA.isInternalCommand = false
-		end
-	end
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- NPC QUEST PROCESSING - ACCEPTING
--------------------------------------------------------------------------------------------------------------
-
-function EMA:QUEST_ACCEPTED( ... )
-	local event, questIndex =  ...
-	if EMA.db.acceptQuests == true then
-		if EMA.db.masterAutoShareQuestOnAccept == true then
-			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-				if EMA.isInternalCommand == false then
-					SelectQuestLogEntry( questIndex )
-						if GetQuestLogPushable() and GetNumSubgroupMembers() > 0 then
-							EMA:EMASendMessageToTeam( EMA.db.messageArea, "Pushing newly accepted quest.", false )
-							QuestLogPushQuest()
-						end
-				end
-			end
-		end
-	end
-end
-
-function EMA:AcceptQuest()
-	if EMA.db.acceptQuests == true then
-		if EMA.db.slaveMirrorMasterAccept == true then
-			if EMA.isInternalCommand == false then
-                EMA:DebugMessage( "AcceptQuest" )
-				EMA:EMASendCommandToTeam( EMA.COMMAND_ACCEPT_QUEST )
-			end
-		end
-	end
-end
-
-function EMA:DoAcceptQuest( sender )
-	if EMA.db.acceptQuests == true and EMA.db.slaveMirrorMasterAccept == true then
-	local questName = GetTitleText()
-	local questIndex = EMA:GetQuestLogIndexByName( questName )
-
-		--Only works if the quest frame is open. Stops sending a blank quest. Tell the team a char not got the quest window open???? <<<<<< TODO
-		if QuestFrame:IsShown() == true then
-			--EMA:Print( "DoAcceptQuest", questName, questIndex, sender)
-			EMA.isInternalCommand = true
-			EMA:DebugMessage( "DoAcceptQuest" )
-			EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ACCEPTED_QUEST_QN"]( questName ), false )
-			AcceptQuest()
-			HideUIPanel( QuestFrame )
-			AcceptQuest()
-			EMA.isInternalCommand = false
-		end
-	end
-end
-
--- Auto quest magic!
-function EMA:AcknowledgeAutoAcceptQuest()
-	if EMA.db.acceptQuests == true then
-		if EMA.db.slaveMirrorMasterAccept == true then
-			if EMA.isInternalCommand == false then
-                EMA:DebugMessage( "MagicAutoAcceptQuestGrrrr", QuestGetAutoAccept() )
-				EMA:EMASendCommandToTeam( EMA.COMMAND_ACCEPT_QUEST_FAKE )
-			end
-		end
-	end
-end
-
-function EMA:DoMagicAutoAcceptQuestGrrrr()
-	if EMA.db.acceptQuests == true and EMA.db.slaveMirrorMasterAccept == true and QuestFrame:IsVisible() then
-	local questIndex = EMA:GetQuestLogIndexByName( questName )
-		EMA.isInternalCommand = true
-		EMA:DebugMessage( "DoMagicAutoAcceptQuestGrrrr" )
-		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["AUTO_ACCEPTED_PICKUPQUEST_QN"]( GetTitleText() ), false )
-		AcknowledgeAutoAcceptQuest()
-		HideUIPanel( QuestFrame )
-		EMA.isInternalCommand = false
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- QUEST PROCESSING - AUTO ACCEPTING
--------------------------------------------------------------------------------------------------------------
-
---TODO: this could do with some work with Friends.
-function EMA:CanAutoAcceptSharedQuestFromPlayer()
-	local canAccept = false
-	if EMA.db.allAcceptAnyQuest == true then
-		canAccept = true
-	elseif EMA.db.onlyAcceptQuestsFrom == true then
-		local questSourceName, questSourceRealm = UnitName( "npc" )
-		local character = EMAUtilities:AddRealmToNameIfNotNil( questSourceName, questSourceRealm )
-		if EMA.db.acceptFromTeam == true then
-			if EMAApi.IsCharacterInTeam( character ) == true then
-				canAccept = true
-			end
-		end
-		if EMA.db.acceptFromFriends == true then
-			for friendIndex = 1, GetNumFriends() do
-				local friendName = GetFriendInfo( friendIndex )
-				if questSourceName == friendName then
-					canAccept = true
-					break
-				end
-			end
-		end
-		if EMA.db.acceptFromParty == true then
-			if UnitInParty( "npc" ) then
-				EMA:DebugMessage( "test" )
-				canAccept = true
-			end
-		end
-		if EMA.db.acceptFromRaid == true then
-			if UnitInRaid( "npc" ) then
-				canAccept = true
-			end
-		end
-		if EMA.db.acceptFromGuild == true then
-			if UnitIsInMyGuild( "npc" ) then
-				canAccept = true
-			end
-		end
-	end
-	return canAccept
-end
-
-function EMA:QUEST_DETAIL()
-    EMA:DebugMessage( "QUEST_DETAIL" )
-	if EMA.db.acceptQuests == true then
-		-- Who is this quest from.
-		if UnitIsPlayer( "npc" ) then
-			-- Quest is shared from a player.
-			if EMA:CanAutoAcceptSharedQuestFromPlayer() == true then
-				--TODO: is this even needed??? Can auto quests be shared from other players?? unsure so we add it in anyway.
-				if ( QuestFrame.autoQuest ) then
-					AcknowledgeAutoAcceptQuest()
-				else
-					EMA.isInternalCommand = true
-					EMA:EMASendMessageToTeam( EMA.db.messageArea, L["AUTOMATICALLY_ACCEPTED_QUEST"]( GetTitleText() ), false )
-					AcceptQuest()
-					EMA.isInternalCommand = false
-				end
-			end
-		else
-			-- Quest is from an NPC.
-			if (EMA.db.allAcceptAnyQuest == true) or ((EMA.db.onlyAcceptQuestsFrom == true) and (EMA.db.acceptFromNpc == true)) then
-				--AutoQuest is Accepted no need to accept it again.
-				if ( QuestFrame.autoQuest ) then
-					AcknowledgeAutoAcceptQuest()
-				else
-					EMA.isInternalCommand = true
-					--EMA:DebugMessage( "QUEST_DETAIL - auto accept is: ", QuestGetAutoAccept() )
-					EMA:EMASendMessageToTeam( EMA.db.messageArea, L["AUTOMATICALLY_ACCEPTED_QUEST"]( GetTitleText() ), false )
-					AcceptQuest()
-					HideUIPanel( QuestFrame )
-					EMA.isInternalCommand = false
-				end
-			end
-		end
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMA QUEST CONTEXT MENU
--------------------------------------------------------------------------------------------------------------
-
-local function EMAApiAbandonQuests(questID, questText)
-	--EMA:Print(questID, questText)
-	title = questText
-	local data = {}
-	data.questID = questID
-	data.title = questText
-	StaticPopup_Hide( "ABANDON_QUEST" )
-	StaticPopup_Hide( "ABANDON_QUEST_WITH_ITEMS" )
-	StaticPopup_Show( "EMAQUEST_ABANDON_ALL_TOONS", title, nil, data )
-end
-
-local function EMAApiUnTrackQuests(questID, questText)
-	--EMA:Print("test", questID, questText)
-	EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, questID, questText, false )
-end
-
-
-
-function EMA:QuestMapQuestOptions_AbandonQuest(questID)
-	if EMAApi.GetTeamListMaximumOrderOnline() > 1 then
-		local lastQuestIndex = GetQuestLogSelection()
-		--EMA:Print("SetAbandonQuest", lastQuestIndex, questID)
-		title = GetAbandonQuestName()
-		local data = {}
-		data.questID = questID
-		data.title = title
-		StaticPopup_Hide( "ABANDON_QUEST" )
-		StaticPopup_Hide( "ABANDON_QUEST_WITH_ITEMS" )
-		StaticPopup_Show( "EMAQUEST_ABANDON_ALL_TOONS", title, nil, data )
-	end
-end
-
-function EMA:QuestObjectiveTracker_UntrackQuest(dropDownButton, questID)
-	--EMA:Print("test", questID)
-	EMA:QuestMapQuestOptions_TrackQuest(questID)
-end
-
-function EMA:QuestMapQuestOptions_TrackQuest(questID)
-	if EMAApi.GetTeamListMaximumOrderOnline() > 1 then
-		--EMA:Print("test", questID)
-		local questLogIndex = GetQuestLogIndexByID(questID)
-		local title = GetQuestLogTitle( questLogIndex )
-		local data = {}
-		data.questID = questID
-		data.title = title
-		if ( IsQuestWatched(questLogIndex) ) then
-			--EMA:Print("TrackingQuest")
-			StaticPopup_Show( "EMA_QUEST_TRACK_ALL_TOONS", title, nil, data )
-		else
-			--EMA:Print("UnTrackQuest")
-			StaticPopup_Show( "EMA_QUEST_UNTRACK_ALL_TOONS", title, nil, data )
-		end
-	end
-end
-
-function EMA:QuestMapQuestOptions_EMA_DoQuestTrack( sender, questID, title, track )
-	--EMA:Print("test1.5", sender, questID, title, track)
-	local questLogIndex = GetQuestLogIndexByID( questID )
-	if questLogIndex ~= 0 then
-		if track then
-			EMA:EMADoQuest_TrackQuest( questID, questLogIndex )
-		else
-			EMA:EMADoQuest_UnTrackQuest( questID, questLogIndex )
-		end
-	else
-		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["QUESTLOG_DO_NOT_HAVE_QUEST"]( title ), false )
-	end
-end
-
-function EMA:EMADoQuest_TrackQuest(questID, questLogIndex)
-	--EMA:Print("test", questID, questLogIndex )
-	if ( not IsQuestWatched(questID) ) then
-		AddQuestWatch(questLogIndex, true)
-		QuestSuperTracking_OnQuestTracked(questID)
-	end
-end
-
-
-function EMA:EMADoQuest_UnTrackQuest(questID, questLogIndex)
-	--EMA:Print("test2", questID, questLogIndex )
-	if ( IsQuestWatched(questLogIndex) ) then
-		QuestObjectiveTracker_UntrackQuest(nil, questID)
-	end
-end
-
-function EMA:QuestMapQuestOptions_EMA_DoAbandonQuest( sender, questID, title )
-	local questLogIndex = GetQuestLogIndexByID( questID )
-	if questLogIndex ~= 0 then
-		local lastQuestIndex = GetQuestLogSelection();
-		SelectQuestLogEntry(GetQuestLogIndexByID(questID));
-		SetAbandonQuest();
-		AbandonQuest();
-		SelectQuestLogEntry(lastQuestIndex);
-		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["QUESTLOG_HAVE_ABANDONED_QUEST"]( title ), false )
-	end
-end
-
--- EMA ALL menu at the bottom of quest WorldMap Quest Log
-
-
-function EMA:CreateEMAMiniQuestLogFrame()
-    EMAMiniQuestLogFrame = CreateFrame( "Frame", "EMAMiniQuestLogFrame", QuestMapFrame )
-    local frame = EMAMiniQuestLogFrame
-	frame:SetWidth( 470 )
-	frame:SetHeight( 40 )
-	frame:SetFrameStrata( "HIGH" )
-	frame:SetToplevel( true )
-	frame:SetClampedToScreen( true )
-	frame:EnableMouse( true )
-	frame:SetMovable( true )
-	frame:ClearAllPoints()
-	frame:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOMRIGHT", 0,-35)
-		frame:SetBackdrop( {
-		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
-		edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
-		tile = true, tileSize = 15, edgeSize = 15,
-		insets = { left = 5, right = 5, top = 5, bottom = 5 }
-	} )
-	table.insert( UISpecialFrames, "EMAQuestLogWindowFrame" )
-	-- abandon ALL button
-	local abandonButton = CreateFrame( "Button", "abandonButton", frame, "UIPanelButtonTemplate" )
-	abandonButton:SetScript( "OnClick", function()  StaticPopup_Show("EMA_ABANDON_ALL_TOON_QUEST") end )
-	abandonButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 10 , -10)
-	abandonButton:SetHeight( 20 )
-	abandonButton:SetWidth( 150 )
-	abandonButton:SetText( L["ABANDON_ALL"] )
-	abandonButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(trackButton, true, L["ABANDON_ALL_TOOLTIP"]) end)
-	abandonButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
-	abandonQuestLogWindowAbandonFrameButton = abandonButton
-	-- Share All Button
-	local shareButton = CreateFrame( "Button", "shareButton", frame, "UIPanelButtonTemplate" )
-	shareButton:SetScript( "OnClick", function()  EMA:DoShareAllQuestsFromAllToons() end )
-	shareButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 160, -10)
-	shareButton:SetHeight( 20 )
-	shareButton:SetWidth( 100 )
-	shareButton:SetText( L["SHARE_ALL"] )
-	shareButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(shareButton, true, L["SHARE_ALL_TOOLTIP"]) end)
-	shareButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
-	shareQuestLogWindowFrameShareButton = shareButton
-	--Track All Button
-	local trackButton = CreateFrame( "Button", "trackButton", frame, "UIPanelButtonTemplate" )
-	trackButton:SetScript( "OnClick", function()  EMA:DoTrackAllQuestsFromAllToons() end )
-	trackButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 260, -10)
-	trackButton:SetHeight( 20 )
-	trackButton:SetWidth( 100 )
-	trackButton:SetText( L["TRACK_ALL"] )
-	trackButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(trackButton, true, L["TRACK_ALL_TOOLTIP"]) end)
-	trackButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
-	EMAQuestLogWindowFrameTrackButton = trackButton
-	-- Untrack All
-	local unTrackButton = CreateFrame( "Button", "unTrackButton", frame, "UIPanelButtonTemplate" )
-	unTrackButton:SetScript( "OnClick", function()  EMA:DoUnTrackAllQuestsFromAllToons() end )
-	unTrackButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 360, -10)
-	unTrackButton:SetHeight( 20 )
-	unTrackButton:SetWidth( 100 )
-	unTrackButton:SetText( L["UNTRACK_ALL"] )
-	unTrackButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(trackButton, true, L["UNTRACK_ALL_TOOLTIP"]) end)
-	unTrackButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
-	EMAQuestLogWindowFrameUnTrackButton = unTrackButton
-end
-
-
-function EMA:ShowTooltip(frame, show, text)
-	if show then
-		GameTooltip:SetOwner(frame, "ANCHOR_TOP")
-		GameTooltip:SetPoint("TOPLEFT", frame, "TOPRIGHT", 16, 0)
-		GameTooltip:ClearLines()
-		GameTooltip:AddLine( text , 1, 0.82, 0, 1)
-		GameTooltip:Show()
-	else
-	GameTooltip:Hide()
-	end
-end
-
-function EMA:DoAbandonAllQuestsFromAllToons()
-	EMA:EMASendMessageToTeam( EMA.db.messageArea, L["ABANDONING_ALLQUEST"], false )
-	EMA:DoAbandonAllQuestsFromThisToon()
-	EMA:ScheduleTimer("EMASendCommandToTeam" , 2, EMA.COMMAND_ABANDON_ALL_QUESTS)
-end
-
-function EMA:DoAbandonAllQuestsFromThisToon()
-	EMA.iterateQuests = 0
-	EMA:IterateQuests("AbandonNextQuest", 0.5)
-end
-
-function EMA.AbandonNextQuest()
-	local title, isHeader, questID = EMA:GetRelevantQuestInfo(EMA.iterateQuests)
-	if isHeader == false and questID ~= 0 then
-		local canAbandon = CanAbandonQuest(questID)
-		if canAbandon then
-			EMA:EMASendCommandToTeam( EMA.COMMAND_ABANDON_QUEST, questID, title)
-			if (EMA.iterateQuests ~= GetNumQuestLogEntries()) then
-				-- decrement quest count as we have removed one if not last quest
-				EMA.iterateQuests = EMA.iterateQuests - 1
-			end
-		end
-	end
-	EMA:IterateQuests("AbandonNextQuest", 0.5)
-end
-
-function EMA.DoShareAllQuestsFromAllToons()
-	EMA:EMASendMessageToTeam( EMA.db.messageArea, L["SHARING_QUEST_TO_ALLMINIONS"], false )
-	EMA:DoShareAllQuestsFromThisToon()
-	EMA:ScheduleTimer("EMASendCommandToTeam" , 2,  EMA.COMMAND_SHARE_ALL_QUESTS)
-end
-
-function EMA.DoShareAllQuestsFromThisToon()
-	EMA.iterateQuests = 0
-	EMA:IterateQuests("ShareNextQuest", 1)
-end
-
-function EMA.ShareNextQuest()
-	local title, isHeader, questID = EMA:GetRelevantQuestInfo(EMA.iterateQuests)
-	if GetQuestLogPushable() then
-		if isHeader == false and questID ~= 0 then
-			QuestMapQuestOptions_ShareQuest(questID)
-		end
-	end
-	EMA:IterateQuests("ShareNextQuest", 1)
-end
-
-
-function EMA:DoTrackAllQuestsFromAllToons()
-	EMA:EMASendMessageToTeam( EMA.db.messageArea, L["TRACKING_QUEST_TO_ALLMINIONS"], false )
-	EMA:DoTrackAllQuestsFromThisToon()
-	EMA:ScheduleTimer("EMASendCommandToTeam", 1, EMA.COMMAND_TRACK_ALL_QUESTS)
-end
-
-function EMA:DoTrackAllQuestsFromThisToon()
-	EMA.iterateQuests = 0
-	EMA:IterateQuests("TrackNextQuest", 0.5)
-end
-
-function EMA.TrackNextQuest()
-
-	local title, isHeader, questID = EMA:GetRelevantQuestInfo(EMA.iterateQuests)
-
-	if isHeader == false and questID ~= 0 then
-		EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, questID, title, true )
-	end
-
-	EMA:IterateQuests("TrackNextQuest", 0.5)
-end
-
-function EMA:DoUnTrackAllQuestsFromAllToons()
-	EMA:EMASendMessageToTeam( EMA.db.messageArea, L["UNTRACKING_QUESTS_ALLMINIONS"], false )
-	EMA:DoUnTrackAllQuestsFromThisToon()
-	EMA:ScheduleTimer("EMASendCommandToTeam", 1, EMA.COMMAND_UNTRACK_ALL_QUESTS)
-end
-
-function EMA:DoUnTrackAllQuestsFromThisToon()
-	EMA.iterateQuests = 0
-	EMA:IterateQuests("UnTrackNextQuest", 0.5)
-end
-
-
-function EMA.UnTrackNextQuest()
-	local title, isHeader, questID = EMA:GetRelevantQuestInfo(EMA.iterateQuests)
-		if isHeader == false and questID ~= 0 then
-			EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_TRACK, questID, title, false )
-		end
-	EMA:IterateQuests("UnTrackNextQuest", 0.5)
-end
-
-function EMA:IterateQuests(methodToCall, timer)
-	EMA.iterateQuests = EMA.iterateQuests + 1
-		if EMA.iterateQuests <= GetNumQuestLogEntries() then
-			EMA:ScheduleTimer( methodToCall, timer )
-		end
-end
-
-function EMA:GetRelevantQuestInfo(questLogIndex)
-    local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questLogIndex )
-	return title, isHeader, questID
-end
-
-function EMA:ToggleFrame( frame )
-	if frame == WorldMapFrame then
-		EMA:ToggleQuestLog()
-	end
-end
-
-function EMA:ToggleQuestLog()
-	-- This sorts out hooking on L or marcioMenu button
-	if EMA.db.showEMAQuestLogWithWoWQuestLog == true then
-		if WorldMapFrame:IsVisible() and QuestMapFrame:IsVisible() then
-			EMA:ToggleShowQuestCommandWindow( true )
-		else
-			EMA:ToggleShowQuestCommandWindow( false )
-		end
-	end
-end
-
-function EMA:QuestLogFrameHide()
-	if EMA.db.showEMAQuestLogWithWoWQuestLog == true then
-		EMA:ToggleShowQuestCommandWindow( false )
-	end
-end
-
-function EMA:ToggleShowQuestCommandWindow( show )
-    if show == true then
-		EMAMiniQuestLogFrame:Show()
-    else
-		EMAMiniQuestLogFrame:Hide()
-    end
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- ESCORT QUEST
--------------------------------------------------------------------------------------------------------------
-
-function EMA:QUEST_ACCEPT_CONFIRM( event, senderName, questName )
-    EMA:DebugMessage( "QUEST_ACCEPT_CONFIRM" )
-	if EMA.db.acceptQuests == true then
-		if EMA.db.slaveAutoAcceptEscortQuest == true then
-			EMA:EMASendMessageToTeam( EMA.db.messageArea, L["AUTOMATICALLY_ACCEPTED_ESCORT_QUEST"]( questName ), false )
-			EMA.isInternalCommand = true
-			ConfirmAcceptQuest()
-			EMA.isInternalCommand = false
-			StaticPopup_Hide( "QUEST_ACCEPT" )
-		end
-	end
-end
-
-function EMA:GetQuestLogIndexByName( questName )
-	for iterateQuests = 1, GetNumQuestLogEntries() do
-        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateQuests )
-		if not isHeader then
-			if title == questName then
-				return iterateQuests
-			end
-		end
-	end
-	return 0
-end
-
-function EMA:AutoSelectToggleCommand( info, parameters )
-	local toggle, tag = strsplit( " ", parameters )
-	if tag ~= nil and tag:trim() ~= "" then
-		EMA:EMASendCommandToTeam( EMA.COMMAND_TOGGLE_AUTO_SELECT, toggle, tag )
-	else
-		EMA:AutoSelectToggle( toggle )
-	end
-end
-
-function EMA:DoAutoSelectToggle( sender, toggle, tag )
-	if EMAApi.DoesCharacterHaveTag( EMA.characterName, tag ) == true then
-		EMA:AutoSelectToggle( toggle )
-	end
-end
-
-function EMA:AutoSelectToggle( toggle )
-	if toggle == L["TOGGLE"] then
-		if EMA.db.allAutoSelectQuests == true then
-			toggle = L["OFF"]
-		else
-			toggle = L["ON"]
-		end
-	end
-	if toggle == L["ON"] then
-		EMA.db.mirrorMasterQuestSelectionAndDeclining = false
-		EMA.db.allAutoSelectQuests = true
-	elseif toggle == L["OFF"] then
-		EMA.db.mirrorMasterQuestSelectionAndDeclining = true
-		EMA.db.allAutoSelectQuests = false
-	end
-	EMA:SettingsRefresh()
-end
-
--------------------------------------------------------------------------------------------------------------
--- COMMAND MANAGEMENT
--------------------------------------------------------------------------------------------------------------
-
--- A EMA command has been recieved.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-    EMA:DebugMessage( 'got a command', characterName, commandName, ... )
-	if commandName == EMA.COMMAND_TOGGLE_AUTO_SELECT then
-		EMA:DoAutoSelectToggle( characterName, ... )
-	end
--- Want to action track and abandon command on the same character tat sent the command.
-	if commandName == EMA.COMMAND_QUEST_TRACK then
-		EMA:QuestMapQuestOptions_EMA_DoQuestTrack( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_ABANDON_QUEST then
-		EMA:QuestMapQuestOptions_EMA_DoAbandonQuest( characterName, ... )
-	end
-
-
-
-	 -- If this character sent this command, don't action it.
-	if characterName == EMA.characterName then
-		return
-	end
-	if commandName == EMA.COMMAND_UNTRACK_ALL_QUESTS then
-		EMA:DoUnTrackAllQuestsFromThisToon()
-	end
-	if commandName == EMA.COMMAND_ABANDON_ALL_QUESTS then
-		EMA:DoAbandonAllQuestsFromThisToon()
-	end
-	if commandName == EMA.COMMAND_TRACK_ALL_QUESTS then
-		EMA:DoTrackAllQuestsFromThisToon()
-	end
-
-	if commandName == EMA.COMMAND_SHARE_ALL_QUESTS then
-		EMA:DoShareAllQuestsFromThisToon()
-	end
-	if commandName == EMA.COMMAND_ACCEPT_QUEST then
-		EMA:DoAcceptQuest( characterName, ...  )
-	end
-	if commandName == EMA.COMMAND_SELECT_GOSSIP_OPTION then
-		EMA:DoSelectGossipOption( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_SELECT_GOSSIP_ACTIVE_QUEST then
-		EMA:DoSelectGossipActiveQuest( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_SELECT_GOSSIP_AVAILABLE_QUEST then
-		EMA:DoSelectGossipAvailableQuest( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_SELECT_ACTIVE_QUEST then
-		EMA:DoSelectActiveQuest( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_SELECT_AVAILABLE_QUEST then
-		EMA:DoSelectAvailableQuest( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_DECLINE_QUEST then
-		EMA:ScheduleTimer("DoDeclineQuest" , 1, characterName, ... )
-	end
-	if commandName == EMA.COMMAND_COMPLETE_QUEST then
-		EMA:DoCompleteQuest( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_CHOOSE_QUEST_REWARD then
-		EMA:DoChooseQuestReward( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_LOG_COMPLETE_QUEST then
-		EMA:DoShowQuestComplete( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_ACCEPT_QUEST_FAKE then
-		EMA:DoMagicAutoAcceptQuestGrrrr( characterName, ... )
-	end
-end
-
-EMAApi.EMAApiAbandonQuest = EMAApiAbandonQuests
-EMAApi.EMAApiUnTrackQuest = EMAApiUnTrackQuests
\ No newline at end of file
diff --git a/Modules/QuestWatcher.lua b/Modules/QuestWatcher.lua
deleted file mode 100644
index ff93671..0000000
--- a/Modules/QuestWatcher.lua
+++ /dev/null
@@ -1,2499 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"QuestWatcher",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
-
-
--- Load libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
-
-local EMAQuestMapQuestOptionsDropDown = CreateFrame("Frame", "EMAQuestMapQuestOptionsDropDown", EMAQuestWatcherFrame, "UIDropDownMenuTemplate")
-
---  Constants and Locale for this module.
-EMA.moduleName = "QuestWatcher"
-EMA.settingsDatabaseName = "QuestWatcherProfileDB"
-EMA.chatCommand = "ema-quest-watcher"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["QUEST"]
-EMA.moduleDisplayName = L["TRACKER"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\QuestTrackerIcon.tga"
--- order
-EMA.moduleOrder = 20
-
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		enableQuestWatcher = true,
-		watcherFramePoint = "RIGHT",
-		watcherFrameRelativePoint = "RIGHT",
-		watcherFrameXOffset = 0,
-		watcherFrameYOffset = 50,
-		watcherFrameAlpha = 1.0,
-		watcherFrameScale = 1.0,
-		borderStyle = L["BLIZZARD_TOOLTIP"],
-		backgroundStyle = L["BLIZZARD_DIALOG_BACKGROUND"],
-		watchFontStyle = L["ARIAL_NARROW"],
-		watchFontSize = 14,
-		hideQuestWatcherInCombat = false,
-		enableQuestWatcherOnMasterOnly = false,
-		watchFrameBackgroundColourR = 0.0,
-		watchFrameBackgroundColourG = 0.0,
-		watchFrameBackgroundColourB = 0.0,
-		watchFrameBackgroundColourA = 0.0,
-		watchFrameBorderColourR = 0.0,
-		watchFrameBorderColourG = 0.0,
-		watchFrameBorderColourB = 0.0,
-		watchFrameBorderColourA = 0.0,
-		watcherListLines = 20,
-		watcherFrameWidth = 340,
-		unlockWatcherFrame = true,
-		hideBlizzardWatchFrame = true,
-		doNotHideCompletedObjectives = true,
-		showCompletedObjectivesAsDone = true,
-		hideQuestIfAllComplete = false,
-		showFrame = true,
-		--messageArea = EMAApi.DefaultMessageArea(),
-		--sendProgressChatMessages = false,
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = "group",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			show = {
-				type = "input",
-				name = L["SHOW_QUEST_WATCHER"],
-				desc = L["SHOW_QUEST_WATCHER_HELP"],
-				usage = "/EMA-quest-watcher show",
-				get = false,
-				set = "ShowFrameCommand",
-			},
-			hide = {
-				type = "input",
-				name = L["HIDE_QUEST_WATCHER"] ,
-				desc = L["HIDE_QUEST_WATCHER_HELP"] ,
-				usage = "/EMA-quest-watcher hide",
-				get = false,
-				set = "HideFrameCommand",
-			},
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-quest-watcher push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE = "JQWObjUpd"
-EMA.COMMAND_UPDATE_QUEST_WATCHER_LIST = "JQWLstUpd"
-EMA.COMMAND_QUEST_WATCH_REMOVE_QUEST = "JQWRmveQst"
-EMA.COMMAND_AUTO_QUEST_COMPLETE = "JQWAtQstCmplt"
-EMA.COMMAND_REMOVE_AUTO_QUEST_COMPLETE = "JQWRmvAtQstCmplt"
-EMA.COMMAND_AUTO_QUEST_OFFER = "JQWAqQstOfr"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:DebugMessage( ... )
-	--EMA:Print( ... )
-end
-
--- Initialise the module.
-function EMA:OnInitialize()
-	EMA.currentAutoQuestPopups = {}
-	EMA.countAutoQuestPopUpFrames = 0
-	EMA.questWatcherFrameCreated = false
-	-- Create the settings control.
-	EMA:SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControlWatcher.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Create the quest watcher frame.
-	EMA:CreateQuestWatcherFrame()
-	EMA:SetQuestWatcherVisibility()
-	-- Quest watcher.
-	EMA.questWatchListOfQuests = {}
-	EMA.questWatchCache = {}
-	EMA.questWatchObjectivesList = {}
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	-- Register for the EMA master changed message.
-	EMA:RegisterMessage( EMAApi.MESSAGE_TEAM_MASTER_CHANGED, "OnMasterChanged" )
-	--EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-    -- Quest events.
-	-- Watcher events.
-	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
-	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
-	EMA:RegisterEvent( "QUEST_WATCH_UPDATE" )
-	EMA:RegisterEvent( "QUEST_LOG_UPDATE")
-	EMA:RegisterEvent( "QUEST_WATCH_LIST_CHANGED", "QUEST_WATCH_UPDATE" )
-	-- For in the field auto quests. And Bonus Quests.
-	EMA:RegisterEvent("QUEST_ACCEPTED", "QUEST_WATCH_UPDATE")
-	EMA:RegisterEvent("QUEST_REMOVED", "RemoveQuestsNotBeingWatched")
-	EMA:RegisterEvent( "QUEST_AUTOCOMPLETE" )
-	EMA:RegisterEvent( "QUEST_COMPLETE" )
-	EMA:RegisterEvent( "QUEST_DETAIL" )
-	EMA:RegisterEvent( "SCENARIO_UPDATE" )
-	EMA:RegisterEvent( "SCENARIO_CRITERIA_UPDATE" )
-	EMA:RegisterEvent( "PLAYER_ENTERING_WORLD" )
-   -- Quest post hooks.
-    EMA:SecureHook( "SelectActiveQuest" )
-	EMA:SecureHook( "GetQuestReward" )
-	EMA:SecureHook( "AddQuestWatch" )
-	EMA:SecureHook( "RemoveQuestWatch" )
-	EMA:SecureHook( "AbandonQuest" )
-	EMA:SecureHook( "SetAbandonQuest" )
-	-- Update the quest watcher for watched quests.
-	EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, false, "all" )
-	--EMA:ScheduleTimer( "EMAQuestWatcherScenarioUpdate", 1, false )
-	EMA:UpdateUnlockWatcherFrame()
-	-- To Hide After elv changes. --ebony
-	EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
-	if EMA.db.enableQuestWatcher == true then
-		EMA:QuestWatcherQuestListScrollRefresh()
-	end
-	EMAQuestMapQuestOptionsDropDown.questID = 0
-	EMAQuestMapQuestOptionsDropDown.questText = nil
-	UIDropDownMenu_Initialize(EMAQuestMapQuestOptionsDropDown, EMAQuestMapQuestOptionsDropDown_Initialize, "MENU")
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-	-- AceHook-3.0 will tidy up the hooks for us.
-end
-
--------------------------------------------------------------------------------------------------------------
--- Messages.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:OnMasterChanged( message, characterName )
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	EMA:SetQuestWatcherVisibility()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsCreate()
-	EMA.settingsControlWatcher = {}
-	-- Create the settings panels.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControlWatcher,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	-- Create the quest controls.
-	local bottomOfQuestWatcherOptions = EMA:SettingsCreateQuestWatcherControl( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControlWatcher.widgetSettings.content:SetHeight( -bottomOfQuestWatcherOptions )
-end
-
-function EMA:SettingsCreateQuestWatcherControl( top )
-	-- Get positions and dimensions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local radioBoxHeight = EMAHelperSettings:GetRadioBoxHeight()
-	local mediaHeight = EMAHelperSettings:GetMediaHeight()
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local sliderHeight = EMAHelperSettings:GetSliderHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local labelContinueHeight = EMAHelperSettings:GetContinueLabelHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( true )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidthSlider = (headingWidth - horizontalSpacing) / 2
-	local indent = horizontalSpacing * 10
-	local indentContinueLabel = horizontalSpacing * 18
-	local indentSpecial = indentContinueLabel + 9
-	local checkBoxThirdWidth = (headingWidth - indentContinueLabel) / 3
-	local column1Left = left
-	local column2Left = left + halfWidthSlider
-	local column1LeftIndent = left + indentContinueLabel
-	local column2LeftIndent = column1LeftIndent + checkBoxThirdWidth + horizontalSpacing
-	local column3LeftIndent = column2LeftIndent + checkBoxThirdWidth + horizontalSpacing
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControlWatcher, "", movingTop, false )
-	movingTop = movingTop - headingHeight
-	-- Create a heading for quest completion.
-	EMAHelperSettings:CreateHeading( EMA.settingsControlWatcher, L["QUEST_TRACKER_HEADER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	-- Check box: Enable auto quest completion.
-	EMA.settingsControlWatcher.checkBoxEnableQuestWatcher = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["ENABLE_TRACKER"],
-		EMA.SettingsToggleEnableQuestWatcher,
-		L["ENABLE_TRACKER_HELP"]
-	)
-
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		left,
-		movingTop,
-		L["UNLOCK_TRACKER"],
-		EMA.SettingsToggleUnlockWatcherFrame,
-		L["UNLOCK_TRACKER_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWatcher.checkBoxHideBlizzardWatchFrame = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		left,
-		movingTop,
-		L["HIDE_BLIZZ_OBJ_TRACKER"],
-		EMA.SettingsToggleHideBlizzardWatchFrame,
-		L["HIDE_BLIZZ_OBJ_TRACKER_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWatcher.checkBoxEnableQuestWatcherMasterOnly = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["SHOW_JOT_ON_MASTER"],
-		EMA.SettingsToggleEnableQuestWatcherMasterOnly,
-		L["SHOW_JOT_ON_MASTER_HELP"]
-
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWatcher.displayOptionsCheckBoxHideQuestWatcherInCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		column1Left,
-		movingTop,
-		L["HIDE_JOT_IN_COMBAT"],
-		EMA.SettingsToggleHideQuestWatcherInCombat,
-		L["HIDE_JOT_IN_COMBAT_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWatcher.checkBoxShowCompletedObjectivesAsDone = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		left,
-		movingTop,
-		L["SHOW_COMPLETED_OBJ_DONE"],
-		EMA.SettingsShowCompletedObjectivesAsDone,
-		L["SHOW_COMPLETED_OBJ_DONE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWatcher.checkBoxHideQuestIfAllComplete = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		left,
-		movingTop,
-		L["HIDE_OBJ_COMPLETED"],
-		EMA.SettingsHideQuestIfAllComplete,
-		L["HIDE_OBJ_COMPLETED_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
---[[
-	EMA.settingsControlWatcher.checkBoxSendProgressChatMessages = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		left,
-		movingTop,
-		L["SEND_PROGRESS_MESSAGES"],
-		EMA.SettingsToggleSendProgressChatMessages,
-		L["SEND_PROGRESS_MESSAGES_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	-- Message area.
-	EMA.settingsControlWatcher.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControlWatcher.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControlWatcher.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-
-	movingTop = movingTop - dropdownHeight
-]]
-	EMAHelperSettings:CreateHeading( EMA.settingsControlWatcher, L["APPEARANCE_LAYOUT_HEALDER"], movingTop, true )
-	movingTop = movingTop - headingHeight - verticalSpacing
-		-- Information line 1.
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherInformation1 = EMAHelperSettings:CreateContinueLabel(
-		EMA.settingsControlWatcher,
-		headingWidth,
-		left,
-		movingTop,
-		L["QUESTWACHERINFORMATIONONE"]
-	)
-	movingTop = movingTop - labelContinueHeight
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["LINES_TO_DISPLAY"]
-	)
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetSliderValues( 5, 50, 1 )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeWatchLines )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		column2Left,
-		movingTop,
-		L["TRACKER_WIDTH"]
-	)
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetSliderValues( 250, 600, 5 )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeWatchFrameWidth )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder = EMAHelperSettings:CreateMediaBorder(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["BORDER_STYLE"]
-	)
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder:SetCallback( "OnValueChanged", EMA.SettingsChangeBorderStyle )
-	EMA.settingsControlWatcher.questWatchBorderColourPicker = EMAHelperSettings:CreateColourPicker(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		column2Left + 15,
-		movingTop - 15,
-		L["BORDER COLOUR"]
-	)
-	EMA.settingsControlWatcher.questWatchBorderColourPicker:SetHasAlpha( true )
-	EMA.settingsControlWatcher.questWatchBorderColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsQuestWatchBorderColourPickerChanged )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground = EMAHelperSettings:CreateMediaBackground(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		column1Left,
-		movingTop,
-		L["BACKGROUND"]
-	)
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground:SetCallback( "OnValueChanged", EMA.SettingsChangeBackgroundStyle )
-	EMA.settingsControlWatcher.questWatchBackgroundColourPicker = EMAHelperSettings:CreateColourPicker(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		column2Left + 15,
-		movingTop - 15,
-		L["BG_COLOUR"]
-	)
-	EMA.settingsControlWatcher.questWatchBackgroundColourPicker:SetHasAlpha( true )
-	EMA.settingsControlWatcher.questWatchBackgroundColourPicker:SetCallback( "OnValueConfirmed", EMA.SettingsQuestWatchBackgroundColourPickerChanged )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMA.settingsControlWatcher.questWatchMediaFont = EMAHelperSettings:CreateMediaFont(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		left,
-		movingTop,
-		L["FONT"]
-	)
-	EMA.settingsControlWatcher.questWatchMediaFont:SetCallback( "OnValueChanged", EMA.SettingsChangeFontStyle )
-	EMA.settingsControlWatcher.questWatchFontSize = EMAHelperSettings:CreateSlider(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		column2Left,
-		movingTop,
-		L["FONT_SIZE"]
-	)
-	EMA.settingsControlWatcher.questWatchFontSize:SetSliderValues( 8, 20 , 1 )
-	EMA.settingsControlWatcher.questWatchFontSize:SetCallback( "OnValueChanged", EMA.SettingsChangeFontSize )
-	movingTop = movingTop - mediaHeight - verticalSpacing
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		column1Left,
-		movingTop,
-		L["SCALE"]
-	)
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetSliderValues( 0.5, 2, 0.01 )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetCallback( "OnValueChanged", EMA.SettingsChangeScale )
-	--movingTop = movingTop - sliderHeight - verticalSpacing
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider = EMAHelperSettings:CreateSlider(
-		EMA.settingsControlWatcher,
-		halfWidthSlider,
-		column2Left,
-		movingTop,
-		L["TRANSPARENCY"]
-	)
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetSliderValues( 0, 1, 0.01 )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetCallback( "OnValueChanged", EMA.SettingsChangeTransparency )
-	movingTop = movingTop - sliderHeight - verticalSpacing
-	return movingTop
-end
---[[
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControlWatcher.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-end
-]]
--------------------------------------------------------------------------------------------------------------
--- Watcher frame.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:CanDisplayQuestWatcher()
-	-- Do not show is quest watcher disabled.
-	if EMA.db.enableQuestWatcher == false then
-		return false
-	end
-	-- Do not show if user has hidden frame.
-	if EMA.db.showFrame == false then
-		return false
-	end
-	-- Do not show if master only and not the master.
-	if EMA.db.enableQuestWatcherOnMasterOnly == true then
-		if EMAApi.IsCharacterTheMaster( EMA.characterName ) == false then
-			return false
-		end
-	end
-	-- Show if at least one line in the watch list.
-	if EMA:CountLinesInQuestWatchList() > 0 then
-		return true
-	end
-	-- Show if at least one auto quest popup.
-	if EMA:HasAtLeastOneAutoQuestPopup() == true then
-		return true
-	end
-	-- Nothing to show.
-	return false
-end
-
-local function Title_OnMouseDown(frame)
-	if IsAltKeyDown() then
-		frame:GetParent():StartMoving()
-	end
-end
-
-local function MoverSizer_OnMouseUp(mover)
-	local frame = mover:GetParent()
-	frame:StopMovingOrSizing()
-	local point, relativeTo, relativePoint, xOffset, yOffset = frame:GetPoint()
-	EMA.db.watcherFramePoint = point
-	EMA.db.watcherFrameRelativePoint = relativePoint
-	EMA.db.watcherFrameXOffset = xOffset
-	EMA.db.watcherFrameYOffset = yOffset
-end
-
-
-function EMA:CreateQuestWatcherFrame()
-	-- The frame.
-	local frame = CreateFrame( "Frame", "EMAQuestWatcherWindowFrame", UIParent )
-	frame.obj = EMA
-	frame:SetFrameStrata( "BACKGROUND" )
-	frame:SetClampedToScreen( true )
-	frame:EnableMouse( false )
-	frame:SetMovable( true )
-	frame:ClearAllPoints()
-	frame:SetPoint( EMA.db.watcherFramePoint, UIParent, EMA.db.watcherFrameRelativePoint, EMA.db.watcherFrameXOffset, EMA.db.watcherFrameYOffset )
-	frame:SetBackdrop( {
-		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
-		edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
-		tile = true, tileSize = 10, edgeSize = 10,
-		insets = { left = 3, right = 3, top = 3, bottom = 3 }
-	} )
-	-- Create the title for the questWaster list frame.
-    local titleButton = CreateFrame( "Button", "EMAQuestWatcherWindowFrameTitle", frame )
-	titleButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", -5, -4 )
-	titleButton:SetWidth( EMA.db.watcherFrameWidth - 100 )
-	titleButton:SetHeight( 20 )
-	titleButton:SetScript("OnMouseDown", Title_OnMouseDown)
-	titleButton:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
-	titleButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(titleButton, "headerMouseOver", true) end)
-	titleButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
-	titleButton.titleName = titleButton:CreateFontString( titleButton:GetName().."Text", "OVERLAY", "GameFontNormal" )
-	titleButton.titleName:SetJustifyH( "CENTER" )
-	titleButton.titleName:SetAllPoints( titleButton )
-	titleButton.titleName:SetTextColor( 1.00, 1.00, 1.00 )
-    titleButton.titleName:SetText( L["TRACKER_TITLE_NAME"] )
-	frame.titleName =  titleButton.titleName
-
-	-- Update button.
-	local updateButton = CreateFrame( "Button", "EMAQuestWatcherWindowFrameButtonUpdate", frame, "UIPanelButtonGrayTemplate" )
-	updateButton:SetPoint( "TOPRIGHT", frame, "TOPRIGHT", -5, -4 )
-	updateButton:SetHeight( 20 )
-	updateButton:SetWidth( 100 )
-	updateButton:SetText( L["UPDATE"] )
-	updateButton:SetScript( "OnClick", EMA.EMAQuestWatchListUpdateButtonClicked )
-	updateButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(updateButton, "update", true) end)
-	updateButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
-	-- Add an area for the "in the field quest" notifications.
-	frame.fieldNotificationsTop = -24
-	frame.fieldNotifications = CreateFrame( "Frame", "EMAQuestWatcherFieldQuestFrame", frame )
-	frame.fieldNotifications:SetFrameStrata( "BACKGROUND" )
-	frame.fieldNotifications:SetClampedToScreen( true )
-	frame.fieldNotifications:EnableMouse( false )
-	frame.fieldNotifications:ClearAllPoints()
-	frame.fieldNotifications:SetPoint( "TOPLEFT", frame, "TOPLEFT", 0, frame.fieldNotificationsTop )
-	frame.fieldNotifications:Show()
-	-- Set transparency of the the frame (and all its children).
-	frame:SetAlpha( EMA.db.watcherFrameAlpha )
-	-- List.
-	local topOfList = frame.fieldNotificationsTop
-	local list = {}
-	list.listFrameName = "EMAQuestWatcherQuestListFrame"
-	list.parentFrame = frame
-	list.listTop = topOfList
-	list.listLeft = 2
-	list.listWidth = EMA.db.watcherFrameWidth
-	list.rowHeight = 19
-	list.rowsToDisplay = EMA.db.watcherListLines
-	list.columnsToDisplay = 2
-	list.columnInformation = {}
-	list.columnInformation[1] = {}
-	list.columnInformation[1].width = 80
-	list.columnInformation[1].alignment = "LEFT"
-	list.columnInformation[2] = {}
-	list.columnInformation[2].width = 20
-	list.columnInformation[2].alignment = "CENTER"
-	list.scrollRefreshCallback = EMA.QuestWatcherQuestListScrollRefresh
-	list.rowClickCallback = EMA.QuestWatcherQuestListRowClick
-	list.rowRightClickCallback = EMA.QuestWatcherQuestListRowRightClick
-	list.rowMouseOverCallBack_OnEnter = EMA.QuestWatcherQuestListRowOnEnter
-	list.rowMouseOverCallBack_OnLeave = EMA.QuestWatcherQuestListRowOnLeave
-	frame.questWatchList = list
-	EMAHelperSettings:CreateScrollList( frame.questWatchList )
-	-- Change appearance from default.
-	frame.questWatchList.listFrame:SetBackdropColor( 0.0, 0.0, 0.0, 0.0 )
-	frame.questWatchList.listFrame:SetBackdropBorderColor( 0.0, 0.0, 0.0, 0.0 )
-	-- Disable mouse on columns so click-through works.
-	for iterateDisplayRows = 1, frame.questWatchList.rowsToDisplay do
-		for iterateDisplayColumns = 1, frame.questWatchList.columnsToDisplay do
-			if InCombatLockdown() == false then
-				frame.questWatchList.rows[iterateDisplayRows].columns[iterateDisplayColumns]:EnableMouse( false )
-			end
-		end
-	end
-	-- Position and size constants (once list height is known).
-	frame.questWatchListBottom = topOfList - list.listHeight
-	frame.questWatchListHeight = list.listHeight
-	frame.questWatchHighlightRow = 1
-	frame.questWatchListOffset = 1
-	-- Set the global frame reference for this frame.
-	EMAQuestWatcherFrame = frame
-	EMAQuestWatcherFrame.autoQuestPopupsHeight = 0
-	EMA:SettingsUpdateBorderStyle()
-	EMA:SettingsUpdateFontStyle()
-	EMA.questWatcherFrameCreated = true
-end
-
-function EMA:ShowTooltip(frame, info, show)
-	if show then
-		GameTooltip:SetOwner(frame, "ANCHOR_TOP")
-		GameTooltip:SetPoint("TOPLEFT", frame, "TOPRIGHT", 16, 0)
-		GameTooltip:ClearLines()
-		if info == "headerMouseOver" then
-			GameTooltip:AddLine(L["HEADER_MOUSE_OVER_QUESTWATCHER"], 1, 0.82, 0, 1)
-		elseif info == "update" then
-			GameTooltip:AddLine(L["UPDATE_MOUSE_OVER_QUESTWATCHER"], 1, 0.82, 0, 1)
-		end
-		GameTooltip:Show()
-	else
-	GameTooltip:Hide()
-	end
-end
-
-
-function EMA:SettingsUpdateBorderStyle()
-	local borderStyle = EMA.SharedMedia:Fetch( "border", EMA.db.borderStyle )
-	local backgroundStyle = EMA.SharedMedia:Fetch( "background", EMA.db.backgroundStyle )
-	local frame = EMAQuestWatcherFrame
-	frame:SetBackdrop( {
-		bgFile = backgroundStyle,
-		edgeFile = borderStyle,
-		tile = true, tileSize = frame:GetWidth(), edgeSize = 10,
-		insets = { left = 3, right = 3, top = 3, bottom = 3 }
-	} )
-	frame:SetBackdropColor( EMA.db.watchFrameBackgroundColourR, EMA.db.watchFrameBackgroundColourG, EMA.db.watchFrameBackgroundColourB, EMA.db.watchFrameBackgroundColourA )
-	frame:SetBackdropBorderColor( EMA.db.watchFrameBorderColourR, EMA.db.watchFrameBorderColourG, EMA.db.watchFrameBorderColourB, EMA.db.watchFrameBorderColourA )
-end
-
-function EMA:SettingsUpdateFontStyle()
-	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.watchFontStyle )
-	local textSize = EMA.db.watchFontSize
-	local frame = EMAQuestWatcherFrame
-	frame.titleName:SetFont( textFont , textSize , "OUTLINE")
-end
-
-
-function EMA:UpdateQuestWatcherDimensions()
-	if InCombatLockdown() == true then
-		return
-	end
-		local frame = EMAQuestWatcherFrame
-		frame:SetWidth( frame.questWatchList.listWidth + 4 )
-		frame:SetHeight( frame.questWatchListHeight + 40 )
-		-- Field notifications.
-		frame.fieldNotifications:SetWidth( frame.questWatchList.listWidth + 4 )
-		frame.fieldNotifications:SetHeight( EMAQuestWatcherFrame.autoQuestPopupsHeight )
-		-- List.
-		frame.questWatchList.listTop = frame.fieldNotificationsTop - EMAQuestWatcherFrame.autoQuestPopupsHeight
-		frame.questWatchList.listFrame:SetPoint( "TOPLEFT", frame.questWatchList.parentFrame, "TOPLEFT", frame.questWatchList.listLeft, frame.questWatchList.listTop )
-		-- Scale.
-		frame:SetScale( EMA.db.watcherFrameScale )
-end
-
-function EMA:SetQuestWatcherVisibility()
-	if InCombatLockdown() == true then
-		return
-	end
-	if EMA:CanDisplayQuestWatcher() == true then
-		EMA:UpdateQuestWatcherDimensions()
-		EMAQuestWatcherFrame:ClearAllPoints()
-		EMAQuestWatcherFrame:SetPoint( EMA.db.watcherFramePoint, UIParent, EMA.db.watcherFrameRelativePoint, EMA.db.watcherFrameXOffset, EMA.db.watcherFrameYOffset )
-		EMAQuestWatcherFrame:SetAlpha( EMA.db.watcherFrameAlpha )
-		EMAQuestWatcherFrame:Show()
-	else
-		EMAQuestWatcherFrame:Hide()
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings functionality.
--------------------------------------------------------------------------------------------------------------
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.enableQuestWatcher = settings.enableQuestWatcher
-		EMA.db.watcherFrameAlpha = settings.watcherFrameAlpha
-		EMA.db.watcherFramePoint = settings.watcherFramePoint
-		EMA.db.watcherFrameRelativePoint = settings.watcherFrameRelativePoint
-		EMA.db.watcherFrameXOffset = settings.watcherFrameXOffset
-		EMA.db.watcherFrameYOffset = settings.watcherFrameYOffset
-		EMA.db.borderStyle = settings.borderStyle
-		EMA.db.backgroundStyle = settings.backgroundStyle
-		EMA.db.watchFontStyle = settings.watchFontStyle
-		EMA.db.watchFontSize = settings.watchFontSize
-		EMA.db.hideQuestWatcherInCombat = settings.hideQuestWatcherInCombat
-		EMA.db.watcherFrameScale = settings.watcherFrameScale
-		EMA.db.enableQuestWatcherOnMasterOnly = settings.enableQuestWatcherOnMasterOnly
-		EMA.db.watchFrameBackgroundColourR = settings.watchFrameBackgroundColourR
-		EMA.db.watchFrameBackgroundColourG = settings.watchFrameBackgroundColourG
-		EMA.db.watchFrameBackgroundColourB = settings.watchFrameBackgroundColourB
-		EMA.db.watchFrameBackgroundColourA = settings.watchFrameBackgroundColourA
-		EMA.db.watchFrameBorderColourR = settings.watchFrameBorderColourR
-		EMA.db.watchFrameBorderColourG = settings.watchFrameBorderColourG
-		EMA.db.watchFrameBorderColourB = settings.watchFrameBorderColourB
-		EMA.db.watchFrameBorderColourA = settings.watchFrameBorderColourA
-		EMA.db.watcherListLines = settings.watcherListLines
-		EMA.db.watcherFrameWidth = settings.watcherFrameWidth
-		EMA.db.unlockWatcherFrame = settings.unlockWatcherFrame
-		EMA.db.hideBlizzardWatchFrame = settings.hideBlizzardWatchFrame
-		EMA.db.doNotHideCompletedObjectives = settings.doNotHideCompletedObjectives
-		EMA.db.showCompletedObjectivesAsDone = settings.showCompletedObjectivesAsDone
-		EMA.db.hideQuestIfAllComplete = settings.hideQuestIfAllComplete
---		EMA.db.showFrame = settings.showFrame
---		EMA.db.sendProgressChatMessages = settings.sendProgressChatMessages
---		EMA.db.messageArea = settings.messageArea
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		EMA:UpdateUnlockWatcherFrame()
-		--EMA:UpdateHideBlizzardWatchFrame()
-		EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"] ( characterName ) )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	-- Quest watcher options.
-	EMA.settingsControlWatcher.checkBoxEnableQuestWatcher:SetValue( EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder:SetValue( EMA.db.borderStyle )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground:SetValue( EMA.db.backgroundStyle )
-
-	EMA.settingsControlWatcher.questWatchMediaFont:SetValue( EMA.db.watchFontStyle )
-	EMA.settingsControlWatcher.questWatchFontSize:SetValue( EMA.db.watchFontSize )
-
-	EMA.settingsControlWatcher.displayOptionsCheckBoxHideQuestWatcherInCombat:SetValue( EMA.db.hideQuestWatcherInCombat )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetValue( EMA.db.watcherFrameAlpha )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetValue( EMA.db.watcherFrameScale )
-	EMA.settingsControlWatcher.checkBoxEnableQuestWatcherMasterOnly:SetValue( EMA.db.enableQuestWatcherOnMasterOnly )
-	EMA.settingsControlWatcher.questWatchBackgroundColourPicker:SetColor( EMA.db.watchFrameBackgroundColourR, EMA.db.watchFrameBackgroundColourG, EMA.db.watchFrameBackgroundColourB, EMA.db.watchFrameBackgroundColourA )
-	EMA.settingsControlWatcher.questWatchBorderColourPicker:SetColor( EMA.db.watchFrameBorderColourR, EMA.db.watchFrameBorderColourG, EMA.db.watchFrameBorderColourB, EMA.db.watchFrameBorderColourA )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetValue( EMA.db.watcherListLines )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetValue( EMA.db.watcherFrameWidth )
-	EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame:SetValue( EMA.db.unlockWatcherFrame )
-	EMA.settingsControlWatcher.checkBoxHideBlizzardWatchFrame:SetValue( EMA.db.hideBlizzardWatchFrame )
-	EMA.settingsControlWatcher.checkBoxShowCompletedObjectivesAsDone:SetValue( EMA.db.showCompletedObjectivesAsDone  )
-	EMA.settingsControlWatcher.checkBoxHideQuestIfAllComplete:SetValue( EMA.db.hideQuestIfAllComplete )
---	EMA.settingsControlWatcher.dropdownMessageArea:SetValue( EMA.db.messageArea )
---	EMA.settingsControlWatcher.checkBoxSendProgressChatMessages:SetValue( EMA.db.sendProgressChatMessages )
-	-- Quest watcher state.
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBorder:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherMediaBackground:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.questWatchMediaFont:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.questWatchFontSize:SetDisabled( not EMA.db.enableQuestWatcher )
-
-	EMA.settingsControlWatcher.displayOptionsCheckBoxHideQuestWatcherInCombat:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherTransparencySlider:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherScaleSlider:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.checkBoxEnableQuestWatcherMasterOnly:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.questWatchBackgroundColourPicker:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.questWatchBorderColourPicker:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherLinesSlider:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.displayOptionsQuestWatcherFrameWidthSlider:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.checkBoxUnlockWatcherFrame:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.checkBoxHideBlizzardWatchFrame:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.checkBoxShowCompletedObjectivesAsDone:SetDisabled( not EMA.db.enableQuestWatcher )
-	EMA.settingsControlWatcher.checkBoxHideQuestIfAllComplete:SetDisabled( not EMA.db.enableQuestWatcher )
---	EMA.settingsControlWatcher.dropdownMessageArea:SetDisabled( not EMA.db.enableQuestWatcher )
---	EMA.settingsControlWatcher.checkBoxSendProgressChatMessages:SetDisabled( not EMA.db.enableQuestWatcher )
-	if EMA.questWatcherFrameCreated == true and InCombatLockdown() == false then
-		EMA:SettingsUpdateBorderStyle()
-		EMA:SettingsUpdateFontStyle()
-		EMA:SetQuestWatcherVisibility()
-	end
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsToggleEnableQuestWatcher( event, checked )
-	EMA.db.enableQuestWatcher = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeBorderStyle( event, value )
-	EMA.db.borderStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeBackgroundStyle( event, value )
-	EMA.db.backgroundStyle = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeFontStyle( event, value )
-	EMA.db.watchFontStyle = value
-	EMA:SettingsRefresh()
-	EMA:EMAQuestWatcherUpdate( false, "all" )
-end
-
-function EMA:SettingsChangeFontSize( event, value )
-	EMA.db.watchFontSize = value
-	EMA:SettingsRefresh()
-	EMA:EMAQuestWatcherUpdate( false, "all" )
-end
-
-function EMA:SettingsToggleHideQuestWatcherInCombat( event, checked )
-	EMA.db.hideQuestWatcherInCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeTransparency( event, value )
-	EMA.db.watcherFrameAlpha = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeScale( event, value )
-	EMA.db.watcherFrameScale = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeWatchLines( event, value )
-	EMA.db.watcherListLines = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsChangeWatchFrameWidth( event, value )
-	EMA.db.watcherFrameWidth = tonumber( value )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleEnableQuestWatcherMasterOnly( event, checked )
-	EMA.db.enableQuestWatcherOnMasterOnly = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsQuestWatchBackgroundColourPickerChanged( event, r, g, b, a )
-	EMA.db.watchFrameBackgroundColourR = r
-	EMA.db.watchFrameBackgroundColourG = g
-	EMA.db.watchFrameBackgroundColourB = b
-	EMA.db.watchFrameBackgroundColourA = a
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsQuestWatchBorderColourPickerChanged( event, r, g, b, a )
-	EMA.db.watchFrameBorderColourR = r
-	EMA.db.watchFrameBorderColourG = g
-	EMA.db.watchFrameBorderColourB = b
-	EMA.db.watchFrameBorderColourA = a
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleUnlockWatcherFrame( event, checked )
-	EMA.db.unlockWatcherFrame = checked
-	EMA:UpdateUnlockWatcherFrame()
-	EMA:SettingsRefresh()
-end
---[[
-function EMA:SettingsToggleSendProgressChatMessages( event, checked )
-	EMA.db.sendProgressChatMessages = checked
-	EMA:SettingsRefresh()
-end
-]]
-function EMA:SettingsToggleShowFrame( event, checked )
-	EMA.db.showFrame = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:ShowFrameCommand( info, parameters )
-	EMA.db.showFrame = true
-	EMA:SettingsRefresh()
-end
-
-function EMA:HideFrameCommand( info, parameters )
-	EMA.db.showFrame = false
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetMessageArea( event, messageAreaValue )
-	EMA.db.messageArea = messageAreaValue
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleHideBlizzardWatchFrame( event, checked )
-	EMA.db.hideBlizzardWatchFrame = checked
-	--EMA:UpdateHideBlizzardWatchFrame()
-	EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsShowCompletedObjectivesAsDone( event, checked )
-	EMA.db.showCompletedObjectivesAsDone = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsHideQuestIfAllComplete( event, checked )
-	EMA.db.hideQuestIfAllComplete = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsDoNotHideCompletedObjectives( event, checked )
-	EMA.db.doNotHideCompletedObjectives = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:UpdateUnlockWatcherFrame()
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	if EMA.db.unlockWatcherFrame == true then
-		EMAQuestWatcherFrame:EnableMouse( true )
-	else
-		EMAQuestWatcherFrame:EnableMouse( false )
-	end
-end
-
-function EMA:UpdateHideBlizzardWatchFrame()
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	if EMA.db.hideBlizzardWatchFrame == true then
-		if ObjectiveTrackerFrame:IsVisible() then
-            ObjectiveTrackerFrame:Hide()
-		end
-	else
-        ObjectiveTrackerFrame:Show()
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- QUEST WATCHING HOOKS
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SelectActiveQuest( questIndex )
-    EMA:DebugMessage("select active quest", questIndex)
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	EMA:SetActiveQuestForQuestWatcherCache( questIndex )
-end
-
-function EMA:GetQuestReward( itemChoice )
-	if EMA.db.enableQuestWatcher == false then
-		return
-    end
-	local questJustCompletedName = GetTitleText()
-    EMA:DebugMessage( "GetQuestReward: ", questIndex, questJustCompletedName )
-    local questIndex = EMA:GetQuestLogIndexByName( questJustCompletedName )
-    local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex )
-    EMA:DebugMessage( "GetQuestReward after GetQuestLogTitle: ", questIndex, questJustCompletedName, questID )
-	EMA:RemoveQuestFromWatchList( questID )
-end
-
-function EMA:AddQuestWatch( questIndex )
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	--EMA:UpdateHideBlizzardWatchFrame()
-	EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
-	EMA:EMAQuestWatcherUpdate( true,  "all" )
-	--EMA:EMAQuestWatcherScenarioUpdate( true )
-end
-
-function EMA:RemoveQuestWatch( questIndex )
-	if EMA.db.enableQuestWatcher == false then
-		return
-    end
-    EMA:DebugMessage( "RemoveQuestWatch", questIndex )
-	--EMA:UpdateHideBlizzardWatchFrame()
-    EMA:ScheduleTimer( "UpdateHideBlizzardWatchFrame", 2 )
-	local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex )
-    EMA:DebugMessage( "About to call RemoveQuestFromWatchList with value:", questID )
-	EMA:RemoveQuestFromWatchList( questID )
-end
-
-function EMA:SetAbandonQuest()
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	local questName = GetAbandonQuestName()
-	if questName ~= nil then
-		local questIndex = EMA:GetQuestLogIndexByName( questName )
-		EMA:SetActiveQuestForQuestWatcherCache( questIndex )
-	end
-end
-
-function EMA:AbandonQuest()
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	-- Wait a bit for the correct information to come through from the server...
-	EMA:ScheduleTimer( "AbandonQuestDelayed", 1 )
-end
-
-
-function EMA:QUEST_WATCH_UPDATE( event, ... )
-	--EMA:Print("test4")
-	if EMA.db.enableQuestWatcher == true then
-		-- Wait a bit for the correct information to come through from the server...
-		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, true, "all" )
-	end
-end
-
-
-function EMA:QUEST_LOG_UPDATE( event, ... )
-	--EMA:Print("QuestTestUpdates")
-	if EMA.db.enableQuestWatcher == true then
-		-- Wait a bit for the correct information to come through from the server...
-		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, true, "all" )
-	end
-end
-
-
-function EMA:SCENARIO_UPDATE( event, ... )
-	--EMA:Print("test2")
-	if EMA.db.enableQuestWatcher == true then
-
-		EMA:RemoveQuestsNotBeingWatched()
-		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, true, "scenario" )
-	end
-end
-
-
-function EMA:SCENARIO_CRITERIA_UPDATE( event, ... )
-	--EMA:Print("test3.5")
-	if EMA.db.enableQuestWatcher == true then
-		-- Wait a bit for the correct information to come through from the server...
-		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, true, "scenario" )
-
-	end
-end
-
-function EMA:PLAYER_ENTERING_WORLD( event, ... )
-	--EMA:Print("test4")
-	if EMA.db.enableQuestWatcher == true then
-		EMA:RemoveQuestsNotBeingWatched()
-		EMA:ScheduleTimer( "EMAQuestWatcherUpdate", 1, false, "all" )
-	end
-end
-
-
-function EMA:PLAYER_REGEN_ENABLED( event, ... )
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	if EMA.db.hideQuestWatcherInCombat == true then
-		EMA:SetQuestWatcherVisibility()
-	end
-end
-
-function EMA:PLAYER_REGEN_DISABLED( event, ... )
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	if EMA.db.hideQuestWatcherInCombat == true then
-		EMAQuestWatcherFrame:Hide()
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- QUEST WATCHING
--------------------------------------------------------------------------------------------------------------
-
-function EMA:AbandonQuestDelayed()
-	EMA:RemoveCurrentQuestFromWatcherCache()
-	EMA:RemoveQuestsNotBeingWatched()
-end
-
-function EMA:EMAQuestWatchListUpdateButtonClicked()
-	EMA:RemoveQuestsNotBeingWatched()
-	EMA:EMASendCommandToTeam( EMA.COMMAND_UPDATE_QUEST_WATCHER_LIST )
-end
-
-function EMA:DoQuestWatchListUpdate( characterName )
-	EMA:EMAQuestWatcherUpdate( false, "all" )
-	--EMA:EMAQuestWatcherScenarioUpdate( false )
-end
-
-
-function EMA:GetQuestObjectiveCompletion( text )
-	if text == nil then
-		return L["N/A"], L["N/A"]
-	end
-	local makeString = nil
-	local dig1, dig2 = string.match( text, "(%d*)/(%d*)")
-	if (dig1  and dig2) then
-		local arg1, arg2 = string.match(text, "(.-%S)%s(.*)")
-		--EMA:Print("testm", arg1, "A", arg2)
-		makeString = dig1..L["/"]..dig2
-	end
-	if makeString ~= nil then
-		local arg1, arg2 = string.match(text, "(.-%S)%s(.*)")
-		local textFind = string.find(arg1, "(%d*)")
-		--EMA:Print("text", textFind)
-		if textFind then
-			return makeString, arg2
-		else
-			return makeString, text
-		end
-	else
-		return L["DONE"] , text
-	end
-end
-
-function EMA:QuestWatchGetObjectiveText( questIndex, objectiveIndex )
-	local objectiveFullText, objectiveType, objectiveFinished = GetQuestLogLeaderBoard( objectiveIndex, questIndex )
-	local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText )
-	return objectiveText
-end
-
-
-
-
--------------------------------------------------------------------------------------------------------------
--- QUEST WATCH CACHE
--------------------------------------------------------------------------------------------------------------
-
-function EMA:IsQuestObjectiveInCache( questID, objectiveIndex )
-	local key = questID..objectiveIndex
-	if EMA.questWatchCache[key] == nil then
-		return false
-	end
-	return true
-end
-
-function EMA:AddQuestObjectiveToCache( questID, objectiveIndex, amountCompleted, objectiveFinished )
-	local key = questID..objectiveIndex
-	EMA.questWatchCache[key] = {}
-	EMA.questWatchCache[key].questID = questID
-	EMA.questWatchCache[key].amountCompleted = amountCompleted
-	EMA.questWatchCache[key].objectiveFinished = objectiveFinished
-end
-
-function EMA:GetQuestCachedValues( questID, objectiveIndex )
-	local key = questID..objectiveIndex
-	return EMA.questWatchCache[key].amountCompleted, EMA.questWatchCache[key].objectiveFinished
-end
-
-function EMA:UpdateQuestCachedValues( questID, objectiveIndex, amountCompleted, objectiveFinished )
-	local key = questID..objectiveIndex
-	EMA.questWatchCache[key].amountCompleted = amountCompleted
-	EMA.questWatchCache[key].objectiveFinished = objectiveFinished
-end
-
-function EMA:QuestCacheUpdate( questID, objectiveIndex, amountCompleted, objectiveFinished )
-	if EMA:IsQuestObjectiveInCache( questID, objectiveIndex ) == false then
-		EMA:AddQuestObjectiveToCache( questID, objectiveIndex, amountCompleted, objectiveFinished )
-		return true
-	end
-	local cachedAmountCompleted, cachedObjectiveFinished = EMA:GetQuestCachedValues( questID, objectiveIndex )
-	if cachedAmountCompleted == amountCompleted and cachedObjectiveFinished == objectiveFinished then
-		return false
-	end
-	EMA:UpdateQuestCachedValues( questID, objectiveIndex, amountCompleted, objectiveFinished )
-	return true
-end
-
-function EMA:SetActiveQuestForQuestWatcherCache( questIndex )
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	if questIndex ~= nil then
-        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex )
-		EMA.currentQuestForQuestWatcherID = questID
-	else
-		EMA.currentQuestForQuestWatcherID = nil
-	end
-end
-
-function EMA:RemoveQuestFromWatcherCache( questID )
-    EMA:DebugMessage( "RemoveQuestFromWatcherCache", questID )
-	for key, questInfo in pairs( EMA.questWatchCache ) do
-		if questInfo.questID == questID then
-			EMA.questWatchCache[key].questID = nil
-			EMA.questWatchCache[key].amountCompleted = nil
-			EMA.questWatchCache[key].objectiveFinished = nil
-			EMA.questWatchCache[key] = nil
-			EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_REMOVE_QUEST, questID )
-		end
-	end
-end
-
-function EMA:RemoveCurrentQuestFromWatcherCache()
-	if EMA.db.enableQuestWatcher == false then
-		return
-    end
-    EMA:DebugMessage( "RemoveCurrentQuestFromWatcherCache", EMA.currentQuestForQuestWatcherID )
-	if EMA.currentQuestForQuestWatcherID == nil then
-		return
-	end
-	EMA:RemoveQuestFromWatcherCache( EMA.currentQuestForQuestWatcherID )
-end
-
--------------------------------------------------------------------------------------------------------------
--- AUTO QUEST COMMUNICATION
--------------------------------------------------------------------------------------------------------------
-
-function EMA:IsCompletedAutoCompleteFieldQuest( questIndex, isComplete )
-	-- Send an isComplete true flag if the quest is completed and is an in the field autocomplete quest.
-	if isComplete and isComplete > 0 then
-		if GetQuestLogIsAutoComplete( questIndex ) then
-			isComplete = true
-		else
-			isComplete = false
-		end
-	else
-		isComplete = false
-	end
-	return isComplete
-end
-
-function EMA:QUEST_AUTOCOMPLETE( event, questID, ... )
-	-- In the field autocomplete quest event.
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	EMA:EMASendCommandToTeam( EMA.COMMAND_AUTO_QUEST_COMPLETE, questID )
-end
-
-function EMA:DoAutoQuestFieldComplete( characterName, questID )
-	EMA:EMAAddAutoQuestPopUp( questID, "COMPLETE", characterName )
-end
-
-function EMA:QUEST_COMPLETE()
-	if EMA.db.enableQuestWatcher == false then
-		return
-    end
-	EMA:EMASendCommandToTeam( EMA.COMMAND_REMOVE_AUTO_QUEST_COMPLETE, questID )
-end
-
-function EMA:DoRemoveAutoQuestFieldComplete( characterName, questID )
-	EMA:EMARemoveAutoQuestPopUp( questID, characterName )
-end
-
-function EMA:QUEST_DETAIL()
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	if QuestGetAutoAccept() and QuestIsFromAreaTrigger() then
-		EMA:EMASendCommandToTeam( EMA.COMMAND_AUTO_QUEST_OFFER, GetQuestID() )
-	end
-end
-
-function EMA:DoAutoQuestFieldOffer( characterName, questID )
-	EMA:EMAAddAutoQuestPopUp( questID, "OFFER", characterName )
-end
-
--------------------------------------------------------------------------------------------------------------
--- QUEST WATCH COMMUNICATION
--------------------------------------------------------------------------------------------------------------
-
-function EMA:EMAQuestWatcherScenarioUpdate(useCache)
-	-- Scenario information
-	local isInScenario = C_Scenario.IsInScenario()
-	if isInScenario == true then
-		-- Hacky hacky to get Scenario to show at the top of the list.
-		if useCache == false then
-			EMAUtilities:ClearTable( EMA.questWatchObjectivesList )
-		end
-		--local useCache = false
-		local scenarioName, currentStage, numStages, flags, _, _, _, xp, money = C_Scenario.GetInfo()
-		--EMA:Print("scenario", scenarioName, currentStage, numStages)
-			for StagesIndex = 1, currentStage do
-				--EMA:Print("Player is on Stage", currentStage)
-				local stageName, stageDescription, numCriteria, _, _, _, numSpells, spellInfo, weightedProgress = C_Scenario.GetStepInfo()
-				--EMA:Print("test match", numCriteria)
-				if numCriteria == 0 then
-					--EMA:Print("test match 0")
-					if (weightedProgress) then
-						--EMA:Print("Checking Progress", weightedProgress)
-						local questID = 1001
-						local criteriaIndex = 0
-						local maxProgress = 100
-						--Placeholder does not work on borkenshore questlines......
-						--local totalQuantity = 100
-						local completed = false
-						local amountCompleted = tostring(weightedProgress).."/"..(maxProgress)
-						local name = "Scenario:"..stageName.." "..currentStage.."/"..numStages
-						--EMA:Print("scenarioProgressInfo", questID, name, criteriaIndex, stageDescription , amountCompleted , totalQuantity, completed )
-						--EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, numCriteria, stageDescription , amountCompleted , totalQuantity, completed )
-						EMA:DoQuestWatchObjectiveUpdate( EMA.CharacterName, questID, name, numCriteria, stageDescription , amountCompleted , totalQuantity, completed )
-					else
-						--EMA:Print("ScenarioDONE", stageDescription)
-						local questID = 1001
-						local criteriaIndex = 1
-						local completed = false
-						local amountCompleted = tostring(0).."/"..(1)
-						local name = "Scenario:"..stageName.." "..currentStage.."/"..numStages
-						--EMA:Print("scenarioProgressInfo", questID, name, criteriaIndex, stageDescription , amountCompleted , totalQuantity, completed )
-						EMA:DoQuestWatchObjectiveUpdate( EMA.characterName, questID, name, numCriteria, stageDescription , amountCompleted , totalQuantity, completed )
-					end
-
-				else
-				for criteriaIndex = 1, numCriteria do
-				local criteriaString, criteriaType, completed, quantity, totalQuantity, flags, assetID, quantityString, criteriaID, duration, elapsed = C_Scenario.GetCriteriaInfo(criteriaIndex)
-				--Ebony to fix a bug with character trial quest (this might be a blizzard bug) TODO relook at somepoint in beta.
-					if (criteriaString) then
-						local questID = 1001
-						local amountCompleted = tostring( quantity ).."/"..( totalQuantity )
-						--EMA:Print("Stages", numStages)
-						local name = nil
-							if (numStages) > 1 then
-								local textName = "Scenario:"..stageName.." "..currentStage.."/"..numStages
-								newName = textName
-							else
-								local textName = "Scenario:"..stageName
-								newName = textName
-							end
-							local name = newName
-							--EMA:Print("test", questID, name, criteriaIndex, criteriaString , amountCompleted , completed, completed)
-							EMA:DoQuestWatchObjectiveUpdate( EMA.characterName, questID, name, criteriaIndex, criteriaString , amountCompleted , completed, completed )
-						end
-					end
-				end
-			end
-		end
-	-- SCENARIO_BONUS
-		local tblBonusSteps = C_Scenario.GetBonusSteps()
-		if #tblBonusSteps > 0 then
-			--EMA:Print("BonusTest", #tblBonusSteps )
-		for i = 1, #tblBonusSteps do
-			local bonusStepIndex = tblBonusSteps[i]
-			--EMA:Print("bonusIndex", bonusStepIndex)
-			local stageName, stageDescription, numCriteria = C_Scenario.GetStepInfo(bonusStepIndex)
-			--EMA:Print("bonusInfo", numCriteria, stageName, stageDescription)
-			for criteriaIndex = 1, numCriteria do
-				--EMA:Print("Player has", numCriteria, "Criterias", "and is checking", criteriaIndex)
-				local criteriaString, criteriaType, completed, quantity, totalQuantity, flags, assetID, quantityString, criteriaID = C_Scenario.GetCriteriaInfoByStep(bonusStepIndex, criteriaIndex)
-				local questID = assetID
-				local amountCompleted = tostring(quantity).."/"..(totalQuantity)
-				local name = "ScenarioBouns:"..stageName --.." "..currentStage.."/"..numStages
-				--EMA:Print("scenarioBouns", questID, name, criteriaIndexa, criteriaString , amountCompleted , totalQuantity, completed )
-				EMA:DoQuestWatchObjectiveUpdate( EMA.characterName, questID, name, criteriaIndex, criteriaString , amountCompleted , completed, completed )
-			end
-		end
-	end
-end
-
-function EMA:EMAQuestWatcherQuestLogUpdate( useCache )
-	for i = 1, GetNumQuestLogEntries() do
-		local questID, title, questLogIndex, numObjectives, requiredMoney, isComplete, startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isBounty, isStory, isOnMap, hasLocalPOI, isHidden = GetQuestWatchInfo(i)
-		if questID ~= nil then
-		--EMA:Print("EMAQuestData", questID, title, questLogIndex, numObjectives, requiredMoney, isComplete, startEvent, isAutoComplete, failureTime, timeElapsed, questType, isTask, isBounty, isStory, isOnMap, hasLocalPOI, isHidden)
-			if numObjectives > 0 then
-				for iterateObjectives = 1, numObjectives do
-					--EMA:Print( "NumObjs:", numObjectives )
-					local objectiveFullText, objectiveType, objectiveFinished = GetQuestLogLeaderBoard( iterateObjectives, questLogIndex )
-					local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText, objectiveType )
-					if objectiveType == "progressbar" then
-						local progress = GetQuestProgressBarPercent( questID )
-						objectiveText = "ProgressBar"..": "..objectiveText
-						amountCompleted = tostring(progress)..L["%"]
-					end
-					if objectiveFullText ~= nil then
-						--EMA:Print("test2", questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete )
-						if (EMA:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then
-							EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, title, iterateObjectives, objectiveText, amountCompleted, isComplete, isComplete )
-						end
-					end
-				end
-			else
-				local objectiveFullText = GetQuestLogCompletionText(questLogIndex)
-				local iterateObjectives = 0
-				local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText )
-				local objectiveFinished = true
-				--EMA:Print("test3", questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete )
-				if (EMA:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then
-					EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, title, iterateObjectives, objectiveText, amountCompleted, isComplete, isComplete )
-				end
-			end
-		end
-	end
-end
-
-function EMA:EMAQuestWatcherWorldQuestUpdate( useCache )
-	--EMA:Print("fireworldquestUpdate")
-	for i = 1, GetNumQuestLogEntries() do
-		local title, level, suggestedGroup, isHeader, isCollapsed, _ , frequency, questID = GetQuestLogTitle(i)
-		local isInArea, isOnMap, numObjectives = GetTaskInfo(questID)
-		local isComplete = EMA:IsCompletedAutoCompleteFieldQuest( questIndex, isComplete )
-			if isInArea and isOnMap then
-			for iterateObjectives = 1, numObjectives do
-				--EMA:Print("test", questID, iterateObjectives, isComplete)
-				local objectiveFullText, objectiveType, objectiveFinished = GetQuestObjectiveInfo( questID, iterateObjectives, isComplete )
-				local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText )
-				if objectiveType == "progressbar"  then
-					local objectiveText = "ProgressBar"
-					local progress = GetQuestProgressBarPercent( questID )
-					local amountCompleted = tostring(progress)..L["%"]
-					--EMA:Print("QuestPercent", title, objectiveText, amountCompleted )
-					local name = tostring("Bonus:")..(title)
-					--EMA:Print("BarQuest", questID, title, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete)
-					if (EMA:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then
-						EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete )
-					end
-			else
-				local amountCompleted, objectiveText = EMA:GetQuestObjectiveCompletion( objectiveFullText )
-				if (EMA:QuestCacheUpdate( questID, iterateObjectives, amountCompleted, objectiveFinished ) == true) or (useCache == false) then
-					--EMA:Print( "UPDATE:", "cache:", useCache, "QuestID", questID, "ObjectID", iterateObjectives )
-					--EMA:Print("sendingquestdata", objectiveText, amountCompleted, finished )
-					local name = tostring("Bonus:")..(title)
-					EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE, questID, name, iterateObjectives, objectiveText, amountCompleted, objectiveFinished, isComplete )
-					end
-				end
-			end
-		end
-	end
-end
-
-function EMA:EMAQuestWatcherUpdate( useCache, questType )
-	if EMA.db.enableQuestWatcher == false then
-		return
-	end
-	--EMA:Print("updateQuestList", useCache, questType )
-	if questType == "scenario" or "all" then
-		EMA:EMAQuestWatcherScenarioUpdate(useCache)
-	end
-	if questType == "quest" or "all" then
-		EMA:EMAQuestWatcherQuestLogUpdate( useCache )
-	end
-	if questType == "worldQuest" or "all" then
-		EMA:EMAQuestWatcherWorldQuestUpdate( useCache )
-	end
-end
-
--- Gathers messages from team.
-function EMA:DoQuestWatchObjectiveUpdate( characterName, questID, questName, objectiveIndex, objectiveText, amountCompleted, objectiveFinished, isComplete )
-	EMA:UpdateQuestWatchList( questID, questName, objectiveIndex, objectiveText, characterName, amountCompleted, objectiveFinished, isComplete )
-end
-
-function EMA:UpdateQuestWatchList( questID, questName, objectiveIndex, objectiveText, characterName, amountCompleted, objectiveFinished, isComplete )
-    --local characterName = (( Ambiguate( name, "none" ) ))
-	--EMA:Print( "UpdateQuestWatchList", questID, questName, objectiveIndex, objectiveText, characterName, amountCompleted, objectiveFinished, isComplete )
-	local questHeaderPosition = EMA:GetQuestHeaderInWatchList( questID, questName, characterName )
-	local objectiveHeaderPosition = EMA:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, "", questHeaderPosition )
-	local characterPosition = EMA:GetCharacterInWatchList( questID, objectiveIndex, characterName, amountCompleted, objectiveHeaderPosition, objectiveFinished )
-	local totalAmountCompleted = EMA:GetTotalCharacterAmountFromWatchList( questID, objectiveIndex )
-	objectiveHeaderPosition = EMA:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, totalAmountCompleted, questHeaderPosition )
-	-- isComplete piggybacks on the quest watch update, so we are always displaying a complete quest button (in case the QUEST_AUTOCOMPLETE event does not fire).
-	if isComplete == true then
-		EMA:DoAutoQuestFieldComplete( characterName, questID )
-	end
-	if EMA.db.hideQuestIfAllComplete == true then
-		EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
-	end
-	EMA:QuestWatcherQuestListScrollRefresh()
-	EMA:SetQuestWatcherVisibility()
-end
-
--------------------------------------------------------------------------------------------------------------
-
-function EMA:RemoveQuestFromWatchList( questID )
-	EMA:RemoveQuestFromWatcherCache( questID )
-	EMA:EMASendCommandToTeam( EMA.COMMAND_QUEST_WATCH_REMOVE_QUEST, questID )
-end
-
-function EMA:DoRemoveQuestFromWatchList( characterName, questID )
-	-- Remove character lines for this character.
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		if questWatchInfo.questID == questID and questWatchInfo.character == characterName then
-			EMA:RemoveQuestWatchInfo( questWatchInfo.key )
-		end
-	end
-	-- See if any character lines left, if none, then remove quest completely.
-	local found = false
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		if questWatchInfo.questID == questID and questWatchInfo.type == "CHARACTER_AMOUNT" then
-			found = true
-		end
-	end
-	if found == false then
-		for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-			local questWatchInfo = questWatchInfoContainer.info
-			if questWatchInfo.questID == questID then
-				EMA:RemoveQuestWatchInfo( questWatchInfo.key )
-			end
-		end
-	else
-		-- Still some character lines left, update the total amount of objectives to reflect lost team member.
-		-- Find any remaining quest objective headers.
-		for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-			local questWatchInfo = questWatchInfoContainer.info
-			if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" then
-				questWatchInfo.amount = EMA:GetTotalCharacterAmountFromWatchList( questID, questWatchInfo.objectiveIndex )
-				-- If all done auto-collapse when complete, collapse objective header.
-				if (questWatchInfo.amount == L["DONE"]) and (EMA.db.doNotHideCompletedObjectives == true) then
-					questWatchInfo.childrenAreHidden = true
-				end
-			end
-			if questWatchInfo.questID == questID and questWatchInfo.type == "QUEST_HEADER" then
-				EMA:UpdateTeamQuestCountRemoveCharacter( questWatchInfo, characterName )
-				if EMA.db.hideQuestIfAllComplete == true then
-					EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
-				end
-			end
-		end
-	end
-	-- Remove any auto quest buttons.
-	EMA:DoRemoveAutoQuestFieldComplete( characterName, questID )
-	EMA:QuestWatcherQuestListScrollRefresh()
-	EMA:SetQuestWatcherVisibility()
-end
-
--------------------------------------------------------------------------------------------------------------
--- QUEST WATCH DISPLAY LIST LOGIC
--------------------------------------------------------------------------------------------------------------
-
-
-function EMA:GetTotalCharacterAmountFromWatchList( questID, objectiveIndex )
-	local amount = 0
-	local total = 0
-	local countCharacters = 0
-	local countDones = 0
-	local questType = nil
-	local amountOverTotal = nil
-	local ProgressQuest = nil
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		local position = questWatchInfoContainer.position
-		if questWatchInfo.questID == questID and questWatchInfo.type == "CHARACTER_AMOUNT" and questWatchInfo.objectiveIndex == objectiveIndex then
-			countCharacters = countCharacters + 1
-			local amountCompletedText = questWatchInfo.amount
-			if amountCompletedText == L["DONE"] then
-				countDones = countDones + 1
-			end
-			local arg1, arg2 = string.match(amountCompletedText, "(%d*)/(%d*)")
-			if (arg1 ~= nil) and (arg2 ~= nil) then
-				if strtrim( arg1 ) ~= "" and strtrim( arg2 ) ~= "" then
-					amount = amount + tonumber( arg1 )
-					total = total + tonumber( arg2 )
-				end
-			else
-				local arg1 = string.match(amountCompletedText, "(%d*)")
-				if (arg1 ~= nil) then
-					if strtrim( arg1 ) ~= "" then
-						amount = amount
-						total = total + tonumber( arg1 )
-						ProgressQuest = true
-					end
-				end
-			end
-		end
-		if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" and string.find( questWatchInfo.information, "ProgressBar" ) then
-			questType = "ProgressBar"
-		end
-	end
-	if countCharacters == 0 then
-		return L["DONE"]
-	end
-	if questType == "ProgressBar" and ProgressQuest == true then
-		local totalChars = (100 * countCharacters)
-		local maths = (total / totalChars) * 100
-		amountOverTotal = maths..L["%"]
-	else
-		if amount == total then
-			amountOverTotal = L["DONE"]
-		else
-			amountOverTotal = string.format( "%s/%s", amount, total )
-		end
-    end
-	EMA:DebugMessage( "AMTOT:", amountOverTotal )
-		if amountOverTotal == "0/0" then
-			--EMA:Print("test", countDones, countCharacters)
-			if countDones == countCharacters then
-				amountOverTotal = L["DONE"]
-			else
-				amountOverTotal = L["N/A"]
-			end
-		end
-	return amountOverTotal
-end
-
-function EMA:RemoveQuestsNotBeingWatched()
-	EMA:UpdateAllQuestsInWatchList()
-	for checkQuestID, value in pairs( EMA.questWatchListOfQuests ) do
-		local found = false
-		for iterateWatchedQuests = 1, GetNumQuestWatches() do
-			local questIndex = GetQuestIndexForWatch( iterateWatchedQuests )
-			if questIndex ~= nil then
-                local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( questIndex )
-				if checkQuestID == questID then
-					found = true
-				end
-			end
-		end
-		if found == false then
-			EMA:RemoveQuestFromWatchList( checkQuestID )
-		end
-	end
-end
-
-function EMA:UpdateAllQuestsInWatchList()
-	table.wipe( EMA.questWatchListOfQuests )
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		-- TODO- whats going on here?
-		EMA.questWatchListOfQuests[questWatchInfoContainer.info.questID] = true
-	end
-end
-
-function EMA:GetCharacterInWatchList( questID, objectiveIndex, characterName, amountCompleted, objectiveHeaderPosition, objectiveFinished )
-	local characterPosition = -1
-	local characterQuestWatchInfo
-	if objectiveFinished then
-		if EMA.db.showCompletedObjectivesAsDone == true then
-			amountCompleted = L["DONE"]
-		end
-	end
-	-- Try and find the character line.
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		local position = questWatchInfoContainer.position
-		if questWatchInfo.questID == questID and questWatchInfo.type == "CHARACTER_AMOUNT" and questWatchInfo.objectiveIndex == objectiveIndex and questWatchInfo.character == characterName then
-			-- Character line found.  Update information.
-			questWatchInfo.amount = amountCompleted
-			characterQuestWatchInfo = questWatchInfo
-			characterPosition = position
-			break
-		end
-	end
-	-- Was not found, add character line.
-	if characterPosition == -1 then
-		-- Only if not completed or user wants to show completed.
-		if ((objectiveFinished == nil) or (objectiveFinished == false)) or (EMA.db.doNotHideCompletedObjectives == true) then
-			local questWatchInfo = EMA:CreateQuestWatchInfo( questID, "CHARACTER_AMOUNT", objectiveIndex, characterName, characterName, amountCompleted )
-			EMA:InsertQuestWatchInfoToListAfterPosition( questWatchInfo, objectiveHeaderPosition )
-			return objectiveHeaderPosition + 1
-		end
-		return -1
-	else
-		-- Character line was found.  Remove it if objective finished?
-		if (objectiveFinished) and (EMA.db.doNotHideCompletedObjectives == false) then
-			EMA:RemoveQuestWatchInfo( characterQuestWatchInfo.key )
-			return -1
-		end
-	end
-	return -1
-end
-
-function EMA:GetObjectiveHeaderInWatchList( questID, questName, objectiveIndex, objectiveText, totalAmountCompleted, questHeaderPosition )
-	--EMA:Print("testposition", questName, "oT", objectiveText, questHeaderPosition)
-	if strtrim( objectiveText ) == "" then
-		objectiveText = questName
-	end
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		local position = questWatchInfoContainer.position
-		if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" and questWatchInfo.objectiveIndex == objectiveIndex then
-			questWatchInfo.information = objectiveText
-			questWatchInfo.amount = totalAmountCompleted
-			-- If all done auto-collapse when complete, collapse objective header.
-			if (questWatchInfo.amount == L["DONE"]) and (EMA.db.doNotHideCompletedObjectives == true) then
-				questWatchInfo.childrenAreHidden = true
-			end
-			return position
-		end
-	end
-	local questWatchInfo = EMA:CreateQuestWatchInfo( questID, "OBJECTIVE_HEADER", objectiveIndex, "", objectiveText, totalAmountCompleted )
-	-- Hide the team list by default.
-	questWatchInfo.childrenAreHidden = true
-	EMA:InsertQuestWatchInfoToListAfterPosition( questWatchInfo, questHeaderPosition )
-	return questHeaderPosition + 1
-end
-
-function EMA:GetQuestItemFromQuestID(findQuestID)
-	for iterateQuests=1,GetNumQuestLogEntries() do
-		local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID = GetQuestLogTitle(iterateQuests)
-		--if title ~= nil then
-		if not isHeader then
-			if findQuestID == questID then
-				local questItemLink, questItemIcon, questItemCharges = GetQuestLogSpecialItemInfo( iterateQuests )
-				if questItemLink then
-					--EMA:Print("Item", questItemLink, questItemIcon, questID)
-					return questItemLink, questItemIcon
-				else
-					return nil, nil
-				end
-			end
-		end
-	end
-end
-
-local function GetInlineFactionIcon()
-	local faction = UnitFactionGroup("player");
-	local coords = faction == "Horde" and QUEST_TAG_TCOORDS.HORDE or QUEST_TAG_TCOORDS.ALLIANCE;
-	return CreateTextureMarkup(QUEST_ICONS_FILE, QUEST_ICONS_FILE_WIDTH, QUEST_ICONS_FILE_HEIGHT, 18, 18
-	, coords[1]
-	, coords[2] - 0.02 -- Offset to stop bleeding from next image
-	, coords[3]
-	, coords[4], 0, 2);
-end
-
-function EMA:GetQuestHeaderInWatchList( questID, questName, characterName )
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		local position = questWatchInfoContainer.position
-		if questWatchInfo.questID == questID and questWatchInfo.type == "QUEST_HEADER" then
-			EMA:UpdateTeamQuestCountAddCharacter( questWatchInfo, characterName )
-
-			if EMA.db.hideQuestIfAllComplete == true then
-				EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
-			end
-			return position
-		end
-	end
-	local questItemLink, questItemIcon = EMA:GetQuestItemFromQuestID(questID)
-	local icon = ""
-	if ( questItemIcon ~= nil ) then
-		icon = strconcat(" |T"..questItemIcon..":18|t".."  ")
-	end
-	-- TODO CLEAN UP AFTER 8.0
-	-- Ebony incase we wonna use this then there is C_LFGList.CanCreateQuestGroup(questID)
-	-- that would show the quest using the group finder
-	if EMAPrivate.Core.isBetaBuild() == true then
-		if (C_CampaignInfo.IsCampaignQuest(questID) ) then
-			--EMA:Print("CampaignQuest", questName)
-			icon = GetInlineFactionIcon()
-		end
-	end
-	local questWatchInfo = EMA:CreateQuestWatchInfo( questID, "QUEST_HEADER", -1, "", questName, icon )
-
-	EMA:UpdateTeamQuestCountAddCharacter( questWatchInfo, characterName )
-	if EMA.db.hideQuestIfAllComplete == true then
-		EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
-	end
-	local newPositionAtEnd = EMA:GetQuestWatchMaximumOrder() + 1
-	EMA:AddQuestWatchInfoToListAtPosition( questWatchInfo, newPositionAtEnd )
-	return newPositionAtEnd
-end
-
-function EMA:UpdateTeamQuestCount( questWatchInfo, characterName )
-	local count = 0
-	for character, dummy in pairs( questWatchInfo.teamCharacters ) do
-		count = count + 1
-	end
-	questWatchInfo.questTeamCount = count
-end
-
-function EMA:UpdateTeamQuestCountAddCharacter( questWatchInfo, name )
-
-	questWatchInfo.teamCharacters[name] = true
-	EMA:UpdateTeamQuestCount( questWatchInfo, name )
-end
-
-function EMA:UpdateTeamQuestCountRemoveCharacter( questWatchInfo, characterName )
-	questWatchInfo.teamCharacters[characterName] = nil
-	EMA:UpdateTeamQuestCount( questWatchInfo, characterName )
-end
-
-function EMA:CheckQuestForAllObjectivesCompleteAndHide( questID )
-	if EMA.db.hideQuestIfAllComplete == false then
-		return
-	end
-	-- If all objective headers for quest say "DONE" then hide quest if hideQuestIfAllComplete option set.
-	local allDone = true
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" then
-			if questWatchInfo.amount ~= L["DONE"] then
-				allDone = false
-			end
-		end
-	end
-	-- Set quest header hidden or not as appropriate.
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		if questWatchInfo.questID == questID and questWatchInfo.type == "QUEST_HEADER" then
-			questWatchInfo.childrenAreHidden = allDone
-		end
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- QUEST WATCH INFO FUNCTIONS
--------------------------------------------------------------------------------------------------------------
-
-function EMA:CreateQuestWatchInfo( questID, type, objectiveIndex, character, information, amount )
-	local questWatchInfo = {}
-	questWatchInfo.key = questID..type..objectiveIndex..character
-	questWatchInfo.questID = questID
-	questWatchInfo.type = type
-	questWatchInfo.objectiveIndex = objectiveIndex
-	questWatchInfo.character = character
-	questWatchInfo.information = information
-	questWatchInfo.amount = amount
-	questWatchInfo.childrenAreHidden = false
-	questWatchInfo.questTeamCount = 0
-	questWatchInfo.teamCharacters = {}
-	return questWatchInfo
-end
-
-function EMA:AddQuestWatchInfoToListAtPosition( questWatchInfo, position )
-	EMA.questWatchObjectivesList[questWatchInfo.key] = {}
-	EMA.questWatchObjectivesList[questWatchInfo.key].position = position
-	EMA.questWatchObjectivesList[questWatchInfo.key].info = questWatchInfo
-end
-
-function EMA:InsertQuestWatchInfoToListAfterPosition( questWatchInfo, position )
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		local checkPosition = questWatchInfoContainer.position
-		if checkPosition > position then
-			questWatchInfoContainer.position = checkPosition + 1
-		end
-	end
-	EMA:AddQuestWatchInfoToListAtPosition( questWatchInfo, position + 1 )
-end
-
-function EMA:RemoveQuestWatchInfo( key )
-	local removedPosition = EMA.questWatchObjectivesList[key].position
-	for checkKey, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local checkPosition = questWatchInfoContainer.position
-		if checkPosition > removedPosition then
-			questWatchInfoContainer.position = checkPosition - 1
-		end
-	end
-	EMA.questWatchObjectivesList[key].info.key = nil
-	EMA.questWatchObjectivesList[key].info.questID = nil
-	EMA.questWatchObjectivesList[key].info.type = nil
-	EMA.questWatchObjectivesList[key].info.objectiveIndex = nil
-	EMA.questWatchObjectivesList[key].info.character = nil
-	EMA.questWatchObjectivesList[key].info.information = nil
-	EMA.questWatchObjectivesList[key].info.amount = nil
-	EMA.questWatchObjectivesList[key].info.childrenAreHidden = nil
-	EMA.questWatchObjectivesList[key].info.questTeamCount = nil
-	table.wipe( EMA.questWatchObjectivesList[key].info.teamCharacters )
-	table.wipe( EMA.questWatchObjectivesList[key].info )
-	EMA.questWatchObjectivesList[key].info = nil
-	EMA.questWatchObjectivesList[key].position = nil
-	table.wipe( EMA.questWatchObjectivesList[key] )
-	EMA.questWatchObjectivesList[key] = nil
-end
-
--- Get the largest order number from the quest watch list.
-function EMA:GetQuestWatchMaximumOrder()
-	local largestPosition = 0
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		local position = questWatchInfoContainer.position
-		if position > largestPosition then
-			largestPosition = position
-		end
-	end
-	return largestPosition
-end
-
-function EMA:GetQuestWatchInfoFromKey( key )
-	local questWatchInfo = EMA.questWatchObjectivesList[key].info
-	return questWatchInfo.information, questWatchInfo.amount, questWatchInfo.type, questWatchInfo.questID, questWatchInfo.childrenAreHidden, key, questWatchInfo.objectiveIndex
-end
-
--- Get the quest watch info at a specific position.
-function EMA:GetQuestWatchInfoAtOrderPosition( position )
-	local information = ""
-	local amount = ""
-	local type = ""
-	local questID = ""
-	local childrenAreHidden = ""
-	local key = ""
-	local questTeamCount = ""
-	local objectiveIndex = ""
-	for keyStored, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		local questWatchInfo = questWatchInfoContainer.info
-		local questWatchPosition = questWatchInfoContainer.position
-		if questWatchPosition == position then
-			information = questWatchInfo.information
-			amount = questWatchInfo.amount
-			type = questWatchInfo.type
-			questID = questWatchInfo.questID
-			childrenAreHidden = questWatchInfo.childrenAreHidden
-			key = keyStored
-			questTeamCount = questWatchInfo.questTeamCount
-			objectiveIndex = questWatchInfo.objectiveIndex
-			break
-		end
-	end
-	return information, amount, type, questID, childrenAreHidden, key, questTeamCount, objectiveIndex
-end
-
-function EMA:ToggleChildrenAreHiddenQuestWatchInfoByKey( key )
-	local questWatchInfo = EMA.questWatchObjectivesList[key].info
-	questWatchInfo.childrenAreHidden = not questWatchInfo.childrenAreHidden
-end
-
-function EMA:CountLinesInQuestWatchList()
-	if EMA.questWatchObjectivesList == nil then
-		return 1
-	end
-	local count = 1
-	for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-		count = count + 1
-	end
-	return count
-end
-
--------------------------------------------------------------------------------------------------------------
--- QUEST WATCH DISPLAY LIST MECHANICS
--------------------------------------------------------------------------------------------------------------
-
-function EMA:QuestWatcherQuestListDrawLine( frame, iterateDisplayRows, type, information, amount, childrenAreHidden, key, questTeamCount, questID )
-	local toggleDisplay = ""
-	local padding = ""
-	local teamCount = ""
-	local textFont = EMA.SharedMedia:Fetch( "font", EMA.db.watchFontStyle )
-	local textSize = EMA.db.watchFontSize
-	if type == "CHARACTER_AMOUNT" then
-		padding = "        "
-	end
-	if type == "OBJECTIVE_HEADER" then
-		padding = "    "
-		if childrenAreHidden == true then
-			toggleDisplay = "+ "
-		else
-			toggleDisplay = "- "
-		end
-	end
-	if type == "QUEST_HEADER" then
-		if questTeamCount ~= 0 then
-			teamCount = " ("..questTeamCount.."/"..EMAApi.GetTeamListMaximumOrderOnline()..") "
-		end
-	end
-	frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetFont( textFont , textSize , "OUTLINE")
-	frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetFont( textFont , textSize , "OUTLINE")
-	--EMA:Print("test2343", type, information )
-	local matchData = string.find( information, "Bonus:" )
-	local matchDataScenario = string.find( information, "Scenario:" )
-	local matchDataScenarioBouns = string.find( information, "ScenarioBouns:" )
-	-- Scenario
-	if matchDataScenario then
-		local name = gsub(information, "[^|]+:", "")
-		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..name )
-		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount )
-			frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0, 1.0, 1.0, 1.0 )
-			frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0, 1.0, 1.0, 1.0 )
-		if InCombatLockdown() == false then
-			frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( false )
-			frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( false )
-		end
-	-- Scenario Bouns
-	elseif matchDataScenarioBouns then
-		local name = gsub(information, "[^|]+:", "")
-		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..name )
-		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount )
-			frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 0, 0.30, 1.0, 1.0, 1.0 )
-			frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 0, 0.30, 1.0, 1.0, 1.0 )
-		if InCombatLockdown() == false then
-			frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( false )
-			frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( false )
-		end
-	else
-		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( padding..toggleDisplay..teamCount..information )
-		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( amount )
-		if type == "QUEST_HEADER" then
-			if matchData then
-				frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0, 0, 1.0, 1.0 )
-				frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0, 0, 1.0, 1.0 )
-			else
-				frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
-				frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0.96, 0.41, 1.0 )
-			end
-
-		end
-		if InCombatLockdown() == false then
-			frame.questWatchList.rows[iterateDisplayRows].columns[1]:EnableMouse( true )
-			frame.questWatchList.rows[iterateDisplayRows].columns[2]:EnableMouse( true )
-		end
-	end
-
-	if type == "OBJECTIVE_HEADER" then
-		--EMA:Print("Match", information)
-		local matchData = string.find( information, "ProgressBar" )
-		if matchData then
-			--EMA:Print("Match", information)
-			frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 0.50, 0.50, 1.0 )
-			frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 0.50, 0.50, 1.0 )
-			-- Turn on the mouse for these buttons.
-		else
-			frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1.0 )
-			frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1.0 )
-			-- Turn on the mouse for these buttons.
-		end
-	end
-	local questItemLink, questItemIcon = EMA:GetQuestItemFromQuestID(questID)
-	if questItemLink ~= nil and type == "QUEST_HEADER" then
-		EMA:UpdateQuestItemButton( iterateDisplayRows, questItemLink )
-
-	end
-	frame.questWatchList.rows[iterateDisplayRows].key = key
-end
-
-function EMA:QuestWatcherQuestListScrollRefresh()
-	local frame = EMAQuestWatcherFrame
-	FauxScrollFrame_Update(
-		frame.questWatchList.listScrollFrame,
-		EMA:GetQuestWatchMaximumOrder(),
-		frame.questWatchList.rowsToDisplay,
-		frame.questWatchList.rowHeight
-	)
-	frame.questWatchListOffset = FauxScrollFrame_GetOffset( frame.questWatchList.listScrollFrame )
-	frame.dataRowOffset = 0
-	local atLeastOneRowShowing = false
-	local afterTextEdit = false
-	for iterateDisplayRows = 1, frame.questWatchList.rowsToDisplay do
-		-- Reset.
-		frame.questWatchList.rows[iterateDisplayRows].key = ""
-		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
-		frame.questWatchList.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		frame.questWatchList.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		frame.questWatchList.rows[iterateDisplayRows].highlight:SetTexture( 0.0, 0.0, 0.0, 1.0 )
-		-- Get data.
-		local dataRowNumber = iterateDisplayRows + frame.questWatchListOffset + frame.dataRowOffset
-		local foundDataRow = false
-		local finishedRows = false
-		while (foundDataRow == false) and (finishedRows == false) do
-			dataRowNumber = iterateDisplayRows + frame.questWatchListOffset + frame.dataRowOffset
-			if dataRowNumber > EMA:GetQuestWatchMaximumOrder() then
-				finishedRows = true
-			else
-				local information, amount, type, questID, childrenAreHidden, key, questTeamCount, objectiveIndex = EMA:GetQuestWatchInfoAtOrderPosition( dataRowNumber )
-
-				foundDataRow = true
-				if type == "QUEST_HEADER" then
-					-- In this case, children are hidden refers to itself as well.
-					if childrenAreHidden == true then
-						foundDataRow = false
-						frame.dataRowOffset = frame.dataRowOffset + 1
-					end
-				end
-				if type == "OBJECTIVE_HEADER" then
-					local hideMe = false
-					for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-						local questWatchInfo = questWatchInfoContainer.info
-						if questWatchInfo.questID == questID and questWatchInfo.type == "QUEST_HEADER" then
-							hideMe = questWatchInfo.childrenAreHidden
-							break
-						end
-					end
-					if hideMe == true then
-						foundDataRow = false
-						frame.dataRowOffset = frame.dataRowOffset + 1
-					end
-				end
-				-- If this is a character_amount type, find its parent objective header and see if its children are hidden.
-				if type == "CHARACTER_AMOUNT" then
-					local hideMe = false
-					for key, questWatchInfoContainer in pairs( EMA.questWatchObjectivesList ) do
-						local questWatchInfo = questWatchInfoContainer.info
-						if questWatchInfo.questID == questID and questWatchInfo.type == "OBJECTIVE_HEADER" and questWatchInfo.objectiveIndex ==  objectiveIndex then
-							hideMe = questWatchInfo.childrenAreHidden
-							break
-						end
-					end
-					if hideMe == true then
-						foundDataRow = false
-						frame.dataRowOffset = frame.dataRowOffset + 1
-					end
-				end
-			end
-
-			-- Put information and amount into columns.
-			local information, amount, type, questID, childrenAreHidden, key, questTeamCount, objectiveIndex = EMA:GetQuestWatchInfoAtOrderPosition( dataRowNumber )
-			EMA:QuestWatcherQuestListDrawLine( frame, iterateDisplayRows, type, information, amount, childrenAreHidden, key, questTeamCount, questID )
-			atLeastOneRowShowing = true
-		end
-	end
-	-- Adjust the scroll frame based on hidden rows.
-	if atLeastOneRowShowing == true then
-		FauxScrollFrame_Update(
-			frame.questWatchList.listScrollFrame,
-			EMA:GetQuestWatchMaximumOrder() - frame.dataRowOffset,
-			frame.questWatchList.rowsToDisplay,
-			frame.questWatchList.rowHeight
-		)
-	end
-	EMA:DisplayAutoQuestPopUps()
-end
-
-
-function EMA:QuestWatcherQuestListRowClick( rowNumber, columnNumber )
-   -- EMA:Print( "QuestWatcherQuestListRowClick", rowNumber, columnNumber )
-	local frame = EMAQuestWatcherFrame
-	local key = frame.questWatchList.rows[rowNumber].key
-	if key ~= nil and key ~= "" then
-		local information, amount, type, questID, childrenAreHidden, keyStored = EMA:GetQuestWatchInfoFromKey( key )
-        EMA:DebugMessage( "GetQuestWatchInfoFromKey", information, amount, type, questID, childrenAreHidden, keyStored, key )
-		if type == "QUEST_HEADER" then
-            if columnNumber == 1 then
-				QuestMapFrame_OpenToQuestDetails( questID )
-			end
-			if columnNumber == 2 then
-				local questItemLink, questItemIcon = EMA:GetQuestItemFromQuestID(questID)
-				if questItemLink ~= nil then
-					local itemName = GetItemInfo(questItemLink)
-					EMA:UpdateQuestItemButton( rowNumber, itemName )
-				end
-		   end
-		end
-		if type == "OBJECTIVE_HEADER" then
-			if columnNumber == 1 then
-				EMA:ToggleChildrenAreHiddenQuestWatchInfoByKey( key )
-				EMA:QuestWatcherQuestListScrollRefresh()
-			end
-		end
-	end
-end
-
-function EMA.QuestWatcherQuestListRowRightClick( rowNumber, columnNumber )
-	--EMA:Print("testRightClick", rowNumber, columnNumber )
-	local frame = EMAQuestWatcherFrame
-	local key = frame.questWatchList.rows[rowNumber].key
-	if key ~= nil and key ~= "" then
-		local information, amount, type, questID, childrenAreHidden, keyStored = EMA:GetQuestWatchInfoFromKey( key )
-		--EMA:Print("test", questID)
-		if type == "QUEST_HEADER" and columnNumber == 1 then
-			EMAQuestMapQuestOptionsDropDown.questID = questID
-			EMAQuestMapQuestOptionsDropDown.questText = information
-			ToggleDropDownMenu(1, nil, EMAQuestMapQuestOptionsDropDown, "cursor", 6, -6)
-		end
-	end
-end
-
-function EMA.QuestWatcherQuestListRowOnEnter( rowNumber, columnNumber )
-	--EMA:Print("MouseOver", rowNumber, columnNumber)
-	local frame = EMAQuestWatcherFrame
-	local key = frame.questWatchList.rows[rowNumber].key
-	local toolTipFrame = frame.questWatchList.rows[rowNumber].columns[columnNumber]
-	if key ~= nil and key ~= "" then
-		local information, amount, type, questID, childrenAreHidden, keyStored = EMA:GetQuestWatchInfoFromKey( key )
-		--EMA:Print("test", information, questID)
-		GameTooltip:ClearAllPoints()
-		GameTooltip:SetPoint("TOPRIGHT", toolTipFrame, "TOPLEFT", 0, 0)
-		GameTooltip:SetOwner( toolTipFrame, "ANCHOR_PRESERVE")
-		if type == "QUEST_HEADER" and columnNumber == 2 then
-			local questItemLink, questItemIcon = EMA:GetQuestItemFromQuestID(questID)
-			if questItemLink ~= nil then
-				GameTooltip:SetHyperlink(questItemLink)
-				GameTooltip:Show()
-			end
-		end
-			if columnNumber == 1 then
-				toolTipFrame:SetAlpha( 1.0 )
-				if ( HaveQuestData(questID) and GetQuestLogRewardXP(questID) == 0 and GetNumQuestLogRewardCurrencies(questID) == 0
-					and GetNumQuestLogRewards(questID) == 0 and GetQuestLogRewardMoney(questID) == 0 and GetQuestLogRewardArtifactXP(questID) == 0 ) then
-					GameTooltip:Hide()
-					return
-				end
-				GameTooltip:AddLine(L["REWARDS"], 1, 0.82, 0, 1)
-				GameTooltip:AddLine(L["REWARDS_TEXT"],1,1,1,1)
-				GameTooltip:AddLine(" ")
-				if ( not HaveQuestData(questID) ) then
-					GameTooltip:AddLine(RETRIEVING_DATA, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b);
-				else
-					-- Taken From Blizzard BonusObjectiveTracker_ShowRewardsTooltip
-					-- xp
-					local xp = GetQuestLogRewardXP(questID);
-					if ( xp > 0 ) then
-						GameTooltip:AddLine(string.format(BONUS_OBJECTIVE_EXPERIENCE_FORMAT, xp), 1, 1, 1);
-					end
-					local artifactXP = GetQuestLogRewardArtifactXP(questID);
-					if ( artifactXP > 0 ) then
-						GameTooltip:AddLine(string.format(BONUS_OBJECTIVE_ARTIFACT_XP_FORMAT, artifactXP), 1, 1, 1);
-					end
-					-- currency
-					QuestUtils_AddQuestCurrencyRewardsToTooltip(questID, GameTooltip);
-					-- honor
-					local honorAmount = GetQuestLogRewardHonor(questID);
-					if ( honorAmount > 0 ) then
-						GameTooltip:AddLine(BONUS_OBJECTIVE_REWARD_WITH_COUNT_FORMAT:format("Interface\\ICONS\\Achievement_LegionPVPTier4", honorAmount, HONOR), 1, 1, 1);
-					end
-					-- money
-					local money = GetQuestLogRewardMoney(questID);
-					if ( money > 0 ) then
-						SetTooltipMoney(GameTooltip, money, nil);
-					end
-					-- items
-					local numQuestRewards = GetNumQuestLogRewards(questID);
-					for i = 1, numQuestRewards do
-						local name, texture, numItems, quality, isUsable = GetQuestLogRewardInfo(i, questID);
-						local text;
-						if ( numItems > 1 ) then
-							text = string.format(BONUS_OBJECTIVE_REWARD_WITH_COUNT_FORMAT, texture, HIGHLIGHT_FONT_COLOR:WrapTextInColorCode(numItems), name);
-						elseif( texture and name ) then
-							text = string.format(BONUS_OBJECTIVE_REWARD_FORMAT, texture, name);
-						end
-					if( text ) then
-						local color = ITEM_QUALITY_COLORS[quality];
-						GameTooltip:AddLine(text, color.r, color.g, color.b);
-					end
-				end
-				GameTooltip:Show()
-			end
-		end
-	end
-end
-
-
-function  EMA.QuestWatcherQuestListRowOnLeave()
-	GameTooltip:Hide()
-end
-
-function EMAQuestMapQuestOptionsDropDown_Initialize(self)
-	CloseDropDownMenus()
-	local questID = EMAQuestMapQuestOptionsDropDown.questID
-	local questText = EMAQuestMapQuestOptionsDropDown.questText
-	if (questID ~= 0 ) then
-		local questLogIndex = GetQuestLogIndexByID(questID)
-
-		local infoTitle = UIDropDownMenu_CreateInfo()
-		infoTitle.text = questText
-		infoTitle.isTitle = 1
-		infoTitle.notCheckable = 1
-		UIDropDownMenu_AddButton(infoTitle)
-
-		local info = UIDropDownMenu_CreateInfo()
-		info.isNotRadio = true
-		info.notCheckable = true
-		info.text = OBJECTIVES_STOP_TRACKING
-
-		info.func = function(_, questID) EMA:QuestMapQuestOptions_ToggleTrackQuest(questID, questText) end
-		info.arg1 = self.questID
-		info.checked = false
-		UIDropDownMenu_AddButton(info)
-
-		if ( GetQuestLogPushable(questLogIndex) and IsInGroup() ) then
-			info.text = SHARE_QUEST
-			info.func = function(_, questID) EMA:QuestMapQuestOptions_ShareQuest(questID) end
-			info.arg1 = self.questID
-			UIDropDownMenu_AddButton(info)
-		end
-		info.text = ABANDON_QUEST
-		info.func = function(_, questID) EMA:QuestMapQuestOptions_AbandonQuest(questID, questText) end
-		info.arg1 = self.questID
-		info.disabled = nil
-
-		UIDropDownMenu_AddButton(info)
-
-	end
-end
-
-function EMA:QuestMapQuestOptions_ToggleTrackQuest(questID, questText)
-	--EMA:Print("test", questID, questText)
-	EMAApi.EMAApiUnTrackQuest( questID, questText )
-end
-
-function EMA:QuestMapQuestOptions_ShareQuest( questID )
-	local questLogIndex = GetQuestLogIndexByID(questID)
-	if questLogIndex then
-		QuestLogPushQuest(questLogIndex)
-	end
-end
-
-function EMA:QuestMapQuestOptions_AbandonQuest(questID, questText)
-	EMAApi.EMAApiAbandonQuest(questID, questText)
-end
-
-function EMA:UpdateQuestItemButton( rowNumber, itemName )
-	if InCombatLockdown() == false then
-		local frame = EMAQuestWatcherFrame
-		frame.questWatchList.rows[rowNumber].columns[2]:SetAttribute("type1", "item")
-		frame.questWatchList.rows[rowNumber].columns[2]:SetAttribute( "item", itemName )
-	end
-end
-
-------------------------------------------------------------------------------------------------------------
--- QUEST WATCH AUTO QUEST DISPLAY - MOSTLY BORROWED FROM BLIZZARD CODE
--------------------------------------------------------------------------------------------------------------
-
-function EMA:HasAtLeastOneAutoQuestPopup()
-	if #EMA.currentAutoQuestPopups == 0 then
-		return false
-	end
-	return true
-end
-
-function EMA:EMAAddAutoQuestPopUp( questID, popUpType, characterName )
-	if EMA.currentAutoQuestPopups[questID] == nil then
-		EMA.currentAutoQuestPopups[questID] = {}
-	end
-	EMA.currentAutoQuestPopups[questID][characterName] = popUpType
-end
-
-function EMA:EMARemoveAutoQuestPopUp( questID, characterName )
-	if EMA.currentAutoQuestPopups[questID] == nil then
-		return
-	end
-	EMA.currentAutoQuestPopups[questID][characterName] = nil
-	if #EMA.currentAutoQuestPopups[questID] == 0 then
-		table.wipe( EMA.currentAutoQuestPopups[questID] )
-		EMA.currentAutoQuestPopups[questID] = nil
-	end
-end
-
-function EMA:EMARemoveAllAutoQuestPopUps( questID )
-	if EMA.currentAutoQuestPopups[questID] == nil then
-		return
-	end
-	table.wipe( EMA.currentAutoQuestPopups[questID] )
-	EMA.currentAutoQuestPopups[questID] = nil
-end
-
-function EMA:AutoQuestGetOrCreateFrame( parent, index )
-	if _G["EMAWatchFrameAutoQuestPopUp"..index] then
-		return _G["EMAWatchFrameAutoQuestPopUp"..index]
-	end
-	local frame = CreateFrame( "SCROLLFRAME", "EMAWatchFrameAutoQuestPopUp"..index, parent )
-	frame.index = index
-    frame:EnableMouse( true )
-    local QuestName = frame:CreateFontString( "EMAWatchFrameAutoQuestPopUpQuestName"..index, "OVERLAY", "GameFontNormal" )
-    QuestName:SetPoint( "TOP", frame, "TOP", 0, -12 )
-    QuestName:SetTextColor( 1.00, 1.00, 1.00 )
-    QuestName:SetText( "" )
-    frame.QuestName = QuestName
-    local TopText = frame:CreateFontString( "EMAWatchFrameAutoQuestPopUpTopText"..index, "OVERLAY", "GameFontNormal" )
-    TopText:SetPoint( "TOP", frame, "TOP", 0, -24 )
-    TopText:SetTextColor( 1.00, 1.00, 1.00 )
-    TopText:SetText( "" )
-    frame.TopText = TopText
-    local BottomText = frame:CreateFontString( "EMAWatchFrameAutoQuestPopUpBottomText"..index, "OVERLAY", "GameFontNormal" )
-    BottomText:SetPoint( "TOP", frame, "TOP", 0, -36 )
-    BottomText:SetTextColor( 1.00, 1.00, 1.00 )
-    BottomText:SetText( "BottomText" )
-    frame.BottomText = BottomText
-	EMA.countAutoQuestPopUpFrames = EMA.countAutoQuestPopUpFrames + 1
-	return frame
-end
-
-function EMA:DisplayAutoQuestPopUps()
-	local nextAnchor
-	local countPopUps = 0
-	local iterateQuestPopups = 01
-	EMAQuestWatcherFrame.autoQuestPopupsHeight = 0
-	local parentFrame = EMAQuestWatcherFrame.fieldNotifications
-	for questID, characterInfo in pairs( EMA.currentAutoQuestPopups ) do
-		local characterName, characterPopUpType, popUpType
-		local characterList = ""
-		for characterName, characterPopUpType in pairs( characterInfo ) do
-			--characterList = characterList..characterName.." "
-			characterList = characterList..( Ambiguate( characterName, "none" ) ).." "
-			-- TODO - hack, assuming all characters have the same sort of popup.
-			popUpType = characterPopUpType
-		end
-        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( GetQuestLogIndexByID( questID ) )
-		if isComplete and isComplete > 0 then
-			isComplete = true
-		else
-			isComplete = false
-		end
-		-- If the current character does not have the quest, show the character names that do have it.
-		local clickToViewText = QUEST_WATCH_POPUP_CLICK_TO_VIEW
-		if not (title and title ~= "") then
-            title = characterList
-			clickToViewText = ""
-		end
-		local frame = EMA:AutoQuestGetOrCreateFrame( parentFrame, countPopUps + 1 )
-		frame:Show()
-		frame:ClearAllPoints()
-		frame:SetParent( parentFrame )
-		if isComplete == true and popUpType == "COMPLETE" then
-			frame.TopText:SetText( QUEST_WATCH_POPUP_CLICK_TO_COMPLETE )
-			frame.BottomText:Hide()
-            frame:SetHeight( 32 )
-			frame.type = "COMPLETED"
-            frame:HookScript( "OnMouseUp", function()
-                ShowQuestComplete( GetQuestLogIndexByID( questID ) )
-                EMA:EMARemoveAllAutoQuestPopUps( questID )
-                EMA:DisplayAutoQuestPopUps()
-                EMA:SettingsUpdateBorderStyle()
-				EMA:SettingsUpdateFontStyle()
-            end )
-		elseif popUpType == "OFFER" then
-			frame.TopText:SetText( QUEST_WATCH_POPUP_QUEST_DISCOVERED )
-			frame.BottomText:Show()
-			frame.BottomText:SetText( clickToViewText )
-            frame:SetHeight( 48 )
-			frame.type = "OFFER"
-			frame:HookScript( "OnMouseUp", function()
-				EMA:EMARemoveAllAutoQuestPopUps( questID )
-				EMA:DisplayAutoQuestPopUps()
-				EMA:SettingsUpdateBorderStyle()
-				EMA:SettingsUpdateFontStyle()
-			end )
-		end
-		frame:ClearAllPoints()
-		if nextAnchor ~= nil then
-			if iterateQuestPopups == 1 then
-				frame:SetPoint( "TOP", nextAnchor, "BOTTOM", 0, 0 ) -- -WATCHFRAME_TYPE_OFFSET
-			else
-				frame:SetPoint( "TOP", nextAnchor, "BOTTOM", 0, 0 )
-			end
-		else
-			frame:SetPoint( "TOP", parentFrame, "TOP", 0, 5 ) -- -WATCHFRAME_INITIAL_OFFSET
-		end
-		frame:SetPoint( "LEFT", parentFrame, "LEFT", -20, 0 )
-		frame.QuestName:SetText( title )
-		frame.questId = questID
-		--frame:UpdateScrollChildRect()
-		--frame:SetVerticalScroll( floor( -9 + 0.5 ) )
-		nextAnchor = frame
-		countPopUps = countPopUps + 1
-		EMAQuestWatcherFrame.autoQuestPopupsHeight = EMAQuestWatcherFrame.autoQuestPopupsHeight + frame:GetHeight()
-	end
-	for iterateQuestPopups = countPopUps + 1, EMA.countAutoQuestPopUpFrames do
-		_G["EMAWatchFrameAutoQuestPopUp"..iterateQuestPopups].questId = nil
-		_G["EMAWatchFrameAutoQuestPopUp"..iterateQuestPopups]:Hide()
-	end
-	EMA:UpdateQuestWatcherDimensions()
-end
-
--------------------------------------------------------------------------------------------------------------
--- QUEST WATCH HELPERS
--------------------------------------------------------------------------------------------------------------
-
-function EMA:GetQuestLogIndexByName( questName )
-	for iterateQuests = 1, GetNumQuestLogEntries() do
-        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateQuests )
-		if not isHeader then
-			if title == questName then
-				return iterateQuests
-			end
-		end
-	end
-	return 0
-end
-
-function EMA:GetQuestLogIndexByID( inQuestID )
-	for iterateQuests = 1, GetNumQuestLogEntries() do
-        local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle( iterateQuests )
-		if not isHeader then
-			if questID == inQuestID then
-				return iterateQuests
-			end
-		end
-	end
-	return 0
-end
-
--------------------------------------------------------------------------------------------------------------
--- COMMAND MANAGEMENT
--------------------------------------------------------------------------------------------------------------
-
--- A EMA command has been recieved.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-
-	if commandName == EMA.COMMAND_QUEST_WATCH_OBJECTIVE_UPDATE then
-		EMA:DoQuestWatchObjectiveUpdate( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_UPDATE_QUEST_WATCHER_LIST then
-		EMA:DoQuestWatchListUpdate( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_QUEST_WATCH_REMOVE_QUEST then
-		EMA:DoRemoveQuestFromWatchList( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_AUTO_QUEST_COMPLETE then
-		EMA:DoAutoQuestFieldComplete( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_REMOVE_AUTO_QUEST_COMPLETE then
-		EMA:DoRemoveAutoQuestFieldComplete( characterName, ... )
-	end
-	if commandName == EMA.COMMAND_AUTO_QUEST_OFFER then
-		EMA:DoAutoQuestFieldOffer( characterName, ... )
-
-	end
-end
diff --git a/Modules/Sell.lua b/Modules/Sell.lua
deleted file mode 100644
index be5c78a..0000000
--- a/Modules/Sell.lua
+++ /dev/null
@@ -1,965 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Sell",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Load libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local AceGUI = LibStub:GetLibrary( "AceGUI-3.0" )
---local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
-local ItemUpgradeInfo = LibStub:GetLibrary( "LibItemUpgradeInfo-1.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "Sell"
-EMA.settingsDatabaseName = "SellProfileDB"
-EMA.chatCommand = "ema-sell"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["VENDER"]
-EMA.moduleDisplayName = L["VENDER"]
-EMA.moduleDisplayVenderName = L["VENDER_LIST_MODULE"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\SellIcon.tga"
--- order
-EMA.moduleOrder = 80
-EMA.moduleListOrder	 = 1
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		sellItemOnAllWithAltKey = false,
-		-- Other Items
-		autoSellOtherItems = false,
-		autoSellOtherItemsList = {},
-		messageArea = EMAApi.DefaultMessageArea(),
-		autoSellItem = false,
-		-- Gray
-		autoSellPoor = false,
-		autoSellBoEPoor	=  false,
-		-- Green
-		autoSellUncommon = false,
-		autoSellIlvlUncommon = 0,
-		autoSellBoEUncommon	= false,
-		-- Rare
-		autoSellRare = false,
-		autoSellIlvlRare = 0,
-		autoSellBoERare	=  false,
-		-- Epic
-		autoSellEpic = false,
-		autoSellIlvlEpic = 0,
-		autoSellBoEEpic	=  false,
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-sell push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_SELL_ITEM = "SellItem"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Sell Management.
--------------------------------------------------------------------------------------------------------------
-
-EMA.BAG_PLAYER_BACKPACK = 0
--- NUM_BAG_SLOTS is defined as 4 in Blizzard's FrameXML\BankFrame.lua.
-EMA.BAG_PLAYER_MAXIMUM = NUM_BAG_SLOTS
--- Store ItemQuality https://wow.gamepedia.com/API_TYPE_Quality
-EMA.ITEM_QUALITY_POOR = 0
-EMA.ITEM_QUALITY_COMMON = 1
-EMA.ITEM_QUALITY_UNCOMMON = 2
-EMA.ITEM_QUALITY_RARE = 3
-EMA.ITEM_QUALITY_EPIC = 4
-EMA.ITEM_QUALITY_LEGENDARY = 5
-EMA.ITEM_QUALITY_ARTIFACT = 6
-EMA.ITEM_QUALITY_HEIRLOOM = 7
-EMA.MIN_ITEM_LEVEL = 10
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	-- Sell on all with alt key.
-	EMA.settingsControl.checkBoxSellItemOnAllWithAltKey:SetValue( EMA.db.sellItemOnAllWithAltKey )
-	-- Auto sell Quality and Ilvl items.
-	EMA.settingsControl.checkBoxAutoSellItems:SetValue( EMA.db.autoSellItem )
-	-- Poor
-	EMA.settingsControl.checkBoxAutoSellPoor:SetValue ( EMA.db.autoSellPoor )
-	EMA.settingsControl.checkBoxAutoSellBoEPoor:SetValue ( EMA.db.autoSellBoEPoor )
-	EMA.settingsControl.checkBoxAutoSellPoor:SetDisabled ( not EMA.db.autoSellItem )
-	EMA.settingsControl.checkBoxAutoSellBoEPoor:SetDisabled ( not EMA.db.autoSellPoor )
-	-- Uncommon
-	EMA.settingsControl.checkBoxAutoSellUncommon:SetValue (EMA.db.autoSellUncommon )
-	EMA.settingsControl.editBoxAutoSellIlvlUncommon:SetText (EMA.db.autoSellIlvlUncommon )
-	EMA.settingsControl.checkBoxAutoSellBoEUncommon:SetValue (EMA.db.autoSellBoEUncommon )
-	EMA.settingsControl.checkBoxAutoSellUncommon:SetDisabled ( not EMA.db.autoSellItem )
-	EMA.settingsControl.editBoxAutoSellIlvlUncommon:SetDisabled ( not EMA.db.autoSellUncommon )
-	EMA.settingsControl.checkBoxAutoSellBoEUncommon:SetDisabled ( not EMA.db.autoSellUncommon )
-	-- Rare
-	EMA.settingsControl.checkBoxAutoSellRare:SetValue (EMA.db.autoSellRare )
-	EMA.settingsControl.editBoxAutoSellIlvlRare:SetText (EMA.db.autoSellIlvlRare )
-	EMA.settingsControl.checkBoxAutoSellBoERare:SetValue (EMA.db.autoSellBoERare )
-	EMA.settingsControl.checkBoxAutoSellRare:SetDisabled ( not EMA.db.autoSellItem )
-	EMA.settingsControl.editBoxAutoSellIlvlRare:SetDisabled ( not EMA.db.autoSellRare )
-	EMA.settingsControl.checkBoxAutoSellBoERare:SetDisabled ( not EMA.db.autoSellRare )
-	-- Epic
-	EMA.settingsControl.checkBoxAutoSellEpic:SetValue ( EMA.db.autoSellEpic )
-	EMA.settingsControl.editBoxAutoSellIlvlEpic:SetText ( EMA.db.autoSellIlvlEpic)
-	EMA.settingsControl.checkBoxAutoSellBoEEpic:SetValue ( EMA.db.autoSellBoEEpic )
-	EMA.settingsControl.checkBoxAutoSellEpic:SetDisabled ( not EMA.db.autoSellItem )
-	EMA.settingsControl.editBoxAutoSellIlvlEpic:SetDisabled ( not EMA.db.autoSellEpic )
-	EMA.settingsControl.checkBoxAutoSellBoEEpic:SetDisabled ( not EMA.db.autoSellEpic )
-	-- Messages.
-	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
-	-- Others.
-	EMA.settingsControlOthers.checkBoxAutoSellOtherItems:SetValue( EMA.db.autoSellOtherItems )
-	EMA.settingsControlOthers.othersEditBoxOtherTag:SetText( EMA.autoSellOtherItemTag )
-	EMA.settingsControlOthers.othersEditBoxOtherItem:SetDisabled( not EMA.db.autoSellOtherItems )
-	EMA.settingsControlOthers.othersEditBoxOtherTag:SetDisabled( not EMA.db.autoSellOtherItems )
-	EMA.settingsControlOthers.othersButtonRemove:SetDisabled( not EMA.db.autoSellOtherItems )
-	EMA.settingsControlOthers.othersButtonAdd:SetDisabled( not EMA.db.autoSellOtherItems )
-	EMA:SettingsOthersScrollRefresh()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.sellItemOnAllWithAltKey = settings.sellItemOnAllWithAltKey
-		EMA.db.autoSellItem = settings.autoSellItem
-		EMA.db.autoSellPoor = settings.autoSellPoor
-		EMA.db.autoSellBoEPoor = settings.autoSellBoEPoor
-		EMA.db.autoSellUncommon = settings.autoSellUncommon
-		EMA.db.autoSellIlvlUncommon = settings.autoSellIlvlUncommon
-		EMA.db.autoSellBoEUncommon = settings.autoSellBoEUncommon
-		EMA.db.autoSellRare = settings.autoSellRare
-		EMA.db.autoSellIlvlRare = settings.autoSellIlvlRare
-		EMA.db.autoSellBoERare = settings.autoSellBoERare
-		EMA.db.autoSellEpic = settings.autoSellEpic
-		EMA.db.autoSellIlvlEpic = settings.autoSellIlvlEpic
-		EMA.db.autoSellBoEEpic = settings.autoSellBoEEpic
-		EMA.db.autoSellOtherItems = settings.autoSellOtherItems
-		EMA.db.messageArea = settings.messageArea
-		EMA.db.autoSellOtherItemsList = EMAUtilities:CopyTable( settings.autoSellOtherItemsList )
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreateMain( top )
-	-- Position and size constants.
-	local buttonControlWidth = 105
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local indent = horizontalSpacing * 12
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local thirdWidth = (headingWidth - (horizontalSpacing * 5)) / 5
-	local left2 = left + thirdWidth
-	local left3 = left + halfWidth
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SELL_ALL"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxSellItemOnAllWithAltKey = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ALT_SELL_ALL"],
-		EMA.SettingsToggleSellItemOnAllWithAltKey,
-		L["ALT_SELL_ALL_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SELL_ITEMS"], movingTop, false )
-
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxAutoSellItems = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["AUTO_SELL_ITEMS"],
-		EMA.SettingsToggleAutoSellItems,
-		L["AUTO_SELL_ITEMS_HELP"]
-	)
--- Gray
-	movingTop = movingTop - checkBoxHeight - 3
-	EMA.settingsControl.checkBoxAutoSellPoor = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["SELL_GRAY"],
-		EMA.SettingsToggleAutoSellPoor,
-		L["SELL_GRAY_HELP"]
-	)
-	EMA.settingsControl.checkBoxAutoSellBoEPoor = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left3,
-		movingTop,
-		L["ONLY_SB"],
-		EMA.SettingsToggleAutoSellBoEPoor,
-		L["ONLY_SB_HELP"]
-	)
--- Green
-	movingTop = movingTop - checkBoxHeight - 3
-	EMA.settingsControl.checkBoxAutoSellUncommon = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["SELL_GREEN"],
-		EMA.SettingsToggleAutoSellUncommon,
-		L["SELL_GREEN_HELP"]
-	)
-	EMA.settingsControl.checkBoxAutoSellBoEUncommon = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left3,
-		movingTop,
-		L["ONLY_SB"],
-		EMA.SettingsToggleAutoSellBoEUncommon,
-		L["ONLY_SB_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.editBoxAutoSellIlvlUncommon = EMAHelperSettings:CreateEditBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["iLVL"],
-		L["iLVL_HELP"]
-	)
-	EMA.settingsControl.editBoxAutoSellIlvlUncommon:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedIlvlUncommon )
--- Rare
-	movingTop = movingTop - editBoxHeight - 3
-	EMA.settingsControl.checkBoxAutoSellRare = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["SELL_RARE"],
-		EMA.SettingsToggleAutoSellRare,
-		L["SELL_RARE_HELP"]
-	)
-	EMA.settingsControl.checkBoxAutoSellBoERare = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left3,
-		movingTop,
-		L["ONLY_SB"],
-		EMA.SettingsToggleAutoSellBoERare,
-		L["ONLY_SB_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.editBoxAutoSellIlvlRare = EMAHelperSettings:CreateEditBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["iLVL"],
-		L["iLVL_HELP"]
-	)
-	EMA.settingsControl.editBoxAutoSellIlvlRare:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedIlvlRare )
--- Epic
-	movingTop = movingTop - editBoxHeight - 3
-	EMA.settingsControl.checkBoxAutoSellEpic = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left,
-		movingTop,
-		L["SELL_EPIC"],
-		EMA.SettingsToggleAutoSellEpic,
-		L["SELL_EPIC_HELP"]
-	)
-	EMA.settingsControl.checkBoxAutoSellBoEEpic = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		halfWidth,
-		left3,
-		movingTop,
-		L["ONLY_SB"],
-		EMA.SettingsToggleAutoSellBoEEpic,
-		L["ONLY_SB_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.editBoxAutoSellIlvlEpic = EMAHelperSettings:CreateEditBox(
-		EMA.settingsControl,
-		thirdWidth,
-		left,
-		movingTop,
-		L["iLVL"],
-		L["iLVL_HELP"]
-	)
-	EMA.settingsControl.editBoxAutoSellIlvlEpic:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedIlvlEpic )
-	movingTop = movingTop - editBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["SELL"]..L[" "]..L["MESSAGES_HEADER"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	return movingTop
-end
-
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-end
-
-local function SettingsCreateOthers( top )
-	-- Position and size constants.
-	local buttonControlWidth = 85
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local othersWidth = headingWidth
-	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
-	local movingTop = top
-	EMAHelperSettings:CreateHeading( EMA.settingsControlOthers, L["SELL_LIST"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControlOthers.checkBoxAutoSellOtherItems = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlOthers,
-		headingWidth,
-		left,
-		movingTop,
-		L["AUTO_SELL_ITEMS"],
-		EMA.SettingsToggleAutoSellOtherItems
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlOthers.othersHighlightRow = 1
-	EMA.settingsControlOthers.othersOffset = 1
-	local list = {}
-	list.listFrameName = "EMASellSettingsOthersFrame"
-	list.parentFrame = EMA.settingsControlOthers.widgetSettings.content
-	list.listTop = movingTop
-	list.listLeft = left
-	list.listWidth = othersWidth
-	list.rowHeight = 20
-	list.rowsToDisplay = 15
-	list.columnsToDisplay = 2
-	list.columnInformation = {}
-	list.columnInformation[1] = {}
-	list.columnInformation[1].width = 70
-	list.columnInformation[1].alignment = "LEFT"
-	list.columnInformation[2] = {}
-	list.columnInformation[2].width = 30
-	list.columnInformation[2].alignment = "LEFT"
-	list.scrollRefreshCallback = EMA.SettingsOthersScrollRefresh
-	list.rowClickCallback = EMA.SettingsOthersRowClick
-	EMA.settingsControlOthers.others = list
-	EMAHelperSettings:CreateScrollList( EMA.settingsControlOthers.others )
-	movingTop = movingTop - list.listHeight - verticalSpacing
-	EMA.settingsControlOthers.othersButtonRemove = EMAHelperSettings:CreateButton(
-		EMA.settingsControlOthers,
-		buttonControlWidth,
-		left,
-		movingTop,
-		L["REMOVE"],
-		EMA.SettingsOthersRemoveClick
-	)
-	movingTop = movingTop -	buttonHeight - verticalSpacing
-	EMAHelperSettings:CreateHeading( EMA.settingsControlOthers, L["ADD_TO_LIST"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControlOthers.othersEditBoxOtherItem = EMAHelperSettings:CreateEditBox(
-		EMA.settingsControlOthers,
-		headingWidth,
-		left,
-		movingTop,
-		L["SELL_LIST_DROP_ITEM"]
-	)
-	EMA.settingsControlOthers.othersEditBoxOtherItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedOtherItem )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlOthers.othersEditBoxOtherTag = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControlOthers,
-		dropBoxWidth,
-		left,
-		movingTop,
-		L["GROUP_LIST"]
-	)
-	EMA.settingsControlOthers.othersEditBoxOtherTag:SetList( EMAApi.GroupList() )
-	EMA.settingsControlOthers.othersEditBoxOtherTag:SetCallback( "OnValueChanged",  EMA.SellOtherGroupDropDownList )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlOthers.othersButtonAdd = EMAHelperSettings:CreateButton(
-		EMA.settingsControlOthers,
-		buttonControlWidth,
-		left,
-		movingTop,
-		L["ADD"],
-		EMA.SettingsOthersAddClick
-	)
-	movingTop = movingTop -	buttonHeight
-	return movingTop
-end
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-
-	EMA.settingsControlOthers = {}
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControlOthers,
-		EMA.moduleDisplayVenderName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleListOrder
-	)
-	local bottomOfSell = SettingsCreateMain( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfSell )
-	local bottomOfOthers = SettingsCreateOthers( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControlOthers.widgetSettings.content:SetHeight( -bottomOfOthers )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Callbacks.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:SettingsOthersScrollRefresh()
-	FauxScrollFrame_Update(
-		EMA.settingsControlOthers.others.listScrollFrame,
-		EMA:GetOthersMaxPosition(),
-		EMA.settingsControlOthers.others.rowsToDisplay,
-		EMA.settingsControlOthers.others.rowHeight
-	)
-	EMA.settingsControlOthers.othersOffset = FauxScrollFrame_GetOffset( EMA.settingsControlOthers.others.listScrollFrame )
-	for iterateDisplayRows = 1, EMA.settingsControlOthers.others.rowsToDisplay do
-		-- Reset.
-		EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
-		EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControlOthers.others.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
-		-- Get data.
-		local dataRowNumber = iterateDisplayRows + EMA.settingsControlOthers.othersOffset
-		if dataRowNumber <= EMA:GetOthersMaxPosition() then
-			-- Put data information into columns.
-			local othersInformation = EMA:GetOtherAtPosition( dataRowNumber )
-			EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[1].textString:SetText( othersInformation.name )
-			EMA.settingsControlOthers.others.rows[iterateDisplayRows].columns[2].textString:SetText( othersInformation.tag )
-			-- Highlight the selected row.
-			if dataRowNumber == EMA.settingsControlOthers.othersHighlightRow then
-				EMA.settingsControlOthers.others.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
-			end
-		end
-	end
-end
-
-function EMA:SettingsOthersRowClick( rowNumber, columnNumber )
-	if EMA.settingsControlOthers.othersOffset + rowNumber <= EMA:GetOthersMaxPosition() then
-		EMA.settingsControlOthers.othersHighlightRow = EMA.settingsControlOthers.othersOffset + rowNumber
-		EMA:SettingsOthersScrollRefresh()
-	end
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsToggleSellItemOnAllWithAltKey( event, checked )
-	EMA.db.sellItemOnAllWithAltKey = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoSellItems( event, checked )
-	EMA.db.autoSellItem = checked
-	EMA:SettingsRefresh()
-end
-
---  Poor
-function EMA:SettingsToggleAutoSellPoor( event, checked )
-	EMA.db.autoSellPoor = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoSellBoEPoor( event, checked )
-	EMA.db.autoSellBoEPoor = checked
-	EMA:SettingsRefresh()
-end
-
--- Uncommon
-function EMA:SettingsToggleAutoSellUncommon( event, checked )
-	EMA.db.autoSellUncommon = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsEditBoxChangedIlvlUncommon( event, text )
-	EMA.db.autoSellIlvlUncommon = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoSellBoEUncommon( event, checked )
-	EMA.db.autoSellBoEUncommon = checked
-	EMA:SettingsRefresh()
-end
-
--- Rare
-function EMA:SettingsToggleAutoSellRare( event, checked )
-	EMA.db.autoSellRare = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsEditBoxChangedIlvlRare( event, text )
-	EMA.db.autoSellIlvlRare = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoSellBoERare( event, checked )
-	EMA.db.autoSellBoERare = checked
-	EMA:SettingsRefresh()
-end
-
--- Epic
-function EMA:SettingsToggleAutoSellEpic( event, checked )
-	EMA.db.autoSellEpic = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsEditBoxChangedIlvlEpic( event, text )
-	EMA.db.autoSellIlvlEpic = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoSellBoEEpic( event, checked )
-	EMA.db.autoSellBoEEpic = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:OnGroupAreasChanged( message )
-	EMA.settingsControlOthers.othersEditBoxOtherTag:SetList( EMAApi.GroupList() )
-end
-
-function EMA:SettingsSetMessageArea( event, value )
-	EMA.db.messageArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoSellOtherItems( event, checked )
-	EMA.db.autoSellOtherItems = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsOthersRemoveClick( event )
-	StaticPopup_Show( "EMASELL_CONFIRM_REMOVE_AUTO_SELL_OTHER_ITEMS" )
-end
-
-function EMA:SettingsEditBoxChangedOtherItem( event, text )
-	EMA.autoSellOtherItemLink = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SellOtherGroupDropDownList (event, value )
-	-- if nil or the blank group then don't get Name.
-	if value == " " or value == nil then
-		return
-	end
-	for index, groupName in ipairs( EMAApi.GroupList() ) do
-		if index == value then
-			EMA.autoSellOtherItemTag = groupName
-			break
-		end
-	end
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsEditBoxChangedUnusableSoulboundTag( event, text )
-	if not text or text:trim() == "" or text:find( "%W" ) ~= nil then
-		EMA:Print( L["ITEM_TAG_ERR"] )
-		return
-	end
-	EMA.db.autoSellUnusableSoulboundTag = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsOthersAddClick( event )
-	if EMA.autoSellOtherItemLink ~= nil and EMA.autoSellOtherItemTag ~= nil then
-		EMA:AddOther( EMA.autoSellOtherItemLink, EMA.autoSellOtherItemTag )
-		EMA.autoSellOtherItemLink = nil
-		EMA.settingsControlOthers.othersEditBoxOtherItem:SetText( "" )
-		EMA:SettingsRefresh()
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Popup Dialogs.
--------------------------------------------------------------------------------------------------------------
-
--- Initialize Popup Dialogs.
-local function InitializePopupDialogs()
-	StaticPopupDialogs["EMASELL_CONFIRM_REMOVE_AUTO_SELL_OTHER_ITEMS"] = {
-        text = L["POPUP_REMOVE_ITEM"],
-		button1 = YES,
-        button2 = NO,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function()
-			EMA:RemoveOther()
-		end,
-    }
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	EMA.autoSellOtherItemLink = nil
-	EMA.autoSellOtherItemTag = EMAApi.AllTag()
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	EMA:RegisterEvent( "MERCHANT_SHOW" )
-	-- Hook the item click event.
-	EMA:RawHook( "ContainerFrameItemButton_OnModifiedClick", true )
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMASell functionality.
--------------------------------------------------------------------------------------------------------------
-
--- The ContainerFrameItemButton_OnModifiedClick hook.
-function EMA:ContainerFrameItemButton_OnModifiedClick( self, event, ... )
-	if EMA.db.sellItemOnAllWithAltKey == true and IsAltKeyDown() and MerchantFrame:IsVisible() then
-		local bag, slot = self:GetParent():GetID(), self:GetID()
-		local texture, count, locked, quality, readable, lootable, link = GetContainerItemInfo( bag, slot )
-		EMA:EMASendCommandToTeam( EMA.COMMAND_SELL_ITEM, link )
-	end
-	return EMA.hooks["ContainerFrameItemButton_OnModifiedClick"]( self, event, ... )
-end
-
-function EMA:DoSellItem( itemlink )
-	-- Iterate each bag the player has.
-	for bag = EMA.BAG_PLAYER_BACKPACK, EMA.BAG_PLAYER_MAXIMUM do
-		-- Iterate each slot in the bag.
-		numSlots = GetContainerNumSlots( bag )
-		for slot = 1, numSlots do
-			-- Get the item link for the item in this slot.
-		--	local bagItemLink = GetContainerItemLink( bag, slot )
-			local _, _, locked, _, _, _, bagItemLink, _, hasNoValue = GetContainerItemInfo(bag, slot)
-			-- If there is an item...
-			if bagItemLink ~= nil then
-				local name = GetItemInfo( bagItemLink )
-				-- Does it match the item to sell?
-				if EMAUtilities:DoItemLinksContainTheSameItem( bagItemLink, itemlink ) then
-					-- Yes, sell this item.
-					if 	hasNoValue == false then
-						if MerchantFrame:IsVisible() == true then
-							UseContainerItem( bag, slot )
-							-- Tell the boss.
-							EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_HAVE_SOLD_X"]( bagItemLink ), false )
-						end
-					end
-				end
-			end
-		end
-	end
-end
-
-function EMA:GetOthersMaxPosition()
-	return #EMA.db.autoSellOtherItemsList
-end
-
-function EMA:GetOtherAtPosition( position )
-	return EMA.db.autoSellOtherItemsList[position]
-end
-
-function EMA:AddOther( itemLink, itemTag )
-	-- Get some more information about the item.
-	local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo( itemLink )
-	-- If the item could be found.
-	if name ~= nil then
-		local itemInformation = {}
-		itemInformation.link = itemLink
-		itemInformation.name = name
-		itemInformation.tag = itemTag
-		table.insert( EMA.db.autoSellOtherItemsList, itemInformation )
-		EMA:SettingsRefresh()
-		EMA:SettingsOthersRowClick( 1, 1 )
-	end
-end
-
-function EMA:RemoveOther()
-	table.remove( EMA.db.autoSellOtherItemsList, EMA.settingsControlOthers.othersHighlightRow )
-	EMA:SettingsRefresh()
-	EMA:SettingsOthersRowClick( 1, 1 )
-end
-
-function EMA:MERCHANT_SHOW()
-	-- Sell Items
-	if EMA.db.autoSellItem == true then
-		EMA:DoMerchantSellItems()
-	end
-	-- Sell Other Items
-	if EMA.db.autoSellOtherItems == true then
-		EMA:ScheduleTimer( "DoMerchantSellOtherItems", 2 )
-	end
-end
-
-function EMA:DoMerchantSellItems()
-	local count = 0
-	local gold = 0
-	-- Iterate each bag the player has.
-	for bag = EMA.BAG_PLAYER_BACKPACK, EMA.BAG_PLAYER_MAXIMUM do
-		-- Iterate each slot in the bag.
-		numSlots = GetContainerNumSlots( bag )
-		for slot = 1, numSlots do
-		local _, itemCount, locked, _, _, _, link, _, hasNoValue = GetContainerItemInfo(bag, slot)
-
-		--for bag,slot,link in LibBagUtils:Iterate("BAGS") do
-			if bag ~= nil then
-				if link ~= nil then
-				local canSell = false
-				local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, iconFileDataID, itemSellPrice = GetItemInfo( link )
-				local _, itemCount = GetContainerItemInfo( bag, slot )
-				--EMA:Print("Test", itemLink, itemRarity )
-					if EMA.db.autoSellPoor == true then
-						if itemRarity == EMA.ITEM_QUALITY_POOR then
-							canSell = true
-							if EMA.db.autoSellBoEPoor == true then
-								local isBop = EMAUtilities:ToolTipBagScaner(link, bag, slot)
-								if isBop ~= ITEM_SOULBOUND then
-								 --EMA:Print("BoE", link )
-								 canSell = false
-								end
-							end
-						end
-					end
-					-- Green
-					if EMA.db.autoSellUncommon == true then
-						if itemRarity == EMA.ITEM_QUALITY_UNCOMMON then
-							if itemType == WEAPON or itemType == ARMOR or itemSubType == EJ_LOOT_SLOT_FILTER_ARTIFACT_RELIC then
-								--EMA:Print("testGreen", link, itemRarity, "a", EMA.ITEM_QUALITY_UNCOMMON )
-								local num = tonumber( EMA.db.autoSellIlvlUncommon )
-								local iLvl = ItemUpgradeInfo:GetUpgradedItemLevel(link)
-								--EMA:Print("test", num , "vs", iLvl, "item", link )
-								if num ~= nil and iLvl ~= nil and ( itemLevel > EMA.MIN_ITEM_LEVEL ) then
-									--if iLvl >= num then
-									if num >= iLvl then
-										--EMA:Print("ture", link )
-										canSell = true
-									end
-								end
-								if EMA.db.autoSellBoEUncommon == true then
-									local isBop = EMAUtilities:ToolTipBagScaner( link,bag,slot )
-									--EMA:Print("IsBoP", isBop)
-									if isBop ~= ITEM_SOULBOUND then
-										canSell = false
-									end
-								end
-							end
-						end
-					end
-						--Blue
-						if EMA.db.autoSellRare == true then
-							if itemRarity == EMA.ITEM_QUALITY_RARE then
-								if itemType == WEAPON or itemType == ARMOR or itemSubType == EJ_LOOT_SLOT_FILTER_ARTIFACT_RELIC then
-									local num = tonumber( EMA.db.autoSellIlvlRare )
-									local iLvl = ItemUpgradeInfo:GetUpgradedItemLevel(link)
-									--EMA:Print("test", iLvl, "vs", num )
-									if num ~= nil and iLvl ~= nil and (itemLevel > EMA.MIN_ITEM_LEVEL ) then
-										if num >= iLvl then
-											canSell = true
-										end
-									end
-									if EMA.db.autoSellBoERare == true then
-										local isBop = EMAUtilities:ToolTipBagScaner( link,bag,slot )
-										--EMA:Print("IsBoP", isBop)
-										if isBop ~= ITEM_SOULBOUND then
-											canSell = false
-										end
-									end
-								end
-							end
-						end
-						-- Epic
-						if EMA.db.autoSellEpic == true then
-							if itemRarity == EMA.ITEM_QUALITY_EPIC then
-								if itemType == WEAPON or itemType == ARMOR or itemSubType == EJ_LOOT_SLOT_FILTER_ARTIFACT_RELIC then
-									local num = tonumber( EMA.db.autoSellIlvlEpic )
-									local iLvl = ItemUpgradeInfo:GetUpgradedItemLevel(link)
-									--EMA:Print("test", iLvl, "vs", num )
-									if num ~= nil and iLvl ~= nil and (itemLevel > EMA.MIN_ITEM_LEVEL ) then
-										if num >= iLvl then
-											canSell = true
-										end
-									end
-									if EMA.db.autoSellBoEEpic == true then
-										local isBop = EMAUtilities:ToolTipBagScaner( link,bag,slot )
-										--EMA:Print("IsBoP", isBop)
-										if isBop ~= ITEM_SOULBOUND then
-											canSell = false
-										end
-									end
-								end
-							end
-						end
-						if canSell == true then
-							if itemSellPrice ~= nil and itemSellPrice > 0 then
-								if MerchantFrame:IsVisible() == true then
-									if itemCount > 1 then
-										count = count + itemCount
-										gold = gold + itemSellPrice * itemCount
-									else
-										count = count + 1
-										gold = gold + itemSellPrice
-									end
-									UseContainerItem( bag, slot )
-								end
-							end
-						end
-					end
-				end
-			end
-		end
-	if count > 0 then
-		local formattedGoldAmount = GetCoinTextureString(gold)
-		EMA:EMASendMessageToTeam( EMA.db.messageArea, L["I_SOLD_ITEMS_PLUS_GOLD"]( count )..formattedGoldAmount, false )
-	end
-end
-
--- Sell Other Items!
-function EMA:DoMerchantSellOtherItems()
-	-- Iterate all the wanted items...
-	for position, itemInformation in pairs( EMA.db.autoSellOtherItemsList ) do
-		-- Does this character have the item tag?  No, don't sell.
-		if EMAApi.IsCharacterInGroup( EMA.characterName, itemInformation.tag ) == true then
-			-- Attempt to sell any items in the players bags.
-			-- Iterate each bag the player has.
-			for bag = EMA.BAG_PLAYER_BACKPACK, EMA.BAG_PLAYER_MAXIMUM do
-				-- Iterate each slot in the bag.
-				for slot = 1, GetContainerNumSlots( bag ) do
-					-- Get the item link for the item in this slot.
-					local bagItemLink = GetContainerItemLink( bag, slot )
-					local _, _, locked, _, _, _, bagItemLink, _, hasNoValue = GetContainerItemInfo(bag, slot)
-					-- If there is an item...
-					if bagItemLink ~= nil then
-						-- Does it match the item to sell?
-						if EMAUtilities:DoItemLinksContainTheSameItem( bagItemLink, itemInformation.link ) then
-							-- Yes, sell this item.
-							if hasNoValue == false then
-								if MerchantFrame:IsVisible() == true then
-									UseContainerItem( bag, slot )
-								end
-							else
-								if 	locked == false then
-									PickupContainerItem(bag,slot)
-									DeleteCursorItem()
-									EMA:EMASendMessageToTeam( EMA.db.messageArea, L["DELETE_ITEM"]( bagItemLink ), false )
-								end
-							end
-						end
-					end
-				end
-			end
-		end
-	end
-end
-
--- A EMA command has been recieved.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if commandName == EMA.COMMAND_SELL_ITEM then
-		EMA:DoSellItem( ... )
-	end
-end
\ No newline at end of file
diff --git a/Modules/Sync.lua b/Modules/Sync.lua
deleted file mode 100644
index 8774466..0000000
--- a/Modules/Sync.lua
+++ /dev/null
@@ -1,372 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Sync",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Get the EMA Utilities Library.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "Sync"
-EMA.settingsDatabaseName = "SyncProfileDB"
-EMA.chatCommand = "ema-Sync"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["SYNC"]
-EMA.moduleDisplayName = L["SYNC"]
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		mountWithTeam = false,
-		dismountWithTeam = false,
-		dismountWithMaster = false,
-		mountInRange = false,
-
-		--messageArea = EMAApi.DefaultMessageArea(),
-		warningArea = EMAApi.DefaultWarningArea()
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["Push Settings"],
-				desc = L["Push the Mount settings to all characters in the team."],
-				usage = "/EMA-mount push",
-				get = false,
-				set = "EMASendSettings",
-				order = 4,
-				guiHidden = true,
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_MOUNT_ME = "EMAMountMe"
-EMA.COMMAND_MOUNT_DISMOUNT = "EMAMountDisMount"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	-- Create the settings control.
-	EMA:SettingsCreate()
-	-- Initialse the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- BlizzUI Frames
-	EMA:CreateEMAInterFaceSyncFrame()
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
---	EMA:RegisterEvent("PLAYER_REGEN_ENABLED")
-
-	EMA:HookScript( InterfaceOptionsFrame, "OnShow", "InterfaceOptionsFrameOnShow" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-	-- AceHook-3.0 will tidy up the hooks for us.
-end
-
-function EMA:SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick
-	)
-	local bottomOfInfo = EMA:SettingsCreateMount( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsCreateMount( top )
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local movingTop = top
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["PH"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxMountWithTeam = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["PH"],
-		EMA.SettingsToggleMountWithTeam,
-		L["PH"]
-	)
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxDismountWithTeam = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["PH"],
-		EMA.SettingsToggleDisMountWithTeam,
-		L["PH"]
-	)
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxDismountWithMaster = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["PH"],
-		EMA.SettingsToggleDisMountWithMaster,
-		L["PH"]
-	)
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxMountInRange = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["PH"],
-		EMA.SettingsToggleMountInRange,
-		L["PH"]
-	)
--- DO WE NEED THIS?
---	movingTop = movingTop - checkBoxHeight
---	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
---		EMA.settingsControl,
---		headingWidth,
---		left,
---		movingTop,
---		L["Message Area"]
---	)
---	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
---	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["Send Warning Area"]
-	)
-	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	return movingTop
-end
-
-function EMA:OnMessageAreasChanged( message )
-	--EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-end
-
-function EMA:SettingsSetWarningArea( event, value )
-	EMA.db.warningArea = value
-	EMA:SettingsRefresh()
-end
-
---function EMA:SettingsSetMessageArea( event, value )
---	EMA.db.messageArea = value
---	EMA:SettingsRefresh()
---end
-
-function EMA:SettingsToggleMountWithTeam( event, checked )
-	EMA.db.mountWithTeam = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDisMountWithTeam( event, checked )
-	EMA.db.dismountWithTeam = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDisMountWithMaster( event, checked )
-	EMA.db.dismountWithMaster = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleMountInRange( event, checked )
-	EMA.db.mountInRange = checked
-	EMA:SettingsRefresh()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.mountWithTeam = settings.mountWithTeam
-		EMA.db.dismountWithTeam = settings.dismountWithTeam
-		EMA.db.dismountWithMaster = settings.dismountWithMaster
-		EMA.db.mountInRange = settings.mountInRange
-		EMA.db.messageArea = settings.messageArea
-		EMA.db.warningArea = settings.warningArea
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["Settings received from A."]( characterName ) )
-	end
-end
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	EMA.settingsControl.checkBoxMountWithTeam:SetValue( EMA.db.mountWithTeam )
-	EMA.settingsControl.checkBoxDismountWithTeam:SetValue( EMA.db.dismountWithTeam )
-	EMA.settingsControl.checkBoxDismountWithMaster:SetValue( EMA.db.dismountWithMaster )
-	EMA.settingsControl.checkBoxMountInRange:SetValue( EMA.db.mountInRange )
-	--EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
-	EMA.settingsControl.dropdownWarningArea:SetValue( EMA.db.warningArea )
-	-- Set state.
-	--EMA.settingsControl.checkBoxMountWithTeam:SetDisabled( not EMA.db.mountWithTeam )
-	EMA.settingsControl.checkBoxDismountWithTeam:SetDisabled( not EMA.db.mountWithTeam )
-	EMA.settingsControl.checkBoxDismountWithMaster:SetDisabled( not EMA.db.dismountWithTeam or not EMA.db.mountWithTeam )
-	EMA.settingsControl.checkBoxMountInRange:SetDisabled( not EMA.db.mountWithTeam )
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMASync functionality.
--------------------------------------------------------------------------------------------------------------
-
---Frames Buttons
-
-function EMA:ShowTooltip(frame, show, text)
-	if show then
-		GameTooltip:SetOwner(frame, "ANCHOR_TOP")
-		GameTooltip:SetPoint("TOPLEFT", frame, "TOPRIGHT", 16, 0)
-		GameTooltip:ClearLines()
-		GameTooltip:AddLine( text , 1, 0.82, 0, 1)
-		GameTooltip:Show()
-	else
-	GameTooltip:Hide()
-	end
-end
-
-
-function EMA:CreateEMAInterFaceSyncFrame()
-	EMAInterFaceSyncFrame = CreateFrame( "Frame", "InterFaceSyncFrame", InterfaceOptionsFrame )
-    local frame = EMAInterFaceSyncFrame
-	frame:SetWidth( 110 )
-	frame:SetHeight( 30 )
-	frame:SetFrameStrata( "HIGH" )
-	frame:SetToplevel( true )
-	frame:SetClampedToScreen( true )
-	frame:EnableMouse( true )
-	frame:SetMovable( true )
-	frame:ClearAllPoints()
-	frame:SetPoint("TOPRIGHT", InterfaceOptionsFrame, "TOPRIGHT", -5, -8 )
-	--[[
-		frame:SetBackdrop( {
-		bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
-		edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
-		tile = true, tileSize = 15, edgeSize = 15,
-		insets = { left = 5, right = 5, top = 5, bottom = 5 }
-	} )
-	]]
-	table.insert( UISpecialFrames, "EMAInterFaceSyncFrame" )
-	local syncButton = CreateFrame( "Button", "syncButton", frame, "UIPanelButtonTemplate" )
-	syncButton:SetScript( "OnClick", function()  EMA:DoSyncInterfaceSettings() end )
-	syncButton:SetPoint( "TOPLEFT", frame, "TOPLEFT", 10 , -5)
-	syncButton:SetHeight( 20 )
-	syncButton:SetWidth( 90 )
-	syncButton:SetText( L["SYNC"] )
-	syncButton:SetScript("OnEnter", function(self) EMA:ShowTooltip(syncButton, true, L["SYNC"] ) end)
-	syncButton:SetScript("OnLeave", function(self) GameTooltip:Hide() end)
-	syncButtonFrameButton = syncButton
-
-end
-
-function EMA:InterfaceOptionsFrameOnShow()
-	--EMA:Print("test")
-	-- This sorts out hooking on L or marcioMenu button
-	--if EMA.db.showEMAQuestLogWithWoWQuestLog == true then
-		if InterfaceOptionsFrame:IsVisible() then
-			EMA:ToggleShowSyncInterfaceFrame( true )
-		else
-			EMA:ToggleShowSyncInterfaceFrame( false )
-		end
-	--end
-end
-
-
-function EMA:ToggleShowSyncInterfaceFrame( show )
-    if show == true then
-		EMAInterFaceSyncFrame:Show()
-    else
-		EMAInterFaceSyncFrame:Hide()
-    end
-end
-
-function EMA:DoSyncInterfaceSettings()
-    EMA:Print("[PH] Button Does Nothing" )
-end
-
-
--- COMMS
-
--- A EMA command has been received.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if characterName ~= self.characterName then
-		--[[
-		if commandName == EMA.COMMAND_MOUNT_ME then
-			--EMA:Print("command")
-			EMA:TeamMount( characterName, ... )
-		end
-		]]
-	end
-end
diff --git a/Modules/Talk.lua b/Modules/Talk.lua
deleted file mode 100644
index ef38d44..0000000
--- a/Modules/Talk.lua
+++ /dev/null
@@ -1,841 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Talk",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0"
-)
-
--- Load libraries.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "Talk"
-EMA.settingsDatabaseName = "TalkProfileDB"
-EMA.chatCommand = "ema-talk"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["TOON"]
-EMA.moduleDisplayName = L["TALK"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\ChatIcon.tga"
--- order
-EMA.moduleOrder = 99
-
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		forwardWhispers = true,
-		doNotForwardRealIdWhispers = true,
---		forwardViaWhisper = false,
-		fakeWhisper = true,
-		fakeInjectSenderToReplyQueue = true,
-		fakeInjectOriginatorToReplyQueue = false,
---		fakeWhisperCompact = false,
-		whisperMessageArea = "ChatFrame1",
---		enableChatSnippets = false,
---		chatSnippets = {},
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_ALL_SETTINGS"],
-				desc = L["PUSH_SETTINGS_INFO"],
-				usage = "/EMA-talk push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_MESSAGE = "EMATalkMessage"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Talk Management.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:UpdateChatFrameList()
-	EMAUtilities:ClearTable( EMA.chatFrameList )
-	for index = 1, NUM_CHAT_WINDOWS do
-		local name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable = GetChatWindowInfo( index )
-		if (shown == 1) or (docked ~= nil) then
-			EMA.chatFrameList["ChatFrame"..index] = name
-		end
-	end
-	table.sort( EMA.chatFrameList )
-end
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	-- Set values.
-	EMA.settingsControl.checkBoxForwardWhispers:SetValue( EMA.db.forwardWhispers )
-	EMA.settingsControl.checkBoxDoNotForwardRealIdWhispers:SetValue( EMA.db.doNotForwardRealIdWhispers )
---	EMA.settingsControl.checkBoxForwardViaWhisper:SetValue( EMA.db.forwardViaWhisper )
-	EMA.settingsControl.checkBoxFakeWhispers:SetValue( EMA.db.fakeWhisper )
-	EMA.settingsControl.checkBoxFakeInjectSenderToReplyQueue:SetValue( EMA.db.fakeInjectSenderToReplyQueue )
-	EMA.settingsControl.checkBoxFakeInjectOriginatorToReplyQueue:SetValue( EMA.db.fakeInjectOriginatorToReplyQueue )
---	EMA.settingsControl.checkBoxFakeWhisperCompact:SetValue( EMA.db.fakeWhisperCompact )
---	EMA.settingsControl.checkBoxEnableChatSnippets:SetValue( EMA.db.enableChatSnippets )
-	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.whisperMessageArea )
-	-- Set state.
-	EMA.settingsControl.checkBoxFakeInjectSenderToReplyQueue:SetDisabled( not EMA.db.fakeWhisper )
-	EMA.settingsControl.checkBoxFakeInjectOriginatorToReplyQueue:SetDisabled( not EMA.db.fakeWhisper )
---	EMA.settingsControl.checkBoxFakeWhisperCompact:SetDisabled( not EMA.db.fakeWhisper )
-	EMA.settingsControl.dropdownMessageArea:SetDisabled( not EMA.db.fakeWhisper )
-	EMA.settingsControl.buttonRefreshChatList:SetDisabled( not EMA.db.fakeWhisper )
---	EMA.settingsControl.buttonRemove:SetDisabled( not EMA.db.enableChatSnippets )
---	EMA.settingsControl.buttonAdd:SetDisabled( not EMA.db.enableChatSnippets )
---	EMA.settingsControl.multiEditBoxSnippet:SetDisabled( not EMA.db.enableChatSnippets )
---	EMA:SettingsScrollRefresh()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.forwardWhispers = settings.forwardWhispers
-		EMA.db.doNotForwardRealIdWhispers = settings.doNotForwardRealIdWhispers
-		EMA.db.fakeWhisper = settings.fakeWhisper
---		EMA.db.enableChatSnippets = settings.enableChatSnippets
-		EMA.db.whisperMessageArea = settings.whisperMessageArea
---		EMA.db.forwardViaWhisper = settings.forwardViaWhisper
---		EMA.db.fakeWhisperCompact = settings.fakeWhisperCompact
-		EMA.db.fakeInjectSenderToReplyQueue = settings.fakeInjectSenderToReplyQueue
-		EMA.db.fakeInjectOriginatorToReplyQueue = settings.fakeInjectOriginatorToReplyQueue
-		EMA.db.chatSnippets = EMAUtilities:CopyTable( settings.chatSnippets )
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-		end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreateOptions( top )
-	-- Position and size constants.
-	local buttonControlWidth = 105
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local left2 = left + halfWidth + horizontalSpacing
-	local indent = horizontalSpacing * 10
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, "", movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["TALK_OPTIONS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxForwardWhispers = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["FORWARD_WHISPERS_MASTER_RELAY"],
-		EMA.SettingsToggleForwardWhispers,
-		L["FORWARD_WHISPERS_MASTER_RELAY_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxDoNotForwardRealIdWhispers = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["DO_NOT_BATTENET_WHISPERS"],
-		EMA.SettingsToggleDoNotForwardRealIdWhispers,
-		L["DO_NOT_BATTENET_WHISPERS_HELP"]
-	)
---[[
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxForwardViaWhisper = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["FORWARD_USING_NORMAL_WHISPERS"],
-		EMA.SettingsToggleForwardViaWhisper,
-		L["FORWARD_USING_NORMAL_WHISPERS_HRLP"]
-	)
-]]
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxFakeWhispers = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["FORWARD_FAKE_WHISPERS"],
-		EMA.SettingsToggleFakeWhispers,
-		L["FORWARD_FAKE_WHISPERS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-		EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		(headingWidth - indent) / 2,
-		left + indent,
-		movingTop,
-		L["FAKE_WHISPERS_CHANNEL"]
-	)
-	EMA.settingsControl.dropdownMessageArea:SetList( EMA.chatFrameList )
-	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-	EMA.settingsControl.buttonRefreshChatList = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		buttonControlWidth,
-		left + indent + (headingWidth - indent) / 2 + horizontalSpacing,
-		movingTop - buttonHeight + 4,
-		L["UPDATE"],
-		EMA.SettingsRefreshChatListClick
-	)
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	EMA.settingsControl.checkBoxFakeInjectSenderToReplyQueue = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth - indent,
-		left + indent,
-		movingTop,
-		L["FORWARDER_REPLY_QUEUE"],
-		EMA.SettingsToggleFakeInjectSenderToReplyQueue,
-		L["FORWARDER_REPLY_QUEUE_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxFakeInjectOriginatorToReplyQueue = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth - indent,
-		left + indent,
-		movingTop,
-		L["ORIGINATOR_REPLY_QUEUE"],
-		EMA.SettingsToggleFakeInjectOriginatorToReplyQueue,
-		L["ORIGINATOR_REPLY_QUEUE_HELP"]
-		)
---[[
-		movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxFakeWhisperCompact = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth - indent,
-		left + indent,
-		movingTop,
-		L["MESSAGES_WITH_LINKS"],
-		EMA.SettingsToggleFakeWhisperCompact,
-		L["MESSAGES_WITH_LINKS_HELP"]
-	)
-]]
---[[
-	movingTop = movingTop - checkBoxHeight
-
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["CHAT_SNIPPETS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxEnableChatSnippets = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ENABLE_CHAT_SNIPPETS"],
-		EMA.SettingsToggleChatSnippets,
-		L["ENABLE_CHAT_SNIPPETS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.highlightRow = 1
-	EMA.settingsControl.offset = 1
-	local list = {}
-	list.listFrameName = "EMATalkChatSnippetsSettingsFrame"
-	list.parentFrame = EMA.settingsControl.widgetSettings.content
-	list.listTop = movingTop
-	list.listLeft = left
-	list.listWidth = headingWidth
-	list.rowHeight = 20
-	list.rowsToDisplay = 5
-	list.columnsToDisplay = 2
-	list.columnInformation = {}
-	list.columnInformation[1] = {}
-	list.columnInformation[1].width = 25
-	list.columnInformation[1].alignment = "LEFT"
-	list.columnInformation[2] = {}
-	list.columnInformation[2].width = 75
-	list.columnInformation[2].alignment = "LEFT"
-	list.scrollRefreshCallback = EMA.SettingsScrollRefresh
-	list.rowClickCallback = EMA.SettingsRowClick
-	EMA.settingsControl.list = list
-	EMAHelperSettings:CreateScrollList( EMA.settingsControl.list )
-	movingTop = movingTop - list.listHeight - verticalSpacing
-	EMA.settingsControl.buttonAdd = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		buttonControlWidth,
-		left,
-		movingTop,
-		L["ADD"],
-		EMA.SettingsAddClick
-	)
-	EMA.settingsControl.buttonRemove = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		buttonControlWidth,
-		left + buttonControlWidth + horizontalSpacing,
-		movingTop,
-		L["REMOVE"],
-		EMA.SettingsRemoveClick
-	)
-	movingTop = movingTop -	buttonHeight - verticalSpacing
-	EMA.settingsControl.multiEditBoxSnippet = EMAHelperSettings:CreateMultiEditBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["SNIPPET_TEXT"],
-		5
-	)
-	EMA.settingsControl.multiEditBoxSnippet:SetCallback( "OnEnterPressed", EMA.SettingsMultiEditBoxChangedSnippet )
-	local multiEditBoxHeightSnippet = 110
-
-	movingTop = movingTop - multiEditBoxHeightSnippet
-]]
-	return movingTop
-end
-
-local function SettingsCreate()
-	EMA.settingsControl = {}
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfSettings = SettingsCreateOptions( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfSettings )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Callbacks.
--------------------------------------------------------------------------------------------------------------
-
---[[
-function EMA:SettingsScrollRefresh()
-	FauxScrollFrame_Update(
-		EMA.settingsControl.list.listScrollFrame,
-		EMA:GetItemsMaxPosition(),
-		EMA.settingsControl.list.rowsToDisplay,
-		EMA.settingsControl.list.rowHeight
-	)
-	EMA.settingsControl.offset = FauxScrollFrame_GetOffset( EMA.settingsControl.list.listScrollFrame )
-	for iterateDisplayRows = 1, EMA.settingsControl.list.rowsToDisplay do
-		-- Reset.
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
-		EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
-		-- Get data.
-		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.offset
-		if dataRowNumber <= EMA:GetItemsMaxPosition() then
-			-- Put data information into columns.
-			local itemInformation = EMA:GetItemAtPosition( dataRowNumber )
-			EMA.settingsControl.list.rows[iterateDisplayRows].columns[1].textString:SetText( itemInformation.name )
-			EMA.settingsControl.list.rows[iterateDisplayRows].columns[2].textString:SetText( itemInformation.snippet )
-			-- Highlight the selected row.
-			if dataRowNumber == EMA.settingsControl.highlightRow then
-				EMA.settingsControl.list.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
-			end
-		end
-	end
-end
-
-function EMA:SettingsRowClick( rowNumber, columnNumber )
-	if EMA.settingsControl.offset + rowNumber <= EMA:GetItemsMaxPosition() then
-		EMA.settingsControl.highlightRow = EMA.settingsControl.offset + rowNumber
-		local itemInformation = EMA:GetItemAtPosition( EMA.settingsControl.highlightRow )
-		if itemInformation ~= nil then
-			EMA.settingsControl.multiEditBoxSnippet:SetText( itemInformation.snippet )
-		end
-		EMA:SettingsScrollRefresh()
-	end
-end
-]]
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsSetMessageArea( event, value )
-	EMA.db.whisperMessageArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleForwardWhispers( event, checked )
-	EMA.db.forwardWhispers = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleDoNotForwardRealIdWhispers( event, checked )
-	EMA.db.doNotForwardRealIdWhispers = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleFakeWhispers( event, checked )
-	EMA.db.fakeWhisper = checked
-	EMA:SettingsRefresh()
-end
-
---[[
-function EMA:SettingsToggleForwardViaWhisper( event, checked )
-	EMA.db.forwardViaWhisper = checked
-	EMA:SettingsRefresh()
-end
-]]
-
-function EMA:SettingsToggleFakeInjectSenderToReplyQueue( event, checked )
-	EMA.db.fakeInjectSenderToReplyQueue = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleFakeInjectOriginatorToReplyQueue( event, checked )
-	EMA.db.fakeInjectOriginatorToReplyQueue = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefreshChatListClick( event )
-	EMA:UPDATE_CHAT_WINDOWS()
-end
-
---[[
-function EMA:SettingsToggleFakeWhisperCompact( event, checked )
-	EMA.db.fakeWhisperCompact = checked
-	EMA:SettingsRefresh()
-end
-]]
-
---[[
-function EMA:SettingsToggleChatSnippets( event, checked )
-	EMA.db.enableChatSnippets = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsMultiEditBoxChangedSnippet( event, text )
-	local itemInformation = EMA:GetItemAtPosition( EMA.settingsControl.highlightRow )
-	if itemInformation ~= nil then
-		itemInformation.snippet = text
-	end
-	EMA:SettingsRefresh()
-end
-]]
-
-
---[[
-function EMA:SettingsAddClick( event )
-	StaticPopup_Show( "EMATALK_ASK_SNIPPET" )
-end
-
-function EMA:SettingsRemoveClick( event )
-	StaticPopup_Show( "EMATALK_CONFIRM_REMOVE_CHAT_SNIPPET" )
-end
-]]
--------------------------------------------------------------------------------------------------------------
--- Popup Dialogs.
--------------------------------------------------------------------------------------------------------------
-
--- Initialize Popup Dialogs.
-local function InitializePopupDialogs()
-	--[[
-	StaticPopupDialogs["EMATALK_ASK_SNIPPET"] = {
-        text = L["CHAT_SNIPPET_POPUP"],
-        button1 = ACCEPT,
-        button2 = CANCEL,
-        hasEditBox = 1,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-		OnShow = function( self )
-			self.editBox:SetText("")
-            self.button1:Disable()
-            self.editBox:SetFocus()
-        end,
-		OnAccept = function( self )
-			EMA:AddItem( self.editBox:GetText() )
-		end,
-		EditBoxOnTextChanged = function( self )
-            if not self:GetText() or self:GetText():trim() == "" or self:GetText():find( "%W" ) ~= nil then
-				self:GetParent().button1:Disable()
-            else
-                self:GetParent().button1:Enable()
-            end
-        end,
-		EditBoxOnEnterPressed = function( self )
-            if self:GetParent().button1:IsEnabled() then
-				EMA:AddItem( self:GetText() )
-            end
-            self:GetParent():Hide()
-        end,
-    }
-	StaticPopupDialogs["EMATALK_CONFIRM_REMOVE_CHAT_SNIPPET"] = {
-        text = L["REMOVE_CHAT_SNIPPET"],
-        button1 = YES,
-        button2 = NO,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function( self )
-			EMA:RemoveItem()
-		end,
-    }
-	]]
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	EMA.chatFrameList = {}
-	EMA:UpdateChatFrameList()
-	-- Remember the last sender to whisper this character.
-	EMA.lastSender = nil
-	EMA.lastSenderIsReal = false
-	EMA.lastSenderRealID = nil
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Hook the SendChatMessage to translate any chat snippets.
-	--EMA:RawHook( "SendChatMessage", true )
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-	-- Populate the settings.
-	EMA:SettingsRefresh()
---	EMA:SettingsRowClick( 1, 1 )
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	EMA:RegisterEvent( "CHAT_MSG_WHISPER" )
-	EMA:RegisterEvent( "CHAT_MSG_BN_WHISPER" )
-	EMA:RegisterEvent( "UPDATE_CHAT_WINDOWS" )
-	EMA:RegisterEvent( "UPDATE_FLOATING_CHAT_WINDOWS", "UPDATE_CHAT_WINDOWS" )
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--------------------------------------------------------------------------------------------------------------
--- EMATalk functionality.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:UPDATE_CHAT_WINDOWS()
-	EMA:UpdateChatFrameList()
-	EMA.settingsControl.dropdownMessageArea:SetList( EMA.chatFrameList )
-	if EMA.chatFrameList[EMA.db.whisperMessageArea] == nil then
-		EMA.db.whisperMessageArea = "ChatFrame1"
-	end
-	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.whisperMessageArea )
-end
-
-function EMA:GetItemsMaxPosition()
-	return #EMA.db.chatSnippets
-end
-
-function EMA:GetItemAtPosition( position )
-	return EMA.db.chatSnippets[position]
-end
-
-function EMA:AddItem( name )
-	local itemInformation = {}
-	itemInformation.name = name
-	itemInformation.snippet = ""
-	table.insert( EMA.db.chatSnippets, itemInformation )
-	EMA:SettingsRefresh()
-	EMA:SettingsRowClick( 1, 1 )
-end
-
-function EMA:RemoveItem()
-	table.remove( EMA.db.chatSnippets, EMA.settingsControl.highlightRow )
-	EMA:SettingsRefresh()
-	EMA:SettingsRowClick( 1, 1 )
-end
-
---[[
--- The SendChatMessage hook.
-function EMA:SendChatMessage( ... )
-	local message, chatType, language, target = ...
-	EMA:Print("test")
-	if chatType == "WHISPER" then
-		-- Does this character have chat snippets enabled?
-		if EMA.db.enableChatSnippets == true then
-			local snippetName = select( 3, message:find( "^!(%w+)$" ) )
-			-- If a snippet name was found...
-			if snippetName then
-				-- Then look up the associated text.
-				local messageToSend = EMA:GetTextForSnippet( snippetName )
-				EMA:Print("test")
-				--EMAPrivate.Communications.SendChatMessage( messageToSend, "WHISPER", target, EMAPrivate.Communications )
-
-				-- Finish with the chat message, i.e. do not let the original handler run.
-				return true
-			end
-		end
-	end
-
-	-- Call the orginal function.
-	return EMA.hooks["SendChatMessage"]( ... )
-end
-]]
-
-function EMA:CHAT_MSG_WHISPER( chatType, message, sender, language, channelName, target, flag, ... )
-	-- Does this character forward whispers?
-	--EMA:Print("Test", message, sender)
-	if EMA.db.forwardWhispers == true then
-		-- Set a GM flag if this whisper was from a GM.
-		local isGM = false
-		if flag == L["GM"] then
-			isGM = true
-		end
-		-- Was the sender the master?
-		if EMAApi.IsCharacterTheMaster( sender ) == true then
-			-- Yes, relay the masters message to others.
-			EMA:ForwardWhisperFromMaster( message )
-		else
-			-- Not the master, forward the whisper to the master.
-			EMA:ForwardWhisperToMaster( message, sender, isGM, false, nil )
-		end
-	end
-end
-
-function EMA:CHAT_MSG_BN_WHISPER( event, message, sender, a, b, c, d, e, f, g, h, i, j, realFriendID, ... )
-	-- Does this character forward whispers?
-	if EMA.db.forwardWhispers == true and EMA.db.doNotForwardRealIdWhispers == false then
-		-- Is this character NOT the master?
-		if EMAApi.IsCharacterTheMaster( self.characterName ) == false then
-			-- Yes, not the master, relay the message to the master.
-			EMA:ForwardWhisperToMaster( message, sender, false, true, realFriendID )
-		end
-	end
-end
-
-local function ColourCodeLinks( message )
-	local realMessage = message
-	for link in message:gmatch( "|H.*|h" ) do
-		local realLink = ""
-		local startFind, endFind = message:find( "|Hitem", 1, true )
-		-- Is it an item link?
-		if startFind ~= nil then
-			-- Yes, is an item link.
-			local itemQuality = select( 3, GetItemInfo( link ) )
-			-- If the item is not in our cache, we cannot get the correct item quality / colour and the link will not work.
-			if itemQuality ~= nil then
-				realLink = select( 4, GetItemQualityColor( itemQuality ) )..link..FONT_COLOR_CODE_CLOSE
-			else
-				realLink = NORMAL_FONT_COLOR_CODE..link..FONT_COLOR_CODE_CLOSE
-			end
-		else
-			-- Not an item link.
-			-- GetFixedLink is in Blizzard's FrameXML/ItemRef.lua
-			-- It fixes, quest, achievement, talent, trade, enchant and instancelock links.
-			realLink = GetFixedLink( link )
-		end
-		realMessage = realMessage:replace( link, realLink )
-	end
-	return realMessage
-end
-
-local function DoesMessageHaveLink( message )
-	local startFind, endFind = message:find( "|H", 1, true )
-	return startFind ~= nil
-end
-
-local function BuildWhisperCharacterString( originalSender, viaCharacter )
-	local info = ChatTypeInfo["WHISPER"]
-	local colorString = format( "|cff%02x%02x%02x", info.r * 255, info.g * 255, info.b * 255 )
-	return format( "%s|Hplayer:%2$s|h[%2$s]|h%4$s|Hplayer:%3$s|h[%3$s]|h%5$s|r", colorString, originalSender, viaCharacter, L["TALK_VIA"], L[")"] )
-end
-
-function EMA:ForwardWhisperToMaster( message, sender, isGM, isReal, realFriendID )
-	-- Don't relay messages to the master or self (causes infinite loop, which causes disconnect).
-	if (EMAApi.IsCharacterTheMaster( EMA.characterName )) or (EMA.characterName == sender) then
-		return
-	end
-	-- Don't relay messages from the master either (not that this situation should happen).
-	if EMAApi.IsCharacterTheMaster( sender ) == true then
-		return
-	end
-	-- Build from whisper string, this cannot be a link as player links are not sent by whispers.
-	local fromCharacterWhisper = sender
-	if isReal == true then
-		-- Get the toon name of the character the RealID person is playing, Blizzard will not reveal player real names, so cannot send those.
-		fromCharacterWhisper = select( 5, BNGetFriendInfoByID( realFriendID ) )..L["BATTLE_NET"]
-		--local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText = BNGetFriendInfoByID( realFriendID )
-	end
-	if isGM == true then
-		fromCharacterWhisper = fromCharacterWhisper..L["<GM>"]
-	end
-	-- Whisper the master.
-	if EMA.db.fakeWhisper == true then
-		local completeMessage = L["WHISPERS"]..message
-	--[[
-		-- Send in compact format?
-		if EMA.db.fakeWhisperCompact == true then
-			-- Does the message contain a link?
-			if DoesMessageHaveLink( message ) == false then
-				-- No, don't display the message.
-				local info = ChatTypeInfo["WHISPER"]
-				local colorString = format( "|cff%02x%02x%02x", info.r * 255, info.g * 255, info.b * 255 )
-				completeMessage = L[" "]..colorString..L["WHISPERED_YOU"].."|r"
-			end
-		end
-	]]
-		if isGM == true then
-			completeMessage = L[" "]..L["<GM>"]..L[" "]..completeMessage
-		end
-		local inject1 = nil
-		if EMA.db.fakeInjectSenderToReplyQueue == true then
-			inject1 = EMA.characterName
-		end
-		local inject2 = nil
-		if EMA.db.fakeInjectOriginatorToReplyQueue == true then
-			inject2 = sender
-		end
-		EMA:EMASendCommandToMaster( EMA.COMMAND_MESSAGE, EMA.db.whisperMessageArea, sender, EMA.characterName, completeMessage, inject1, inject2 )
-	end
-	--[[
-	if EMA.db.forwardViaWhisper == true then
-		-- RealID messages do not wrap links in colour codes (text is always all blue), so wrap link in colour code
-		-- so normal whisper forwarding with link works.
-		if (isReal == true) and (DoesMessageHaveLink( message ) == true) then
-			message = ColourCodeLinks( message )
-		end
-		EMAPrivate.Communications.SendCommandMaster( fromCharacterWhisper..": "..message, "WHISPER", EMAApi.GetMasterName(), EMAPrivate.Communications.COMMUNICATION_PRIORITY_BULK )
-	end
-	]]
-	-- Remember this sender as the most recent sender.
-	EMA.lastSender = sender
-	EMA.lastSenderIsReal = isReal
-	EMA.lastSenderRealID = realFriendID
-end
-
-function EMA:ForwardWhisperFromMaster( messageFromMaster )
-	-- Who to send to and what to send?
-	-- Check the message to see if there is a character to whisper to; character name is preceeded by @.
-	-- No match will return nil for the parameters.
-	local sendTo, messageToInspect = select( 3, messageFromMaster:find( "^@(%w+)%s*(.*)$" ) )
-	-- If no sender found in message...
-	if not sendTo then
-		-- Then send to last sender.
-		sendTo = EMA.lastSender
-		-- Send the full message.
-		messageToInspect = messageFromMaster
-	end
-	-- Check to see if there is a snippet name in the message (text with a leading !).
-	local messageToSend = messageToInspect
---[[
-	if EMA.db.enableChatSnippets == true then
-		local snippetName = select( 3, messageToInspect:find( "^!(%w+)$" ) )
-		-- If a snippet name was found...
-		if snippetName then
-			-- Then look up the associated text.
-			messageToSend = EMA:GetTextForSnippet( snippetName )
-		end
-	end
-]]
-	-- If there is a valid character to send to...
-	if sendTo then
-		if messageToSend:trim() ~= "" then
-			-- Send the message.
-			if EMA.lastSenderIsReal == true and EMA.lastSenderRealID ~= nil then
-				BNSendWhisper( EMA.lastSenderRealID, messageToSend )
-			else
-				--EMA:Print("chatSend", messageToSend, sendTo )
-				SendChatMessage( messageToSend, "WHISPER", nil, sendTo )
-			end
-		end
-		-- Remember this sender as the most recent sender.
-		EMA.lastSender = sendTo
-	end
-end
-
-function EMA:GetTextForSnippet( snippetName )
-	local snippet = ""
-	for position, itemInformation in pairs( EMA.db.chatSnippets ) do
-		if itemInformation.name == snippetName then
-			snippet = itemInformation.snippet
-			break
-		end
-	end
-	return snippet
-end
-
-function EMA:ProcessReceivedMessage( sender, whisperMessageArea, orginator, forwarder, message, inject1, inject2 )
-	local chatTimestamp = ""
-	local info = ChatTypeInfo["WHISPER"]
-	local colorString = format( "|cff%02x%02x%02x", info.r * 255, info.g * 255, info.b * 255 )
-	if (CHAT_TIMESTAMP_FORMAT) then
-		chatTimestamp = colorString..BetterDate( CHAT_TIMESTAMP_FORMAT, time() ).."|r"
-	end
-	local fixedMessage = message
-	for embeddedColourString in message:gmatch( "|c.*|r" ) do
-		fixedMessage = fixedMessage:replace( embeddedColourString, "|r"..embeddedColourString..colorString )
-	end
-	fixedMessage = colorString..fixedMessage.."|r"
-	if string.sub( whisperMessageArea, 1, 9 ) ~= "ChatFrame" then
-		whisperMessageArea = "ChatFrame1"
-	end
-	_G[whisperMessageArea]:AddMessage( chatTimestamp..BuildWhisperCharacterString( orginator, forwarder )..fixedMessage )
-	if inject1 ~= nil then
-		ChatEdit_SetLastTellTarget( inject1, "WHISPER" )
-	end
-	if inject2 ~= nil then
-		ChatEdit_SetLastTellTarget( inject2, "WHISPER" )
-	end
-end
-
--- A EMA command has been recieved.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if commandName == EMA.COMMAND_MESSAGE then
-		EMA:ProcessReceivedMessage( characterName, ... )
-	end
-end
\ No newline at end of file
diff --git a/Modules/Toon.lua b/Modules/Toon.lua
deleted file mode 100644
index c4e2782..0000000
--- a/Modules/Toon.lua
+++ /dev/null
@@ -1,1540 +0,0 @@
--- ================================================================================ --
---				EMA EE - ( The Awesome MultiBoxing Assistant Ebony's Edition )    --
---				Current Author: Jennifer Cally (Ebony)								--
---				Copyright 2015 - 2018 Jennifer Cally "Ebony"						--
---																					--
---				License: The MIT License (MIT)										--
---				Copyright (c) 2008-2015  Michael "Jafula" Miller					--
---																					--
--- ================================================================================ --
-
--- Create the addon using AceAddon-3.0 and embed some libraries.
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Toon",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Get the EMA Utilities Library.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
-EMA.SharedMedia = LibStub( "LibSharedMedia-3.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "Toon"
-EMA.settingsDatabaseName = "ToonProfileDB"
-EMA.chatCommand = "ema-toon"
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["TOON"]
-EMA.parentDisplayNameToon = L["TOON"]
-EMA.parentDisplayNameMerchant = L["VENDER"]
-EMA.moduleDisplayName = L["TOON"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\Toon.tga"
-EMA.moduleIconWarnings = "Interface\\Addons\\EMA\\Media\\WarningIcon.tga"
-EMA.moduleIconRepair = "Interface\\Addons\\EMA\\Media\\moduleIconRepair.tga"
--- order
-EMA.moduleOrder = 40
-
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		warnHitFirstTimeCombat = false,
-		hitFirstTimeMessage = L["ATTACKED"],
-		warnTargetNotMasterEnterCombat = false,
-		warnTargetNotMasterMessage = L["TARGETING"],
-		warnFocusNotMasterEnterCombat = false,
-		warnFocusNotMasterMessage = L["FOCUS"],
-		warnWhenHealthDropsBelowX = true,
-		warnWhenHealthDropsAmount = "30",
-		warnHealthDropsMessage = L["LOW_HEALTH"],
-		warnWhenManaDropsBelowX = true,
-		warnWhenManaDropsAmount = "30",
-		warnManaDropsMessage = L["LOW_MANA"],
-		warnWhenDurabilityDropsBelowX = true,
-		warnWhenDurabilityDropsAmount = "20",
-		warnDurabilityDropsMessage = L["DURABILITY_LOW_MSG"],
-		warnBagsFull = true,
-		bagsFullMessage = L["BAGS_FULL"],
-		warnCC = true,
-		CcMessage = L["CCED"],
-		warningArea = EMAApi.DefaultWarningArea(),
-		autoAcceptResurrectRequest = true,
-		autoAcceptResurrectRequestOnlyFromTeam = true,
-		acceptDeathRequests = true,
-		autoDenyDuels = true,
-		autoAcceptSummonRequest = false,
-		autoDenyGuildInvites = false,
-		requestArea = EMAApi.DefaultMessageArea(),
-		autoRepair = true,
-		autoRepairUseGuildFunds = true,
-		merchantArea = EMAApi.DefaultMessageArea(),
-		autoAcceptRoleCheck = false,
-		enterLFGWithTeam = false,
-		acceptReadyCheck = false,
-		teleportLFGWithTeam = false,
-		rollWithTeam = false,
-		--Debug Suff
-		testAlwaysOff = true
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		args = {
-				push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_ALL_SETTINGS"],
-				usage = "/EMA-toon push",
-				get = false,
-				set = "EMASendSettings",
-			},
-		},
-	}
-	return configuration
-end
-
-local function DebugMessage( ... )
-	--EMA:Print( ... )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-EMA.COMMAND_TEAM_DEATH = "EMAToonTeamDeath"
-EMA.COMMAND_RECOVER_TEAM = "EMAToonRecoverTeam"
-EMA.COMMAND_SOUL_STONE = "EMAToonSoulStone"
-EMA.COMMAND_READY_CHECK = "EMAReadyCheck"
-EMA.COMMAND_TELE_PORT = "EMAteleport"
-EMA.COMMAND_LOOT_ROLL = "JamabaLootRoll"
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------------------------------------
--- Variables used by module.
--------------------------------------------------------------------------------------------------------------
-
-EMA.sharedInvData = {}
-
--------------------------------------------------------------------------------------------------------------
--- Settings Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function SettingsCreateMerchant( top )
-	-- Get positions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
-	local column2left = left + halfWidth
-	local left2 = left + thirdWidth
-	local left3 = left + (thirdWidth * 2)
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControlMerchant, "", movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControlMerchant, L["VENDOR"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControlMerchant.checkBoxAutoRepair = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlMerchant,
-		headingWidth,
-		left,
-		movingTop,
-		L["AUTO_REPAIR"],
-		EMA.SettingsToggleAutoRepair,
-		L["AUTO_REPAIR_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlMerchant.checkBoxAutoRepairUseGuildFunds = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlMerchant,
-		headingWidth,
-		left,
-		movingTop,
-		L["REPAIR_GUILD_FUNDS"],
-		EMA.SettingsToggleAutoRepairUseGuildFunds,
-		L["REPAIR_GUILD_FUNDS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlMerchant.dropdownMerchantArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControlMerchant,
-		headingWidth,
-		left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControlMerchant.dropdownMerchantArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControlMerchant.dropdownMerchantArea:SetCallback( "OnValueChanged", EMA.SettingsSetMerchantArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	return movingTop
-end
-
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControlMerchant.dropdownMerchantArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControlToon.dropdownRequestArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControlWarnings.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-end
-
-function EMA:OnCharactersChanged()
-	EMA:SettingsRefresh()
-end
-
-local function SettingsCreateToon( top )
-	-- Get positions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
-	local column2left = left + halfWidth
-	local left2 = left + thirdWidth
-	local left3 = left + (thirdWidth * 2)
-	local movingTop = top
-	EMAHelperSettings:CreateHeading( EMA.settingsControlToon, L["REQUESTS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControlToon.checkBoxAutoDenyDuels = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left,
-		movingTop,
-		L["DENY_DUELS"],
-		EMA.SettingsToggleAutoDenyDuels,
-		L["DENY_DUELS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlToon.checkBoxAutoDenyGuildInvites = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left,
-		movingTop,
-		L["DENY_GUILD_INVITES"],
-		EMA.SettingsToggleAutoDenyGuildInvites,
-		L["DENY_GUILD_INVITES_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequest = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left,
-		movingTop,
-		L["ACCEPT_RESURRECT"],
-		EMA.SettingsToggleAutoAcceptResurrectRequests,
-		L["ACCEPT_RESURRECT_AUTO"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequestOnlyFromTeam = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left + 20,
-		movingTop,
-		L["ACCEPT_RESURRECT_FROM_TEAM"],
-		EMA.SettingsToggleAutoAcceptResurrectRequestsOnlyFromTeam,
-		L["ACCEPT_RESURRECT_FROM_TEAM_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlToon.checkBoxAcceptDeathRequests = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left,
-		movingTop,
-		L["RELEASE_PROMPTS"],
-		EMA.SettingsToggleAcceptDeathRequests,
-		L["RELEASE_PROMPTS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlToon.checkBoxAutoAcceptSummonRequest = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left,
-		movingTop,
-		L["SUMMON_REQUEST"],
-		EMA.SettingsToggleAutoAcceptSummonRequest,
-		L["SUMMON_REQUEST_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControlToon, L["GROUPTOOLS_HEADING"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControlToon.checkBoxAutoRoleCheck = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left,
-		movingTop,
-		L["ROLE_CHECKS"],
-		EMA.SettingsToggleAutoRoleCheck,
-		L["ROLE_CHECKS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlToon.checkBoxAcceptReadyCheck = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left,
-		movingTop,
-		L["READY_CHECKS"],
-		EMA.SettingsToggleAcceptReadyCheck,
-		L["READY_CHECKS_HELP"]
-	)
- 	movingTop = movingTop - checkBoxHeight
- 	EMA.settingsControlToon.checkBoxLFGTeleport = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left,
-		movingTop,
-		L["LFG_Teleport"],
-		EMA.SettingsToggleLFGTeleport,
-		L["LFG_Teleport_HELP"]
-	)
- 	movingTop = movingTop - checkBoxHeight
- 	EMA.settingsControlToon.checkBoxLootWithTeam = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlToon,
-		halfWidth,
-		left,
-		movingTop,
-		L["ROLL_LOOT"],
-		EMA.SettingsToggleLootWithTeam,
-		L["ROLL_LOOT_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControlToon, L["MESSAGES_HEADER"], movingTop, false )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
- 	EMA.settingsControlToon.dropdownRequestArea = EMAHelperSettings:CreateDropdown(
-	EMA.settingsControlToon,
-		headingWidth,
-		left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControlToon.dropdownRequestArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControlToon.dropdownRequestArea:SetCallback( "OnValueChanged", EMA.SettingsSetRequestArea )
-	return movingTop
-end
-
-local function SettingsCreateWarnings( top )
-	-- Get positions.
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local labelHeight = EMAHelperSettings:GetLabelHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( true )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local halfWidth = (headingWidth - horizontalSpacing) / 2
-	local thirdWidth = (headingWidth - (horizontalSpacing * 2)) / 3
-	local column2left = left + halfWidth
-	local left2 = left + thirdWidth
-	local left3 = left + (thirdWidth * 2)
-	local movingTop = top
-	EMAHelperSettings:CreateHeading( EMA.settingsControlWarnings, L["COMBAT"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControlWarnings.checkBoxWarnHitFirstTimeCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["WARN_HIT"],
-		EMA.SettingsToggleWarnHitFirstTimeCombat,
-		L["WARN_HIT_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWarnings.editBoxHitFirstTimeMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["WARN_HIT"]
-	)
-	EMA.settingsControlWarnings.editBoxHitFirstTimeMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedHitFirstTimeMessage )
-
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlWarnings.checkBoxWarnTargetNotMasterEnterCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["TARGET_NOT_MASTER"],
-		EMA.SettingsToggleWarnTargetNotMasterEnterCombat,
-		L["TARGET_NOT_MASTER_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWarnings.editBoxWarnTargetNotMasterMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["TARGETING"]
-	)
-	EMA.settingsControlWarnings.editBoxWarnTargetNotMasterMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnTargetNotMasterMessage )
-
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlWarnings.checkBoxWarnFocusNotMasterEnterCombat = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["FOCUS_NOT_MASTER"],
-		EMA.SettingsToggleWarnFocusNotMasterEnterCombat,
-		L["FOCUS_NOT_MASTER_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWarnings.editBoxWarnFocusNotMasterMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["FOCUS"]
-	)
-	EMA.settingsControlWarnings.editBoxWarnFocusNotMasterMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnFocusNotMasterMessage )
-	movingTop = movingTop - editBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControlWarnings, L["HEALTH_POWER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControlWarnings.checkBoxWarnWhenHealthDropsBelowX = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["HEALTH_DROPS_BELOW"],
-		EMA.SettingsToggleWarnWhenHealthDropsBelowX,
-		L["HEALTH_DROPS_BELOW_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWarnings.editBoxWarnWhenHealthDropsAmount = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["HEALTH_PERCENTAGE"]
-	)
-	EMA.settingsControlWarnings.editBoxWarnWhenHealthDropsAmount:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnWhenHealthDropsAmount )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["LOW_HEALTH"]
-	)
-	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnHealthDropsMessage )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlWarnings.checkBoxWarnWhenManaDropsBelowX = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["MANA_DROPS_BELOW"],
-		EMA.SettingsToggleWarnWhenManaDropsBelowX,
-		L["MANA_DROPS_BELOW_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWarnings.editBoxWarnWhenManaDropsAmount = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["MANA_PERCENTAGE"]
-	)
-	EMA.settingsControlWarnings.editBoxWarnWhenManaDropsAmount:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnWhenManaDropsAmount )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlWarnings.editBoxWarnManaDropsMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["LOW_MANA"]
-	)
-	EMA.settingsControlWarnings.editBoxWarnManaDropsMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnManaDropsMessage )
-	movingTop = movingTop - editBoxHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControlWarnings, L["OTHER"], movingTop, true )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControlWarnings.checkBoxWarnWhenDurabilityDropsBelowX = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["DURABILITY_DROPS_BELOW"],
-		EMA.SettingsToggleWarnWhenDurabilityDropsBelowX,
-		L["DURABILITY_DROPS_BELOW_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWarnings.editBoxWarnWhenDurabilityDropsAmount = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["DURABILITY_PERCENTAGE"]
-	)
-	EMA.settingsControlWarnings.editBoxWarnWhenDurabilityDropsAmount:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnWhenDurabilityDropsAmount )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlWarnings.editBoxWarnDurabilityDropsMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["LOW_DURABILITY_TEXT"]
-	)
-	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedWarnDurabilityDropsMessage )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlWarnings.checkBoxWarnCC = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["WARN_IF_CC"],
-		EMA.SettingsToggleWarnCC,
-		L["WARN_IF_CC_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWarnings.editBoxCCMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["CCED"]
-	)
-	EMA.settingsControlWarnings.editBoxCCMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedCCMessage )
-
-	movingTop = movingTop - editBoxHeight
-    EMA.settingsControlWarnings.checkBoxWarnBagsFull = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["BAGS_FULL"],
-		EMA.SettingsToggleWarnBagsFull,
-		L["BAGS_FULL_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControlWarnings.editBoxBagsFullMessage = EMAHelperSettings:CreateEditBox( EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["BAGS_FULL"]
-	)
-	EMA.settingsControlWarnings.editBoxBagsFullMessage:SetCallback( "OnEnterPressed", EMA.EditBoxChangedBagsFullMessage )
-	movingTop = movingTop - editBoxHeight
-
-
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControlWarnings.dropdownWarningArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControlWarnings,
-		headingWidth,
-		left,
-		movingTop,
-		L["SEND_WARNING_AREA"]
-	)
-	EMA.settingsControlWarnings.dropdownWarningArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControlWarnings.dropdownWarningArea:SetCallback( "OnValueChanged", EMA.SettingsSetWarningArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	return movingTop
-end
-
-local function SettingsCreate()
-	EMA.settingsControlToon = {}
-	EMA.settingsControlWarnings = {}
-	EMA.settingsControlMerchant = {}
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControlToon,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayNameToon,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControlWarnings,
-		L["WARNINGS"],
-		EMA.parentDisplayNameToon,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIconWarnings
-	)
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControlMerchant,
-		L["REPAIR"],
-		EMA.parentDisplayNameMerchant,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIconRepair
-	)
-	local bottomOfToon = SettingsCreateToon( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControlToon.widgetSettings.content:SetHeight( -bottomOfToon )
-	local bottomOfWarnings = SettingsCreateWarnings( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControlWarnings.widgetSettings.content:SetHeight( -bottomOfWarnings)
-	local bottomOfMerchant = SettingsCreateMerchant( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControlMerchant.widgetSettings.content:SetHeight( -bottomOfMerchant )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControlWarnings, helpTable, EMA:GetConfiguration() )
-end
-
--------------------------------------------------------------------------------------------------------------
--- Settings Populate.
--------------------------------------------------------------------------------------------------------------
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	EMA.settingsControlWarnings.checkBoxWarnHitFirstTimeCombat:SetValue( EMA.db.warnHitFirstTimeCombat )
-	EMA.settingsControlWarnings.editBoxHitFirstTimeMessage:SetText( EMA.db.hitFirstTimeMessage )
-	EMA.settingsControlWarnings.checkBoxWarnTargetNotMasterEnterCombat:SetValue( EMA.db.warnTargetNotMasterEnterCombat )
-	EMA.settingsControlWarnings.editBoxWarnTargetNotMasterMessage:SetText( EMA.db.warnTargetNotMasterMessage )
-	EMA.settingsControlWarnings.checkBoxWarnFocusNotMasterEnterCombat:SetValue( EMA.db.warnFocusNotMasterEnterCombat )
-	EMA.settingsControlWarnings.editBoxWarnFocusNotMasterMessage:SetText( EMA.db.warnFocusNotMasterMessage )
-	EMA.settingsControlWarnings.checkBoxWarnWhenHealthDropsBelowX:SetValue( EMA.db.warnWhenHealthDropsBelowX )
-	EMA.settingsControlWarnings.editBoxWarnWhenHealthDropsAmount:SetText( EMA.db.warnWhenHealthDropsAmount )
-	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage:SetText( EMA.db.warnHealthDropsMessage )
-	EMA.settingsControlWarnings.checkBoxWarnWhenManaDropsBelowX:SetValue( EMA.db.warnWhenManaDropsBelowX )
-	EMA.settingsControlWarnings.editBoxWarnWhenManaDropsAmount:SetText( EMA.db.warnWhenManaDropsAmount )
-	EMA.settingsControlWarnings.editBoxWarnManaDropsMessage:SetText( EMA.db.warnManaDropsMessage )
-	EMA.settingsControlWarnings.checkBoxWarnWhenDurabilityDropsBelowX:SetValue( EMA.db.warnWhenDurabilityDropsBelowX )
-	EMA.settingsControlWarnings.editBoxWarnWhenDurabilityDropsAmount:SetText( EMA.db.warnWhenDurabilityDropsAmount )
-	EMA.settingsControlWarnings.editBoxWarnDurabilityDropsMessage:SetText( EMA.db.warnDurabilityDropsMessage )
-	EMA.settingsControlWarnings.checkBoxWarnBagsFull:SetValue( EMA.db.warnBagsFull )
-	EMA.settingsControlWarnings.editBoxBagsFullMessage:SetText( EMA.db.bagsFullMessage )
-	EMA.settingsControlWarnings.checkBoxWarnCC:SetValue( EMA.db.warnCC )
-	EMA.settingsControlWarnings.editBoxCCMessage:SetText( EMA.db.CcMessage )
-	EMA.settingsControlWarnings.dropdownWarningArea:SetValue( EMA.db.warningArea )
-	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequest:SetValue( EMA.db.autoAcceptResurrectRequest )
-	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequestOnlyFromTeam:SetValue( EMA.db.autoAcceptResurrectRequestOnlyFromTeam )
-	EMA.settingsControlToon.checkBoxAcceptDeathRequests:SetValue( EMA.db.acceptDeathRequests )
-	EMA.settingsControlToon.checkBoxAutoDenyDuels:SetValue( EMA.db.autoDenyDuels )
-	EMA.settingsControlToon.checkBoxAutoAcceptSummonRequest:SetValue( EMA.db.autoAcceptSummonRequest )
-	EMA.settingsControlToon.checkBoxAutoDenyGuildInvites:SetValue( EMA.db.autoDenyGuildInvites )
-	EMA.settingsControlToon.checkBoxAutoRoleCheck:SetValue( EMA.db.autoAcceptRoleCheck )
-	EMA.settingsControlToon.checkBoxAcceptReadyCheck:SetValue( EMA.db.acceptReadyCheck )
-	EMA.settingsControlToon.checkBoxLFGTeleport:SetValue( EMA.db.teleportLFGWithTeam )
-	EMA.settingsControlToon.checkBoxLootWithTeam:SetValue( EMA.db.rollWithTeam )
-	EMA.settingsControlToon.dropdownRequestArea:SetValue( EMA.db.requestArea )
-	EMA.settingsControlMerchant.checkBoxAutoRepair:SetValue( EMA.db.autoRepair )
-	EMA.settingsControlMerchant.checkBoxAutoRepairUseGuildFunds:SetValue( EMA.db.autoRepairUseGuildFunds )
-	EMA.settingsControlMerchant.dropdownMerchantArea:SetValue( EMA.db.merchantArea )
-	-- Set state.
-	EMA.settingsControlWarnings.editBoxHitFirstTimeMessage:SetDisabled( not EMA.db.warnHitFirstTimeCombat )
-	EMA.settingsControlWarnings.editBoxWarnTargetNotMasterMessage:SetDisabled( not EMA.db.warnTargetNotMasterEnterCombat )
-	EMA.settingsControlWarnings.editBoxWarnFocusNotMasterMessage:SetDisabled( not EMA.db.warnFocusNotMasterEnterCombat )
-	EMA.settingsControlWarnings.editBoxWarnWhenHealthDropsAmount:SetDisabled( not EMA.db.warnWhenHealthDropsBelowX )
-	EMA.settingsControlWarnings.editBoxWarnHealthDropsMessage:SetDisabled( not EMA.db.warnWhenHealthDropsBelowX )
-	EMA.settingsControlWarnings.editBoxWarnWhenManaDropsAmount:SetDisabled( not EMA.db.warnWhenManaDropsBelowX )
-	EMA.settingsControlWarnings.editBoxWarnManaDropsMessage:SetDisabled( not EMA.db.warnWhenManaDropsBelowX )
-	EMA.settingsControlWarnings.editBoxWarnWhenDurabilityDropsAmount:SetDisabled( not EMA.db.warnWhenDurabilityDropsBelowX )
-	EMA.settingsControlWarnings.editBoxWarnDurabilityDropsMessage:SetDisabled( not EMA.db.warnWhenDurabilityDropsBelowX )
-	EMA.settingsControlMerchant.checkBoxAutoRepairUseGuildFunds:SetDisabled( not EMA.db.autoRepair )
-	EMA.settingsControlWarnings.editBoxBagsFullMessage:SetDisabled( not EMA.db.warnBagsFull )
-	EMA.settingsControlWarnings.editBoxCCMessage:SetDisabled( not EMA.db.warnCC )
-	EMA.settingsControlToon.checkBoxAutoAcceptResurrectRequestOnlyFromTeam:SetDisabled( not EMA.db.autoAcceptResurrectRequest )
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsToggleAutoRepair( event, checked )
-	EMA.db.autoRepair = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoRepairUseGuildFunds( event, checked )
-	EMA.db.autoRepairUseGuildFunds = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoDenyDuels( event, checked )
-	EMA.db.autoDenyDuels = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoAcceptSummonRequest( event, checked )
-	EMA.db.autoAcceptSummonRequest = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoDenyGuildInvites( event, checked )
-	EMA.db.autoDenyGuildInvites = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoAcceptResurrectRequests( event, checked )
-	EMA.db.autoAcceptResurrectRequest = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoAcceptResurrectRequestsOnlyFromTeam( event, checked )
-	EMA.db.autoAcceptResurrectRequestOnlyFromTeam = checked
-	EMA:SettingsRefresh()
-end
-
-
-function EMA:SettingsToggleAcceptDeathRequests( event, checked )
-	EMA.db.acceptDeathRequests = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAutoRoleCheck( event, checked )
-	EMA.db.autoAcceptRoleCheck = checked
-	EMA:SettingsRefresh()
-end
-
-
-function EMA:SettingsToggleAcceptReadyCheck( event, checked )
-	EMA.db.acceptReadyCheck = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleLFGTeleport( event, checked )
-	EMA.db.teleportLFGWithTeam = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleLootWithTeam( event, checked )
-	EMA.db.rollWithTeam = checked
-	EMA:SettingsRefresh()
-end
-
--- Warnings Toggles
-
-function EMA:SettingsToggleWarnHitFirstTimeCombat( event, checked )
-	EMA.db.warnHitFirstTimeCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedHitFirstTimeMessage( event, text )
-	EMA.db.hitFirstTimeMessage = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleWarnBagsFull( event, checked )
-	EMA.db.warnBagsFull = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedBagsFullMessage( event, text )
-	EMA.db.bagsFullMessage = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleWarnCC( event, checked )
-	EMA.db.warnCC = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedCCMessage( event, text )
-	EMA.db.CcMessage = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleWarnTargetNotMasterEnterCombat( event, checked )
-	EMA.db.warnTargetNotMasterEnterCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedWarnTargetNotMasterMessage( event, text )
-	EMA.db.warnTargetNotMasterMessage = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleWarnFocusNotMasterEnterCombat( event, checked )
-	EMA.db.warnFocusNotMasterEnterCombat = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedWarnFocusNotMasterMessage( event, text )
-	EMA.db.warnFocusNotMasterMessage = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleWarnWhenHealthDropsBelowX( event, checked )
-	EMA.db.warnWhenHealthDropsBelowX = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedWarnWhenHealthDropsAmount( event, text )
-	local amount = tonumber( text )
-	amount = EMAUtilities:FixValueToRange( amount, 0, 100 )
-	EMA.db.warnWhenHealthDropsAmount = tostring( amount )
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedWarnHealthDropsMessage( event, text )
-	EMA.db.warnHealthDropsMessage = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleWarnWhenManaDropsBelowX( event, checked )
-	EMA.db.warnWhenManaDropsBelowX = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedWarnWhenManaDropsAmount( event, text )
-	local amount = tonumber( text )
-	amount = EMAUtilities:FixValueToRange( amount, 0, 100 )
-	EMA.db.warnWhenManaDropsAmount = tostring( amount )
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedWarnManaDropsMessage( event, text )
-	EMA.db.warnManaDropsMessage = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleWarnWhenDurabilityDropsBelowX( event, checked )
-	EMA.db.warnWhenDurabilityDropsBelowX = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedWarnWhenDurabilityDropsAmount( event, text )
-	local amount = tonumber( text )
-	amount = EMAUtilities:FixValueToRange( amount, 0, 100 )
-	EMA.db.warnWhenDurabilityDropsAmount = tostring( amount )
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedWarnDurabilityDropsMessage( event, text )
-	EMA.db.warnDurabilityDropsMessage = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetWarningArea( event, value )
-	EMA.db.warningArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetRequestArea( event, value )
-	EMA.db.requestArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsSetMerchantArea( event, value )
-	EMA.db.merchantArea = value
-	EMA:SettingsRefresh()
-end
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	-- Create the settings control.
-	SettingsCreate()
-	-- Initialise the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControlWarnings.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-	-- Flag set when told the master about health falling below a certain percentage.
-	EMA.toldMasterAboutHealth = false
-	-- Flag set when told the master about mana falling below a certain percentage.
-	EMA.toldMasterAboutMana = false
-	-- Flag Set when told master About Durability
-	EMA.toldMasterAboutDurability = false
-	-- Have been hit flag.
-	EMA.haveBeenHit = false
-	-- Bags full changed count.
-	EMA.previousFreeBagSlotsCount = false
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	EMA.isInternalCommand = false
-	-- WoW events.
-	EMA:RegisterEvent( "UNIT_COMBAT" )
-	EMA:RegisterEvent( "PLAYER_REGEN_DISABLED" )
-	EMA:RegisterEvent( "PLAYER_REGEN_ENABLED" )
-	EMA:RegisterEvent( "UNIT_HEALTH" )
-	EMA:RegisterEvent( "UPDATE_INVENTORY_DURABILITY" )
-	EMA:RegisterEvent( "UNIT_POWER_FREQUENT" )
-	EMA:RegisterEvent( "MERCHANT_SHOW" )
-	EMA:RegisterEvent( "RESURRECT_REQUEST" )
-	EMA:RegisterEvent( "PLAYER_DEAD" )
-	EMA:RegisterEvent( "CORPSE_IN_RANGE" )
-	EMA:RegisterEvent( "CORPSE_IN_INSTANCE" )
-	EMA:RegisterEvent( "CORPSE_OUT_OF_RANGE" )
-	EMA:RegisterEvent( "PLAYER_UNGHOST" )
-	EMA:RegisterEvent( "PLAYER_ALIVE" )
-	EMA:RegisterEvent( "CONFIRM_SUMMON")
-	EMA:RegisterEvent( "DUEL_REQUESTED" )
-	EMA:RegisterEvent( "GUILD_INVITE_REQUEST" )
-	EMA:RegisterEvent( "LFG_ROLE_CHECK_SHOW" )
-	EMA:RegisterEvent( "READY_CHECK" )
-	EMA:RegisterEvent("LOSS_OF_CONTROL_ADDED")
-	EMA:RegisterEvent( "UI_ERROR_MESSAGE", "BAGS_FULL" )
-	EMA:RegisterEvent( "BAG_UPDATE_DELAYED" )
-
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_ONLINE, "OnCharactersChanged" )
-	EMA:RegisterMessage( EMAApi.MESSAGE_CHARACTER_OFFLINE, "OnCharactersChanged" )
-	-- Ace Hooks
-	EMA:SecureHook( "ConfirmReadyCheck" )
-	EMA:SecureHook( "LFGTeleport" )
-	EMA:SecureHook( "RollOnLoot" )
-
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.warnHitFirstTimeCombat = settings.warnHitFirstTimeCombat
-		EMA.db.hitFirstTimeMessage = settings.hitFirstTimeMessage
-		EMA.db.warnTargetNotMasterEnterCombat = settings.warnTargetNotMasterEnterCombat
-		EMA.db.warnTargetNotMasterMessage = settings.warnTargetNotMasterMessage
-		EMA.db.warnFocusNotMasterEnterCombat = settings.warnFocusNotMasterEnterCombat
-		EMA.db.warnFocusNotMasterMessage = settings.warnFocusNotMasterMessage
-		EMA.db.warnWhenHealthDropsBelowX = settings.warnWhenHealthDropsBelowX
-		EMA.db.warnWhenHealthDropsAmount = settings.warnWhenHealthDropsAmount
-		EMA.db.warnHealthDropsMessage = settings.warnHealthDropsMessage
-		EMA.db.warnWhenManaDropsBelowX = settings.warnWhenManaDropsBelowX
-		EMA.db.warnWhenManaDropsAmount = settings.warnWhenManaDropsAmount
-		EMA.db.warnManaDropsMessage = settings.warnManaDropsMessage
-		EMA.db.warnWhenDurabilityDropsBelowX = settings.warnWhenDurabilityDropsBelowX
-		EMA.db.warnWhenDurabilityDropsAmount = settings.warnWhenDurabilityDropsAmount
-		EMA.db.warnDurabilityDropsMessage = settings.warnDurabilityDropsMessage
-		EMA.db.warnBagsFull = settings.warnBagsFull
-		EMA.db.bagsFullMessage = settings.bagsFullMessage
-		EMA.db.warnCC = settings.warnCC
-		EMA.db.CcMessage = settings.CcMessage
-		EMA.db.autoAcceptResurrectRequest = settings.autoAcceptResurrectRequest
-		EMA.db.autoAcceptResurrectRequestOnlyFromTeam = settings.autoAcceptResurrectRequestOnlyFromTeam
-		EMA.db.acceptDeathRequests = settings.acceptDeathRequests
-		EMA.db.autoDenyDuels = settings.autoDenyDuels
-		EMA.db.autoAcceptSummonRequest = settings.autoAcceptSummonRequest
-		EMA.db.autoDenyGuildInvites = settings.autoDenyGuildInvites
-		EMA.db.autoAcceptRoleCheck = settings.autoAcceptRoleCheck
-		EMA.db.enterLFGWithTeam = settings.enterLFGWithTeam
-		EMA.db.acceptReadyCheck = settings.acceptReadyCheck
-		EMA.db.teleportLFGWithTeam = settings.teleportLFGWithTeam
-		EMA.db.rollWithTeam = settings.rollWithTeam
-		EMA.db.autoRepair = settings.autoRepair
-		EMA.db.autoRepairUseGuildFunds = settings.autoRepairUseGuildFunds
-		EMA.db.warningArea = settings.warningArea
-		EMA.db.requestArea = settings.requestArea
-		EMA.db.merchantArea = settings.merchantArea
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
-function EMA:UNIT_COMBAT( event, unitAffected, action )
-	if EMA.db.warnHitFirstTimeCombat == false then
-		return
-	end
-	if EMAApi.IsCharacterTheMaster( self.characterName ) == true then
-		return
-	end
-	if InCombatLockdown() then
-		if unitAffected == "player" and action ~= "HEAL" and not EMA.haveBeenHit then
-			EMA.haveBeenHit = true
-			EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.hitFirstTimeMessage, false )
-		end
-	end
-end
-
-function EMA:GUILD_INVITE_REQUEST( event, inviter, guild, ... )
-	if EMA.db.autoDenyGuildInvites == true then
-		DeclineGuild()
-		GuildInviteFrame:Hide()
-		EMA:EMASendMessageToTeam( EMA.db.requestArea, L["REFUSED_GUILD_INVITE"]( guild, inviter ), false )
-	end
-end
-
-function EMA:DUEL_REQUESTED( event, challenger, ... )
-	if EMA.db.autoDenyDuels == true then
-		CancelDuel()
-		StaticPopup_Hide( "DUEL_REQUESTED" )
-		EMA:EMASendMessageToTeam( EMA.db.requestArea, L["I_REFUSED_A_DUEL_FROM_X"]( challenger ), false )
-	end
-end
-
-function EMA:PLAYER_UNGHOST(event, ...)
-		StaticPopup_Hide( "RECOVER_CORPSE" )
-		StaticPopup_Hide( "RECOVER_CORPSE_INSTANCE" )
-		StaticPopup_Hide( "XP_LOSS" )
-		StaticPopup_Hide( "RECOVER_TEAM")
-		StaticPopup_Hide(  "TEAMDEATH" )
-end
-
-function EMA:PLAYER_ALIVE(event, ...)
-		StaticPopup_Hide( "RECOVER_CORPSE" )
-		StaticPopup_Hide( "RECOVER_CORPSE_INSTANCE" )
-		StaticPopup_Hide( "XP_LOSS" )
-		StaticPopup_Hide( "RECOVER_TEAM" )
-		StaticPopup_Hide( "TEAMDEATH" )
-end
-
-function EMA:CORPSE_IN_RANGE(event, ...)
-	local teamMembers = EMAApi.GetTeamListMaximumOrderOnline()
-	if teamMembers > 1 and EMA.db.acceptDeathRequests == true then
-		StaticPopup_Show("RECOVER_TEAM")
-	end
-end
-
-function EMA:CORPSE_IN_INSTANCE(event, ...)
-		StaticPopup_Show("RECOVER_CORPSE_INSTANCE")
-		StaticPopup_Hide("RECOVER_TEAM")
-end
-
-function EMA:CORPSE_OUT_OF_RANGE(event, ...)
-		StaticPopup_Hide("RECOVER_CORPSE")
-		StaticPopup_Hide("RECOVER_CORPSE_INSTANCE")
-		StaticPopup_Hide("XP_LOSS")
-		StaticPopup_Hide("RECOVER_TEAM")
-end
-
-function EMA:PLAYER_DEAD( event, ...)
-	-- EMA Team Stuff.
-	local teamMembers = EMAApi.GetTeamListMaximumOrderOnline()
-	if teamMembers > 1 and EMA.db.acceptDeathRequests == true then
-		StaticPopup_Show( "TEAMDEATH" )
-	end
-end
-
--- Mosty taken from blizzard StaticPopup Code
--- 8.0 changes self Res to much to beable to work like we want it to
--- Not sure if we can do this anymore? maybe just remove it for now
-StaticPopupDialogs["TEAMDEATH"] = {
-	text = L["RELEASE_TEAM_Q"],
-	button1 = DEATH_RELEASE,
-	--button2 = USE_SOULSTONE,
-	button2 = CANCEL,
-	OnShow = function(self)
-		--self.timeleft = GetReleaseTimeRemaining()
-		--[[
-		-- TODO FIX FOR 8.0
-		if EMAPrivate.Core.isBetaBuild == true then
-			-- Find out new code????? for now we can not use this
-			local text = nil
-		else
-			local text = HasSoulstone()
-		end
-		if ( text ) then
-			self.button2:SetText(text)
-		end
-		if ( self.timeleft == -1 ) then
-			self.text:SetText(DEATH_RELEASE_NOTIMER)
-		end
-		--]]
-		self.button1:SetText(L["RELEASE_TEAM"])
-	end,
-	OnAccept = function(self)
-		--EMA:Print("testRes")
-		-- Do we need this???
-		--if not ( CannotBeResurrected() ) then
-		--	return 1
-		--end
-
-		EMA.teamDeath()
-	end,
-	OnCancel = function(self, data, reason)
-		--[[
-		if ( reason == "override" ) then
-			return;
-		end
-		if ( reason == "timeout" ) then
-			return;
-		end
-		if ( reason == "clicked" ) then
-			if ( HasSoulstone() ) then
-				EMA.teamSS()
-			else
-				EMA.teamRes()
-			end
-			if ( CannotBeResurrected() ) then
-				return 1
-			end
-		end
-		]]
-	end,
-	OnUpdate = function(self, elapsed)
-		if ( IsFalling() and not IsOutOfBounds()) then
-			self.button1:Disable()
-			self.button2:Disable()
-			--self.button3:Disable()
-			return;
-		end
-
-		local b1_enabled = self.button1:IsEnabled()
-		self.button1:SetEnabled(not IsEncounterInProgress())
-
-		if ( b1_enabled ~= self.button1:IsEnabled() ) then
-			if ( b1_enabled ) then
-				self.text:SetText(CAN_NOT_RELEASE_IN_COMBAT)
-			else
-				self.text:SetText("");
-				StaticPopupDialogs[self.which].OnShow(self)
-			end
-			StaticPopup_Resize(dialog, which)
-		end
-		--[[
-		if( HasSoulstone() and CanUseSoulstone() ) then
-			self.button2:Enable()
-		else
-			self.button2:Disable()
-		end
-		--]]
-	end,
-	--[[
-	DisplayButton2 = function(self)
-		return HasSoulstone()
-	end,
-	]]
-	timeout = 0,
-	whileDead = 1,
-	interruptCinematic = 1,
-	notClosableByLogout = 1,
-	noCancelOnReuse = 1,
-	cancels = "RECOVER_TEAM"
-}
-
-StaticPopupDialogs["RECOVER_TEAM"] = {
-	text = L["RECOVER_CORPSES"],
-	button1 = ACCEPT,
-	OnAccept = function(self)
-		EMA:relaseTeam();
-		return 1;
-	end,
-	timeout = 0,
-	whileDead = 1,
-	interruptCinematic = 1,
-	notClosableByLogout = 1
-};
-
-function EMA:relaseTeam()
-	EMA:EMASendCommandToTeam( EMA.COMMAND_RECOVER_TEAM )
-end
-
-function EMA:teamDeath()
-
-	EMA:EMASendCommandToTeam( EMA.COMMAND_TEAM_DEATH )
-end
-
---Remove
-function EMA:teamSS()
-	EMA:EMASendCommandToTeam( EMA.COMMAND_SOUL_STONE )
-	--UseSoulstone()
-end
-
-function EMA:doRecoverTeam()
-	RetrieveCorpse()
-	if UnitIsGhost("player") then
-		local delay = GetCorpseRecoveryDelay()
-		if delay > 0 then
-			EMA:EMASendMessageToTeam( EMA.db.requestArea, L["RELEASE_CORPSE_FOR_X"]( delay ), false )
-			StaticPopup_Show("RECOVER_TEAM")
-		else
-			RetrieveCorpse()
-			StaticPopup_Hide("RECOVER_TEAM")
-		end
-	end
-end
-
-function EMA:doTeamDeath()
-	if UnitIsDead("player") and not UnitIsGhost("player") then
-		RepopMe()
-		StaticPopup_Hide("TEAMDEATH")
-	end
-end
-
---CleanUP
-function EMA:doSoulStone()
-	if UnitIsDead("player") and not UnitIsGhost("player") then
-		-- Dead code do not use!
-		--[[
-		if HasSoulstone() then
-			UseSoulstone()
-			StaticPopup_Hide("TEAMDEATH")
-		else
-			EMA:EMASendMessageToTeam( EMA.db.warningArea, L["I Do not have a SoulStone"], false )
-		end
-		]]
-	end
-end
-
-function EMA:RESURRECT_REQUEST( event, name, ... )
-	--EMA:Print("test Res From", name)
-	local canResurrect = false
-	if EMA.db.autoAcceptResurrectRequest == true then
-		--EMA:Print("test Res From", name)
-		canResurrect = true
-	end
-	if EMA.db.autoAcceptResurrectRequestOnlyFromTeam == true then
-		for index, characterName in EMAApi.TeamListOrderedOnline() do
-			unit = Ambiguate( characterName, "none" )
-			--EMA:Print("test", name, "vs", unit )
-			if unit == name then
-				canResurrect = true
-				break
-			else
-				canResurrect = false
-			end
-		end
-	end
-	if canResurrect == true then
-		AcceptResurrect()
-		StaticPopup_Hide( "RESURRECT")
-		StaticPopup_Hide( "RESURRECT_NO_SICKNESS" )
-		StaticPopup_Hide( "RESURRECT_NO_TIMER" )
-		StaticPopup_Hide( "SKINNED" )
-		StaticPopup_Hide( "SKINNED_REPOP" )
-		StaticPopup_Hide( "DEATH" )
-		StaticPopup_Hide( "RECOVER_TEAM" )
-		StaticPopup_Hide( "TEAMDEATH" )
-	end
-end
-
---LFG stuff
-
-function EMA:READY_CHECK( event, name, ... )
-	-- Auto do Ready Check if team member is the one that does the readycheck
-	if EMA.db.acceptReadyCheck == true then
-		--EMA:Print("readyCheck", name )
-		for index, characterName in EMAApi.TeamListOrderedOnline() do
-			if name == Ambiguate( characterName, "none") then
-				EMA.isInternalCommand = ture
-				--EMA:Print("found in team", characterName)
-				if ReadyCheckFrame:IsShown() == true then
-					--EMA:Print("Ok?")
-					ConfirmReadyCheck(1)
-					ReadyCheckFrame:Hide()
-				end
-				EMA.isInternalCommand = false
-			end
-		end
-	end
-end
-
-function EMA:ConfirmReadyCheck( ready )
-	--EMA:Print("Test", ready )
-	if EMA.db.acceptReadyCheck == true then
-		if EMA.isInternalCommand == false then
-			EMA:EMASendCommandToTeam( EMA.COMMAND_READY_CHECK, ready)
-		end
-	end
-end
-
-function EMA:AmReadyCheck( ready )
-	--EMA:Print("AmReady!", ready )
-	EMA.isInternalCommand = true
-		if ready == 1 then
-			ConfirmReadyCheck(1)
-			ReadyCheckFrame:Hide()
-		else
-			ConfirmReadyCheck()
-			ReadyCheckFrame:Hide()
-		end
-	EMA.isInternalCommand = false
-end
-
-function EMA:LFGTeleport( event, arg1, ... )
-	--EMA:Print("LFGtest")
-	if EMA.db.teleportLFGWithTeam == true then
-		if IsShiftKeyDown() == false then
-			if EMA.isInternalCommand == false then
-				if IsInLFGDungeon() == true then
-					EMA:EMASendCommandToTeam( EMA.COMMAND_TELE_PORT, true )
-				else
-					EMA:EMASendCommandToTeam( EMA.COMMAND_TELE_PORT, false )
-				end
-			end
-		end
-	end
-end
-
-function EMA:DoLFGTeleport(port)
-	--EMA:Print("TeleCommand", port)
-	EMA.isInternalCommand = true
-	if IsShiftKeyDown() == false then
-		if port == true then
-			LFGTeleport(1)
-		else
-			LFGTeleport()
-		end
-	end
-	EMA.isInternalCommand = false
-end
-
-function EMA:LFG_ROLE_CHECK_SHOW( event, ... )
-	if EMA.db.autoAcceptRoleCheck == true then
-		--EMA:Print("testPopup?")
-		CompleteLFGRoleCheck("ture")
-	end
-end
-
-function EMA:RollOnLoot(id, rollType, ...)
-	--EMA:Print("lootTest", id, rollType)
-	local texture, name, count, quality, bindOnPickUp = GetLootRollItemInfo( id )
-	--EMA:Print("lootItemTest", name)
-	if EMA.db.rollWithTeam == true then
-		if IsShiftKeyDown() == false then
-			if EMA.isInternalCommand == false then
-				EMA:EMASendCommandToTeam( EMA.COMMAND_LOOT_ROLL, id, rollType, name)
-			end
-		end
-	end
-end
-
-function EMA:DoLootRoll( id, rollType, name )
-	--EMA:Print("i have a command to roll on item", name)
-	EMA.isInternalCommand = true
-	if name ~= nil then
-		RollOnLoot(id, rollType)
-	end
-	EMA.isInternalCommand = false
-end
-
-function EMA:CONFIRM_SUMMON( event, sender, location, ... )
-	local sender, location = GetSummonConfirmSummoner(), GetSummonConfirmAreaName()
-	if EMA.db.autoAcceptSummonRequest == true then
-		if GetSummonConfirmTimeLeft() > 0 then
-		ConfirmSummon()
-		StaticPopup_Hide("CONFIRM_SUMMON")
-		EMA:EMASendMessageToTeam( EMA.db.requestArea, L["SUMMON_FROM_X_TO_Y"]( sender, location ), false )
-		end
-	end
-end
-
-function EMA:MERCHANT_SHOW( event, ... )
-	-- Does the user want to auto repair?
-	if EMA.db.autoRepair == false then
-		return
-	end
-	-- Can this merchant repair?
-	if not CanMerchantRepair() then
-		return
-	end
-	-- How much to repair?
-	local repairCost, canRepair = GetRepairAllCost()
-	if canRepair == nil then
-		return
-	end
-	-- At least some cost...
-	if repairCost > 0 then
-		-- If allowed to use guild funds, then attempt to repair using guild funds.
-		if EMA.db.autoRepairUseGuildFunds == true then
-			if IsInGuild() and CanGuildBankRepair() then
-				RepairAllItems( 1 )
-			end
-		end
-		-- After guild funds used, still need to repair?
-		repairCost = GetRepairAllCost()
-		-- At least some cost...
-		if repairCost > 0 then
-			-- How much money available?
-			local moneyAvailable = GetMoney()
-			-- More or equal money than cost?
-			if moneyAvailable >= repairCost then
-				-- Yes, repair.
-				RepairAllItems()
-			else
-				-- Nope, tell the boss.
-				 EMA:EMASendMessageToTeam( EMA.db.merchantArea, L["ERR_GOLD_TO_REPAIR"], false )
-			end
-		end
-	end
-	if repairCost > 0 then
-		-- Tell the boss how much that cost.
-		local costString = EMAUtilities:FormatMoneyString( repairCost )
-		EMA:EMASendMessageToTeam( EMA.db.merchantArea, L["REPAIRING_COST_ME_X"]( costString ), false )
-	end
-end
-
-function EMA:UNIT_POWER_FREQUENT( event, unitAffected, power, ... )
-	if EMA.db.warnWhenManaDropsBelowX == false then
-		return
-	end
-	if unitAffected ~= "player" then
-		return
-	end
-	if power ~= "MANA" then
-		return
-	end
-	local currentMana = (UnitPower( "player", 0 ) / UnitPowerMax( "player", 0 ) * 100)
-	if EMA.toldMasterAboutMana == true then
-		if currentMana >= tonumber( EMA.db.warnWhenManaDropsAmount ) then
-			EMA.toldMasterAboutMana = false
-		end
-	else
-		if currentMana < tonumber( EMA.db.warnWhenManaDropsAmount ) then
-			EMA.toldMasterAboutMana = true
-			EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnManaDropsMessage, false )
-		end
-	end
-end
-
-function EMA:UNIT_HEALTH( event, unitAffected, ... )
-	if EMA.db.warnWhenHealthDropsBelowX == false then
-		return
-	end
-	if unitAffected ~= "player" then
-		return
-	end
-	local currentHealth = (UnitHealth( "player" ) / UnitHealthMax( "player" ) * 100)
-	if EMA.toldMasterAboutHealth == true then
-		if currentHealth >= tonumber( EMA.db.warnWhenHealthDropsAmount ) then
-			EMA.toldMasterAboutHealth = false
-		end
-	else
-		if currentHealth < tonumber( EMA.db.warnWhenHealthDropsAmount ) then
-			EMA.toldMasterAboutHealth = true
-			EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnHealthDropsMessage, false )
-		end
-	end
-end
-
-function EMA:UPDATE_INVENTORY_DURABILITY(event, agr1)
-	if EMA.db.warnWhenDurabilityDropsBelowX == false then
-		return
-	end
-	--EMA:Print("Test Durability Fired")
-	local curTotal, maxTotal, broken = 0, 0, 0
-	for i = 1, 18 do
-		local curItemDurability, maxItemDurability = GetInventoryItemDurability(i)
-		if curItemDurability and maxItemDurability then
-			curTotal = curTotal + curItemDurability
-			maxTotal = maxTotal + maxItemDurability
-			if maxItemDurability > 0 and curItemDurability == 0 then
-				broken = broken + 1
-			end
-		end
-	end
-	local durability = (curTotal / maxTotal) * 100
-	local durabilityText = tostring(gsub( durability, "%.[^|]+", "") )
-	--EMA:Print("Test Durability", durabilityText,"%")
-	if EMA.toldMasterAboutDurability == true then
-		if durability >= tonumber( EMA.db.warnWhenDurabilityDropsAmount ) then
-			EMA.toldMasterAboutDurability = false
-		end
-	else
-		if durability < tonumber( EMA.db.warnWhenDurabilityDropsAmount ) then
-			EMA.toldMasterAboutDurability = true
-			EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnDurabilityDropsMessage..L[" "]..durabilityText..L["%"], false )
-		end
-	end
-end
-
-function EMA:PLAYER_REGEN_ENABLED( event, ... )
-	EMA.haveBeenHit = false
-end
-
-function EMA:PLAYER_REGEN_DISABLED( event, ... )
-	EMA.haveBeenHit = false
-	if EMA.db.warnTargetNotMasterEnterCombat == true then
-		if EMAApi.IsCharacterTheMaster( EMA.characterName ) == false then
-			local name, realm = UnitName( "target" )
-			local character = EMAUtilities:AddRealmToNameIfNotNil( name, realm )
-			if character ~= EMAApi.GetMasterName() then
-				EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnTargetNotMasterMessage, false )
-			end
-		end
-	end
-	if EMA.db.warnFocusNotMasterEnterCombat == true then
-		if EMAApi.IsCharacterTheMaster( EMA.characterName ) == false then
-			local name, realm = UnitName( "focus" )
-			local character = EMAUtilities:AddRealmToNameIfNotNil( name, realm )
-			if character ~= EMAApi.GetMasterName() then
-				EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.warnFocusNotMasterMessage, false )
-			end
-		end
-	end
-end
-
-function EMA:BAGS_FULL( event, arg1, message, ... )
-   if EMA.db.warnBagsFull == true then
-		if UnitIsGhost( "player" ) then
-			return
-		end
-		if UnitIsDead( "player" ) then
-			return
-		end
-		local numberFreeSlots, numberTotalSlots = LibBagUtils:CountSlots( "BAGS", 0 )
-		if  message == ERR_INV_FULL or message == INVENTORY_FULL then
-			if numberFreeSlots == 0 then
-				if EMA.previousFreeBagSlotsCount == false then
-					EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.bagsFullMessage, false )
-					EMA.previousFreeBagSlotsCount = true
-					EMA:ScheduleTimer("ResetBagFull", 60, nil )
-				end
-			end
-		end
-	end
-end
-
-function EMA:BAG_UPDATE_DELAYED(event, ... )
-	if EMA.db.warnBagsFull == true then
-		local numberFreeSlots, numberTotalSlots = LibBagUtils:CountSlots( "BAGS", 0 )
-		if numberFreeSlots > 0 then
-			 EMA.previousFreeBagSlotsCount = false
-			 EMA:CancelAllTimers()
-		end
-	end
-end
-
-function EMA:ResetBagFull()
-	EMA.previousFreeBagSlotsCount = false
-	EMA:CancelAllTimers()
-end
-
---Ebony CCed
-function EMA:LOSS_OF_CONTROL_ADDED( event, ... )
-	if EMA.db.warnCC == true then
-		local eventIndex = C_LossOfControl.GetNumEvents()
-		if eventIndex > 0 then
-			local locType, spellID, text, iconTexture, startTime, timeRemaining, duration, lockoutSchool, priority, displayType = C_LossOfControl.GetEventInfo(eventIndex)
-			if EMAApi.IsCharacterTheMaster( EMA.characterName ) == false then
-				EMA:EMASendMessageToTeam( EMA.db.warningArea, EMA.db.CcMessage..L[" "]..text, false )
-			end
-		end
-	end
-end
-
--- A EMA command has been received.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	--EMA:Print("Test", characterName, commandName)
-	if commandName == EMA.COMMAND_RECOVER_TEAM then
-		EMA:doRecoverTeam()
-	end
-	if commandName == EMA.COMMAND_TEAM_DEATH then
-		EMA:doTeamDeath()
-	end
-	-- More then likey to get removed
-	if commandName == EMA.COMMAND_SOUL_STONE then
-		--EMA:doSoulStone()
-	end
-	if commandName == EMA.COMMAND_READY_CHECK then
-		if characterName ~= self.characterName then
-			EMA.AmReadyCheck( characterName, ... )
-		end
-	end
-	if commandName == EMA.COMMAND_TELE_PORT then
-		if characterName ~= self.characterName then
-			EMA.DoLFGTeleport( characterName, ... )
-		end
-	end
-	if commandName == EMA.COMMAND_LOOT_ROLL then
-		if characterName ~= self.characterName then
-			EMA.DoLootRoll( characterName, ... )
-		end
-	end
-end
diff --git a/Modules/Trade.lua b/Modules/Trade.lua
deleted file mode 100644
index 3523c54..0000000
--- a/Modules/Trade.lua
+++ /dev/null
@@ -1,681 +0,0 @@
--- ================================================================================ --
---				EMA - ( Ebony's MultiBoxing Assistant )    							--
---				Current Author: Jennifer Cally (Ebony)								--
---																					--
---				License: MIT License 2018 Jennifer Cally							--
---																					--
---				Some Code Used from "Jamba" that is 								--
---				Released under the MIT License 										--
---				"Jamba" Copyright 2008-2015  Michael "Jafula" Miller				--
---																					--
--- ================================================================================ --
--- Create the addon using AceAddon-3.0 and embed some libraries.
-
-local EMA = LibStub( "AceAddon-3.0" ):NewAddon(
-	"Trade",
-	"Module-1.0",
-	"AceConsole-3.0",
-	"AceEvent-3.0",
-	"AceHook-3.0",
-	"AceTimer-3.0"
-)
-
--- Get the EMA Utilities Library.
-local EMAUtilities = LibStub:GetLibrary( "EbonyUtilities-1.0" )
-local EMAHelperSettings = LibStub:GetLibrary( "EMAHelperSettings-1.0" )
-local LibBagUtils = LibStub:GetLibrary( "LibBagUtils-1.0" )
-local AceGUI = LibStub( "AceGUI-3.0" )
-
---  Constants and Locale for this module.
-EMA.moduleName = "Trade"
-EMA.settingsDatabaseName = "TradeProfileDB"
-EMA.chatCommand = "ema-trade"
-
-local L = LibStub( "AceLocale-3.0" ):GetLocale( "Core" )
-EMA.parentDisplayName = L["INTERACTION"]
-EMA.moduleDisplayName = L["TRADE"]
--- Icon
-EMA.moduleIcon = "Interface\\Addons\\EMA\\Media\\TradeIcon.tga"
--- order
-EMA.moduleOrder = 10
-
--- Settings - the values to store and their defaults for the settings database.
-EMA.settings = {
-	profile = {
-		messageArea = EMAApi.DefaultMessageArea(),
-		showEMATradeWindow = false,
-		tradeBoEItems = false,
-		tradeCRItems = false,
-		autoTradeItemsList = {},
-		adjustMoneyWithMasterOnTrade = false,
-		goldAmountToKeepOnToonTrade = 200,
-	},
-}
-
--- Configuration.
-function EMA:GetConfiguration()
-	local configuration = {
-		name = EMA.moduleDisplayName,
-		handler = EMA,
-		type = 'group',
-		childGroups  = "tab",
-		get = "EMAConfigurationGetSetting",
-		set = "EMAConfigurationSetSetting",
-		args = {
-			push = {
-				type = "input",
-				name = L["PUSH_SETTINGS"],
-				desc = L["PUSH_ALL_SETTINGS"],
-				usage = "/EMA-trade push",
-				get = false,
-				set = "EMASendSettings",
-				guiHidden = true,
-			},
-		},
-	}
-	return configuration
-end
-
--------------------------------------------------------------------------------------------------------------
--- Command this module sends.
--------------------------------------------------------------------------------------------------------------
-
-
--------------------------------------------------------------------------------------------------------------
--- Messages module sends.
--------------------------------------------------------------------------------------------------------------
-
-
--------------------------------------------------------------------------------------------------------------
--- Popup Dialogs.
--------------------------------------------------------------------------------------------------------------
-
-local function InitializePopupDialogs()
-	StaticPopupDialogs["EMATRADE_CONFIRM_REMOVE_TRADE_ITEMS"] = {
-        text = L["REMOVE_TRADE_LIST"],
-        button1 = YES,
-        button2 = NO,
-        timeout = 0,
-		whileDead = 1,
-		hideOnEscape = 1,
-        OnAccept = function()
-			EMA:RemoveItem()
-		end,
-    }
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- Addon initialization, enabling and disabling.
--------------------------------------------------------------------------------------------------------------
-
--- Initialise the module.
-function EMA:OnInitialize()
-	-- Initialise the popup dialogs.
-	InitializePopupDialogs()
-	EMA.autoTradeItemLink = nil
-	EMA.autoTradeItemTag = EMAApi.AllTag()
-	-- Create the settings control.
-	EMA:SettingsCreate()
-	-- Initialse the EMAModule part of this module.
-	EMA:EMAModuleInitialize( EMA.settingsControl.widgetSettings.frame )
-	-- Populate the settings.
-	EMA:SettingsRefresh()
-end
-
--- Called when the addon is enabled.
-function EMA:OnEnable()
-	EMA:RegisterEvent( "TRADE_SHOW" )
-	EMA:RegisterEvent( "TRADE_CLOSED" ) -- Unsued but we keep it for now!
-	EMA:RegisterMessage( EMAApi.MESSAGE_MESSAGE_AREAS_CHANGED, "OnMessageAreasChanged" )
-	EMA:RegisterMessage( EMAApi.GROUP_LIST_CHANGED , "OnGroupAreasChanged" )
-end
-
--- Called when the addon is disabled.
-function EMA:OnDisable()
-	-- AceHook-3.0 will tidy up the hooks for us.
-end
-
-function EMA:SettingsCreate()
-	EMA.settingsControl = {}
-	-- Create the settings panel.
-	EMAHelperSettings:CreateSettings(
-		EMA.settingsControl,
-		EMA.moduleDisplayName,
-		EMA.parentDisplayName,
-		EMA.SettingsPushSettingsClick,
-		EMA.moduleIcon,
-		EMA.moduleOrder
-	)
-	local bottomOfInfo = EMA:SettingsCreateTrade( EMAHelperSettings:TopOfSettings() )
-	EMA.settingsControl.widgetSettings.content:SetHeight( -bottomOfInfo )
-	-- Help
-	local helpTable = {}
-	EMAHelperSettings:CreateHelp( EMA.settingsControl, helpTable, EMA:GetConfiguration() )
-end
-
-function EMA:SettingsPushSettingsClick( event )
-	EMA:EMASendSettings()
-end
-
-function EMA:SettingsCreateTrade( top )
-	local buttonControlWidth = 85
-	local checkBoxHeight = EMAHelperSettings:GetCheckBoxHeight()
-	local editBoxHeight = EMAHelperSettings:GetEditBoxHeight()
-	local buttonHeight = EMAHelperSettings:GetButtonHeight()
-	local dropdownHeight = EMAHelperSettings:GetDropdownHeight()
-	local left = EMAHelperSettings:LeftOfSettings()
-	local headingHeight = EMAHelperSettings:HeadingHeight()
-	local headingWidth = EMAHelperSettings:HeadingWidth( false )
-	local horizontalSpacing = EMAHelperSettings:GetHorizontalSpacing()
-	local verticalSpacing = EMAHelperSettings:GetVerticalSpacing()
-	local tradeWidth = headingWidth
-	local dropBoxWidth = (headingWidth - horizontalSpacing) / 4
-	local movingTop = top
-	-- A blank to get layout to show right?
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L[""], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["TRADE_LIST_HEADER"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxShowEMATradeWindow = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TRADE_LIST"],
-		EMA.SettingsToggleShowEMATradeWindow,
-		L["TRADE_LIST_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.tradeItemsHighlightRow = 1
-	EMA.settingsControl.tradeItemsOffset = 1
-	local list = {}
-	list.listFrameName = "EMATradeIteamsSettingsFrame"
-	list.parentFrame = EMA.settingsControl.widgetSettings.content
-	list.listTop = movingTop
-	list.listLeft = left
-	list.listWidth = tradeWidth
-	list.rowHeight = 15
-	list.rowsToDisplay = 10
-	list.columnsToDisplay = 2
-	list.columnInformation = {}
-	list.columnInformation[1] = {}
-	list.columnInformation[1].width = 70
-	list.columnInformation[1].alignment = "LEFT"
-	list.columnInformation[2] = {}
-	list.columnInformation[2].width = 30
-	list.columnInformation[2].alignment = "LEFT"
-	list.scrollRefreshCallback = EMA.SettingsScrollRefresh
-	list.rowClickCallback = EMA.SettingsTradeItemsRowClick
-	EMA.settingsControl.tradeItems = list
-	EMAHelperSettings:CreateScrollList( EMA.settingsControl.tradeItems )
-	movingTop = movingTop - list.listHeight - verticalSpacing
-	EMA.settingsControl.tradeItemsButtonRemove = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		buttonControlWidth,
-		left,
-		movingTop,
-		L["REMOVE"],
-		EMA.SettingsTradeItemsRemoveClick
-	)
-	movingTop = movingTop -	buttonHeight - verticalSpacing
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["ADD_ITEMS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.tradeItemsEditBoxTradeItem = EMAHelperSettings:CreateEditBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["ITEM_DROP"]
-	)
-
-	EMA.settingsControl.tradeItemsEditBoxTradeItem:SetCallback( "OnEnterPressed", EMA.SettingsEditBoxChangedTradeItem )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.tradeItemsEditBoxToonTag = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		dropBoxWidth,
-		left,
-		movingTop,
-		L["GROUP_LIST"]
-	)
-	EMA.settingsControl.tradeItemsEditBoxToonTag:SetList( EMAApi.GroupList() )
-	EMA.settingsControl.tradeItemsEditBoxToonTag:SetCallback( "OnValueChanged",  EMA.TradeGroupListDropDownList )
-
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.tradeItemsButtonAdd = EMAHelperSettings:CreateButton(
-		EMA.settingsControl,
-		buttonControlWidth,
-		left,
-		movingTop,
-		L["ADD"],
-		EMA.SettingsTradeItemsAddClick
-	)
-	movingTop = movingTop -	buttonHeight
-	EMAHelperSettings:CreateHeading( EMA.settingsControl, L["TRADE_OPTIONS"], movingTop, false )
-	movingTop = movingTop - headingHeight
-	EMA.settingsControl.checkBoxTradeBoEItems = EMAHelperSettings:CreateCheckBox(
-	EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TRADE_BOE_ITEMS"],
-		EMA.SettingsToggleTradeBoEItems,
-		L["TRADE_BOE_ITEMS_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxTradeCRItems = EMAHelperSettings:CreateCheckBox(
-	EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TRADE_REAGENTS"],
-		EMA.SettingsToggleTradeCRItems,
-		L["TRADE_REAGENTS_HELP"]
-	)
-	-- Trade Gold! Keep
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.checkBoxAdjustMoneyWithMasterOnTrade = EMAHelperSettings:CreateCheckBox(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["TRADE_GOLD"],
-		EMA.SettingsToggleAdjustMoneyWithMasterOnTrade,
-		L["TRADE_GOLD_HELP"]
-	)
-	movingTop = movingTop - checkBoxHeight
-	EMA.settingsControl.editBoxGoldAmountToLeaveOnToonTrade = EMAHelperSettings:CreateEditBox( EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["GOLD_TO_KEEP"]
-	)
-	EMA.settingsControl.editBoxGoldAmountToLeaveOnToonTrade:SetCallback( "OnEnterPressed", EMA.EditBoxChangedGoldAmountToLeaveOnToonTrade )
-	movingTop = movingTop - editBoxHeight
-	EMA.settingsControl.dropdownMessageArea = EMAHelperSettings:CreateDropdown(
-		EMA.settingsControl,
-		headingWidth,
-		left,
-		movingTop,
-		L["MESSAGE_AREA"]
-	)
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-	EMA.settingsControl.dropdownMessageArea:SetCallback( "OnValueChanged", EMA.SettingsSetMessageArea )
-	movingTop = movingTop - dropdownHeight - verticalSpacing
-	return movingTop
-end
-
-
--------------------------------------------------------------------------------------------------------------
--- Settings Callbacks.
--------------------------------------------------------------------------------------------------------------
-
-
-function EMA:SettingsScrollRefresh()
-	FauxScrollFrame_Update(
-		EMA.settingsControl.tradeItems.listScrollFrame,
-		EMA:GetTradeItemsMaxPosition(),
-		EMA.settingsControl.tradeItems.rowsToDisplay,
-		EMA.settingsControl.tradeItems.rowHeight
-	)
-	EMA.settingsControl.tradeItemsOffset = FauxScrollFrame_GetOffset( EMA.settingsControl.tradeItems.listScrollFrame )
-	for iterateDisplayRows = 1, EMA.settingsControl.tradeItems.rowsToDisplay do
-		-- Reset.
-		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[1].textString:SetText( "" )
-		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[1].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[2].textString:SetText( "" )
-		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[2].textString:SetTextColor( 1.0, 1.0, 1.0, 1.0 )
-		EMA.settingsControl.tradeItems.rows[iterateDisplayRows].highlight:SetColorTexture( 0.0, 0.0, 0.0, 0.0 )
-		-- Get data.
-		local dataRowNumber = iterateDisplayRows + EMA.settingsControl.tradeItemsOffset
-		if dataRowNumber <= EMA:GetTradeItemsMaxPosition() then
-			-- Put data information into columns.
-			local tradeItemsInformation = EMA:GetTradeItemsAtPosition( dataRowNumber )
-			EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[1].textString:SetText( tradeItemsInformation.name )
-			EMA.settingsControl.tradeItems.rows[iterateDisplayRows].columns[2].textString:SetText( tradeItemsInformation.tag )
-			-- Highlight the selected row.
-			if dataRowNumber == EMA.settingsControl.tradeItemsHighlightRow then
-				EMA.settingsControl.tradeItems.rows[iterateDisplayRows].highlight:SetColorTexture( 1.0, 1.0, 0.0, 0.5 )
-			end
-		end
-	end
-end
-
-function EMA:SettingsTradeItemsRowClick( rowNumber, columnNumber )
-	if EMA.settingsControl.tradeItemsOffset + rowNumber <= EMA:GetTradeItemsMaxPosition() then
-		EMA.settingsControl.tradeItemsHighlightRow = EMA.settingsControl.tradeItemsOffset + rowNumber
-		EMA:SettingsScrollRefresh()
-	end
-end
-
-function EMA:SettingsTradeItemsRemoveClick( event )
-	StaticPopup_Show( "EMATRADE_CONFIRM_REMOVE_TRADE_ITEMS" )
-end
-
-function EMA:SettingsEditBoxChangedTradeItem( event, text )
-	EMA.autoTradeItemLink = text
-	EMA:SettingsRefresh()
-end
-
-function EMA:TradeGroupListDropDownList (event, value )
-	-- if nil or the blank group then don't get Name.
-	if value == " " or value == nil then
-		return
-	end
-	for index, groupName in ipairs( EMAApi.GroupList() ) do
-		if index == value then
-			EMA.autoTradeItemTag = groupName
-			break
-		end
-	end
-	EMA:SettingsRefresh()
-end
-
-
-function EMA:SettingsTradeItemsAddClick( event )
-	if EMA.autoTradeItemLink ~= nil and EMA.autoTradeItemTag ~= nil then
-		EMA:AddItem( EMA.autoTradeItemLink, EMA.autoTradeItemTag )
-		EMA.autoTradeItemLink = nil
-		EMA.settingsControl.tradeItemsEditBoxTradeItem:SetText( "" )
-		EMA:SettingsRefresh()
-	end
-end
-
-function EMA:OnMessageAreasChanged( message )
-	EMA.settingsControl.dropdownMessageArea:SetList( EMAApi.MessageAreaList() )
-end
-
-function EMA:OnGroupAreasChanged( message )
-	EMA.settingsControl.tradeItemsEditBoxToonTag:SetList( EMAApi.GroupList() )
-end
-
-function EMA:SettingsSetMessageArea( event, value )
-	EMA.db.messageArea = value
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleShowEMATradeWindow( event, checked )
-	EMA.db.showEMATradeWindow = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleTradeBoEItems(event, checked )
-	EMA.db.tradeBoEItems = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleTradeCRItems(event, checked )
-	EMA.db.tradeCRItems = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAdjustMoneyOnToonViaGuildBank( event, checked )
-	EMA.db.adjustMoneyWithGuildBank = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsToggleAdjustMoneyWithMasterOnTrade( event, checked )
-	EMA.db.adjustMoneyWithMasterOnTrade = checked
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedGoldAmountToLeaveOnToon( event, text )
-	EMA.db.goldAmountToKeepOnToon = tonumber( text )
-	if EMA.db.goldAmountToKeepOnToon == nil then
-		EMA.db.goldAmountToKeepOnToon = 0
-	end
-	EMA:SettingsRefresh()
-end
-
-function EMA:EditBoxChangedGoldAmountToLeaveOnToonTrade( event, text )
-	EMA.db.goldAmountToKeepOnToonTrade = tonumber( text )
-	if EMA.db.goldAmountToKeepOnToonTrade == nil then
-		EMA.db.goldAmountToKeepOnToonTrade = 0
-	end
-	EMA:SettingsRefresh()
-end
-
--- Settings received.
-function EMA:EMAOnSettingsReceived( characterName, settings )
-	if characterName ~= EMA.characterName then
-		-- Update the settings.
-		EMA.db.messageArea = settings.messageArea
-		EMA.db.showEMATradeWindow = settings.showEMATradeWindow
-		EMA.db.tradeBoEItems = settings.tradeBoEItems
-		EMA.db.tradeCRItems = settings.tradeCRItems
-		EMA.db.autoTradeItemsList = EMAUtilities:CopyTable( settings.autoTradeItemsList )
-		EMA.db.adjustMoneyWithGuildBank = settings.adjustMoneyWithGuildBank
-		EMA.db.goldAmountToKeepOnToon = settings.goldAmountToKeepOnToon
-		EMA.db.adjustMoneyWithMasterOnTrade = settings.adjustMoneyWithMasterOnTrade
-		EMA.db.goldAmountToKeepOnToonTrade = settings.goldAmountToKeepOnToonTrade
-		-- Refresh the settings.
-		EMA:SettingsRefresh()
-		-- Tell the player.
-		EMA:Print( L["SETTINGS_RECEIVED_FROM_A"]( characterName ) )
-	end
-end
-
-function EMA:BeforeEMAProfileChanged()
-end
-
-function EMA:OnEMAProfileChanged()
-	EMA:SettingsRefresh()
-end
-
-function EMA:SettingsRefresh()
-	EMA.settingsControl.checkBoxShowEMATradeWindow:SetValue( EMA.db.showEMATradeWindow )
-	EMA.settingsControl.checkBoxTradeBoEItems:SetValue( EMA.db.tradeBoEItems)
-	EMA.settingsControl.checkBoxTradeCRItems:SetValue( EMA.db.tradeCRItems)
-	EMA.settingsControl.dropdownMessageArea:SetValue( EMA.db.messageArea )
-	EMA.settingsControl.checkBoxAdjustMoneyWithMasterOnTrade:SetValue( EMA.db.adjustMoneyWithMasterOnTrade )
-	EMA.settingsControl.editBoxGoldAmountToLeaveOnToonTrade:SetText( tostring( EMA.db.goldAmountToKeepOnToonTrade ) )
-	EMA.settingsControl.editBoxGoldAmountToLeaveOnToonTrade:SetDisabled( not EMA.db.adjustMoneyWithMasterOnTrade )
-	EMA.settingsControl.tradeItemsEditBoxTradeItem:SetDisabled( not EMA.db.showEMATradeWindow )
-	EMA.settingsControl.tradeItemsEditBoxToonTag:SetDisabled( not EMA.db.showEMATradeWindow )
-	EMA.settingsControl.tradeItemsButtonRemove:SetDisabled( not EMA.db.showEMATradeWindow )
-	EMA.settingsControl.tradeItemsButtonAdd:SetDisabled( not EMA.db.showEMATradeWindow )
-	EMA:SettingsScrollRefresh()
-
-end
-
---Comms not sure if we going to use comms here.
--- A EMA command has been received.
-function EMA:EMAOnCommandReceived( characterName, commandName, ... )
-	if characterName == self.characterName then
-		return
-	end
-end
-
--------------------------------------------------------------------------------------------------------------
--- Trade functionality.
--------------------------------------------------------------------------------------------------------------
-
--- New Trade stuff
-
-
-function EMA:GetTradeItemsMaxPosition()
-	return #EMA.db.autoTradeItemsList
-end
-
-function EMA:GetTradeItemsAtPosition( position )
-	return EMA.db.autoTradeItemsList[position]
-end
-
-function EMA:AddItem( itemLink, itemTag )
-	-- Get some more information about the item.
-	local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo( itemLink )
-	-- If the item could be found.
-	if name ~= nil then
-		local itemInformation = {}
-		itemInformation.link = link
-		itemInformation.name = name
-		itemInformation.tag = itemTag
-		table.insert( EMA.db.autoTradeItemsList, itemInformation )
-		EMA:SettingsRefresh()
-		EMA:SettingsTradeItemsRowClick( 1, 1 )
-	end
-end
-
-function EMA:RemoveItem()
-	table.remove( EMA.db.autoTradeItemsList, EMA.settingsControl.tradeItemsHighlightRow )
-	EMA:SettingsRefresh()
-	EMA:SettingsTradeItemsRowClick( 1, 1 )
-end
-
-
-function EMA:TRADE_SHOW( event, ... )
-	--Keep for tradeing gold!
-	if EMA.db.adjustMoneyWithMasterOnTrade == true then
-		EMA:ScheduleTimer( "TradeShowAdjustMoneyWithMaster", 0.3 )
-	end
-	-- do trade list with Gold!
-	if EMA.db.showEMATradeWindow == true then
-		EMA:ScheduleTimer("TradeItemsFromList", 0.5 )
-	end
-	if EMA.db.tradeBoEItems == true then
-		EMA:ScheduleTimer("TradeBoEItems", 1.0 )
-	end
-	if EMA.db.tradeCRItems == true then
-		EMA:ScheduleTimer("TradeCRItems", 1.5 )
-	end
-end
-
-
-function EMA:TradeShowAdjustMoneyWithMaster()
-	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-		return
-	end
-	local moneyToKeepOnToon = tonumber( EMA.db.goldAmountToKeepOnToonTrade ) * 10000
-	local moneyOnToon = GetMoney()
-	local moneyToDepositOrWithdraw = moneyOnToon - moneyToKeepOnToon
-	if moneyToDepositOrWithdraw == 0 then
-		return
-	end
-	if moneyToDepositOrWithdraw > 0 then
-		for index, character in EMAApi.TeamListOrderedOnline() do
-			--EMA:Print("Team", character )
-			local teamCharacterName = ( Ambiguate( character, "short" ) )
-			local tradePlayersName = GetUnitName("NPC")
-			if tradePlayersName == teamCharacterName then
-					--EMA:Print("found", tradePlayersName, teamCharacterName, character )
-					if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
-						MoneyInputFrame_SetCopper(TradePlayerInputMoneyFrame, moneyToDepositOrWithdraw)
-						break
-					end
-			else
-				--EMA:Print(tradePlayersName, L["Is Not a Member of the team, Will not trade Gold."])
-			end
-		end
-
-	end
-end
-
-
-function EMA:TradeItemsFromList()
-	for index, character in EMAApi.TeamListOrderedOnline() do
-		--EMA:Print("Team", character )
-		local teamCharacterName = ( Ambiguate( character, "short" ) )
-		local tradePlayersName = GetUnitName("NPC")
-		if tradePlayersName == teamCharacterName then
-			--EMA:Print("found", tradePlayersName, teamCharacterName, character )
-			--Checks the D_B for any items in the list.
-			for position, itemInformation in pairs( EMA.db.autoTradeItemsList ) do
-				if EMAApi.IsCharacterInGroup(EMA.characterName, itemInformation.tag ) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
-				--EMA:Print("Items in list", itemInformation.link )
-					for bag,slot,link in LibBagUtils:Iterate("BAGS", itemInformation.link ) do
-						if bag ~= nil then
-							--EMA:Print("found", bag, slot)
-							for iterateTradeSlots = 1, (MAX_TRADE_ITEMS - 1) do
-								if GetTradePlayerItemLink( iterateTradeSlots ) == nil then
-									PickupContainerItem( bag, slot )
-									ClickTradeButton( iterateTradeSlots )
-								end
-							end
-						end
-					end
-				end
-			end
-		else
-			--EMA:Print(tradePlayersName, L["ERR_WILL_NOT_TRADE"])
-		end
-	end
-end
-
-function EMA:TradeBoEItems()
-	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-		return
-	end
-	for index, character in EMAApi.TeamListOrderedOnline() do
-		--EMA:Print("Team", character )
-		local teamCharacterName = ( Ambiguate( character, "short" ) )
-		local tradePlayersName = GetUnitName("NPC")
-		if tradePlayersName == teamCharacterName then
-			if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
-				for bag,slot,link in LibBagUtils:Iterate("BAGS") do
-					if bag ~= nil then
-						local _, _, locked, quality = GetContainerItemInfo(bag, slot)
-						-- quality is Uncommon (green) to  Epic (purple) 2 - 3 - 4
-						if quality ~= nil and locked == false then
-							if quality >= 2 and quality <= 4 then
-								-- tooltips scan is the olny way to find if the item is BoE in bags!
-								local isBoe = EMAUtilities:ToolTipBagScaner(link, bag, slot)
-								-- if the item is boe then add it to the trade list!
-								if isBoe ~= ITEM_SOULBOUND then
-									--EMA:Print("test21", link, locked)
-									for iterateTradeSlots = 1, (MAX_TRADE_ITEMS - 1) do
-										if GetTradePlayerItemLink( iterateTradeSlots ) == nil then
-											PickupContainerItem( bag, slot )
-											ClickTradeButton( iterateTradeSlots )
-										end
-									end
-								end
-							end
-						end
-					end
-				end
-			end
-		end
-	end
-end
-
-
-function EMA:TradeCRItems()
-	if EMAApi.IsCharacterTheMaster( EMA.characterName ) == true then
-		return
-	end
-	for index, character in EMAApi.TeamListOrderedOnline() do
-		--EMA:Print("Team", character )
-		local teamCharacterName = ( Ambiguate( character, "short" ) )
-		local tradePlayersName = GetUnitName("NPC")
-		if tradePlayersName == teamCharacterName then
-			if EMAApi.IsCharacterTheMaster(character) == true and EMAUtilities:CheckIsFromMyRealm(character) == true then
-				for bag,slot,itemLink in LibBagUtils:Iterate("BAGS") do
-					if itemLink then
-						-- using legion CraftingReagent API, as tooltip massess up some "items"
-						local _,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,isCraftingReagent = GetItemInfo(itemLink)
-						if isCraftingReagent == true then
-							--EMA:Print("TradeCraftingGoods", isCraftingReagent, itemLink)
-							-- tooltips scan is the olny way to find if the item is BOP in bags!
-							local isBop = EMAUtilities:TooltipScaner(itemLink)
-							--EMA:Print("testBOP", itemLink, isBop)
-							if isBop ~= ITEM_BIND_ON_PICKUP then
-							--EMA:Print("AddToTrade", itemLink)
-								for iterateTradeSlots = 1, (MAX_TRADE_ITEMS - 1) do
-									if GetTradePlayerItemLink( iterateTradeSlots ) == nil then
-										PickupContainerItem( bag, slot )
-										ClickTradeButton( iterateTradeSlots )
-									end
-								end
-							end
-						end
-					end
-				end
-			end
-		end
-	end
-end
-
-
-function EMA:TRADE_CLOSED()
-
-end
\ No newline at end of file