Made fewer queries (with wbyoung).
updated the get friendships  api a little bit more with whit
Merged changes.