chore(index.js) : cleanup, basic error trap