This'd be easier if we switch `get_types_and_factors_and_units` to return the hashes