Updated js script to utilize the configuration object