Code improvements in AddonMgr