Total rework of the plugin