Complete refactoring to remove all PHP dependencies to make it a pure JS REST client.