1. Check for nullptr if metadata is set. 2. Changing scaling_factor to be multiplied instead of divided (dcdb nomenclature).