Refactored ExtensionManager::initialize()