Optimized object manager handling in Valid.pm and Queue/PreferencesDB.pm.