Refactor done for mongo mutual friends computation