Created the unit conversion functions.