Redo of the "init" code to spread it out into sort of modules.
This is work-in-progress code.