Updated CommonJs classes so that use-time depenencies to non-leaf
classes are added beneath `module.exports`, plus externalized a couple
of private inner classes to make the depenency requirements easier to
understand.