refactor: general cleanup
add comments to index.js