plug-ins: various small cleanups in the plug-ins that use metadata