Fixed getAffiliation query to retrieve the codes.
Updated the comments in appropriate context.