Refactoring to lib dir for code, index.js as module exporter.