Switch to plugin architecture