Correctly set version from package.json.
Set a default version for npm.
Update test doc strings.
Use groovy idioms where possible.