Update test to properly consume jsonFile, and to have proper immediately invoked function not get glommed into vars.
Rework where chain gets constructed.