More work on JS code to fetch data.