Refactoring app.js (in progress)

Working on transforming single API calls into Batch requests. It currently works except when number of friends < 50 - I have a -1 at the end of the for loop iteration which messes up friend indexing. Need to double check the resulting dictionary (global variable `data`) for integrity.