NPM: moving methods from class into instance.

This will allow us to start doing dependency injection for behavior that
can be driven from CLI options, like better debug/log messages.