Add TerritoryCollection
Encapsulate main code and ensure existence of settings.json & history/current.json