worker.js and index.js cleanup