Move index.js to ./lib/ directory

See #29 and #26

Refactor index.js to be inside the /lib directory