Removed error on non-JSON response and small formatting changes.