updated PHP code documenting C code
code cleaning
improvements