Remove unused code in api_client