Fix undefined constants and some phpdoc
Merge pull request #19 from addshore/genFixes

Fix undefined constants and some phpdoc