Complex sentence: It was renamed after the American Fork River which runs through it the city, as well as to avoid confusion with Salt Lake City.
Split into simpler sentences: It was renamed American Fork after the American Fork River which runs through it. They also did this to avoid confusion with Salt Lake City.