How do you deal with the piracy - easy:
1. ban the Spanish and French deep-sea fishermen who've destroyed the stocks in the Somali Basin to the point where the Somali fishermen had no other way of making money.
2. if you really cared enough, do some proper Comprehensive Approach type stuff on Somaliland, in order to create a little bit of stability and peace in the area. This would probably include annoying the majority of the countries neighbouring Somali.
3. in a very targeted way, go and blow up bits of the pirate camps. Make them realise that piracy is not in their interest. This message will only have credibility if 1 & 2 are followed through on. If they can't earn a living doing what they used to do, why should they stop being pirates? Unless you want to execute every black person on the high seas, in the Somali Basin, in a skiff, the cost/benefit analysis of being a pirate (in the absence of any other work) will always flop on the side of being a pirate.
4. let the shipping companies deal with any other residual piracy. If they want us to do something about it, then they follow our rules - not ignore them and scream bloody murder when one of their ships is taken. Having seen low free-board, slow speed ships take the shortest route from the Bab el-Mendeb to an East African port, in order to save a little bit of time (and thus money), I have little sympathy if they are taken.