Quantcast

Replaced all occurrences of MODNAME with private.addon_name, and made some small tweaks along the way.

James D. Callahan III [04-03-11 - 13:20]
Replaced all occurrences of MODNAME with private.addon_name, and made some small tweaks along the way.
Filename
Config.lua
Constants.lua
Core.lua
Database/Recipes/Alchemy.lua
Database/Recipes/Blacksmithing.lua
Database/Recipes/Enchanting.lua
Database/Recipes/Engineering.lua
Database/Recipes/FirstAid.lua
Database/Recipes/Runeforging.lua
Interface/Common.lua
Interface/FilterMenus.lua
Interface/List.lua
Interface/Panel.lua
Interface/Tabs.lua
Locales/devel-enUS.lua
Player.lua
Recipe.lua
Waypoint.lua
diff --git a/Config.lua b/Config.lua
index 117ef30..2b7c157 100644
--- a/Config.lua
+++ b/Config.lua
@@ -30,22 +30,23 @@ local table = _G.table
 -------------------------------------------------------------------------------
 -- AddOn namespace.
 -------------------------------------------------------------------------------
+local FOLDER_NAME, private	= ...
+
 local LibStub = _G.LibStub

-local MODNAME		= "Ackis Recipe List"
-local addon		= LibStub("AceAddon-3.0"):GetAddon(MODNAME)
+local addon		= LibStub("AceAddon-3.0"):GetAddon(private.addon_name)

 local BFAC		= LibStub("LibBabble-Faction-3.0"):GetLookupTable()
 local LC		= _G.LOCALIZED_CLASS_NAMES_MALE
-local L			= LibStub("AceLocale-3.0"):GetLocale(MODNAME)
+local L			= LibStub("AceLocale-3.0"):GetLocale(private.addon_name)

 local AceConfig 	= LibStub("AceConfig-3.0")
 local AceConfigReg 	= LibStub("AceConfigRegistry-3.0")
 local AceConfigDialog 	= LibStub("AceConfigDialog-3.0")

--- Set up the private intra-file namespace.
-local FOLDER_NAME, private	= ...
-
+-------------------------------------------------------------------------------
+-- Constants
+-------------------------------------------------------------------------------
 local modularOptions = {}

 local function giveProfiles()
