Added test.php for debugging API calls.
Updated API class methods with error testing and json string returns.