- Minor refactoring to allow testing of startup code.