Update for index.js now that api.js is prototypal