Fix index.js for deployment and updated config files