In process: fixing code to handle no resource.unit_of_quantity
Changes to account for no resource.unit_of_quantity.  Think I have them all.