code cleanup in plugin_data