@@ -75,7 +76,7 @@ local function fullOptions()
 	if not options then
 		options = {
 			type = "group",
-			name = MODNAME,
+			name = private.addon_name,
 			args = {
 				general = {
 					order	= 1,
@@ -812,8 +813,8 @@ local function GetDisplayOptions()
 end

 function addon:SetupOptions()
-	AceConfigReg:RegisterOptionsTable(MODNAME, fullOptions)
-	self.optionsFrame = AceConfigDialog:AddToBlizOptions(MODNAME, nil, nil, "general")
+	AceConfigReg:RegisterOptionsTable(private.addon_name, fullOptions)
+	self.optionsFrame = AceConfigDialog:AddToBlizOptions(private.addon_name, nil, nil, "general")

 	-- Register the module options
 	self:RegisterModuleOptions("Display", GetDisplayOptions(), _G.DISPLAY_OPTIONS)
@@ -835,7 +836,7 @@ function addon:SetupOptions()

 	-- Add in the about panel to the Bliz options (not a part of the ace3 config)
 	if LibStub:GetLibrary("LibAboutPanel", true) then
-		self.optionsFrame["About"] = LibStub:GetLibrary("LibAboutPanel").new(MODNAME, MODNAME)
+		self.optionsFrame["About"] = LibStub:GetLibrary("LibAboutPanel").new(private.addon_name, private.addon_name)
 	else
 		self:Print("Lib AboutPanel not loaded.")
 	end
@@ -851,5 +852,5 @@ end

 function addon:RegisterModuleOptions(name, optionsTable, displayName)
 	modularOptions[name] = optionsTable
-	self.optionsFrame[name] = AceConfigDialog:AddToBlizOptions(MODNAME, displayName, MODNAME, name)
+	self.optionsFrame[name] = AceConfigDialog:AddToBlizOptions(private.addon_name, displayName, private.addon_name, name)
 end
diff --git a/Constants.lua b/Constants.lua
index 1ee7a5f..c7bca41 100644
--- a/Constants.lua
+++ b/Constants.lua
@@ -19,11 +19,11 @@ local _G = getfenv(0)
 -------------------------------------------------------------------------------
 -- AddOn namespace.
 -------------------------------------------------------------------------------
-local LibStub = _G.LibStub
+local FOLDER_NAME, private = ...
+private.addon_name = "Ackis Recipe List"

-local MODNAME	= "Ackis Recipe List"
-local L		= LibStub("AceLocale-3.0"):GetLocale(MODNAME)
-local private	= _G.select(2, ...)
+local LibStub = _G.LibStub
+local L		= LibStub("AceLocale-3.0"):GetLocale(private.addon_name)

 -------------------------------------------------------------------------------
 -- Profession data.
diff --git a/Core.lua b/Core.lua
index d7804c7..a83f769 100644
--- a/Core.lua
+++ b/Core.lua
@@ -40,7 +40,6 @@ local table = _G.table
 -- AddOn namespace.
 -------------------------------------------------------------------------------
 local FOLDER_NAME, private = ...
-private.addon_name = "Ackis Recipe List"

 local LibStub	= _G.LibStub
 local addon	= LibStub("AceAddon-3.0"):NewAddon(private.addon_name, "AceConsole-3.0", "AceEvent-3.0")
@@ -1051,7 +1050,7 @@ do
 		local recipe_list = private.recipe_list
 		local recipes_found = 0
 		local SF = private.recipe_state_flags
-		local overwritemap = private.spell_overwrite_map
+		local spell_overwrite_map = private.spell_overwrite_map

 		for i = 1, _G.GetNumTradeSkills() do
 			local tradeName, tradeType = _G.GetTradeSkillInfo(i)
@@ -1068,13 +1067,13 @@ do
 					-- ability to learn the lower rank.

 					-- If we have it in the mapping, set the lower rank spell to known
-					if overwritemap[spell_id] then
-						local overwrite_recipe = recipe_list[overwritemap[spell_id]]
+					if spell_overwrite_map[spell_id] then
+						local overwrite_recipe = recipe_list[spell_overwrite_map[spell_id]]

 						if overwrite_recipe then
 							SetRecipeAsKnownOrLinked(overwrite_recipe, is_linked)
 						else
-							self:Debug(tradeName .. " " .. overwritemap[spell_id] .. L["MissingFromDB"])
+							self:Debug(tradeName .. " " .. spell_overwrite_map[spell_id] .. L["MissingFromDB"])
 						end
 					end
 					SetRecipeAsKnownOrLinked(recipe, is_linked)
diff --git a/Database/Recipes/Alchemy.lua b/Database/Recipes/Alchemy.lua
index 1e70a8f..333389f 100644
--- a/Database/Recipes/Alchemy.lua
+++ b/Database/Recipes/Alchemy.lua
@@ -14,14 +14,20 @@ This source code is released under All Rights Reserved.
 ]] --

 -------------------------------------------------------------------------------
--- AddOn namespace.
+-- Localized Lua globals.
 -------------------------------------------------------------------------------
-local MODNAME = "Ackis Recipe List"
-local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME)
-local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME)
+local _G = getfenv(0)

+-------------------------------------------------------------------------------
+-- AddOn namespace.
+-------------------------------------------------------------------------------
 local FOLDER_NAME, private = ...

+local LibStub	= _G.LibStub
+local addon = LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L = LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
+
+
 -------------------------------------------------------------------------------
 -- Filter flags. Acquire types, and Reputation levels.
 -------------------------------------------------------------------------------
diff --git a/Database/Recipes/Blacksmithing.lua b/Database/Recipes/Blacksmithing.lua
index 04e26f9..9cfb45f 100644
--- a/Database/Recipes/Blacksmithing.lua
+++ b/Database/Recipes/Blacksmithing.lua
@@ -14,14 +14,19 @@ This source code is released under All Rights Reserved.
 ]] --

 -------------------------------------------------------------------------------
--- AddOn namespace.
+-- Localized Lua globals.
 -------------------------------------------------------------------------------
-local MODNAME = "Ackis Recipe List"
-local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME)
-local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME)
+local _G = getfenv(0)

+-------------------------------------------------------------------------------
+-- AddOn namespace.
+-------------------------------------------------------------------------------
 local FOLDER_NAME, private = ...

