Updating index.js to use the new Cast API.