Use importlib when available
Remove uses of 'kind' as it can be accessed with plugin.type