the nitrates are still high. 5ppm is quite bad and i bet that is your problem. idealy you want nitrates no more than 2 ppm, the high nitrate may have removed the protective slime from the tang and a parasite may have attacked him. with the shrimps, you may want to check that you have never used any treatment that contains copper, this will kill the shrimp easy. Although bubble corals pack a powerful sting i dont think that is the problem with your tang, did his tail only hit the coral or his body aswell, also please put in your tempreture, S.G, Ammonia, Nitrite. also tell us if you have introduced any new fish.