Working on the JSON

Rearanging the code to understand the process.