Changed API slightly to return objects instead of identities.