Simultaneously, Zug expanded its territory, acquiring a number of rural areas in the form of bailiwicks (Walchwil, Cham, Gangolfswil Hünenberg and Steinhausen, and Oberrüti, now part of the canton of Aargau). Zug became a confederation in itself - with the town and its subject territories, and the three outer (‘free’) municipalities, Ägeri, Menzingen (with Neuheim) and Baar. This problematic dualism dominated until 1798, i.e. until the end of the old confederation, the political structure of the Canton Zug. The unifying element of this miniature confederation was, among others, the rural municipalities and the forty-member city council.