Update index.js

Improved readability a bit. All tests are passing.