Updated main.js to use cached data.