clean up package.json, reduce duplicate code