Refactor set selection code for class/name/map/skill/type.
Isolate into called functions.
Gear update, cascading changes.
Better differentiation of modes that can be used for pet actions.
Tidy and comment cleanup and expansion.