Move lib to index.js