Fixed index.js to work nicely locally