Buffers for pH and metal ion control