The short answers to your question are yes and yes. Now to the long answer.... I'd read some of the references above, as the long answer is far too technical and long-winded for this post. If you can get your hands on "How to Brew" by John Palmer or the Brewing Elements series book "Water", both will take you as far down the rabbit hole as you want to go without paying hundreds per hour for college-level chemistry classes.