Updated for npm.  More work on tests.