Initial working version of the plugin, before docs and refinements