(chore) rename worker.js to index.js
(refactor) split code into separate modules based on event being handled