Move ajax for countries to separate method