Update index.js

misc cleanup