Common filter code for plugin and ring out tool