As Chad has said,if there is nothing else alive in thetank, let it cycle and wait till the Ammonia and Nitrate levels are 0. If there is still livestock in the tank, then do a few (2-4) large (25-50%) water changes over the next 1 - 2 weeks or until the ammonia and Nitrate lacvels drop down to 0. The ammonia is the cause of the elevated Nitrate levels and the death of the snails, crabs and tang would all be enough to cause the rise in the ammonia levels, especially if it's a new tank. Next you need to determine the reason for the deaths of the snails and crabs, the tang probably got too stressed out from the ammonia levels, and then work at correcting that problem before adding anything new to the tank.