Miguel/plugin refactor

Yup, that's a good idea.  Let me change it