Lots of work on PHP wrapper for API and corresponding JS wrapper
Merge pull request #2 from streetlight/refactoring

Lots of work on PHP wrapper for API and corresponding JS wrapper