fixed the issue that caused jasmine test to fail, and revise api exposed. 

style nit: we're not having a space between value and type in function args. 
types: seems that we require keys to be a `{uids: string[]}`, better to use the more specific type.