API responses are always JSON

These changes address #588. All API responses will be in the format requested (JSON by default). These changes also clean up some API response metadata.