Convert index.js to CoffeeScript