Initial code for the new discovery plugin system