cosmetical improvements in pid code