Yanked some code from addon:DisplayFrame() and turned it into MainPanel:SetProfession().
Yanked some code from addon:DisplayFrame() and turned it into MainPanel:SetProfession().
Removed a large portion of code from MainPanel.mode_button's OnClick script - everything it was doing is handled by the cascade of events initiated by addon:Scan().
Removed SaveFramePosition() - its code now resides in MainPanel's OnMouseUp script.
Moved faction_strings and CheckDisplayFaction() into a do block with expandEntry(), since they are both only used there.
CheckDisplayFactions() now has one parameter, down from two.
Removed file-local variable currentProfIndex - we now use MainPanel.profession
Moved SortedProfessions and NUM_PROFESSIONS to the Constants section in the file.
Removed MainPanel:Close() - calling MainPanel:Hide() does the same thing.