Parallelizing friends/follows queries, some refactoring