Cleaned up index.js