Fix term names according to specification.

Closes #38
Lookup the flavor based on the ID, rather than name.

Since now the flavor category is based on the ID, we have to adapt all
the code to reflect this change.

Refers to bug #38.
Lookup security groups by id rather than name.