restructure plugin system into extension system