clean up to the monadic style of the units-of-measure code