over highly effective anti-submarine techniques learned from the British from experiences in the Battle of the Atlantic, they would take a significant toll on Japanese submarines, which tended to be slower and could not dive as deep as their German counterparts. Japanese submarines, in particular, never menaced the Allied merchant convoys and strategic shipping lanes to any degree that German U-boats did. One major advantage the Allies had was the breaking of the Japanese "Purple" code by the US, so allowing friendly ships to be diverted from Japanese submarines and allowing Allied submarines to intercept Japanese forces. In 1942 and early 1943, US submarines posed little threat to Japanese ships, whether warships or merchant ships. They were initially hampered by poor torpedoes, which often failed to detonate on impact, ran too deep, or even ran wild. As the US submarine menace was slight in the beginning, Japanese commanders became complacent and as a result did not invest heavily into ASW measures or upgrade their convoy protection to any degree to what the Allies in the Atlantic did. Often encouraged by the Japanese not placing a high priority on the Allied submarine threat, US skippers were relatively complacent and docile compared to their German counterparts, who understood the "life and death" urgency in the Atlantic. However, US Vice Admiral Charles A. Lockwood pressured the ordnance department to replace the faulty torpedoes; famously when they initially ignored his complaints, he ran his own tests to prove the torpedoes' unreliability. He also cleaned out the "deadwood", replacing many cautious or unproductive submarine skippers with younger (somewhat) and more aggressive commanders. As a result, in the latter half of 1943, US subs were suddenly sinking Japanese ships at a dramatically higher rate, scoring their share of key warship kills and accounting for almost half of the Japanese merchant fleet. Japan's naval command was caught off guard; Japan had neither the anti-submarine technology or doctrine, nor the production capability to withstand a tonnage war of attrition, nor did she develop the organizations needed (unlike the Allies in the Atlantic). Japanese antisubmarine forces consisted mainly of their destroyers, with sonar and depth charges. However, Japanese destroyer design, tactics, training, and doctrine emphasized surface nightfighting and torpedo delivery (necessary for fleet operations) over anti-submarine duties. By the time Japan finally developed a destroyer escort, which was more economical and better suited to convoy protection, it was too