Fixes and minor changes in php files.
Merge pull request #3 from Shadowawe/master

Fixes and minor changes in php files.