Refactoring related to a bug with init/quit management.