Fix endfi for negative exponents, break S(a,b) unit conversions into separate fuctions