Yep, I just completed all three levels for the first time and the four codes got me all the pieces for one ship. Ahoy! (And thanks for the tips on beating Level 3... it just confirmed that the big K does respond to the shots being fired at it, and helped me plan my strategy in terms of waiting for one to surface, dispatching it and then hitting the island just after it sinks beneath the waves.)