Moving lib/main.js to index.js