Refactor security group method.

It now takes one security group and returns a pair of [name, id]
WE also update the surrounding code to relfect that.