Sets and a Util function.

Signed-off-by: Andrew Porter <mephisto83@hotmail.com>