The structure of `index.js` file should be improved, it's complex. Please propose better `structure` for it. Related #74