Preserving Water Quality in Distribution Systems