addressed https://github.com/kvz/phpjs/issues/138 and did some cleanup
Merge pull request #139 from codemasher/master

Fixed #138 and did some cleanup