refactored plugin system so global plugins can be used without any application context