Renamed and refactored numeric code.