Various updates to plugin framework