Modify the requirement of main-ui to :refer the used vars.
Added required :type field to plugin definitions. Plugins are registered depending on their :type when loaded and unloaded.
Removed try..catch.