+local LibStub	= _G.LibStub
+local addon = LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L = LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
+
 -------------------------------------------------------------------------------
 -- Filter flags. Acquire types, and Reputation levels.
 -------------------------------------------------------------------------------
diff --git a/Database/Recipes/Enchanting.lua b/Database/Recipes/Enchanting.lua
index 04864e9..5029158 100644
--- a/Database/Recipes/Enchanting.lua
+++ b/Database/Recipes/Enchanting.lua
@@ -14,14 +14,19 @@ This source code is released under All Rights Reserved.
 ]] --

 -------------------------------------------------------------------------------
--- AddOn namespace.
+-- Localized Lua globals.
 -------------------------------------------------------------------------------
-local MODNAME = "Ackis Recipe List"
-local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME)
-local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME)
+local _G = getfenv(0)

+-------------------------------------------------------------------------------
+-- AddOn namespace.
+-------------------------------------------------------------------------------
 local FOLDER_NAME, private = ...

+local LibStub	= _G.LibStub
+local addon = LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L = LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
+
 -------------------------------------------------------------------------------
 -- Filter flags. Acquire types, and Reputation levels.
 -------------------------------------------------------------------------------
diff --git a/Database/Recipes/Engineering.lua b/Database/Recipes/Engineering.lua
index eeb3d91..19db1da 100644
--- a/Database/Recipes/Engineering.lua
+++ b/Database/Recipes/Engineering.lua
@@ -15,14 +15,19 @@ This source code is released under All Rights Reserved.
 ]] --

 -------------------------------------------------------------------------------
--- AddOn namespace.
+-- Localized Lua globals.
 -------------------------------------------------------------------------------
-local MODNAME = "Ackis Recipe List"
-local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME)
-local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME)
+local _G = getfenv(0)

+-------------------------------------------------------------------------------
+-- AddOn namespace.
+-------------------------------------------------------------------------------
 local FOLDER_NAME, private = ...

+local LibStub	= _G.LibStub
+local addon = LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L = LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
+
 -------------------------------------------------------------------------------
 -- Filter flags. Acquire types, and Reputation levels.
 -------------------------------------------------------------------------------
diff --git a/Database/Recipes/FirstAid.lua b/Database/Recipes/FirstAid.lua
index 47aa912..bca38c8 100644
--- a/Database/Recipes/FirstAid.lua
+++ b/Database/Recipes/FirstAid.lua
@@ -14,14 +14,19 @@ This source code is released under All Rights Reserved.
 ]] --

 -------------------------------------------------------------------------------
--- AddOn namespace.
+-- Localized Lua globals.
 -------------------------------------------------------------------------------
-local MODNAME = "Ackis Recipe List"
-local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME)
-local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME)
+local _G = getfenv(0)

+-------------------------------------------------------------------------------
+-- AddOn namespace.
+-------------------------------------------------------------------------------
 local FOLDER_NAME, private = ...

+local LibStub	= _G.LibStub
+local addon = LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L = LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
+
 -------------------------------------------------------------------------------
 -- Filter flags. Acquire types, and Reputation levels.
 -------------------------------------------------------------------------------
diff --git a/Database/Recipes/Runeforging.lua b/Database/Recipes/Runeforging.lua
index 65d42f7..16c2020 100644
--- a/Database/Recipes/Runeforging.lua
+++ b/Database/Recipes/Runeforging.lua
@@ -15,14 +15,19 @@ This source code is released under All Rights Reserved.
 ]] --

 -------------------------------------------------------------------------------
--- AddOn namespace.
+-- Localized Lua globals.
 -------------------------------------------------------------------------------
-local MODNAME = "Ackis Recipe List"
-local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME)
-local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME)
+local _G = getfenv(0)

+-------------------------------------------------------------------------------
+-- AddOn namespace.
+-------------------------------------------------------------------------------
 local FOLDER_NAME, private = ...

+local LibStub	= _G.LibStub
+local addon = LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L = LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
+
 -------------------------------------------------------------------------------
 -- Filter flags. Acquire types, and Reputation levels.
 -------------------------------------------------------------------------------
@@ -31,9 +36,9 @@ local A = private.acquire_types
 local Q = private.item_qualities
 local V = private.game_versions

