Plugin changes

Getting the plugin framework up to spec..