Changes to fall back to alt API key. Some changes to AJAX functionality.