Fixes php-app and adds comments