Added proper string manipulations for populating metadata.