Move unit conversion stuff to units.py