Re-wrote a good chunk of the PDD code in 0.5.