Refactored getCountries into a utility function that creates a dropdown with options for country.