Major/finalize api

Finalize the API & publish it to NPM.