---------------------------------------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 -- Initialize!
---------------------------------------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
 function addon:InitRuneforging()
 	local function AddRecipe(spell_id, genesis, quality)
 		return addon:AddRecipe(spell_id, 53428, genesis, quality)
diff --git a/Interface/Common.lua b/Interface/Common.lua
index 28952a3..a6398e4 100644
--- a/Interface/Common.lua
+++ b/Interface/Common.lua
@@ -5,17 +5,15 @@ local _G = getfenv(0)

 local table = _G.table
 local string = _G.string
+local pairs = _G.pairs

 -------------------------------------------------------------------------------
 -- AddOn namespace.
 -------------------------------------------------------------------------------
-local LibStub = LibStub
+local FOLDER_NAME, private = ...

-local MODNAME	= "Ackis Recipe List"
-local addon	= LibStub("AceAddon-3.0"):GetAddon(MODNAME)
-
--- Set up the private intra-file namespace.
-local private	= select(2, ...)
+local LibStub = _G.LibStub
+local addon	= LibStub("AceAddon-3.0"):GetAddon(private.addon_name)

 -------------------------------------------------------------------------------
 -- Table cache mechanism
@@ -104,13 +102,13 @@ do
 	local HIGHLIGHT_FONT_COLOR = _G.HIGHLIGHT_FONT_COLOR

 	local function Show_Tooltip(frame, motion)
