Added functionality to use as CLI

Reorganized project structure
Made a few changes to index.js
Updated README.md