WIP: Taking over PD support form sarsate

PD here should probably be named something else - it's not PD specific.   And anyway it should be pd.