Fixed aysnchronous json getting bug, modularised code

* Flow of execution is sequential for retrieving JSON files
* User data and points are now in a single JSON object for each
datapoint
* Modularised code into multiple functions