Add Application Selector

Applications can only be selected by the XID of the group leader. This code
either doesn't work or (more likely I believe) I cannot figure out how to test
it.