update package.json
cleanup and add tests