Factors affecting pH and Kw