Switch to only using property to store "group" pointer
Replace #define with enum
Remove unused variable
Rework switch statements slightly
Break searching into seperate (poorly named) class