Updated code handling interest groups to take into account the new db schema.