Update of PDI.h the is more consistent with the use of pointers. This update should remove some bugs too.