Removing enclosing function from index.js