improved default country definition logic, added tests, updated data