First working (draft) version of the plugin