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.
Document security group code.