refactor so that the npmd is responsible for the command bit...
refactor tests
tidy
4.0.0