Complex sentence: While most of the garrison were allowed to depart, Wishart was imprisoned for his exploits with the Great Montrose, but freed after the Battle of Kilsyth.
Split into simpler sentences: While most of the garrison were allowed to depart, Wishart was imprisoned for his exploits with the Great Montrose. He was freed after the Battle of Kilsyth.