cleaned up index.js