First stab at implementing PCD. Doesn't work very well. I suspect the boundary conditions.