Complex sentence: Great Falls remained the second-largest city in Montana until 2000 when, with the zoning of some of its surrounding neighborhoods, Missoula surpassed Great Falls by a margin of 363 people.
Split into simpler sentences: Great Falls remained the second largest city in Montana until 2000. In 2000 with the zoning of some surrounding neighborhoods Missoula became the second largest city in Montana by a margin of 363 people.