Refactor naming of runtime components.
Remove unneeded top level module.
Refactored  CLI code into subdir.
Refactor remaining files into functional groups.
Make command line work in npm installed directory. Auto-create output directories.