trying to put subs in modules or external source files.
More changes.
Far from finished but getting there.