We need a module that provides unit-conversion, so that the code states what unit is in use currently and how it is converted.
I stumbled over some strange inline conversions like
mm * km^2 to
m^3 where the
km^2 where converted from
m^2 in the function call by hand.
Providing routines, we could make it clearer what is going on.