change getCountries to return a promise for API consistency, change generateCountryList to cache the results of the getCountries call for performance