Need to mix unloading of plugins into base code