move index.js to lib folder