Why were submarines not used before World War I?

The H L Hunley was used during the Civil War, and was credited with the first sinking by a submarine. Look it up on the web for more details. Here is one site: http://soundwaves.usgs.gov/2000/09/ I believe that submarines became more practical when the internal combustion engine was refined. This corresponds with WW1 in many respects. There are probably metallurgy issues with hull design, but I don't know enough to comment on that issue. The biggest issue for submarines is the lack of air. Not only is it vital for the crew of the submarine, all of the early means of mobility required air. The Hunley was 'man powered' and the crew had to breath. Steam and gas engines depend upon burning of fuel, which requires air. Most of the early submarines were diesel powered when they where on the surface, but required battery technology to run when underwater. The electric motors and batteries powerful enough to run them for any length of time were not available prior to the turn of the century. When the above problems were solved and reliable self-powered torpedoes were introduced, the submarine was added to the arsenal of the World's navies, but they were still held out of wartime participation because these navies were controlled by admirals who saw the sub as a dangerous and dirty way to fight, which it was, and a far cry from lines of battleships dueling each other gloriously as they had done in previous centuries. Only World War 1 broke this cycle. In the Russo-Japanese War of 1905-06, both sides operated submarines obtained from the USA, but they never saw any important action. The Spanish Navy had a few subs in 1898, whereas the US Navy had none at the time, but these were not properly used either.