added package.json and test directory, reconfigured into lib and index
added readme