Add search and average data to main.js