More piDee work
Commenting/debugging

Not finished, cleaning up.