ads, less php logging, php coding style improvements