Complex sentence: Towns named after him are Medary, Wisconsin, near the Minnesota border, and Medary, South Dakota, which was the first town in the Dakota Territory.
Split into simpler sentences: Towns named after him are in Wisconsin, near the Minnesota border, and in South Dakota. Medary was the first town in the Dakota Territory.