Clean up code and convert ion concentrations to SI units.