Fix broken API calls and transition API information to environmental variables.