fix up package.json, add LICENSE.txt, write docs