Finished initial stab at making DPM work.