plugin: simplified plugin definition
Bunch of additions and fixes