WIP: Taking over PD support form sarsate

Lines 95 to 110 would benefit from being made into a function and unit tested.