Please read the following links. I think they will answer your questions.

Lowering Alkalinity Step-by-Step

Using Muriatic Acid Safely