Added more flexibility to the plugin.