Refactor so that DynJS dependency is minimized

Begins to address #46 by putting into place a factory framework from which the runtime can be obtained.