Restructuring the plugin