Fixes and minor changes in php files.