Code related to download, slice-and-dice and generation of JSON into database.