-		GameTooltip:SetOwner(frame, "ANCHOR_RIGHT")
-		GameTooltip:SetText(frame.tooltip_text, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
-		GameTooltip:Show()
+		_G.GameTooltip:SetOwner(frame, "ANCHOR_RIGHT")
+		_G.GameTooltip:SetText(frame.tooltip_text, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
+		_G.GameTooltip:Show()
 	end

 	local function Hide_Tooltip()
-		GameTooltip:Hide()
+		_G.GameTooltip:Hide()
 	end

 	function private.SetTooltipScripts(frame, textLabel)
diff --git a/Interface/FilterMenus.lua b/Interface/FilterMenus.lua
index b43eeb1..3113068 100644
--- a/Interface/FilterMenus.lua
+++ b/Interface/FilterMenus.lua
@@ -3,27 +3,24 @@
 -------------------------------------------------------------------------------
 local _G = getfenv(0)

-local string = _G.string
+-- Functions
+local pairs = _G.pairs

+-- Libraries
+local string = _G.string
 local table = _G.table

-local pairs = _G.pairs
-
 -------------------------------------------------------------------------------
 -- AddOn namespace.
 -------------------------------------------------------------------------------
-local LibStub = _G.LibStub
-
-local MODNAME	= "Ackis Recipe List"
-local addon	= LibStub("AceAddon-3.0"):GetAddon(MODNAME)
+local FOLDER_NAME, private = ...

+local LibStub = _G.LibStub
+local addon	= LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L		= LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
 local BFAC	= LibStub("LibBabble-Faction-3.0"):GetLookupTable()
-local L		= LibStub("AceLocale-3.0"):GetLocale(MODNAME)
 local QTip	= LibStub("LibQTip-1.0")

--- Set up the private intra-file namespace.
-local private	= _G.select(2, ...)
-
 -------------------------------------------------------------------------------
 -- Upvalues
 -------------------------------------------------------------------------------
@@ -31,8 +28,6 @@ local SetTextColor = private.SetTextColor
 local GenericCreateButton = private.GenericCreateButton
 local SetTooltipScripts = private.SetTooltipScripts

-local A = private.acquire_types
-
 -------------------------------------------------------------------------------
 -- Constants
 -------------------------------------------------------------------------------
@@ -424,6 +419,7 @@ function private.InitializeFilterPanel()
 	-- Create FilterPanel.obtain, and set its scripts.
 	-------------------------------------------------------------------------------
 	do
+		local A = private.acquire_types
 		local obtain_frame = FilterPanel:CreateSubMenu("obtain")

 		-------------------------------------------------------------------------------
diff --git a/Interface/List.lua b/Interface/List.lua
index 42a8f95..2b5a5e0 100644
--- a/Interface/List.lua
+++ b/Interface/List.lua
@@ -14,19 +14,15 @@ local type = _G.type
 -------------------------------------------------------------------------------
 -- AddOn namespace.
 -------------------------------------------------------------------------------
-local LibStub = LibStub
-
-local MODNAME	= "Ackis Recipe List"
-local addon	= LibStub("AceAddon-3.0"):GetAddon(MODNAME)
+local FOLDER_NAME, private = ...

+local LibStub	= _G.LibStub
+local addon	= LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L		= LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
 local BFAC	= LibStub("LibBabble-Faction-3.0"):GetLookupTable()
 local BZ	= LibStub("LibBabble-Zone-3.0"):GetLookupTable()
-local L		= LibStub("AceLocale-3.0"):GetLocale(MODNAME)
 local QTip	= LibStub("LibQTip-1.0")

--- Set up the private intra-file namespace.
-local FOLDER_NAME, private	= ...
-
 local Player	= private.Player

 -------------------------------------------------------------------------------
@@ -1503,8 +1499,8 @@ do
 		narrowFont = LSM3:Fetch(LSM3.MediaType.FONT, "Arial Narrow")
 		normalFont = LSM3:Fetch(LSM3.MediaType.FONT, "Friz Quadrata TT")
 	end
-	local narrowFontObj = CreateFont(MODNAME.."narrowFontObj")
-	local normalFontObj = CreateFont(MODNAME.."normalFontObj")
+	local narrowFontObj = CreateFont(private.addon_name.."narrowFontObj")
+	local normalFontObj = CreateFont(private.addon_name.."normalFontObj")

 	-- I want to do a bit more comprehensive tooltip processing. Things like changing font sizes,
 	-- adding padding to the left hand side, and using better color handling. So... this function
@@ -1850,7 +1846,7 @@ do
 			end
 			return
 		end
-		acquire_tip = QTip:Acquire(MODNAME.." Tooltip", 2, "LEFT", "LEFT")
+		acquire_tip = QTip:Acquire(private.addon_name.." Tooltip", 2, "LEFT", "LEFT")
 		acquire_tip:ClearAllPoints()

 		if acquire_tip_anchor == "Right" then
diff --git a/Interface/Panel.lua b/Interface/Panel.lua
index 91f0291..e1f59c0 100644
--- a/Interface/Panel.lua
+++ b/Interface/Panel.lua
@@ -33,25 +33,14 @@ local tonumber = _G.tonumber
 local tostring = _G.tostring

 -------------------------------------------------------------------------------
--- Localized Blizzard API.
--------------------------------------------------------------------------------
-local GetItemQualityColor = _G.GetItemQualityColor
-
--- GLOBALS: CreateFrame, GameTooltip, UIParent
-
--------------------------------------------------------------------------------
 -- AddOn namespace.
 -------------------------------------------------------------------------------
-local LibStub = _G.LibStub
-
-local MODNAME	= "Ackis Recipe List"
-local addon	= LibStub("AceAddon-3.0"):GetAddon(MODNAME)
+local FOLDER_NAME, private	= ...

+local LibStub = _G.LibStub
+local addon	= LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L		= LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
 local BFAC	= LibStub("LibBabble-Faction-3.0"):GetLookupTable()
-local L		= LibStub("AceLocale-3.0"):GetLocale(MODNAME)
-
--- Set up the private intra-file namespace.
-local FOLDER_NAME, private	= ...

 -------------------------------------------------------------------------------
 -- Upvalues
diff --git a/Interface/Tabs.lua b/Interface/Tabs.lua
index c88413c..2fbc7c1 100644
--- a/Interface/Tabs.lua
+++ b/Interface/Tabs.lua
@@ -11,16 +11,12 @@ local pairs, ipairs = _G.pairs, _G.ipairs
 -------------------------------------------------------------------------------
 -- AddOn namespace.
 -------------------------------------------------------------------------------
-local LibStub = LibStub
-
-local MODNAME	= "Ackis Recipe List"
-local addon	= LibStub("AceAddon-3.0"):GetAddon(MODNAME)
+local FOLDER_NAME, private = ...

+local LibStub = _G.LibStub
+local addon	= LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L		= LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
 local BFAC	= LibStub("LibBabble-Faction-3.0"):GetLookupTable()
-local L		= LibStub("AceLocale-3.0"):GetLocale(MODNAME)
-
--- Set up the private intra-file namespace.
-local private	= select(2, ...)

 -------------------------------------------------------------------------------
 -- Constants
diff --git a/Locales/devel-enUS.lua b/Locales/devel-enUS.lua
index 798a1e2..2d61942 100644
--- a/Locales/devel-enUS.lua
+++ b/Locales/devel-enUS.lua
@@ -16,9 +16,7 @@ These translations are released under the Public Domain.
 ************************************************************************
 ]]--

