refactoring the plugin system further.