Complex sentence: Ultra was primarily working on the Kriegsmarine naval codes, which eventually helped win the battle of the Atlantic, but as the war progressed Wehrmacht army codes were also broken.
Split into simpler sentences: Ultra was primarily working on the Kriegsmarine naval codes, which eventually helped win the battle of the Atlantic. But as the war progressed Wehrmacht army codes were also broken.