Nations: improves nation extraction script