-local MODNAME	= "Ackis Recipe List"
-
-local L = LibStub("AceLocale-3.0"):NewLocale(MODNAME, "enUS", true)
+local L = LibStub("AceLocale-3.0"):NewLocale("Ackis Recipe List", "enUS", true)

 if not L then return end

@@ -1327,4 +1325,4 @@ L["Zixil"] = "Zixil"
 L["Zorbin Fandazzle"] = "Zorbin Fandazzle"
 L["Zula Slagfury"] = "Zula Slagfury"
 L["Zurai"] = "Zurai"
-L["Zurii"] = "Zurii"
\ No newline at end of file
+L["Zurii"] = "Zurii"
diff --git a/Player.lua b/Player.lua
index 605ae45..82a7e81 100644
--- a/Player.lua
+++ b/Player.lua
@@ -17,28 +17,22 @@
 -------------------------------------------------------------------------------
 local _G = getfenv(0)

-local table = _G.table
-
+-- Libraries
 local bit = _G.bit
+local table = _G.table

+-- Functions
 local pairs = _G.pairs

 -------------------------------------------------------------------------------
--- Localized Blizzard API.
--------------------------------------------------------------------------------
-
--------------------------------------------------------------------------------
 -- AddOn namespace.
 -------------------------------------------------------------------------------
-local LibStub = _G.LibStub
-
-local MODNAME	= "Ackis Recipe List"
-local addon	= LibStub("AceAddon-3.0"):GetAddon(MODNAME)
+local FOLDER_NAME, private	= ...

+local LibStub = _G.LibStub
+local addon	= LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L		= LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
 local BFAC	= LibStub("LibBabble-Faction-3.0"):GetLookupTable()
-local L		= LibStub("AceLocale-3.0"):GetLocale(MODNAME)
-
-local FOLDER_NAME, private	= ...

 ------------------------------------------------------------------------------
 -- Data which is stored regarding a players statistics (luadoc copied from Collectinator, needs updating)
diff --git a/Recipe.lua b/Recipe.lua
index a623ef6..9354143 100644
--- a/Recipe.lua
+++ b/Recipe.lua
@@ -21,10 +21,8 @@ local table = _G.table
 local FOLDER_NAME, private = ...

 local LibStub = _G.LibStub
-local MODNAME = "Ackis Recipe List"
-local addon = LibStub("AceAddon-3.0"):GetAddon(MODNAME)
-
-local L = LibStub("AceLocale-3.0"):GetLocale(MODNAME)
+local addon = LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L = LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
 local BZ = LibStub("LibBabble-Zone-3.0"):GetLookupTable()
 local BFAC = LibStub("LibBabble-Faction-3.0"):GetLookupTable()

diff --git a/Waypoint.lua b/Waypoint.lua
index 8622adf..266c17e 100644
--- a/Waypoint.lua
+++ b/Waypoint.lua
@@ -24,17 +24,13 @@ local pairs, select = _G.pairs, _G.select
 -------------------------------------------------------------------------------
 -- AddOn namespace.
 -------------------------------------------------------------------------------
-local LibStub = _G.LibStub
-
-local MODNAME	= "Ackis Recipe List"
-local addon	= LibStub("AceAddon-3.0"):GetAddon(MODNAME)
+local FOLDER_NAME, private	= ...

+local LibStub = _G.LibStub
+local addon	= LibStub("AceAddon-3.0"):GetAddon(private.addon_name)
+local L		= LibStub("AceLocale-3.0"):GetLocale(private.addon_name)
 local BFAC	= LibStub("LibBabble-Faction-3.0"):GetLookupTable()
 local BZ	= LibStub("LibBabble-Zone-3.0"):GetLookupTable()
-local L		= LibStub("AceLocale-3.0"):GetLocale(MODNAME)
-
--- Set up the private intra-file namespace.
-local FOLDER_NAME, private	= ...

 local A = private.acquire_types
 local F = private.filter_flags