This ModuleSettingsInitialize() should be on line 102 so that the module is definitely initialized before getting the state.  Otherwise if this were teh only optional module it would lead to a crash.