Made an attempt at keeping selectable title directive generic.

not sure if it's too specific to even try but what the hell.
Changed selectable title directive to take a list of group data.